diff --git a/astro.config.mjs b/astro.config.mjs index 09396a9..37c3a0b 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,5 +1,6 @@ -import { defineConfig } from 'astro/config' -import sitemap from '@astrojs/sitemap' +import { defineConfig } from 'astro/config'; +import sitemap from '@astrojs/sitemap'; +import metaTags from "astro-meta-tags"; export default defineConfig({ sitemap: true, @@ -7,6 +8,6 @@ export default defineConfig({ outDir: 'dist', publicDir: 'static', site: 'https://fgo-ta.com/', - integrations: [sitemap()], + integrations: [sitemap(), metaTags()], trailingSlash: "never" -}) +}); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 844f1e5..858b0e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,6 +12,7 @@ "@astrojs/check": "^0.3.4", "@astrojs/sitemap": "^3.0.3", "astro": "^4.0.7", + "astro-meta-tags": "^0.1.3", "autoprefixer": "^10.4.16", "iconoir": "^7.3.0", "postcss-preset-env": "^9.3.0", @@ -2366,6 +2367,14 @@ "sharp": "^0.32.5" } }, + "node_modules/astro-meta-tags": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/astro-meta-tags/-/astro-meta-tags-0.1.3.tgz", + "integrity": "sha512-hQ2JK9deBBPI94umeQxnj2hrs1hJ9pJcnqK8XjyZNnBq6pHefR5dpRXTzHDoxr1V4TjIQho0P9F2NG7JdaQhHA==", + "peerDependencies": { + "astro": "^4.0.0" + } + }, "node_modules/astro/node_modules/@types/node": { "version": "20.10.5", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", diff --git a/package.json b/package.json index 971ab2e..07aa892 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "fgo-ta-com-website", "type": "module", - "version": "0.1.13", + "version": "0.1.14", "scripts": { "dev": "astro dev", "start": "astro dev", @@ -14,6 +14,7 @@ "@astrojs/check": "^0.3.4", "@astrojs/sitemap": "^3.0.3", "astro": "^4.0.7", + "astro-meta-tags": "^0.1.3", "autoprefixer": "^10.4.16", "iconoir": "^7.3.0", "postcss-preset-env": "^9.3.0", diff --git a/postcss.config.cjs b/postcss.config.cjs new file mode 100644 index 0000000..5fd8746 --- /dev/null +++ b/postcss.config.cjs @@ -0,0 +1,13 @@ +module.exports = { + plugins: { + "postcss-preset-env": { + autoprefixer: { flexbox: "no-2009" }, + stage: 2, + features: { + "custom-properties": false, + "custom-media-queries": true, + "nesting-rules": true + } + } + } +}; \ No newline at end of file diff --git a/src/content/data/cernunnos.json b/src/content/data/cernunnos.json index 2ee4f41..0dd065f 100644 --- a/src/content/data/cernunnos.json +++ b/src/content/data/cernunnos.json @@ -86,6 +86,14 @@ "servant": "shishou", "turns": "4T", "runner": "KOG" + }, + { + "title": "Amakusa 4T", + "link": "https://www.youtube.com/watch?v=hRu3EskLExE", + "date": "2023-07-27", + "servant": "amakusa", + "turns": "4T", + "runner": "Yier" } ] } diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 4e871ff..4b916e3 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 mail from 'iconoir/icons/mail.svg' import type { IconsLookup } from '../types/generic' export interface Props { @@ -16,6 +17,7 @@ export interface Props { const icons: IconsLookup = { home: home, database: database, + about: mail } const { descriptionOverride, currentpage, title } = Astro.props diff --git a/src/layouts/baseSection.astro b/src/layouts/baseSection.astro index 40e3585..2bf0cad 100644 --- a/src/layouts/baseSection.astro +++ b/src/layouts/baseSection.astro @@ -21,53 +21,41 @@ const { title, description } = Astro.props flex-direction: column; justify-content: center; text-align: center; - } - div > div { - row-gap: 1em; - column-gap: 1em; - justify-content: center; - align-self: center; - display: flex; - flex-flow: row wrap; - padding-top: 1em; - position: relative; - } - div h1 { - font-size: 40px; - line-height: 48px; - letter-spacing: -1px; - color: white; - margin-top: 2rem; - margin-bottom: 0px; - margin-left: auto; - margin-right: auto; - padding: 0.25rem 1.5rem; - border-radius: 0.5rem; - max-width: max-content; - background-color: var(--c-darkgray); - padding-bottom: 0.5rem; - } - div h2 { - color: white; - font-size: 16px; - font-weight: 600; - max-width: 75; - margin: 1rem; - line-height: 20px; - text-align: center; - } - - @supports (text-align-last: center) { - div h2 { - text-align: justify; - text-align-last: center; - } - } - @media (min-width: 512px) { div { - row-gap: 1.5em; - column-gap: 1.5em; + gap: 1em; + align-self: center; + flex-flow: row wrap; + padding-top: 1em; + position: relative; + } + + h1 { + font-size: 40px; + line-height: 48px; + letter-spacing: -1px; + color: white; + margin: 2rem auto 0px auto; + padding: 0.25rem 1.5rem; + border-radius: 0.5rem; + max-width: max-content; + background-color: var(--c-darkgray); + padding-bottom: 0.5rem; + } + + h2 { + color: white; + font-size: 16px; + font-weight: 600; + max-width: 75; + margin: 1rem; + line-height: 20px; + text-align: center; + + @supports (text-align-last: center) { + text-align: justify; + text-align-last: center; + } } } @@ -75,6 +63,12 @@ const { title, description } = Astro.props margin-left: 1rem; margin-right: 1rem; } + @media (min-width: 512px) { + div { + row-gap: 1.5em; + column-gap: 1.5em; + } + } @media (min-width: 1000px) { .base { @@ -88,19 +82,18 @@ const { title, description } = Astro.props margin-left: 10%; margin-right: 10%; } - div h1 { - margin-left: unset; - margin-right: unset; - } - div h2 { - text-align: left; + div { + h1 { + margin-left: unset; + margin-right: unset; + } + h2 { + text-align: left; + @supports (text-align-last: center) { + text-align-last: unset; + } + } } - - @supports (text-align-last: center) { - div h2 { - text-align-last: initial; - } - } } diff --git a/src/layouts/taShowcaseLayout.astro b/src/layouts/taShowcaseLayout.astro index 2a67ed7..d213cdd 100644 --- a/src/layouts/taShowcaseLayout.astro +++ b/src/layouts/taShowcaseLayout.astro @@ -10,9 +10,9 @@ export interface Props { } const { datafile } = Astro.props -const fulldata = import.meta.glob(`../content/data/*.json`) +const fulldata = import.meta.glob(`/src/content/data/*.json`) const filecontent: FileData = ( - await fulldata[`../content/data/${datafile}.json`]() + await fulldata[`/src/content/data/${datafile}.json`]() )['default'] const pagetitle = `${filecontent.info.title} - FGO TA` diff --git a/src/pages/database/[slug].astro b/src/pages/database/[slug].astro index c6805e5..1d7b432 100644 --- a/src/pages/database/[slug].astro +++ b/src/pages/database/[slug].astro @@ -5,7 +5,7 @@ import { findSlug } from '../../utils/tools' export function getStaticPaths() { const fulldata = import.meta.glob( - `../../content/data/*.json` + `/src/content/data/*.json` ) const keylist = Object.keys(fulldata).map((item) => findSlug(item)!) diff --git a/src/pages/database/index.astro b/src/pages/database/index.astro index fdf4efb..e27c5d0 100644 --- a/src/pages/database/index.astro +++ b/src/pages/database/index.astro @@ -9,7 +9,7 @@ const description = 'FGO NA TA Database' const questInfo = [] const fulldata = import.meta.glob( - `../../content/data/*.json` + `/src/content/data/*.json` ) for (const [key, value] of Object.entries(fulldata)) {