From 1b9d13718a559ea5bbf03ffa9ae540bb1c460891 Mon Sep 17 00:00:00 2001 From: Pentaz Date: Tue, 9 Aug 2022 12:15:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8Dwaline=E6=9A=97=E9=BB=91?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=20(#109)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 适配waline暗黑模式 第一次写,不知道是否和规范。 覆盖原文件的样式。 * 适配waline暗黑模式 --- source/css/_plugins/comments/waline.styl | 61 ++++++++++++++++++++++++ source/css/_plugins/index.styl | 2 + 2 files changed, 63 insertions(+) create mode 100644 source/css/_plugins/comments/waline.styl diff --git a/source/css/_plugins/comments/waline.styl b/source/css/_plugins/comments/waline.styl new file mode 100644 index 0000000..69459e5 --- /dev/null +++ b/source/css/_plugins/comments/waline.styl @@ -0,0 +1,61 @@ +.cmt-body.waline + --waline-font-size: 0.9375rem; + /* 常规颜色 */ + --waline-white: #fff; + --waline-light-grey: #999; + --waline-dark-grey: #666; + /* 主题色 */ + --waline-theme-color: #3498db; + --waline-active-color: #2ecc71; + /* 布局颜色 */ + --waline-color: #444; + --waline-bgcolor: #fff; + --waline-bgcolor-light: #f8f8f8; + --waline-bgcolor-hover: #f0f0f0; + --waline-border-color: #ddd; + --waline-disable-bgcolor: #f8f8f8; + --waline-disable-color: #bbb; + --waline-code-bgcolor: #282c34; + /* 特殊颜色 */ + --waline-bq-color: #f0f0f0; + /* 头像 */ + --waline-avatar-size: 3.25rem; + --waline-m-avatar-size: calc(var(--waline-avatar-size) * 9 / 13); + /* 徽章 */ + --waline-badge-color: #3498db; + --waline-badge-font-size: 0.725em; + /* 信息 */ + --waline-info-bgcolor: #f8f8f8; + --waline-info-color: #999; + --waline-info-font-size: 0.725em; + /* 渲染选择 */ + --waline-border: 1px solid var(--waline-border-color); + --waline-avatar-radius: 50%; + --waline-box-shadow: none; + + + @media (prefers-color-scheme: dark) + --waline-white: #000; + --waline-light-grey: #666; + --waline-dark-grey: #999; + /* 布局颜色 */ + + --waline-color: #fff; + --waline-bgcolor: var(--block); + --waline-bgcolor-light: #272727; + --waline-border-color: #333; + --waline-disable-bgcolor: #444; + --waline-disable-color: #272727; + /* 特殊颜色 */ + --waline-bq-color: #272727; + /* 其他颜色 */ + --waline-info-bgcolor: #272727; + --waline-info-color: #666; + +.wl-count + @media (prefers-color-scheme: dark) + padding: .375em; + font-weight: bold; + font-size: 1.25em; + color: #fff; + diff --git a/source/css/_plugins/index.styl b/source/css/_plugins/index.styl index 2affc8c..cff87ff 100644 --- a/source/css/_plugins/index.styl +++ b/source/css/_plugins/index.styl @@ -17,3 +17,5 @@ if hexo-config('comments.service') == 'utterances' @import 'comments/utterances' if hexo-config('comments.service') == 'valine' @import 'comments/valine' +if hexo-config('comments.service') == 'waline' + @import 'comments/waline'