diff --git a/.forgejo/workflows/linting.yml b/.forgejo/workflows/linting.yml index b759eae..4e921f8 100644 --- a/.forgejo/workflows/linting.yml +++ b/.forgejo/workflows/linting.yml @@ -1,7 +1,7 @@ on: push: branches: - - "**" + - '**' jobs: checking: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b9661ca..b4fafcb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,7 +66,6 @@ deploy-site: - ssh $DEPLOY_USER@$DEPLOY_HOST 'PATH="$HOME/.local/bin:$PATH"; cd fgo-ta_com; find public -maxdepth 1 -printf "%p\n"; screen -S fgo-ta_com-public -dm serve public/ -p 9200' - echo "Website is up on https://fgo-ta.com" - redeploy-site: stage: scripts when: manual diff --git a/.prettierrc b/.prettierrc index fbe0e55..fa51da2 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,6 +1,6 @@ { - "trailingComma": "es5", - "tabWidth": 2, - "semi": false, - "singleQuote": true -} \ No newline at end of file + "trailingComma": "es5", + "tabWidth": 2, + "semi": false, + "singleQuote": true +} diff --git a/astro.config.mjs b/astro.config.mjs index 6babea9..12b442c 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,5 +1,5 @@ -import { defineConfig } from 'astro/config'; -import sitemap from "@astrojs/sitemap"; +import { defineConfig } from 'astro/config' +import sitemap from '@astrojs/sitemap' export default defineConfig({ sitemap: true, @@ -7,5 +7,5 @@ export default defineConfig({ outDir: 'dist', publicDir: 'static', site: 'https://fgo-ta.com/', - integrations: [sitemap()] -}); \ No newline at end of file + integrations: [sitemap()], +}) diff --git a/package-lock.json b/package-lock.json index 0c1799a..e0c42b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "fgo-ta-com-website", - "version": "0.1.5", + "version": "0.1.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "fgo-ta-com-website", - "version": "0.1.5", + "version": "0.1.7", "dependencies": { "@astro-community/astro-embed-youtube": "^0.4.3", "@astrojs/check": "^0.3.4", @@ -16,6 +16,10 @@ "iconoir": "^7.3.0", "postcss-preset-env": "^9.3.0", "typescript": "^5.3.3" + }, + "devDependencies": { + "prettier": "^3.1.1", + "prettier-plugin-astro": "^0.12.3" } }, "node_modules/@ampproject/remapping": { @@ -6273,6 +6277,41 @@ "node": ">=8.15" } }, + "node_modules/prettier": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz", + "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", + "devOptional": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-astro": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/prettier-plugin-astro/-/prettier-plugin-astro-0.12.3.tgz", + "integrity": "sha512-GthUSu3zCvmtVyqlArosez0xE08vSJ0R1sWurxIWpABaCkNGYFANoUdFkqmIo54EV2uPLGcVJzOucWvCjPBWvg==", + "devOptional": true, + "dependencies": { + "@astrojs/compiler": "^1.5.5", + "prettier": "^3.0.0", + "sass-formatter": "^0.7.6" + }, + "engines": { + "node": "^14.15.0 || >=16.0.0" + } + }, + "node_modules/prettier-plugin-astro/node_modules/@astrojs/compiler": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-1.8.2.tgz", + "integrity": "sha512-o/ObKgtMzl8SlpIdzaxFnt7SATKPxu4oIP/1NL+HDJRzxfJcAkOTAb/ZKMRyULbz4q+1t2/DAebs2Z1QairkZw==", + "devOptional": true + }, "node_modules/prismjs": { "version": "1.29.0", "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", @@ -7050,6 +7089,12 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/s.color": { + "version": "0.0.15", + "resolved": "https://registry.npmjs.org/s.color/-/s.color-0.0.15.tgz", + "integrity": "sha512-AUNrbEUHeKY8XsYr/DYpl+qk5+aM+DChopnWOPEzn8YKzOhv4l2zH6LzZms3tOZP3wwdOyc0RmTciyi46HLIuA==", + "devOptional": true + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -7074,6 +7119,15 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "node_modules/sass-formatter": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/sass-formatter/-/sass-formatter-0.7.8.tgz", + "integrity": "sha512-7fI2a8THglflhhYis7k06eUf92VQuJoXzEs2KRP0r1bluFxKFvLx0Ns7c478oYGM0fPfrr846ZRWVi2MAgHt9Q==", + "devOptional": true, + "dependencies": { + "suf-log": "^2.5.3" + } + }, "node_modules/sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", @@ -7418,6 +7472,15 @@ "node": ">=0.10.0" } }, + "node_modules/suf-log": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/suf-log/-/suf-log-2.5.3.tgz", + "integrity": "sha512-KvC8OPjzdNOe+xQ4XWJV2whQA0aM1kGVczMQ8+dStAO6KfEB140JEVQ9dE76ONZ0/Ylf67ni4tILPJB41U0eow==", + "devOptional": true, + "dependencies": { + "s.color": "0.0.15" + } + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", diff --git a/package.json b/package.json index 8483da5..3b16573 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "fgo-ta-com-website", "type": "module", - "version": "0.1.6", + "version": "0.1.7", "scripts": { "dev": "astro dev", "start": "astro dev", @@ -22,5 +22,9 @@ "browserslist": [ "last 2 versions", ">0.5% and not dead" - ] + ], + "devDependencies": { + "prettier": "^3.1.1", + "prettier-plugin-astro": "^0.12.3" + } } diff --git a/serve.json b/serve.json index 3eba146..eb10f13 100644 --- a/serve.json +++ b/serve.json @@ -4,17 +4,22 @@ "etag": true, "headers": [ { - "source" : "**/*.@(jpg|jpeg|gif|png|webp|svg)", - "headers" : [{ - "key" : "Cache-Control", - "value" : "no-cache" - }] - }, { - "source" : "404.html", - "headers" : [{ - "key" : "Cache-Control", - "value" : "no-cache" - }] + "source": "**/*.@(jpg|jpeg|gif|png|webp|svg)", + "headers": [ + { + "key": "Cache-Control", + "value": "no-cache" + } + ] + }, + { + "source": "404.html", + "headers": [ + { + "key": "Cache-Control", + "value": "no-cache" + } + ] } ] } diff --git a/src/assets/ta_servants/altera.png b/src/assets/ta_servants/altera.png new file mode 100644 index 0000000..a9295f5 Binary files /dev/null and b/src/assets/ta_servants/altera.png differ diff --git a/src/assets/ta_servants/astrea.png b/src/assets/ta_servants/astrea.png new file mode 100644 index 0000000..113f1f7 Binary files /dev/null and b/src/assets/ta_servants/astrea.png differ diff --git a/src/assets/ta_servants/charlotte.png b/src/assets/ta_servants/charlotte.png new file mode 100644 index 0000000..f827cb1 Binary files /dev/null and b/src/assets/ta_servants/charlotte.png differ diff --git a/src/assets/ta_servants/gong.png b/src/assets/ta_servants/gong.png new file mode 100644 index 0000000..332f02d Binary files /dev/null and b/src/assets/ta_servants/gong.png differ diff --git a/src/assets/ta_servants/jalter.png b/src/assets/ta_servants/jalter.png new file mode 100644 index 0000000..3e16834 Binary files /dev/null and b/src/assets/ta_servants/jalter.png differ diff --git a/src/assets/ta_servants/koyo.png b/src/assets/ta_servants/koyo.png new file mode 100644 index 0000000..8414ea7 Binary files /dev/null and b/src/assets/ta_servants/koyo.png differ diff --git a/src/assets/ta_servants/melt.png b/src/assets/ta_servants/melt.png new file mode 100644 index 0000000..874b113 Binary files /dev/null and b/src/assets/ta_servants/melt.png differ diff --git a/src/content/data/cernunnos.json b/src/content/data/cernunnos.json index 4e0ce23..d70790a 100644 --- a/src/content/data/cernunnos.json +++ b/src/content/data/cernunnos.json @@ -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" - } - ] -} \ No newline at end of file + { + "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" + } + ] +} diff --git a/src/layouts/taShowcaseLayout.astro b/src/layouts/taShowcaseLayout.astro index f3b6553..e028ea3 100644 --- a/src/layouts/taShowcaseLayout.astro +++ b/src/layouts/taShowcaseLayout.astro @@ -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)) --- ( `../../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 diff --git a/src/utils/slugTools.ts b/src/utils/slugTools.ts index c4f1a15..d81acd4 100644 --- a/src/utils/slugTools.ts +++ b/src/utils/slugTools.ts @@ -1,3 +1,3 @@ export function findSlug(filepath: string) { - return filepath.match(/(?:.*[\\/])(.+)(?:\.json)/)?.[1] -} \ No newline at end of file + return filepath.match(/(?:.*[\\/])(.+)(?:\.json)/)?.[1] +} diff --git a/tsconfig.json b/tsconfig.json index 77da9dd..bcbf8b5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,3 +1,3 @@ { "extends": "astro/tsconfigs/strict" -} \ No newline at end of file +}