From b958273c881d63b213aeb36d50883895ad5a703f Mon Sep 17 00:00:00 2001 From: Lukas Trombach Date: Tue, 31 Dec 2024 17:04:42 +0100 Subject: [PATCH] add article content tw classes --- src/components/ExternalLink.astro | 1 + .../Projects/ProjectCard/ProjectCard.astro | 5 +++- .../Projects/ProjectPage/PageBody.astro | 27 ++++++++++++++----- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/components/ExternalLink.astro b/src/components/ExternalLink.astro index df1cdd8b..56924134 100644 --- a/src/components/ExternalLink.astro +++ b/src/components/ExternalLink.astro @@ -37,6 +37,7 @@ const imageProps = { fetchpriority: "low", loading: "lazy", decoding: "async", + "data-site-icon": true, } as const satisfies HTMLAttributes<"img">; --- diff --git a/src/components/Projects/ProjectCard/ProjectCard.astro b/src/components/Projects/ProjectCard/ProjectCard.astro index 8b26a1cb..93617de7 100644 --- a/src/components/Projects/ProjectCard/ProjectCard.astro +++ b/src/components/Projects/ProjectCard/ProjectCard.astro @@ -17,7 +17,10 @@ const { href, title, description, cover, meta } = Astro.props; ]} transition:name={`border-${dash(title)}`} > - + { cover?.image && cover.alt && ( diff --git a/src/components/Projects/ProjectPage/PageBody.astro b/src/components/Projects/ProjectPage/PageBody.astro index 7063d446..9191839e 100644 --- a/src/components/Projects/ProjectPage/PageBody.astro +++ b/src/components/Projects/ProjectPage/PageBody.astro @@ -14,11 +14,18 @@ const dashedTitle = dash(title);
code]:rounded [&_p>code]:bg-muted [&_p>code]:px-[0.3rem] [&_p>code]:py-[0.2rem] [&_p>code]:font-mono [&_p>code]:text-sm [&_p>code]:font-semibold", + "[&_figcaption]:break-words [&_figcaption]:hyphens-auto [&_figcaption]:text-prettyi [&_figcaption]:text-sm [&_figcaption]:text-muted-foreground [&_figcaption]:mt-4", + "[&_pre]:text-sm [&_pre]:leading-7 [&_pre]:py-4 [&_pre]:px-6 [&_pre]:rounded-md", + "motion-safe:[&_figure>img]:timeline-slide-in-bottom motion-safe:[&_figure>img]:[animation-range:entry_10%_contain_25%]", + "motion-safe:[&_video]:timeline-slide-in-bottom motion-safe:[&_video]:[animation-range:entry_10%_contain_25%]", ]} transition:name={`border-${dashedTitle}`} > @@ -36,12 +43,18 @@ const dashedTitle = dash(title); ) } -
+
-

{titleCase(title)}

+

+ {titleCase(title)} +

{description}