Added more runs, prettier formatting
This commit is contained in:
parent
7fe9e8c25f
commit
04ec083b19
19 changed files with 185 additions and 65 deletions
src
assets/ta_servants
content/data
layouts
pages/database
utils
BIN
src/assets/ta_servants/altera.png
Normal file
BIN
src/assets/ta_servants/altera.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 35 KiB |
BIN
src/assets/ta_servants/astrea.png
Normal file
BIN
src/assets/ta_servants/astrea.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 35 KiB |
BIN
src/assets/ta_servants/charlotte.png
Normal file
BIN
src/assets/ta_servants/charlotte.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 29 KiB |
BIN
src/assets/ta_servants/gong.png
Normal file
BIN
src/assets/ta_servants/gong.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 32 KiB |
BIN
src/assets/ta_servants/jalter.png
Normal file
BIN
src/assets/ta_servants/jalter.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 32 KiB |
BIN
src/assets/ta_servants/koyo.png
Normal file
BIN
src/assets/ta_servants/koyo.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 30 KiB |
BIN
src/assets/ta_servants/melt.png
Normal file
BIN
src/assets/ta_servants/melt.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 34 KiB |
|
@ -1,26 +1,82 @@
|
|||
{
|
||||
"info": {
|
||||
"title": "Cernunnos",
|
||||
"questReleaseDate": "2023-07-10",
|
||||
"shortdescription": "One of FGOs most notorious boss fights due to up to 100% special defense, strong DoT damage and powerful field effects",
|
||||
"description": "One of FGOs most notorious boss fights due to up to 100% special defense, strong DoT damage and powerful field effects - and still, the TA community prevailed and created some of the most amazing runs of all time"
|
||||
"info": {
|
||||
"title": "Cernunnos",
|
||||
"questReleaseDate": "2023-07-10",
|
||||
"shortdescription": "One of FGOs most notorious boss fights due to up to 100% special defense, strong DoT damage and powerful field effects",
|
||||
"description": "One of FGOs most notorious boss fights due to up to 100% special defense, strong DoT damage and powerful field effects - and still, the TA community prevailed and created some of the most amazing runs of all time"
|
||||
},
|
||||
"data": [
|
||||
{
|
||||
"title": "Shishou 4T (No Castoria)",
|
||||
"link": "https://www.youtube.com/watch?v=WrHudtdfivA",
|
||||
"date": "2023-07-19",
|
||||
"servant": "shishou",
|
||||
"turns": "4T",
|
||||
"runner": "Firq"
|
||||
},
|
||||
"data": [
|
||||
{
|
||||
"title": "Cernunnos 4T (No Castoria)",
|
||||
"link": "https://www.youtube.com/watch?v=WrHudtdfivA",
|
||||
"date": "2023-07-19",
|
||||
"servant": "shishou",
|
||||
"turns": "4T",
|
||||
"runner": "Firq"
|
||||
},
|
||||
{
|
||||
"title": "Cernunnos 4T (FLO)",
|
||||
"link": "https://www.youtube.com/watch?O1f-go7uJQM",
|
||||
"date": "2023-07-19",
|
||||
"servant": "shishou",
|
||||
"turns": "4T",
|
||||
"runner": "Requiem"
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"title": "Shishou 4T (FLO)",
|
||||
"link": "https://www.youtube.com/watch?v=O1f-go7uJQM",
|
||||
"date": "2023-07-19",
|
||||
"servant": "shishou",
|
||||
"turns": "4T",
|
||||
"runner": "Requiem"
|
||||
},
|
||||
{
|
||||
"title": "Jalter 4T",
|
||||
"link": "https://www.youtube.com/watch?v=VGuXstsJa6k",
|
||||
"date": "2023-07-10",
|
||||
"servant": "jalter",
|
||||
"turns": "4T",
|
||||
"runner": "Ray"
|
||||
},
|
||||
{
|
||||
"title": "Altera 4T",
|
||||
"link": "https://www.youtube.com/watch?v=BrgJT3gC6sg",
|
||||
"date": "2023-07-13",
|
||||
"servant": "altera",
|
||||
"turns": "4T",
|
||||
"runner": "Requiem"
|
||||
},
|
||||
{
|
||||
"title": "Astrea 4T (4 Slot)",
|
||||
"link": "https://www.youtube.com/watch?v=0pwUn_bickU",
|
||||
"date": "2023-07-17",
|
||||
"servant": "astrea",
|
||||
"turns": "4T",
|
||||
"runner": "Alastair Hale"
|
||||
},
|
||||
{
|
||||
"title": "Meltryllis 4T (4 Slot)",
|
||||
"link": "https://www.youtube.com/watch?v=B5uZkC40SQc",
|
||||
"date": "2023-07-21",
|
||||
"servant": "melt",
|
||||
"turns": "4T",
|
||||
"runner": "Zectry"
|
||||
},
|
||||
{
|
||||
"title": "Kijyo Koyo 4T",
|
||||
"link": "https://www.youtube.com/watch?v=hea0QSvTbkY",
|
||||
"date": "2023-07-14",
|
||||
"servant": "koyo",
|
||||
"turns": "4T",
|
||||
"runner": "MCR"
|
||||
},
|
||||
{
|
||||
"title": "Charlotte 4T",
|
||||
"link": "https://www.youtube.com/watch?v=HMD2WLNGxAk",
|
||||
"date": "2023-07-12",
|
||||
"servant": "charlotte",
|
||||
"turns": "4T",
|
||||
"runner": "Dante09"
|
||||
},
|
||||
{
|
||||
"title": "Gong 4T (4 NPs)",
|
||||
"link": "https://www.youtube.com/watch?v=qQ82YA4BeGE",
|
||||
"date": "2023-07-11",
|
||||
"servant": "gong",
|
||||
"turns": "4T",
|
||||
"runner": "BadLuck"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -9,14 +9,13 @@ export interface Props {
|
|||
}
|
||||
|
||||
const { datafile } = Astro.props
|
||||
const fulldata = import.meta.glob<{ default: any }>(
|
||||
`../content/data/*.json`
|
||||
)
|
||||
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
|
||||
filecontent.data.sort((a, b) => Date.parse(b.date) - Date.parse(a.date))
|
||||
---
|
||||
|
||||
<Layout
|
||||
|
|
|
@ -1,20 +1,14 @@
|
|||
---
|
||||
import TaShowcaseLayout from '../../layouts/taShowcaseLayout.astro'
|
||||
import {findSlug} from '../../utils/slugTools'
|
||||
import { findSlug } from '../../utils/slugTools'
|
||||
|
||||
export function getStaticPaths() {
|
||||
const fulldata = import.meta.glob<{ default: any }>(
|
||||
`../../content/data/*.json`
|
||||
)
|
||||
const keylist = Object.keys(fulldata).map(
|
||||
(item) => findSlug(item)
|
||||
)
|
||||
const keylist = Object.keys(fulldata).map((item) => findSlug(item)!)
|
||||
|
||||
const paths: { params: { slug: string } }[] = []
|
||||
for (const key of keylist) {
|
||||
paths.push({ params: { slug: key! } })
|
||||
}
|
||||
return paths
|
||||
return keylist.map((slug) => ({ params: { slug } }))
|
||||
}
|
||||
|
||||
const { slug } = Astro.params
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
export function findSlug(filepath: string) {
|
||||
return filepath.match(/(?:.*[\\/])(.+)(?:\.json)/)?.[1]
|
||||
}
|
||||
return filepath.match(/(?:.*[\\/])(.+)(?:\.json)/)?.[1]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue