From 4487fb094567f80745a6270ce2d7cc3c11a25a2d Mon Sep 17 00:00:00 2001 From: Troy Date: Sat, 28 Dec 2024 16:19:26 +0000 Subject: [PATCH] remove tags from article header (#6) --- package-lock.json | 4 +- package.json | 3 +- src/components/Article.astro | 74 +++++++------------ src/components/Footer.astro | 9 ++- src/components/RelatedArticles.astro | 4 +- src/components/ShowcasePost.astro | 6 +- src/components/ShowcaseProject.astro | 4 +- .../posts/libreboot-on-an-x230/index.mdx | 2 +- .../projects/studying-spider/index.mdx | 2 +- src/layouts/Layout.astro | 2 +- src/lib/utils.ts | 2 +- src/pages/404.astro | 2 +- src/pages/index.astro | 4 +- src/styles/{tailwind.css => global.css} | 0 14 files changed, 50 insertions(+), 68 deletions(-) rename src/styles/{tailwind.css => global.css} (100%) diff --git a/package-lock.json b/package-lock.json index 1c4f5be..76d5999 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "astro", + "name": "troylusty.com", "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "astro", + "name": "troylusty.com", "version": "0.0.1", "dependencies": { "@astrojs/check": "0.9.4", diff --git a/package.json b/package.json index ea6f99e..d3838a0 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,9 @@ { - "name": "astro", + "name": "troylusty.com", "type": "module", "version": "0.0.1", "scripts": { "dev": "astro dev", - "start": "astro dev", "build": "astro check && astro build", "preview": "astro preview", "astro": "astro", diff --git a/src/components/Article.astro b/src/components/Article.astro index bb771f2..c061a4c 100644 --- a/src/components/Article.astro +++ b/src/components/Article.astro @@ -37,66 +37,46 @@ const listFormatter = new Intl.ListFormat("en-GB", { >
-
-
- - { - datesMatch ? ( +
+ + { + datesMatch ? ( +

+ +

+ ) : ( + <>

- ) : ( - <> -

- -

- -

- -

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

{readingTime(article.body)}

-
- ) : null + +

+ +

+ + ) }
+ { + isPost ? ( +
+ +

{readingTime(article.body)}

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

- In collaboration with{" "} +

+ +

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

) : null } -
    - { - article.data.categories.map((category: string) => ( -
  • - {category} -
  • - )) - } - { - article.data.tags.map((tag: string) => ( -
  • - {tag} -
  • - )) - } -
{i.name} @@ -40,8 +40,9 @@ import { Icon } from "astro-icon/components";
© {new Date().getFullYear()} - {SITE.TITLE}. All Rights - Reserved. + {SITE.TITLE}. All Rights Reserved.
{ @@ -50,7 +51,7 @@ import { Icon } from "astro-icon/components"; )) diff --git a/src/components/RelatedArticles.astro b/src/components/RelatedArticles.astro index 12c3136..7e9ae53 100644 --- a/src/components/RelatedArticles.astro +++ b/src/components/RelatedArticles.astro @@ -24,7 +24,7 @@ const next = items[(index + 1) % items.length];

{collection.data.title}{collection.data.description}

diff --git a/src/components/ShowcaseProject.astro b/src/components/ShowcaseProject.astro index f2e1e62..6f6dd20 100644 --- a/src/components/ShowcaseProject.astro +++ b/src/components/ShowcaseProject.astro @@ -18,7 +18,7 @@ const { collection } = Astro.props; alt={collection.data.image.alt} title={collection.data.title} loading="eager" - class="absolute inset-0 h-full w-full object-cover duration-300 ease-in-out group-hover:scale-105" + class="absolute inset-0 h-full w-full object-cover transition-transform duration-300 group-hover:scale-105" fit="cover" />
- • Collection + (Collection) ) : ( diff --git a/src/content/posts/libreboot-on-an-x230/index.mdx b/src/content/posts/libreboot-on-an-x230/index.mdx index b20f41a..261c1e7 100644 --- a/src/content/posts/libreboot-on-an-x230/index.mdx +++ b/src/content/posts/libreboot-on-an-x230/index.mdx @@ -103,7 +103,7 @@ paru -S flashprog dmidecode sudo flashprog -p internal:laptop=force_I_want_a_brick,boardmismatch=force -r dump.bin ``` -5. Clone Libreboot MaKe and change into the directory. +5. Clone LibreBoot MaKe and change into the directory. ```sh git clone https://codeberg.org/libreboot/lbmk; cd lbmk diff --git a/src/content/projects/studying-spider/index.mdx b/src/content/projects/studying-spider/index.mdx index 613d013..34d7efe 100644 --- a/src/content/projects/studying-spider/index.mdx +++ b/src/content/projects/studying-spider/index.mdx @@ -8,7 +8,7 @@ tags: ["blender"] categories: ["personal"] --- -Thanks to [Sam](https://www.artstation.com/samgriffiths) for feedback. +Thanks to [Sam](https://www.artstation.com/samgriffiths) for the feedback. ![Studying Spider](troy-lusty-studying-spider.avif) diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index f81643c..de86767 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -3,7 +3,7 @@ import Head from "@components/Head.astro"; import Header from "@components/Header.astro"; import Footer from "@components/Footer.astro"; import SkinnyCenter from "@components/SkinnyCenter.astro"; -import "@styles/tailwind.css"; +import "@styles/global.css"; interface Props { title: string; diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 6ae3e48..e7ef2fb 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -10,7 +10,7 @@ export function readingTime(html: string) { const textOnly = html.replace(/<[^>]+>/g, ""); const wordCount = textOnly.split(/\s+/).length; const readingTimeMinutes = (wordCount / 200 + 1).toFixed(); - return `${wordCount} words (~${readingTimeMinutes} min read)`; + return `${wordCount} words (${readingTimeMinutes} mins)`; } export function dateRange(startDate: Date, endDate?: Date | string): string { diff --git a/src/pages/404.astro b/src/pages/404.astro index 369f1f2..e303621 100644 --- a/src/pages/404.astro +++ b/src/pages/404.astro @@ -11,7 +11,7 @@ import { Icon } from "astro-icon/components"; >