From e4543128646753ab8dcc2ee7d3c453a3058d9d26 Mon Sep 17 00:00:00 2001 From: Han <1655466387@qq.com> Date: Wed, 19 Feb 2025 11:51:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9B=BE=E7=89=87=E6=87=92?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=8F=8A=20RSS=20=20=E2=9C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/images/footer/rss.svg | 1 + src/components/ArticleCard.astro | 2 +- src/components/Aside.astro | 4 ++-- src/components/Footer.astro | 9 ++++---- src/pages/about/index.astro | 36 +++++++++++++++-------------- src/pages/rss.xml.ts | 2 +- src/styles/About.less | 5 +++- src/styles/Footer.less | 6 +++++ 8 files changed, 39 insertions(+), 26 deletions(-) create mode 100644 public/assets/images/footer/rss.svg diff --git a/public/assets/images/footer/rss.svg b/public/assets/images/footer/rss.svg new file mode 100644 index 0000000..4673396 --- /dev/null +++ b/public/assets/images/footer/rss.svg @@ -0,0 +1 @@ +订阅: RSS订阅RSS \ No newline at end of file diff --git a/src/components/ArticleCard.astro b/src/components/ArticleCard.astro index 2afd22e..e2f6efc 100644 --- a/src/components/ArticleCard.astro +++ b/src/components/ArticleCard.astro @@ -13,7 +13,7 @@ import "../styles/components/ArticleCard.less";
-
{post.data.title}
+
{post.data.title}
{post.data.categories} diff --git a/src/components/Aside.astro b/src/components/Aside.astro index c32ead8..0eb6f26 100644 --- a/src/components/Aside.astro +++ b/src/components/Aside.astro @@ -30,7 +30,7 @@ import "../styles/components/Aside.less"; { WebSites.map(item => ( - + {item.text} )) } @@ -74,7 +74,7 @@ import "../styles/components/Aside.less"; recommendArticles.map(async i => (

- + {(await

{(await i).title} diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 97a5c1a..216dc26 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,4 +1,7 @@ --- +// 静态图片 +import { Image } from "astro:assets"; +// 格式化时间 import { fmtDate } from "../utils/index"; // 页面内容的元数据 import SITE_CONFIG from "../config"; @@ -9,9 +12,7 @@ import "../styles/Footer.less";

diff --git a/src/pages/about/index.astro b/src/pages/about/index.astro index cf689a3..2df3194 100644 --- a/src/pages/about/index.astro +++ b/src/pages/about/index.astro @@ -1,4 +1,6 @@ --- +// 静态图片 +import { Image } from "astro:assets"; // 页面 Info import SITE_CONFIG from "../../config"; const { Description, Twikoo } = SITE_CONFIG; @@ -23,23 +25,23 @@ import "../../styles/About.less";

我是一名热爱前端开发并拥有丰富经验的工程师,喜欢探索新技术并应用于实际项目中。 我始终保持对新技术的热情,并将我的知识与经验分享在我的博客中。我期待在这里与你分享我的见解、经验和最新的技术动态。

🌟 Languages and Tools

- HTML5 - Node.js - PHP - Python - Git - Linux - Nginx - Docker - Vue.js - Vite - Webpack - Electron - Express - Tailwind CSS - JavaScript - SQLite - VS Code + HTML5 + Node.js + PHP + Python + Git + Linux + Nginx + Docker + Vue.js + Vite + Webpack + Electron + Express + Tailwind CSS + JavaScript + SQLite + VS Code
{Twikoo.envId && } diff --git a/src/pages/rss.xml.ts b/src/pages/rss.xml.ts index b00a7a6..73099aa 100644 --- a/src/pages/rss.xml.ts +++ b/src/pages/rss.xml.ts @@ -16,6 +16,6 @@ export async function GET(context: any) { pubDate: post.data.updated || post.data.date, description: getDescription(post), link: `/article/${post.data.id}` - })), + })).reverse(), }); } diff --git a/src/styles/About.less b/src/styles/About.less index dd2c600..f7ad090 100644 --- a/src/styles/About.less +++ b/src/styles/About.less @@ -30,12 +30,15 @@ &>a { width: max-content; max-width: 100%; - height: max-content; + height: 2rem; line-height: 1; overflow: hidden; transition: transform 0.16s ease-in-out; &>img { + height: calc(100% - 1px); + width: auto; + object-fit: contain; border-bottom: 1px solid #2563eb; } diff --git a/src/styles/Footer.less b/src/styles/Footer.less index d608730..7218169 100644 --- a/src/styles/Footer.less +++ b/src/styles/Footer.less @@ -68,6 +68,12 @@ height: 0.88rem; } } + + img { + height: 100%; + width: auto; + object-fit: contain; + } } }