Redesign Part 2
This commit is contained in:
parent
f1bb9b80ca
commit
9c2c7f7818
18 changed files with 332 additions and 28 deletions
src/pages
|
@ -3,7 +3,7 @@ import { getCollection } from 'astro:content'
|
|||
import TaShowcaseLayout from '../../layouts/taShowcaseLayout.astro'
|
||||
import Layout from '../../layouts/Layout.astro'
|
||||
import DatabaseSection from '../../layouts/databaseSection.astro'
|
||||
import QuestListing from '../../components/questListing.astro'
|
||||
import QuestListing from '../../components/listings/questListingCard.astro'
|
||||
import SmallTitle from '../../components/smallTitle.astro'
|
||||
|
||||
interface store {
|
||||
|
|
|
@ -1,24 +1,27 @@
|
|||
---
|
||||
import { getCollection } from 'astro:content';
|
||||
import { getCollection } from 'astro:content'
|
||||
import Layout from '../../layouts/Layout.astro'
|
||||
import QuestListing from '../../components/questListing.astro'
|
||||
import QuestListing from '../../components/listings/questListingLine.astro'
|
||||
import EventListing from '../../components/listings/eventListingLine.astro'
|
||||
import DatabaseSection from '../../layouts/databaseSection.astro'
|
||||
import Title from '../../components/title.astro';
|
||||
import Title from '../../components/title.astro'
|
||||
|
||||
const description = 'FGO NA TA Database'
|
||||
const fulldata = await getCollection('taInfoData')
|
||||
const fulldata = await getCollection('taInfoData')
|
||||
const groups = await getCollection('groups')
|
||||
const changes = await getCollection('changes')
|
||||
let combined = fulldata
|
||||
|
||||
for (const group of groups) {
|
||||
combined = combined.filter(data => !data.id.startsWith(group.id))
|
||||
combined = combined.filter((data) => !data.id.startsWith(group.id))
|
||||
}
|
||||
combined = combined.concat(groups as any)
|
||||
combined = combined.concat(groups as any).concat(changes as any)
|
||||
|
||||
combined.sort(
|
||||
(a, b) => b.data.info.releaseDate.valueOf() - a.data.info.releaseDate.valueOf() || b.data.info.releaseNumber - a.data.info.releaseNumber
|
||||
(a, b) =>
|
||||
b.data.info.releaseDate.valueOf() - a.data.info.releaseDate.valueOf() ||
|
||||
b.data.info.releaseNumber - a.data.info.releaseNumber
|
||||
)
|
||||
|
||||
---
|
||||
|
||||
<Layout
|
||||
|
@ -26,9 +29,31 @@ combined.sort(
|
|||
currentpage="database"
|
||||
descriptionOverride={description}
|
||||
>
|
||||
<Title maintext='TA DATA­BASE' subtext='A mostly up-to-date list of NA TA runs' fadeout={true}/>
|
||||
<DatabaseSection title="NA Runs" titlehidden={true}>
|
||||
{combined.map((quest) => <QuestListing { ...{...quest.data.info, slug: quest.id} } baseurl="database" />)}
|
||||
<Title
|
||||
maintext="TA DATABASE"
|
||||
subtext="A mostly up-to-date list of NA TA runs"
|
||||
fadeout={true}
|
||||
/>
|
||||
<DatabaseSection title="NA Runs" titlehidden={true} displayLine={true}>
|
||||
{
|
||||
combined.map((quest) => {
|
||||
if (['quest', 'group'].includes(quest.data.info.type)) {
|
||||
return (
|
||||
<QuestListing
|
||||
{...{ ...quest.data.info, slug: quest.id }}
|
||||
baseurl="database"
|
||||
/>
|
||||
)
|
||||
} else {
|
||||
return (
|
||||
<EventListing
|
||||
{...{ ...quest.data.info, slug: quest.id }}
|
||||
link={(quest.data as any).link}
|
||||
/>
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
</DatabaseSection>
|
||||
</Layout>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
import { getCollection } from 'astro:content';
|
||||
import Layout from '../../layouts/Layout.astro'
|
||||
import QuestListing from '../../components/questListing.astro'
|
||||
import QuestListing from '../../components/listings/questListingCard.astro'
|
||||
import DatabaseSection from '../../layouts/databaseSection.astro'
|
||||
import GenericHero from '../../components/genericHero.astro';
|
||||
import Title from '../../components/title.astro';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue