From ac0ebf5fe8818d785eb6d33920cb8896a297e321 Mon Sep 17 00:00:00 2001 From: Michael Payne <10254938+michaelpayne02@users.noreply.github.com> Date: Fri, 10 May 2024 07:55:41 -0500 Subject: [PATCH] add: bg gradient --- src/components/CTA.astro | 14 ++++-- src/components/Card.astro | 50 ------------------- src/components/LightboxPortal.astro | 2 +- src/components/ProjectCard.astro | 4 +- src/components/SearchBox.astro | 4 +- src/components/ThemeToggle.astro | 2 +- src/components/ToolSection.astro | 2 +- src/components/blog/Hero.astro | 2 +- .../blog/webmentions/Comments.astro | 6 +-- src/components/blog/webmentions/Likes.astro | 2 +- src/components/layout/Footer.astro | 12 ++--- src/components/layout/Header.astro | 1 - src/layouts/Base.astro | 12 +++++ src/layouts/BlogPost.astro | 6 +-- src/pages/404.astro | 6 +-- src/pages/contact/index.astro | 2 +- src/pages/index.astro | 27 +++++----- src/pages/projects/[...page].astro | 8 +-- src/pages/tags/[tag]/[...page].astro | 17 ++----- src/pages/tags/index.astro | 17 ++----- src/pages/tools/index.astro | 2 +- 21 files changed, 69 insertions(+), 129 deletions(-) delete mode 100644 src/components/Card.astro diff --git a/src/components/CTA.astro b/src/components/CTA.astro index 02a9a63..3e194aa 100644 --- a/src/components/CTA.astro +++ b/src/components/CTA.astro @@ -1,20 +1,24 @@ --- +interface Props { + color?: string + className?: string + href?: string +} const { color, className, href } = Astro.props -if (!color) throw new Error('color is required') --- - +

diff --git a/src/components/Card.astro b/src/components/Card.astro deleted file mode 100644 index e538ae5..0000000 --- a/src/components/Card.astro +++ /dev/null @@ -1,50 +0,0 @@ ---- -import type { ImageMetadata } from 'astro' -import { Image } from 'astro:assets' - -const { - as: Tag = 'div', - class: className, - href, - heading, - subheading, - date, - imagePath, - altText, - imageClass -} = Astro.props -const images = import.meta.glob<{ default: ImageMetadata }>('/src/assets/*.{jpeg,jpg,png,gif}') - -if (imagePath) { - if (!images[imagePath]) - throw new Error(`"${imagePath}" does not exist in glob: "src/assets/*.{jpeg,jpg,png,gif}"`) -} ---- - - - { - imagePath && ( - {altText} - ) - } -

-
-

{heading}

-

{subheading}

-

{date}

-
- -
- diff --git a/src/components/LightboxPortal.astro b/src/components/LightboxPortal.astro index 6bc7274..e9bcf19 100644 --- a/src/components/LightboxPortal.astro +++ b/src/components/LightboxPortal.astro @@ -67,7 +67,7 @@ pointer-events: none; cursor: zoom-out; // TODO: map color to API - background-color: var(--bg-color, hsl(0, 0%, 0%, 0.85)); + background-color: hsl(var(--background) / 0.9); opacity: 0; transition: opacity 0.35s; diff --git a/src/components/ProjectCard.astro b/src/components/ProjectCard.astro index 594bae9..f49aeb7 100644 --- a/src/components/ProjectCard.astro +++ b/src/components/ProjectCard.astro @@ -10,7 +10,7 @@ const { subheading, imagePath, altText, - loading, + loading = 'lazy', mediaTransitionName } = Astro.props @@ -25,7 +25,7 @@ if (!images[imagePath]) - + -