From c5e1e5dda7ebc2b51df7ec1f93acf94b95aadd8a Mon Sep 17 00:00:00 2001 From: Troy Date: Thu, 13 Feb 2025 18:55:50 +0000 Subject: [PATCH] feat: reduce page sizing complexity --- src/components/Article.astro | 84 ++++++++++++++-------------- src/components/Carousel.astro | 3 +- src/components/Footer.astro | 2 +- src/components/FormattedDate.astro | 7 ++- src/components/Header.astro | 2 +- src/components/Prose.astro | 2 +- src/components/RelatedArticles.astro | 2 +- src/components/ShowcasePost.astro | 21 +++---- src/layouts/Layout.astro | 7 +-- src/pages/cv.astro | 14 ++--- src/pages/index.astro | 16 +++--- src/pages/posts/index.astro | 18 +++--- src/pages/projects/index.astro | 18 +++--- 13 files changed, 95 insertions(+), 101 deletions(-) diff --git a/src/components/Article.astro b/src/components/Article.astro index 99c3601..f09a0eb 100644 --- a/src/components/Article.astro +++ b/src/components/Article.astro @@ -28,56 +28,54 @@ const listFormatter = new Intl.ListFormat("en-GB", { updated={article.data.updated} tags={article.data.tags} > -
-

+ {article.data.title}{article.data.description} - {article.data.title}{article.data.description} -

-
-
- - { - datesMatch ? ( + +
+
+ + { + datesMatch ? ( +

+ +

+ ) : ( + <>

- ) : ( - <> -

- -

- -

- -

- - ) - } -
- { - isPost ? ( -
- -

{readingTime(article.body)}

-
- ) : null - } - { - article.data.extraAuthors ? ( -
- -

- {listFormatter.format(article.data.extraAuthors)} + +

+

-
- ) : null + + ) }
+ { + isPost ? ( +
+ +

{readingTime(article.body)}

+
+ ) : null + } + { + article.data.extraAuthors ? ( +
+ +

+ {listFormatter.format(article.data.extraAuthors)} +

+
+ ) : null + }
diff --git a/src/components/Carousel.astro b/src/components/Carousel.astro index 373339f..3430735 100644 --- a/src/components/Carousel.astro +++ b/src/components/Carousel.astro @@ -7,7 +7,6 @@ const { data } = Astro.props; ---
+