From 29bd21d164d35b20cbf3ad42c18f57408ffef208 Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Thu, 21 Dec 2023 23:59:53 +0800 Subject: [PATCH] [opt] style --- _config.yml | 23 +++++++++--------- layout/404.ejs | 2 +- layout/_partial/cover/wiki_cover.ejs | 24 +++++++------------ .../_partial/main/article/article_footer.ejs | 8 +++---- layout/_partial/main/post_list/post_card.ejs | 2 +- layout/_partial/main/post_list/wiki_card.ejs | 12 ++-------- layout/_partial/sidebar/index.ejs | 2 +- layout/_partial/widgets/ghuser.ejs | 2 +- scripts/tags/lib/swiper.js | 2 +- source/css/_layout/list.styl | 10 ++++---- source/css/_layout/partial/cover.styl | 2 ++ source/css/_layout/partial/paginator.styl | 4 ++-- source/css/_layout/tag-plugins/frame.styl | 2 +- source/css/_layout/widgets/ghuser.styl | 11 ++++----- source/js/plugins/fcircle.js | 6 ++--- source/js/plugins/friends.js | 6 ++--- source/js/plugins/memos.js | 6 ++--- source/js/plugins/sites.js | 8 +++---- source/js/plugins/timeline.js | 4 ++-- source/js/plugins/weibo.js | 6 ++--- 20 files changed, 66 insertions(+), 76 deletions(-) diff --git a/_config.yml b/_config.yml index 7f1c2d0..a38eddc 100755 --- a/_config.yml +++ b/_config.yml @@ -182,16 +182,16 @@ comments: footer: social: # github: - # icon: '' + # icon: '' # url: / # music: - # icon: '' + # icon: '' # url: / # unsplash: - # icon: '' + # icon: '' # url: / # comments: - # icon: '' + # icon: '' # url: /about/#comments sitemap: # '博客': @@ -332,8 +332,8 @@ plugins: # swiper swiper: enable: true - css: https://unpkg.com/swiper@8.4.5/swiper-bundle.min.css - js: https://unpkg.com/swiper@8.4.5/swiper-bundle.min.js + css: https://unpkg.com/swiper@10.3/swiper-bundle.min.css + js: https://unpkg.com/swiper@10.3/swiper-bundle.min.js # 赫蹏 (Heti) - 专为中文网页内容设计的排版样式增强 @@ -426,7 +426,7 @@ style: underline: true # true / false animated_avatar: animate: auto # auto, always - background: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/avatar/round/rainbow64@3x.webp + background: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.5/avatar/round/rainbow64@3x.webp codeblock: scrollbar: 4px highlightjs_theme: https://gcore.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/styles/atom-one-dark.min.css @@ -438,10 +438,11 @@ style: search: 'linear-gradient(to right, #04F3FF, #08FFC6, #DDF730, #FFBD19, #FF1FE0, #C418FF, #04F3FF)' default: - avatar: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/avatar/round/3442075.svg - link: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/link/8f277b4ee0ecd.svg - cover: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/cover/76b86c0226ffd.svg - image: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/image/2659360.svg + avatar: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.5/avatar/round/3442075.svg + link: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.5/link/8f277b4ee0ecd.svg + cover: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.5/cover/76b86c0226ffd.svg + image: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.5/image/2659360.svg + project: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.5/image/2779789.png api_host: ghapi: https://api.github.com diff --git a/layout/404.ejs b/layout/404.ejs index 8bf0584..a817f0c 100755 --- a/layout/404.ejs +++ b/layout/404.ejs @@ -6,7 +6,7 @@ page.header = 'auto'; page.robots = 'none'; %>
-

404

+

404

