starshard/peafowl
Template
1
Fork 0
mirror of https://github.com/starshardstudio/peafowl.git synced 2024-11-22 04:54:19 +00:00
peafowl/_includes/list-anime.tsx

54 lines
1.6 KiB
TypeScript
Raw Normal View History

2024-11-05 12:39:33 +00:00
import { AnimeTable } from "../_components/AnimeTable.tsx";
import { AnimeData } from "../_utils/anime.ts";
export const layout = "base.tsx";
export const url = "/anime.html";
export default function (data: Lume.Data, helpers: Lume.Helpers) {
const introSection = data.content
? (
<section id={"list-anime-section-intro"}>
{data.children}
</section>
)
: null;
const anime: AnimeData[] = data.search.pages("anime");
const animeSection = (
<section id={"list-anime-section-games"}>
<h2>
Anime list
<small>
<a href={helpers.url("/anime/feed.rss")}>
<i className={"fa-sharp fa-solid fa-rss"} /> Feed
</a>
</small>
<small>
<a href={helpers.url("/anime/index.json")}>
<i className={"fa-sharp fa-solid fa-brackets-curly"} />
{" "}
2024-11-05 17:05:17 +00:00
Raw
2024-11-05 12:39:33 +00:00
</a>
</small>
</h2>
<div>
<AnimeTable
id={"list-anime-table"}
anime={anime}
priority={"mixed"}
/>
</div>
</section>
);
return (
<main id={"list-anime-main"}>
{introSection}
{animeSection}
<script src={"/_static/scripting/sort.js"} />
<script src={"/_static/scripting/installSortOnLoad.js"} />
</main>
);
}