From 24da21aa6f7b70b6cd9176a2683746ac3a7bcd6c Mon Sep 17 00:00:00 2001 From: Troy Date: Thu, 5 Jun 2025 18:40:14 +0100 Subject: [PATCH] fix: make article metadata fill container width first --- package-lock.json | 16 ++--- package.json | 2 +- src/components/Article.astro | 64 +++++++++---------- .../projects/camouflage-store/index.mdx | 2 - src/pages/about/index.astro | 16 ++--- src/pages/posts/index.astro | 7 +- src/pages/projects/index.astro | 7 +- src/pages/tags/[tag].astro | 12 ++-- src/pages/tags/index.astro | 14 ++-- 9 files changed, 69 insertions(+), 71 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2cd861e..ad03335 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@astrojs/rss": "^4.0.12", "@astrojs/sitemap": "3.4.1", "@tailwindcss/vite": "^4.1.8", - "astro": "^5.8.2", + "astro": "^5.9.0", "astro-icon": "^1.1.5", "rehype-external-links": "^3.0.0", "tailwindcss": "^4.1.8", @@ -83,9 +83,9 @@ } }, "node_modules/@astrojs/compiler": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-2.11.0.tgz", - "integrity": "sha512-zZOO7i+JhojO8qmlyR/URui6LyfHJY6m+L9nwyX5GiKD78YoRaZ5tzz6X0fkl+5bD3uwlDHayf6Oe8Fu36RKNg==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-2.12.0.tgz", + "integrity": "sha512-7bCjW6tVDpUurQLeKBUN9tZ5kSv5qYrGmcn0sG0IwacL7isR2ZbyyA3AdZ4uxsuUFOS2SlgReTH7wkxO6zpqWA==", "license": "MIT" }, "node_modules/@astrojs/internal-helpers": { @@ -2455,12 +2455,12 @@ } }, "node_modules/astro": { - "version": "5.8.2", - "resolved": "https://registry.npmjs.org/astro/-/astro-5.8.2.tgz", - "integrity": "sha512-t0TBpBdVluA2QVmbFBwpIqmTvBwNhIz1XTIT1BWPkDkoIgsiEMf6BOZqcoGG7f4GVKkUB9bTgMOhPgU3tbJ6vQ==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/astro/-/astro-5.9.0.tgz", + "integrity": "sha512-AHF7oZDBQRwggHUG0bwBhRQjrDD+vJpCtPd0/GVxDB1hGRV0SQuFWS0UHX5bYczIqFcao1z9o9o0r2rQtHrTMg==", "license": "MIT", "dependencies": { - "@astrojs/compiler": "^2.11.0", + "@astrojs/compiler": "^2.12.0", "@astrojs/internal-helpers": "0.6.1", "@astrojs/markdown-remark": "6.3.2", "@astrojs/telemetry": "3.3.0", diff --git a/package.json b/package.json index 4c602bc..79094bb 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "@astrojs/rss": "^4.0.12", "@astrojs/sitemap": "3.4.1", "@tailwindcss/vite": "^4.1.8", - "astro": "^5.8.2", + "astro": "^5.9.0", "astro-icon": "^1.1.5", "rehype-external-links": "^3.0.0", "tailwindcss": "^4.1.8", diff --git a/src/components/Article.astro b/src/components/Article.astro index 895047c..03cce0f 100644 --- a/src/components/Article.astro +++ b/src/components/Article.astro @@ -51,7 +51,7 @@ if (article.data.extraAuthors && article.data.extraAuthors.length !== 0) {
-
+
{ !article.data.updated ? ( @@ -70,38 +70,38 @@ if (article.data.extraAuthors && article.data.extraAuthors.length !== 0) { ) } + { + isPost ? ( + <> + +

{readingTime(article.body)}

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

+ + ) : null + } + { + article.data.tags ? ( + <> + + {article.data.tags.map((tag: string) => ( + + {tag} + + ))} + + ) : null + }

- { - isPost ? ( -
- -

{readingTime(article.body)}

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

-

- ) : null - } - { - article.data.tags ? ( -
- - {article.data.tags.map((tag: string) => ( - - {tag} - - ))} -
- ) : null - }
a.id - b.id);

@@ -155,7 +155,7 @@ const sortedEducation = [...education].sort((a, b) => a.id - b.id); aria-label="Website" class="bg-button text-secondary hover:bg-button-active flex w-fit flex-row items-center gap-1 justify-self-center rounded-full p-2 text-center text-sm text-nowrap capitalize transition-colors duration-300" > - + a.id - b.id); class="text-secondary/70 hidden max-w-md items-center text-pretty print:flex" > @@ -212,11 +212,9 @@ const sortedEducation = [...education].sort((a, b) => a.id - b.id); of 3D environments. Using either real-time or offline rendering techniques in software packages such as Blender, Unreal Engine, and more recently: Godot. In addition to this I also have an interest in web development, graphic design, - and cyber security which all make up a large part of my hobbies not including - motorbikes. If you're reading this offline, my portfolio of work can be found - on my website at troylusty.com/projects.

@@ -233,7 +231,7 @@ const sortedEducation = [...education].sort((a, b) => a.id - b.id);

Do you think I'd be a good fit to help out on a project you're working on, or maybe just want to chat? Send me an email! !post.data.draft) @@ -23,11 +22,11 @@ const posts = (await getCollection("posts")) posts.map((article: any) => ) } -

diff --git a/src/pages/projects/index.astro b/src/pages/projects/index.astro index 18e0767..2d0f68c 100644 --- a/src/pages/projects/index.astro +++ b/src/pages/projects/index.astro @@ -3,7 +3,6 @@ import { getCollection } from "astro:content"; import { PROJECTS, SITE } from "@consts"; import Layout from "@layouts/Layout.astro"; import ShowcaseProject from "@components/ShowcaseProject.astro"; -import Link from "@components/Link.astro"; const projects = (await getCollection("projects")) .filter((project) => !project.data.draft) @@ -19,11 +18,11 @@ const projects = (await getCollection("projects")) > {projects.map((article: any) => )} - diff --git a/src/pages/tags/[tag].astro b/src/pages/tags/[tag].astro index 126064a..d19c6cc 100644 --- a/src/pages/tags/[tag].astro +++ b/src/pages/tags/[tag].astro @@ -62,9 +62,11 @@ const allArticlesWithTag = [...blogPostsWithTag, ...projectsWithTag] > {allArticlesWithTag.map((article) => )} - See all tags + diff --git a/src/pages/tags/index.astro b/src/pages/tags/index.astro index 211f55d..cca04ac 100644 --- a/src/pages/tags/index.astro +++ b/src/pages/tags/index.astro @@ -41,12 +41,14 @@ const allTagsSorted = freqSort(allTags); > { allTagsSorted.map((tag: string) => ( - - {tag} - +
  • + + {tag} + +
  • )) }