<%- __('page.error.what') %> diff --git a/layout/_partial/cover/wiki_cover.ejs b/layout/_partial/cover/wiki_cover.ejs index 404b75c..a3216cf 100644 --- a/layout/_partial/cover/wiki_cover.ejs +++ b/layout/_partial/cover/wiki_cover.ejs @@ -8,34 +8,28 @@ function layoutWikiCover() { if (proj.homepage.path !== page.path) { return; } - if (proj.cover == undefined || proj.cover === false || proj.cover === '[]') { + if (proj.coverpage == undefined || proj.coverpage === false || proj.coverpage === '[]') { return el; } - var cover = proj.cover; - let logo = proj.logo; + var coverpage = proj.coverpage; + let cover = proj.cover; let title = proj.title || page.title; let desc = proj.description || page.description; - if (cover === true) { - cover = ['logo', 'title', 'description']; + if (coverpage === true) { + coverpage = ['cover', 'title', 'description']; } el += '

'; el += '
'; - if (logo && logo.src && cover.includes('logo')) { - el += '
'; - if (logo.large) { - el += ''; - } else { - el += ''; - } - el += '
'; + if (cover?.length > 0 && coverpage.includes('cover')) { + el += `
` } - if (title && cover.includes('title')) { + if (title && coverpage.includes('title')) { el += '
'; el += '' + title + ''; el += '
'; } - if (desc && cover.includes('description')) { + if (desc && coverpage.includes('description')) { el += '
' + desc + '
'; } el += '
'; diff --git a/layout/_partial/main/article/article_footer.ejs b/layout/_partial/main/article/article_footer.ejs index 4ace8a2..23a224b 100644 --- a/layout/_partial/main/article/article_footer.ejs +++ b/layout/_partial/main/article/article_footer.ejs @@ -103,13 +103,13 @@ function layoutDiv() { } el += '>'; if (item == 'wechat') { - el += ''; + el += ''; } else if (item == 'weibo') { - el += ''; + el += ''; } else if (item == 'email') { - el += ''; + el += ''; } else if (item == 'link') { - el += ''; + el += ''; } el += ''; } diff --git a/layout/_partial/main/post_list/post_card.ejs b/layout/_partial/main/post_list/post_card.ejs index 96ed244..0522bdd 100755 --- a/layout/_partial/main/post_list/post_card.ejs +++ b/layout/_partial/main/post_list/post_card.ejs @@ -90,7 +90,7 @@ function div_default() { } } if (post.pin) { - el += ''; + el += ''; } el += '
'; el += '
'; diff --git a/layout/_partial/main/post_list/wiki_card.ejs b/layout/_partial/main/post_list/wiki_card.ejs index b75b7dc..eb420f3 100644 --- a/layout/_partial/main/post_list/wiki_card.ejs +++ b/layout/_partial/main/post_list/wiki_card.ejs @@ -2,18 +2,10 @@ function layoutDiv() { var el = ''; el += '
'; - if (proj.logo && proj.logo.src) { - el += '
'; - el += 'logo
` el += '
'; if (proj.tags && proj.tags.length > 0) { - el += '
'; + el += '
'; for (let tag of proj.tags) { el += '' + tag + ''; } diff --git a/layout/_partial/sidebar/index.ejs b/layout/_partial/sidebar/index.ejs index 1d4d75e..0b6a5fb 100755 --- a/layout/_partial/sidebar/index.ejs +++ b/layout/_partial/sidebar/index.ejs @@ -56,7 +56,7 @@ function layoutWidgets() { el += '
'; // all products el += ''; - el += ''; + el += ''; el += __('btn.all_wiki'); el += ''; // this product diff --git a/layout/_partial/widgets/ghuser.ejs b/layout/_partial/widgets/ghuser.ejs index 730d421..b8abff6 100644 --- a/layout/_partial/widgets/ghuser.ejs +++ b/layout/_partial/widgets/ghuser.ejs @@ -42,7 +42,7 @@ function layoutDiv() { el += '
'; // follow el += ''; // menu diff --git a/scripts/tags/lib/swiper.js b/scripts/tags/lib/swiper.js index ba0ace5..c4de029 100644 --- a/scripts/tags/lib/swiper.js +++ b/scripts/tags/lib/swiper.js @@ -22,7 +22,7 @@ module.exports = ctx => function(args, content) { }) } } - el += '