You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
739 B
28 lines
739 B
---
|
|
import { getCollection } from "astro:content";
|
|
|
|
const chapters = (await getCollection("fanfic")).filter(
|
|
(entry) =>
|
|
(!entry.data.wip || process.env.NODE_ENV === "development") &&
|
|
entry.data.parent === Astro.props.name
|
|
);
|
|
---
|
|
|
|
<div>
|
|
{
|
|
chapters.map((chapter, i) => (
|
|
<a href={chapter.slug.split("/")[1]}>
|
|
<div
|
|
class="main-content"
|
|
style="margin-bottom: 10px; font-size: 125%;"
|
|
>
|
|
<b>
|
|
Chapter {i + 1} - {chapter.data.title}
|
|
</b>
|
|
<i>{chapter.data.pubDate?.toDateString()}</i>
|
|
</div>
|
|
</a>
|
|
))
|
|
}
|
|
</div>
|