From bf33824b8b94033896b5809468ab7db29fee7daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=9F=E6=97=A5=E8=AF=AD?= Date: Fri, 19 Jan 2024 01:12:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=9F=E9=9A=8Ftianli=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86=E5=9C=86=E8=A7=92?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=20(#360)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 跟随tianli更新,优化部分圆角显示 * ai doc * fix ai 403 * fix --- _config.yml | 1 + layout/_partial/plugins/ai/tianli_gpt.ejs | 4 ++-- source/css/_plugins/comments/twikoo.styl | 18 ++++++++-------- source/css/_plugins/tianli_gpt.styl | 26 +++++++++++------------ 4 files changed, 24 insertions(+), 25 deletions(-) diff --git a/_config.yml b/_config.yml index 248d882..b42367e 100755 --- a/_config.yml +++ b/_config.yml @@ -449,6 +449,7 @@ plugins: enable: false field: post # all, post, wiki api: 5Q5mpqRK5DkwT1X9Gi5e # tianli_gpt key + limit: 1000 # 设置提交的字数限制,默认为1000字,上限为5000,超过5000字符将被截断,不能为空 typingAnimate: true # 打字机动画 style: diff --git a/layout/_partial/plugins/ai/tianli_gpt.ejs b/layout/_partial/plugins/ai/tianli_gpt.ejs index b320b0b..5167321 100644 --- a/layout/_partial/plugins/ai/tianli_gpt.ejs +++ b/layout/_partial/plugins/ai/tianli_gpt.ejs @@ -3,6 +3,6 @@ let tianliGPT_postSelector = '.md-text.content.<%= page.layout === "post" ? "post" : "wiki" %>'; let tianliGPT_key = '<%= theme.plugins.tianli_gpt.api %>'; let tianliGPT_typingAnimate = '<%= theme.plugins.tianli_gpt.typingAnimate %>'; + let tianliGPT_wordLimit = <%= theme.plugins.tianli_gpt.limit %>; - -<% } %> + diff --git a/source/css/_plugins/comments/twikoo.styl b/source/css/_plugins/comments/twikoo.styl index 2f2b1ed..42d846e 100644 --- a/source/css/_plugins/comments/twikoo.styl +++ b/source/css/_plugins/comments/twikoo.styl @@ -1,5 +1,5 @@ .cmt-body.twikoo - --twikoo-lighttext: #ef794f; + --twikoo-lighttext: $color-theme; --twikoo-secondtext: #909094; --twikoo-emoji-background: #f8f8f8; --twikoo-theme: $color-theme; @@ -8,14 +8,14 @@ .tk-content .vemoji, .tk-owo-emotion width: unset; - border-radius: 0; + border-radius: $border-image; max-height: 24px; max-width: 100px; img max-width: 400px; max-height: 400px; - border-radius: 8px; + border-radius: $border-image; .OwO .OwO-body @@ -58,7 +58,7 @@ width: auto border: none padding: 6px 2rem - border-radius: 4px + border-radius: $border-block background: var(--block) color: var(--text-p1) line-height: 2 @@ -74,7 +74,7 @@ margin-bottom: 1rem border: 1px dashed var(--block-border); padding: 1rem; - border-radius: 4px; + border-radius: $border-block; background: var(--card); &:hover @@ -86,7 +86,7 @@ .tk-submit padding: 1rem 1rem 0 1rem; - border-radius: 4px; + border-radius: $border-block; background: var(--card); .tk-tag @@ -108,9 +108,9 @@ set_darkmode_comments() .cmt-body.twikoo - --twikoo-lighttext: #f2b94b; - --twikoo-secondtext: #a1a2b8; - --twikoo-theme: #409eff; + --twikoo-lighttext: $color-link; + --twikoo-secondtext: var(--text-p2); + --twikoo-theme: $color-theme; if hexo-config('style.darkmode') == 'auto' @media (prefers-color-scheme: dark) diff --git a/source/css/_plugins/tianli_gpt.styl b/source/css/_plugins/tianli_gpt.styl index bc2f496..6fe9bd0 100644 --- a/source/css/_plugins/tianli_gpt.styl +++ b/source/css/_plugins/tianli_gpt.styl @@ -1,7 +1,7 @@ .post-TianliGPT --heo-none: #00000000 - --heo-theme = var(--theme-link) - --heo-main: var(--theme-link) + --heo-theme = $color-theme + --heo-main: $color-theme --heo-snackbar-time: 5s --heo-theme-none: #4259ef01 --heo-background: var(--site-bg) @@ -18,11 +18,10 @@ .post-TianliGPT background: var(--block) - border-radius: 12px + border-radius: $border-block padding: 12px line-height: 1.3 border: var(--style-border-always) - margin: 16px 0 @media screen and (max-width: 768px) .post-TianliGPT @@ -30,7 +29,6 @@ .tianliGPT-title display: flex - color: var(--theme-link) border-radius: 8px align-items: center padding: 0 12px @@ -46,7 +44,7 @@ margin-top: 12px padding: 8px 12px background: var(--card) - border-radius: 8px + border-radius: $border-block border: var(--style-border-always) font-size: 15px line-height: 1.4 @@ -71,15 +69,15 @@ transition: 0.3s .tianliGPT-suggestions .tianliGPT-suggestions-item:hover - background: var(--heo-main) + background: $color-theme color: var(--text-p0) .blinking-cursor - background-color: var(--heo-main) + background-color: var(--text-p2) width: 10px - height: 16px + height: 10px display: inline-block - vertical-align: middle + border-radius: 50%; animation: blinking-cursor 0.5s infinite -webkit-animation: blinking-cursor 0.5s infinite margin-left: 4px @@ -102,7 +100,7 @@ .tianliGPT-tag font-size: 12px - background-color: var(--theme-link) + background-color: var(--text-p2) color: var(--card) font-weight: bold border-radius: 4px @@ -116,7 +114,7 @@ transition: 0.3s .tianliGPT-tag:hover - background: var(--text-p2) + background: $color-theme color: var(--card) ins.adsbygoogle @@ -149,7 +147,7 @@ ins.adsbygoogle .tianliGPT-title-icon svg width: 20px height: 20px - fill: var(--heo-main) + fill: var(--text-p2) .tianliGPT-title-icon svg path - fill: var(--heo-main) \ No newline at end of file + fill: var(--text-p2) \ No newline at end of file