fgo-ta-com-website/src/layouts/taShowcaseLayout.astro

51 lines
1.1 KiB
Text
Raw Normal View History

---
import Layout from '../layouts/Layout.astro'
import BaseSection from '../layouts/baseSection.astro'
import TACard from '../components/taCard.astro'
2024-01-09 13:30:28 +00:00
import { plsLoadTAEntry } from '../utils/tools'
export interface Props {
datafile: string
}
const { datafile } = Astro.props
2024-01-09 13:30:28 +00:00
const taEntry = await plsLoadTAEntry(datafile)
const pagetitle = `${taEntry.info.title} - FGO TA`
taEntry.data.sort((a, b) => Date.parse(b.date) - Date.parse(a.date))
---
<Layout
title={pagetitle}
currentpage="database-entry"
2024-01-09 13:30:28 +00:00
descriptionOverride={taEntry.info.shortdescription}
>
<a href="/database">&lt&lt Back to database</a>
2024-01-09 13:30:28 +00:00
<BaseSection
title={taEntry.info.title}
description={taEntry.info.description}
>
{taEntry.data.map((item) => <TACard {...item} />)}
</BaseSection>
<div class="placeholder"></div>
</Layout>
<style>
.placeholder {
visibility: hidden;
width: 100%;
height: 2.5rem;
}
a {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
text-align: center;
color: white;
background-color: var(--c-gray);
padding: 0.5rem 0px;
text-decoration: none;
}
</style>