Initial commit
This commit is contained in:
commit
09a1919d36
152 changed files with 22845 additions and 0 deletions
37
src/components/Authors.astro
Normal file
37
src/components/Authors.astro
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
import { type Lang, type User } from '../content/config'
|
||||
import UserComponent from './UserComponent.astro'
|
||||
|
||||
type Props = {
|
||||
authors: User | User[]
|
||||
lang: Lang
|
||||
}
|
||||
|
||||
const { authors, lang } = Astro.props
|
||||
const authorsArray = [authors].flat()
|
||||
---
|
||||
|
||||
{authorsArray.length > 0 && <p class="font-light">
|
||||
{lang === 'eng' && (
|
||||
(authorsArray.length > 2) ?
|
||||
<span>
|
||||
by {authorsArray.slice(0, authorsArray.length - 1).map(author => (<UserComponent user={author} /><span>, </span>))}and <UserComponent user={authorsArray[authorsArray.length - 1]} />
|
||||
</span> :
|
||||
(authorsArray.length > 1) ?
|
||||
<span>
|
||||
by <UserComponent user={authorsArray[0]} /> and <UserComponent user={authorsArray[1]} />
|
||||
</span> :
|
||||
<span>
|
||||
by <UserComponent user={authorsArray[0]} />
|
||||
</span>
|
||||
)}
|
||||
{lang === 'tok' && (
|
||||
(authorsArray.length > 1) ?
|
||||
<span>
|
||||
lipu nu li tan ni: {authorsArray.slice(0, authorsArray.length - 1).map(author => <UserComponent user={author} /><span> en </span>)}<UserComponent user={authorsArray[authorsArray.length - 1]} />
|
||||
</span> :
|
||||
<span>
|
||||
lipu nu li tan <UserComponent user={authorsArray[0]} />
|
||||
</span>
|
||||
)}
|
||||
</p>}
|
||||
25
src/components/CopyrightedCharacters.astro
Normal file
25
src/components/CopyrightedCharacters.astro
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
import { type Lang, type User } from '../content/config'
|
||||
import UserComponent from './UserComponent.astro'
|
||||
|
||||
type Props = {
|
||||
copyrightedCharacters?: Record<string, User>
|
||||
lang: Lang
|
||||
}
|
||||
|
||||
const { copyrightedCharacters, lang } = Astro.props
|
||||
---
|
||||
|
||||
{copyrightedCharacters &&
|
||||
<section id="copyrighted-characters">
|
||||
{lang === 'eng' && (
|
||||
<ul>
|
||||
{Object.entries(copyrightedCharacters).map(([character, user]) =>
|
||||
<li>
|
||||
{character} is © <UserComponent user={user} />
|
||||
</li>
|
||||
)}
|
||||
</ul>
|
||||
)}
|
||||
</section>
|
||||
}
|
||||
11
src/components/Navigation.astro
Normal file
11
src/components/Navigation.astro
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
---
|
||||
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a class="hover:underline focus:underline hover:text-green-800 focus:text-green-800 dark:hover:text-bm-300 dark:focus:text-bm-300" href="/">Home</a></li>
|
||||
<li><a class="hover:underline focus:underline hover:text-green-800 focus:text-green-800 dark:hover:text-bm-300 dark:focus:text-bm-300" href="/stories">Stories</a></li>
|
||||
<li><a class="hover:underline focus:underline hover:text-green-800 focus:text-green-800 dark:hover:text-bm-300 dark:focus:text-bm-300" href="/games">Games</a></li>
|
||||
<li><a class="hover:underline focus:underline hover:text-green-800 focus:text-green-800 dark:hover:text-bm-300 dark:focus:text-bm-300" href="/tags">Tags</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
5
src/components/Prose.astro
Normal file
5
src/components/Prose.astro
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
---
|
||||
<div class="prose prose-story max-w-none dark:prose-invert">
|
||||
<slot />
|
||||
</div>
|
||||
11
src/components/UserComponent.astro
Normal file
11
src/components/UserComponent.astro
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
import { type User } from '../content/config'
|
||||
|
||||
type Props = {
|
||||
user: User
|
||||
}
|
||||
|
||||
const { user } = Astro.props
|
||||
---
|
||||
|
||||
{typeof user === 'string' ? <span>{user}</span> : Object.entries(user).map(([k, v]) => <a href={v} class="text-link underline" target="_blank"><span>{k}</span></a>)[0]}
|
||||
Loading…
Add table
Add a link
Reference in a new issue