From 5e4fa90ceae864b22599350b23f08474366f38f5 Mon Sep 17 00:00:00 2001 From: DrMint <29893320+DrMint@users.noreply.github.com> Date: Sun, 14 Apr 2024 06:49:54 +0200 Subject: [PATCH] Added links to media page for thumbnails --- TODO.md | 1 + package-lock.json | 103 ++++++------ package.json | 6 +- src/components/HeaderTitle.astro | 2 +- .../RTBlock/components/RTSection.astro | 3 +- .../RTUpload/components/RTImage.astro | 6 + src/i18n/wordings-keys.ts | 20 +-- src/pages/[locale]/api/pages/partial.astro | 53 +++--- src/pages/[locale]/collectibles/[slug].astro | 50 +++--- src/shared/payload/payload-sdk.ts | 153 +++++++++--------- 10 files changed, 201 insertions(+), 196 deletions(-) diff --git a/TODO.md b/TODO.md index b7c0b9c..3335f12 100644 --- a/TODO.md +++ b/TODO.md @@ -2,6 +2,7 @@ ## Short term +- [Medias] Add Parent pages - [Timeline] inline links to pages not working (timeline 2026/06) ## Mid term diff --git a/package-lock.json b/package-lock.json index 0fd1708..850e748 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,20 +13,20 @@ "@fontsource-variable/murecho": "^5.0.18", "@fontsource-variable/vollkorn": "^5.0.20", "accept-language": "^3.0.18", - "astro": "4.5.18", + "astro": "4.6.1", "astro-icon": "^1.1.0", "node-cache": "^5.1.2", "tippy.js": "^6.3.7", "ua-parser-js": "^1.0.37" }, "devDependencies": { - "@iconify-json/material-symbols": "^1.1.77", + "@iconify-json/material-symbols": "^1.1.78", "@types/ua-parser-js": "^0.7.39", "astro-meta-tags": "^0.2.2", "autoprefixer": "^10.4.19", "bun-types": "^1.1.3", "npm-check-updates": "^16.14.18", - "postcss-preset-env": "^9.5.4", + "postcss-preset-env": "^9.5.5", "prettier": "^3.2.5", "prettier-plugin-astro": "^0.13.0", "typescript": "^5.4.5" @@ -233,11 +233,11 @@ } }, "node_modules/@astrojs/markdown-remark": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-5.0.0.tgz", - "integrity": "sha512-QBXbxXZamVRoqCNN2gjDXa7qYPUkJZq7KYFfg3DX7rze3QL6xiz4N+Wg202dNPRaIkQa16BV6D8+EHibQFubRg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-5.1.0.tgz", + "integrity": "sha512-S6Z3K2hOB7MfjeDoHsotnP/q2UsnEDB8NlNAaCjMDsGBZfTUbWxyLW3CaphEWw08f6KLZi2ibK9yC3BaMhh2NQ==", "dependencies": { - "@astrojs/prism": "^3.0.0", + "@astrojs/prism": "^3.1.0", "github-slugger": "^2.0.0", "hast-util-from-html": "^2.0.0", "hast-util-to-text": "^4.0.0", @@ -270,45 +270,31 @@ } }, "node_modules/@astrojs/prism": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@astrojs/prism/-/prism-3.0.0.tgz", - "integrity": "sha512-g61lZupWq1bYbcBnYZqdjndShr/J3l/oFobBKPA3+qMat146zce3nz2kdO4giGbhYDt4gYdhmoBz0vZJ4sIurQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@astrojs/prism/-/prism-3.1.0.tgz", + "integrity": "sha512-Z9IYjuXSArkAUx3N6xj6+Bnvx8OdUSHA8YoOgyepp3+zJmtVYJIl/I18GozdJVW1p5u/CNpl3Km7/gwTJK85cw==", "dependencies": { "prismjs": "^1.29.0" }, "engines": { - "node": ">=18.14.1" + "node": "^18.17.1 || ^20.3.0 || >=21.0.0" } }, "node_modules/@astrojs/telemetry": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@astrojs/telemetry/-/telemetry-3.0.4.tgz", - "integrity": "sha512-A+0c7k/Xy293xx6odsYZuXiaHO0PL+bnDoXOc47sGDF5ffIKdKQGRPFl2NMlCF4L0NqN4Ynbgnaip+pPF0s7pQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@astrojs/telemetry/-/telemetry-3.1.0.tgz", + "integrity": "sha512-/ca/+D8MIKEC8/A9cSaPUqQNZm+Es/ZinRv0ZAzvu2ios7POQSsVD+VOj7/hypWNsNM3T7RpfgNq7H2TU1KEHA==", "dependencies": { - "ci-info": "^3.8.0", + "ci-info": "^4.0.0", "debug": "^4.3.4", "dlv": "^1.1.3", - "dset": "^3.1.2", + "dset": "^3.1.3", "is-docker": "^3.0.0", "is-wsl": "^3.0.0", "which-pm-runs": "^1.1.0" }, "engines": { - "node": ">=18.14.1" - } - }, - "node_modules/@astrojs/telemetry/node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "engines": { - "node": ">=8" + "node": "^18.17.1 || ^20.3.0 || >=21.0.0" } }, "node_modules/@babel/code-frame": { @@ -2019,9 +2005,9 @@ "dev": true }, "node_modules/@iconify-json/material-symbols": { - "version": "1.1.77", - "resolved": "https://registry.npmjs.org/@iconify-json/material-symbols/-/material-symbols-1.1.77.tgz", - "integrity": "sha512-b+jAkZKxBrGXXV76psToCGYVzu2IzyM8fxgiLOc6uPLB3R4vhrQGKT1J3wH9JnURShwQenEVPVNWetr5sj0Trg==", + "version": "1.1.78", + "resolved": "https://registry.npmjs.org/@iconify-json/material-symbols/-/material-symbols-1.1.78.tgz", + "integrity": "sha512-WNDaCOdxIMAVer6fWYCsi7iUJM43sBIRd8bFExOifyb4RpXP1dG+Zh3MXqCX56iwaQ9Ra/a2XlFDNZfKnE4NWQ==", "dev": true, "dependencies": { "@iconify/types": "*" @@ -2643,9 +2629,9 @@ ] }, "node_modules/@shikijs/core": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.2.4.tgz", - "integrity": "sha512-ClaUWpt8oTzjcF0MM1P81AeWyzc1sNSJlAjMG80CbwqbFqXSNz+NpQVUC0icobt3sZn43Sn27M4pHD/Jmp3zHw==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.3.0.tgz", + "integrity": "sha512-7fedsBfuILDTBmrYZNFI8B6ATTxhQAasUHllHmjvSZPnoq4bULWoTpHwmuQvZ8Aq03/tAa2IGo6RXqWtHdWaCA==" }, "node_modules/@sigstore/bundle": { "version": "1.1.0", @@ -3211,14 +3197,14 @@ } }, "node_modules/astro": { - "version": "4.5.18", - "resolved": "https://registry.npmjs.org/astro/-/astro-4.5.18.tgz", - "integrity": "sha512-iytLnUfyUneKMjIQdj79zzniByXtcmGNDobIV/gjGsatC9vAyPqeCT8TbMqfkRBMeYGs+S/wCzSoPqaaMJiQnw==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/astro/-/astro-4.6.1.tgz", + "integrity": "sha512-gcL22NEhuRi4wu9/x5Kn2eJf7nT6GeU5BxdN6AHbUnX6UzEDIWtpgHs5lBIZYExKbHKN9PjEGXWQzQtFwLU+5g==", "dependencies": { "@astrojs/compiler": "^2.7.1", "@astrojs/internal-helpers": "0.4.0", - "@astrojs/markdown-remark": "5.0.0", - "@astrojs/telemetry": "3.0.4", + "@astrojs/markdown-remark": "5.1.0", + "@astrojs/telemetry": "3.1.0", "@babel/core": "^7.24.3", "@babel/generator": "^7.23.3", "@babel/parser": "^7.23.3", @@ -3282,8 +3268,9 @@ "astro": "astro.js" }, "engines": { - "node": ">=18.14.1", - "npm": ">=6.14.0" + "node": "^18.17.1 || ^20.3.0 || >=21.0.0", + "npm": ">=9.6.5", + "pnpm": ">=7.1.0" }, "optionalDependencies": { "sharp": "^0.32.6" @@ -5605,9 +5592,9 @@ } }, "node_modules/hast-util-to-text": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-4.0.0.tgz", - "integrity": "sha512-EWiE1FSArNBPUo1cKWtzqgnuRQwEeQbQtnFJRYV1hb1BWDgrAlBU0ExptvZMM/KSA82cDpm2sFGf3Dmc5Mza3w==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-4.0.1.tgz", + "integrity": "sha512-RHL7Vo2n06ZocCFWqmbyhZ1pCYX/mSKdywt9YD5U6Hquu5syV+dImCXFKLFt02JoK5QxkQFS0PoVdFdPXuPffQ==", "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", @@ -8967,9 +8954,9 @@ } }, "node_modules/postcss-custom-properties": { - "version": "13.3.6", - "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-13.3.6.tgz", - "integrity": "sha512-vVVIwQbJiIz+PBLMIWA6XMi53Zg66/f474KolA7x0Das6EwkATc/9ZvM6zZx2gs7ZhcgVHjmWBbHkK9FlCgLeA==", + "version": "13.3.7", + "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-13.3.7.tgz", + "integrity": "sha512-0N9F/GUCr/D0IazjzHahyYW2bQVDT6qDtEudiGHAhMd3XqhfM3VmfYVlkc/40DOhsPtngSNb54/Ctu8msvFOvQ==", "dev": true, "funding": [ { @@ -9345,9 +9332,9 @@ } }, "node_modules/postcss-preset-env": { - "version": "9.5.4", - "resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-9.5.4.tgz", - "integrity": "sha512-o/jOlJjhm4f6rI5q1f+4Og3tz1cjaO50er9ndk7ZdcXHjWOH49kMAhqDC/nQifypQkOAiAmF46dPt3pZM+Cwbg==", + "version": "9.5.5", + "resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-9.5.5.tgz", + "integrity": "sha512-tg71KfEgTHMM+C4LpWtKfHFWEunfWj1JThq/Odsw60MOowcffBrMAcSBDE+imftW5/BD3mpOiiTL6c+KcnGaLQ==", "dev": true, "funding": [ { @@ -9401,7 +9388,7 @@ "postcss-color-hex-alpha": "^9.0.4", "postcss-color-rebeccapurple": "^9.0.3", "postcss-custom-media": "^10.0.4", - "postcss-custom-properties": "^13.3.6", + "postcss-custom-properties": "^13.3.7", "postcss-custom-selectors": "^7.1.8", "postcss-dir-pseudo-class": "^8.0.1", "postcss-double-position-gradients": "^5.0.6", @@ -10843,11 +10830,11 @@ } }, "node_modules/shiki": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.2.4.tgz", - "integrity": "sha512-Q9n9jKiOjJCRPztA9POn3/uZXNySHDNKAsPNpmtHDcFyi6ZQhx5vQKZW3Nhrwn8TWW3RudSRk66zqY603EZDeg==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.3.0.tgz", + "integrity": "sha512-9aNdQy/etMXctnPzsje1h1XIGm9YfRcSksKOGqZWXA/qP9G18/8fpz5Bjpma8bOgz3tqIpjERAd6/lLjFyzoww==", "dependencies": { - "@shikijs/core": "1.2.4" + "@shikijs/core": "1.3.0" } }, "node_modules/signal-exit": { diff --git a/package.json b/package.json index 4ed1293..f6b5ada 100644 --- a/package.json +++ b/package.json @@ -24,20 +24,20 @@ "@fontsource-variable/murecho": "^5.0.18", "@fontsource-variable/vollkorn": "^5.0.20", "accept-language": "^3.0.18", - "astro": "4.5.18", + "astro": "4.6.1", "astro-icon": "^1.1.0", "node-cache": "^5.1.2", "tippy.js": "^6.3.7", "ua-parser-js": "^1.0.37" }, "devDependencies": { - "@iconify-json/material-symbols": "^1.1.77", + "@iconify-json/material-symbols": "^1.1.78", "@types/ua-parser-js": "^0.7.39", "astro-meta-tags": "^0.2.2", "autoprefixer": "^10.4.19", "bun-types": "^1.1.3", "npm-check-updates": "^16.14.18", - "postcss-preset-env": "^9.5.4", + "postcss-preset-env": "^9.5.5", "prettier": "^3.2.5", "prettier-plugin-astro": "^0.13.0", "typescript": "^5.4.5" diff --git a/src/components/HeaderTitle.astro b/src/components/HeaderTitle.astro index 30844e1..5f7aad6 100644 --- a/src/components/HeaderTitle.astro +++ b/src/components/HeaderTitle.astro @@ -46,7 +46,7 @@ const { header, id } = Astro.props; h4, h5, h6 { - display: inline-flex; + display: flex; place-items: center; gap: 0.5em; } diff --git a/src/components/RichText/components/RTBlock/components/RTSection.astro b/src/components/RichText/components/RTBlock/components/RTSection.astro index 84ac4be..1d38f1b 100644 --- a/src/components/RichText/components/RTBlock/components/RTSection.astro +++ b/src/components/RichText/components/RTBlock/components/RTSection.astro @@ -28,6 +28,7 @@ const { node, context } = Astro.props; color: var(--color-base-650); font-weight: 500; font-size: 70%; - place-self: end; + place-self: start; + margin-top: 0.33em; } diff --git a/src/components/RichText/components/RTUpload/components/RTImage.astro b/src/components/RichText/components/RTUpload/components/RTImage.astro index d2af92f..e749e83 100644 --- a/src/components/RichText/components/RTUpload/components/RTImage.astro +++ b/src/components/RichText/components/RTUpload/components/RTImage.astro @@ -56,5 +56,11 @@ const mediaPage = getLocalizedUrl(`/images/${id}`); box-shadow: 0 5px 20px -10px var(--color-shadow); margin-bottom: -0.5em; } + + transition: 100ms scale; + + &:hover { + scale: 102%; + } } diff --git a/src/i18n/wordings-keys.ts b/src/i18n/wordings-keys.ts index b1aa781..6db773e 100644 --- a/src/i18n/wordings-keys.ts +++ b/src/i18n/wordings-keys.ts @@ -89,29 +89,29 @@ export type WordingKey = | "pages.tableOfContent.break" | "global.languageOverride.availableLanguages" | "timeline.title" - | "timeline.eras.drakengard3" + | "timeline.description" + | "timeline.eras.cataclysm" | "timeline.eras.drakengard" | "timeline.eras.drakengard2" + | "timeline.eras.drakengard3" | "timeline.eras.nier" | "timeline.eras.nierAutomata" - | "timeline.eras.cataclysm" - | "timeline.description" - | "timeline.notes.title" + | "timeline.jumpTo" | "timeline.notes.content" + | "timeline.notes.title" | "timeline.priorCataclysmNote.title" | "timeline.priorCataclysmNote.content" - | "timeline.jumpTo" | "timeline.year.during" - | "timeline.eventFooter.languages" | "timeline.eventFooter.sources" + | "timeline.eventFooter.languages" | "timeline.eventFooter.note" - | "global.sources.typeLabel.url" - | "global.sources.typeLabel.page" | "global.sources.typeLabel.collectible" - | "global.sources.typeLabel.folder" + | "global.sources.typeLabel.collectible.range.custom" | "global.sources.typeLabel.collectible.range.page" | "global.sources.typeLabel.collectible.range.timestamp" - | "global.sources.typeLabel.collectible.range.custom" + | "global.sources.typeLabel.folder" + | "global.sources.typeLabel.page" + | "global.sources.typeLabel.url" | "global.openMediaPage" | "global.downloadButton" | "global.previewTypes.video" diff --git a/src/pages/[locale]/api/pages/partial.astro b/src/pages/[locale]/api/pages/partial.astro index 21f0e13..6c563e0 100644 --- a/src/pages/[locale]/api/pages/partial.astro +++ b/src/pages/[locale]/api/pages/partial.astro @@ -41,13 +41,15 @@ const translation = getLocalizedMatch(page.translations); { page.thumbnail && ( - + + + ) } @@ -93,12 +95,14 @@ const translation = getLocalizedMatch(page.translations);