--- import Credits from "./Credits.astro"; import DownloadButton from "./DownloadButton.astro"; import AppLayoutTitle from "./AppLayout/components/AppLayoutTitle.astro"; import type { ComponentProps } from "astro/types"; import Attributes from "./Attributes.astro"; import { sizesToSrcset } from "src/utils/img"; import { Icon } from "astro-icon/components"; import RichText from "./RichText/RichText.astro"; import type { EndpointImage, EndpointScanImage, EndpointPayloadImage, EndpointCredit, } from "src/shared/payload/endpoint-types"; import type { RichTextContent } from "src/shared/payload/rich-text"; interface Props { previousImageHref?: string | undefined; nextImageHref?: string | undefined; image: EndpointImage | EndpointScanImage | EndpointPayloadImage; pretitle?: string | undefined; title: string; subtitle?: string | undefined; description?: RichTextContent | undefined; lang?: string | undefined; attributes?: ComponentProps["attributes"] | undefined; metaAttributes?: ComponentProps["attributes"] | undefined; credits?: EndpointCredit[] | undefined; filename?: string | undefined; smallTitle?: boolean | undefined; } const { nextImageHref, previousImageHref, image: { url, width, height, sizes }, attributes = [], metaAttributes = [], credits = [], description, lang, pretitle, title, subtitle, filename, smallTitle = false, } = Astro.props; const hasNavigation = previousImageHref || nextImageHref; --- {/* ------------------------------------------- HTML ------------------------------------------- */}
{ hasNavigation && ( ) } { hasNavigation && ( ) }
0 || metaAttributes.length > 0 || credits.length > 0 || description, }}>
{ smallTitle ? (

{title}

) : ( ) } {description && }
{attributes.length > 0 && } {credits.length > 0 && } {metaAttributes.length > 0 && } {filename && }
{/* ------------------------------------------- CSS -------------------------------------------- */} {/* ------------------------------------------- JS --------------------------------------------- */}