From f580a2a8f0b0d23b8cc3d22bae0ffba3920a4224 Mon Sep 17 00:00:00 2001 From: D-Sketon <2055272094@qq.com> Date: Sun, 20 Oct 2024 20:35:35 +0800 Subject: [PATCH] feat: improve style --- src/components/Footer.astro | 6 +----- src/components/FriendCard.astro | 4 ++-- src/components/Header.astro | 2 +- src/components/HeaderSubTitle.astro | 2 +- src/components/HeaderTitle.astro | 2 +- src/components/Pagination.astro | 4 ++-- src/components/post/Date.astro | 4 ++-- src/components/post/Tag.astro | 3 ++- src/layouts/MarkdownLayout.astro | 1 + src/styles/base.stylus | 8 ++------ 10 files changed, 15 insertions(+), 21 deletions(-) diff --git a/src/components/Footer.astro b/src/components/Footer.astro index fce0fc1..826bc8a 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -102,11 +102,7 @@ const totalmin2read = await totalReadingTime(); opacity: 0.3; width: 200%; height: 10px; - background-image: linear-gradient( - to left, - rgba(255, 0, 0, 0.75) 50%, - transparent 0% - ); + background: linear-gradient(to left, var(--red-1) 50%, transparent 0%) repeat-x 0 0 / 100px 10px; background-size: 100px 10px; background-repeat: repeat-x; transition: opacity 0.3s; diff --git a/src/components/FriendCard.astro b/src/components/FriendCard.astro index 17f7628..615cecf 100644 --- a/src/components/FriendCard.astro +++ b/src/components/FriendCard.astro @@ -2,11 +2,11 @@ import { FRIEND } from "../utils/config"; --- -
+
{ FRIEND.map(({ name, desc, url, avatar }) => { return ( -
+
diff --git a/src/components/Header.astro b/src/components/Header.astro index 73b5002..52ec8ce 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -42,7 +42,7 @@ const posts = await getCollection("blog"); { cover === `${BASE_URL}/images/banner.webp` ? ( <> - + +

{subtitle} diff --git a/src/components/HeaderTitle.astro b/src/components/HeaderTitle.astro index 1db7b16..a354109 100644 --- a/src/components/HeaderTitle.astro +++ b/src/components/HeaderTitle.astro @@ -9,7 +9,7 @@ const { title, url } = Astro.props; diff --git a/src/components/Pagination.astro b/src/components/Pagination.astro index 30a90c7..9757ccf 100644 --- a/src/components/Pagination.astro +++ b/src/components/Pagination.astro @@ -15,7 +15,7 @@ const lowerBound = currentPage - 2 > 0 ? currentPage - 2 : 1; const upperBound = currentPage + 2 < lastPage ? currentPage + 2 : lastPage; --- -