Initial commit

This commit is contained in:
Bad Manners 2024-03-20 00:56:57 -03:00
commit 09a1919d36
152 changed files with 22845 additions and 0 deletions

View 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>}

View 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 &copy; <UserComponent user={user} />
</li>
)}
</ul>
)}
</section>
}

View 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>

View file

@ -0,0 +1,5 @@
---
---
<div class="prose prose-story max-w-none dark:prose-invert">
<slot />
</div>

View 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]}