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 && (
@@ -71,8 +71,7 @@ import "./Aside.less"; 公告
-

欢迎访问我的博客,我是一名前端工程师,喜欢分享前端知识和技巧。

-

如果你对我的博客感兴趣,欢迎关注我的公众号,我会定期发布一些前端技术文章和教程。

+
) diff --git a/src/components/Comment/Comment.less b/src/components/Comment/Comment.less index c7c8a31..da571ef 100644 --- a/src/components/Comment/Comment.less +++ b/src/components/Comment/Comment.less @@ -430,7 +430,7 @@ box-sizing: border-box; padding: 0.188rem; margin: 0.188rem 0; - border: solid 1px #E8E8E8; + border: solid 1px var(--vh-font-16); display: block; max-height: 66px; object-fit: contain; diff --git a/src/components/MainHeader/MainHeader.less b/src/components/MainHeader/MainHeader.less index 9050617..2d36420 100644 --- a/src/components/MainHeader/MainHeader.less +++ b/src/components/MainHeader/MainHeader.less @@ -51,7 +51,7 @@ box-sizing: border-box; padding: 0.66rem 0.66rem 0; width: 100%; - max-width: 26rem; + max-width: 28.88rem; height: max-content; color: var(--vh-white-color); text-align: center; diff --git a/src/components/Pagination/Pagination.less b/src/components/Pagination/Pagination.less index 5e8231d..d5836af 100644 --- a/src/components/Pagination/Pagination.less +++ b/src/components/Pagination/Pagination.less @@ -48,7 +48,7 @@ section.vh-art-page { pointer-events: none; &>svg { - color: #E8E8E8; + color: var(--vh-font-16); } } diff --git a/src/config.ts b/src/config.ts index cd59360..f2aa881 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,20 +1,29 @@ export default { + // 网站标题 Title: '韩小韩博客', + // 网站地址 Site: 'https://www.vvhan.com', + // 网站副标题 Subtitle: '不曾与你分享的时间,我在进步.', + // 网站描述 Description: '韩小韩博客 专注于前开发与相关技术的实战分享,涵盖Vue框架、Node.js、Serverless等,并涉及Node、Python、Linux、Docker等领域。同时,博客也分享作者的生活、音乐和旅行的热爱。', + // 网站作者 Author: '.𝙃𝙖𝙣', - Motto: '运气是计划之外的东西.', + // 作者头像 Avatar: 'https://q1.qlogo.cn/g?b=qq&nk=1655466387&s=640', + // 网站座右铭 + Motto: '运气是计划之外的东西.', // Cover 网站缩略图 Cover: '/assets/images/banner/072c12ec85d2d3b5.webp', - // 网站创建时间 - CreateTime: '2021-09-01', + // 网站侧边栏公告 (不填写即不开启) + 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;