diff --git a/TODO.md b/TODO.md index 3335f12..6007070 100644 --- a/TODO.md +++ b/TODO.md @@ -2,21 +2,28 @@ ## Short term -- [Medias] Add Parent pages - [Timeline] inline links to pages not working (timeline 2026/06) +- Fix inconsistency with material-icon in Payload (with or without material-icon prefix) +- [Media] display filename alongside the localized title. +- [Media] Have a title, subtitle, pretitle just like everything else +- Background images some times lack gradient at the bottom and fade in before they could load +- Number of audio players seems limited (on Chrome and Firefox) ## Mid term +- [Medias] Add Parent pages +- [Scans] Adapt size of obi based on cover/dustjacket +- [Scans] Order of cover/dustjacket/obi should be based on the book's page order. +- [RichTextContent] Add autolink block support - Save cookies for longer than just the session - [Scripts] Can't run the scripts using node (ts-node?) - Support for nameless section - [Timeline] Error if collectible not published? - [Timeline] Handle no JS for footers - [Timeline] Add details button in footer with credits + last updated / created -- [Collectibles] Create page for gallery -- [Collectibles] Create page for scans - When the tags overflow, the tag group name should be align start (see http://localhost:12499/en/pages/magnitude-negative-chapter-1) - [SDK] create a initPayload() that return a payload sdk (and stop hard wirring to ENV or node-cache) +- [Videos] see why no video on Firefox and no poster on Chrome https://v3.accords-library.com/en/videos/661b672825d380e548dbb8c8 ## Long term diff --git a/prettier.config.js b/prettier.config.cjs similarity index 100% rename from prettier.config.js rename to prettier.config.cjs diff --git a/src/pages/[locale]/collectibles/_components/ContentsSection/InlineTagGroups.astro b/src/components/InlineTagGroups.astro similarity index 100% rename from src/pages/[locale]/collectibles/_components/ContentsSection/InlineTagGroups.astro rename to src/components/InlineTagGroups.astro diff --git a/src/components/Lightbox.astro b/src/components/Lightbox.astro new file mode 100644 index 0000000..d865e46 --- /dev/null +++ b/src/components/Lightbox.astro @@ -0,0 +1,118 @@ +--- +import Button from "components/Button.astro"; +import { + type EndpointCredit, + type EndpointTagsGroup, + type PayloadImage, + type RichTextContent, +} from "src/shared/payload/payload-sdk"; +import RichText from "./RichText/RichText.astro"; +import TagGroups from "./TagGroups.astro"; +import Credits from "./Credits.astro"; +import DownloadButton from "./DownloadButton.astro"; + +interface Props { + previousImageHref?: string | undefined; + nextImageHref?: string | undefined; + image: PayloadImage; + title: string; + description?: RichTextContent | undefined; + tagGroups?: EndpointTagsGroup[] | undefined; + credits?: EndpointCredit[] | undefined; + filename?: string | undefined; +} + +const { + nextImageHref, + previousImageHref, + image: { url, width, height }, + tagGroups, + credits, + description, + title, + filename, +} = Astro.props; +--- + +{/* ------------------------------------------- HTML ------------------------------------------- */} + +
{formatScanIndexShort(index)}
+ + +{/* ------------------------------------------- CSS -------------------------------------------- */} + + diff --git a/src/pages/[locale]/collectibles/[slug]/scans/index.astro b/src/pages/[locale]/collectibles/[slug]/scans/index.astro new file mode 100644 index 0000000..69f4268 --- /dev/null +++ b/src/pages/[locale]/collectibles/[slug]/scans/index.astro @@ -0,0 +1,215 @@ +--- +import AppEmptyLayout from "components/AppLayout/AppEmptyLayout.astro"; +import AppLayoutTitle from "components/AppLayout/components/AppLayoutTitle.astro"; +import Credits from "components/Credits.astro"; +import RichText from "components/RichText/RichText.astro"; +import { getI18n } from "src/i18n/i18n"; +import { payload } from "src/shared/payload/payload-sdk"; +import { fetchOr404 } from "src/utils/responses"; +import ScanPreview from "./_components/ScanPreview.astro"; + +const slug = Astro.params.slug!; +const { getLocalizedMatch, t } = await getI18n(Astro.locals.currentLocale); + +const scans = await fetchOr404(() => payload.getCollectibleScans(slug)); +if (scans instanceof Response) { + return scans; +} + +const { translations, credits, cover, pages, dustjacket, obi, parentPages } = scans; + +const translation = getLocalizedMatch(translations); + +const hasInsideCover = cover ? Object.keys(cover).some((value) => value.includes("inside")) : false; +const hasOutsideCover = cover + ? Object.keys(cover).some((value) => !value.includes("inside")) + : false; + +const hasInsideDustjacket = dustjacket + ? Object.keys(dustjacket).some((value) => value.includes("inside")) + : false; +const hasOutsideDustjacket = dustjacket + ? Object.keys(dustjacket).some((value) => !value.includes("inside")) + : false; + +const hasInsideObi = obi ? Object.keys(obi).some((value) => value.includes("inside")) : false; +const hasOutsideObi = obi ? Object.keys(obi).some((value) => !value.includes("inside")) : false; +--- + +{/* ------------------------------------------- HTML ------------------------------------------- */} + +{t("collectibles.scans.dustjacket.description")}
+{t("collectibles.scans.obi.description")}
+