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

53 lines
1.2 KiB
Text
Raw Normal View History

---
import Layout from '../layouts/Layout.astro'
import BaseSection from '../layouts/baseSection.astro'
import TACard from '../components/taCard.astro'
import type { filedata } from '../types/ta'
export interface Props {
datafile: string
}
const { datafile } = Astro.props
const fulldata = import.meta.glob<{ default: any }>(
`../content/data/*.json`
)
const filecontent: filedata = (
await fulldata[`../content/data/${datafile}.json`]()
)['default']
const title = filecontent.info.title
---
<Layout
title={title}
currentpage="database-entry"
descriptionOverride={filecontent.info.shortdescription}
>
<a href="/database">&lt&lt Back to database</a>
<BaseSection title={title} description={filecontent.info.description}>
{filecontent.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>