From d0cafa72de20ea736facf475895efdf88b8791e7 Mon Sep 17 00:00:00 2001
From: Han <1655466387@qq.com>
Date: Mon, 7 Apr 2025 11:34:37 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=86=E8=8A=82=E2=9C=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/assets/js/vhCaiqi.js | 7 +++---
src/components/Aside/Aside.astro | 5 ++---
src/components/Comment/Comment.less | 2 +-
src/components/MainHeader/MainHeader.less | 2 +-
src/components/Pagination/Pagination.less | 2 +-
src/config.ts | 26 ++++++++++++++---------
src/styles/ArticleBase.less | 6 +++---
7 files changed, 28 insertions(+), 22 deletions(-)
diff --git a/public/assets/js/vhCaiqi.js b/public/assets/js/vhCaiqi.js
index f7dc7af..93cf68f 100644
--- a/public/assets/js/vhCaiqi.js
+++ b/public/assets/js/vhCaiqi.js
@@ -51,8 +51,8 @@ document.addEventListener('DOMContentLoaded', () => {
}
// 核心方法
- function setGlobals() {
- state.canvas = document.querySelector(".vh-aside-item.user > canvas");
+ function setGlobals(dom) {
+ state.canvas = document.querySelector(dom);
state.ctx = state.canvas.getContext("2d");
}
@@ -178,7 +178,8 @@ document.addEventListener('DOMContentLoaded', () => {
// 公共接口
return {
init: () => {
- setGlobals();
+ if (!document.querySelector('.vh-aside-item.user > canvas')) return;
+ setGlobals(".vh-aside-item.user > canvas");
initializeButton();
window.addEventListener('resize', handleResize);
}
diff --git a/src/components/Aside/Aside.astro b/src/components/Aside/Aside.astro
index a180678..eca5c75 100644
--- a/src/components/Aside/Aside.astro
+++ b/src/components/Aside/Aside.astro
@@ -61,7 +61,7 @@ import "./Aside.less";
{
- AsideShow.TipsShow && (
+ SITE_CONFIG.Tips && (
欢迎访问我的博客,我是一名前端工程师,喜欢分享前端知识和技巧。 如果你对我的博客感兴趣,欢迎关注我的公众号,我会定期发布一些前端技术文章和教程。
欢迎光临我的博客 🎉
这里会分享我的日常和学习中的收集、整理及总结,希望能对你有所帮助:) 💖
', // 首页打字机文案列表 TypeWriteList: [ '不曾与你分享的时间,我在进步.', "I am making progress in the time I haven't shared with you.", ], + // 网站创建时间 + CreateTime: '2021-09-01', // 顶部 Banner 配置 HomeBanner: { enable: true, @@ -41,7 +50,7 @@ export default { }, // 导航栏 (新窗口打开 newWindow: true) Navs: [ - // 仅支持 SVG 且 SVG 需放在 public/assets/images/svg/ 目录下,填入文件名即可(封装了 SVG 组件 为了极致压缩 SVG) + // 仅支持 SVG 且 SVG 需放在 public/assets/images/svg/ 目录下,填入文件名即可 <不需要文件后缀名>(封装了 SVG 组件 为了极致压缩 SVG) // 建议使用 https://tabler.io/icons 直接下载 SVG { text: '朋友', link: '/links', icon: 'Nav_friends' }, { text: '圈子', link: '/friends', icon: 'Nav_rss' }, @@ -53,7 +62,7 @@ export default { ], // 侧边栏个人网站 WebSites: [ - // 仅支持 SVG 且 SVG 需放在 public/assets/images/svg/ 目录下,填入文件名即可(封装了 SVG 组件 为了极致压缩 SVG) + // 仅支持 SVG 且 SVG 需放在 public/assets/images/svg/ 目录下,填入文件名即可 <不需要文件后缀名>(封装了 SVG 组件 为了极致压缩 SVG) // 建议使用 https://tabler.io/icons 直接下载 SVG { text: 'Github', link: 'https://github.com/uxiaohan', icon: 'WebSite_github' }, { text: '韩小韩API', link: 'https://api.vvhan.com', icon: 'WebSite_api' }, @@ -65,13 +74,9 @@ export default { AsideShow: { // 是否展示个人网站 WebSitesShow: true, - // 是否展示公告 - TipsShow: true, - // 是否展示数量统计 - CountShow: true, // 是否展示分类 CategoriesShow: true, - // 是否展示个人标签 + // 是否展示标签 TagsShow: true, // 是否展示推荐文章 recommendArticleShow: true @@ -79,6 +84,7 @@ export default { // DNS预解析地址 DNSOptimization: [ 'https://i0.wp.com', + 'https://cn.cravatar.com', 'https://analytics.vvhan.com', 'https://vh-api.4ce.cn', 'https://registry.npmmirror.com', diff --git a/src/styles/ArticleBase.less b/src/styles/ArticleBase.less index bb36993..fe91d7f 100644 --- a/src/styles/ArticleBase.less +++ b/src/styles/ArticleBase.less @@ -400,7 +400,7 @@ &>img.vh-article-img { width: 100%; aspect-ratio: 3 / 2; - border: solid 1px #E8E8E8; + border: solid 1px var(--vh-font-16); border-radius: 5px; object-fit: cover; overflow: hidden; @@ -415,7 +415,7 @@ align-items: center; width: 100%; aspect-ratio: 16 / 9; - border: solid 1px #E8E8E8; + border: solid 1px var(--vh-font-16); border-radius: 5px; overflow: hidden; } @@ -493,7 +493,7 @@ width: max-content; max-width: 100%; max-height: 36rem; - border: solid 1px #E8E8E8; + border: solid 1px var(--vh-font-16); border-radius: 5px; cursor: zoom-in; cursor: -moz-zoom-in;