diff --git a/src/components/questListing.astro b/src/components/questListing.astro
index b6d24b6..00864db 100644
--- a/src/components/questListing.astro
+++ b/src/components/questListing.astro
@@ -1,5 +1,6 @@
---
export interface Props {
+ baseurl: string
slug: string
title: string
releaseDate: Date
@@ -12,8 +13,8 @@ const options_date: Intl.DateTimeFormatOptions = {
day: '2-digit',
}
-const { shortdescription, releaseDate, slug, title } = Astro.props
-const url = `/database/${slug}`
+const { shortdescription, releaseDate, slug, title, baseurl } = Astro.props
+const url = `/${baseurl}/${slug}`
const render_date = releaseDate.toLocaleDateString(
'en-GB',
options_date
diff --git a/src/content/_template.json b/src/content/.template.json
similarity index 100%
rename from src/content/_template.json
rename to src/content/.template.json
diff --git a/src/content/config.ts b/src/content/config.ts
index 713834d..c464a6b 100644
--- a/src/content/config.ts
+++ b/src/content/config.ts
@@ -36,4 +36,5 @@ const taData = defineCollection({
export const collections = {
taInfoData: taData,
+ teslafest: taData,
}
diff --git a/src/content/teslafest/gc-summer-4.json b/src/content/teslafest/gc-summer-4.json
new file mode 100644
index 0000000..721c865
--- /dev/null
+++ b/src/content/teslafest/gc-summer-4.json
@@ -0,0 +1,24 @@
+{
+ "info": {
+ "title": "Giga Coil - Western Arts Ninja Style",
+ "releaseDate": "2024-03-28",
+ "shortdescription": "Fuuma Quest",
+ "releaseNumber": 1
+ },
+ "quests": [
+ {
+ "questTitle": "Giga Coil - Western Arts Ninja Style",
+ "description": "aaa",
+ "data": [
+ {
+ "title": "Skadi 3T",
+ "link": "https://www.youtube.com/watch?v=VMVus__ZYXE",
+ "date": "2024-03-30",
+ "servant": "skadi",
+ "turns": "3T",
+ "runner": "Firq"
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index 4b916e3..b14d9fd 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -5,6 +5,7 @@ import navdata from '../../static/data/_navdata.json'
import embed from '../assets/embed.png'
import home from 'iconoir/icons/home.svg'
import database from 'iconoir/icons/database.svg'
+import databasestar from 'iconoir/icons/database-star.svg'
import mail from 'iconoir/icons/mail.svg'
import type { IconsLookup } from '../types/generic'
@@ -17,6 +18,7 @@ export interface Props {
const icons: IconsLookup = {
home: home,
database: database,
+ databasestar: databasestar,
about: mail
}
diff --git a/src/layouts/taShowcaseLayout.astro b/src/layouts/taShowcaseLayout.astro
index 23210da..2791d22 100644
--- a/src/layouts/taShowcaseLayout.astro
+++ b/src/layouts/taShowcaseLayout.astro
@@ -5,11 +5,13 @@ import TACard from '../components/taCard.astro'
import { plsLoadTAEntry } from '../utils/tools'
export interface Props {
+ collection: "teslafest" | "taInfoData"
collectionKey: string
+ baseurl: "database" | "teslafest"
}
-const { collectionKey } = Astro.props
-const taEntry = await plsLoadTAEntry(collectionKey)
+const { collection, collectionKey, baseurl } = Astro.props
+const taEntry = await plsLoadTAEntry(collectionKey, collection)
const pagetitle = `${taEntry.info.title} - FGO TA`
---
@@ -18,7 +20,7 @@ const pagetitle = `${taEntry.info.title} - FGO TA`
currentpage="database-entry"
descriptionOverride={taEntry.info.shortdescription}
>
- << Back to database
+ << Back to database
{
taEntry.quests.map((item) => (
diff --git a/src/pages/database/[slug].astro b/src/pages/database/[slug].astro
index d48fbd1..94bd6f2 100644
--- a/src/pages/database/[slug].astro
+++ b/src/pages/database/[slug].astro
@@ -10,4 +10,4 @@ export async function getStaticPaths() {
const { slug } = Astro.params
---
-
+
diff --git a/src/pages/database/index.astro b/src/pages/database/index.astro
index 07de718..303a2d0 100644
--- a/src/pages/database/index.astro
+++ b/src/pages/database/index.astro
@@ -19,7 +19,7 @@ fulldata.sort(
descriptionOverride={description}
>
- {fulldata.map((quest) => )}
+ {fulldata.map((quest) => )}
diff --git a/src/pages/teslafest/[slug].astro b/src/pages/teslafest/[slug].astro
new file mode 100644
index 0000000..efc33a1
--- /dev/null
+++ b/src/pages/teslafest/[slug].astro
@@ -0,0 +1,13 @@
+---
+import { getCollection } from 'astro:content';
+import TaShowcaseLayout from '../../layouts/taShowcaseLayout.astro'
+
+export async function getStaticPaths() {
+ const fulldata = (await getCollection('teslafest')).map((data) => data.id)
+ return fulldata.map((slug) => ({ params: { slug } }))
+}
+
+const { slug } = Astro.params
+---
+
+
diff --git a/src/pages/teslafest/index.astro b/src/pages/teslafest/index.astro
new file mode 100644
index 0000000..8416666
--- /dev/null
+++ b/src/pages/teslafest/index.astro
@@ -0,0 +1,26 @@
+---
+import { getCollection } from 'astro:content';
+import Layout from '../../layouts/Layout.astro'
+import QuestListing from '../../components/questListing.astro'
+import DatabaseSection from '../../layouts/databaseSection.astro'
+
+const description = 'NA Teslafest'
+const fulldata = await getCollection('teslafest')
+
+fulldata.sort(
+ (a, b) => b.data.info.releaseDate.valueOf() - a.data.info.releaseDate.valueOf() || b.data.info.releaseNumber - a.data.info.releaseNumber
+)
+
+---
+
+
+
+ {fulldata.map((quest) => )}
+
+
+
+
diff --git a/src/utils/tools.ts b/src/utils/tools.ts
index 9cb727c..6d497ed 100644
--- a/src/utils/tools.ts
+++ b/src/utils/tools.ts
@@ -7,8 +7,8 @@ export function plsLoadImage(record: ImportRecord, path: string) {
return loadedImage
}
-export async function plsLoadTAEntry(key: string) {
- const filecontent = (await getEntry('taInfoData', key))?.data
+export async function plsLoadTAEntry(key: string, file: "taInfoData" | "teslafest" = 'taInfoData') {
+ const filecontent = (await getEntry(file, key))?.data
if (!filecontent) throw new Error(`Datafile was not found for key ${key}`)
return filecontent
}
diff --git a/static/data/_navdata.json b/static/data/_navdata.json
index ea9e90c..68082cd 100644
--- a/static/data/_navdata.json
+++ b/static/data/_navdata.json
@@ -8,5 +8,10 @@
"link": "/database",
"text": "TA Database",
"icon": "database"
+ },
+ {
+ "link": "/teslafest",
+ "text": "Teslafest",
+ "icon": "databasestar"
}
]