From 0cab2f14055bda55d64f6d8c58657d4e95793cdc Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Tue, 30 Jan 2024 23:48:00 +0800 Subject: [PATCH] [opt] style --- _config.yml | 8 +- layout/_partial/cover/index.ejs | 6 +- layout/_partial/main/footer.ejs | 2 +- .../_partial/main/navbar/article_banner.ejs | 54 ++++++++++++ .../_partial/main/navbar/article_top_area.ejs | 2 +- layout/_partial/main/navbar/author_banner.ejs | 2 +- .../_partial/main/navbar/breadcrumb/blog.ejs | 6 ++ layout/_partial/main/navbar/dateinfo.ejs | 14 +-- layout/page.ejs | 12 +-- scripts/tags/lib/link.js | 4 +- source/css/_common/base.styl | 2 +- source/css/_common/cap.styl | 2 +- source/css/_common/html.styl | 2 +- source/css/_common/title.styl | 14 ++- source/css/_custom.styl | 8 +- source/css/_layout/layout.styl | 1 + source/css/_layout/main.styl | 2 - source/css/_layout/md.styl | 87 ++++++++----------- .../css/_layout/partial/article-banner.styl | 23 +++++ source/css/_layout/partial/bread-nav.styl | 38 ++++---- source/css/_layout/partial/cover.styl | 11 +-- source/css/_layout/tag-plugins/banner.styl | 42 +++++---- source/css/_layout/tag-plugins/quot.styl | 4 +- 23 files changed, 198 insertions(+), 148 deletions(-) create mode 100644 layout/_partial/main/navbar/article_banner.ejs create mode 100644 source/css/_layout/partial/article-banner.styl diff --git a/_config.yml b/_config.yml index cfe4214..0be5bbd 100755 --- a/_config.yml +++ b/_config.yml @@ -470,9 +470,9 @@ style: darkmode: auto # auto / always / false smooth_scroll: false # true / false 开启时如果目录过长可能无法准确定位 font-size: - root: 16px - body: 1rem # 16px - code: 85% # 14px + root: 16px # 改这个会影响全局所有文字的字号 + body: 17px # 影响正文区域的字号,如果改成 px 则不受 root 影响 + code: 85% # 相较于其所在行的文本大小,建议用百分比 codeblock: 0.8125rem # 13px font-family: logo: 'system-ui, "Microsoft Yahei", "Segoe UI", -apple-system, Roboto, Ubuntu, "Helvetica Neue", Arial, "WenQuanYi Micro Hei", sans-serif' @@ -480,6 +480,8 @@ style: code: 'Menlo, Monaco, Consolas, system-ui, "Courier New", monospace, sans-serif' codeblock: 'Menlo, Monaco, Consolas, system-ui, "Courier New", monospace, sans-serif' text-align: left + prefix: + h2: https://api.iconify.design/ci:heading-h2.svg border-radius: card: 12px block: 12px diff --git a/layout/_partial/cover/index.ejs b/layout/_partial/cover/index.ejs index cfaf68d..5a0e415 100644 --- a/layout/_partial/cover/index.ejs +++ b/layout/_partial/cover/index.ejs @@ -3,9 +3,9 @@ function layoutCover() { if (page.wiki) { return partial('wiki_cover') } - if (page.layout === 'post') { - return partial('post_cover') - } + // if (page.layout === 'post') { + // return partial('post_cover') + // } return '' } %> diff --git a/layout/_partial/main/footer.ejs b/layout/_partial/main/footer.ejs index 7370424..b16f7e7 100755 --- a/layout/_partial/main/footer.ejs +++ b/layout/_partial/main/footer.ejs @@ -2,7 +2,7 @@ const content = theme.footer.content?.replace('${author.name}', (config.author || 'Anonymity'))?.replace('${theme.name}', stellar_info('name'))?.replace('${theme.version}', stellar_info('version'))?.replace('${theme.tree}', stellar_info('tree')) function layoutDiv() { var el = '' - el += `