Merge pull request #195 from XPoet/dev

release v3.6.0
This commit is contained in:
指间的诗意 2023-01-10 15:59:09 +08:00 committed by GitHub
commit 292508fbd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
45 changed files with 404 additions and 181 deletions

View File

@ -1,6 +1,8 @@
.DS_Store
Thumbs.db
node_modules node_modules
/.github/FUNDING.yml
package-lock.json package-lock.json
yarn.lock yarn.lock
.github/*
.vscode/* .vscode/*
.idea/* .idea/*

143
LICENSE
View File

@ -1,5 +1,5 @@
GNU GENERAL PUBLIC LICENSE GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 29 June 2007 Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
@ -7,17 +7,15 @@
Preamble Preamble
The GNU General Public License is a free, copyleft license for The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works. software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast, to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the software for all its users.
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you price. Our General Public Licenses are designed to make sure that you
@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things. free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you Developers that use our General Public Licenses protect your rights
these rights or asking you to surrender the rights. Therefore, you have with two steps: (1) assert copyright on the software, and (2) offer
certain responsibilities if you distribute copies of the software, or if you this License which gives you legal permission to copy, distribute
you modify it: responsibilities to respect the freedom of others. and/or modify the software.
For example, if you distribute copies of such a program, whether A secondary benefit of defending all users' freedom is that
gratis or for a fee, you must pass on to the recipients the same improvements made in alternate versions of the program, if they
freedoms that you received. You must make sure that they, too, receive receive widespread use, become available for other developers to
or can get the source code. And you must show them these terms so they incorporate. Many developers of free software are heartened and
know their rights. encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
Developers that use the GNU GPL protect your rights with two steps: The GNU Affero General Public License is designed specifically to
(1) assert copyright on the software, and (2) offer you this License ensure that, in such cases, the modified source code becomes available
giving you legal permission to copy, distribute and/or modify it. to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
For the developers' and authors' protection, the GPL clearly explains An older license, called the Affero General Public License and
that there is no warranty for this free software. For both users' and published by Affero, was designed to accomplish similar goals. This is
authors' sake, the GPL requires that modified versions be marked as a different license, not a version of the Affero GPL, but Affero has
changed, so that their problems will not be attributed erroneously to released a new version of the Affero GPL which permits relicensing under
authors of previous versions. this license.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and The precise terms and conditions for copying, distribution and
modification follow. modification follow.
@ -72,7 +60,7 @@ modification follow.
0. Definitions. 0. Definitions.
"This License" refers to version 3 of the GNU General Public License. "This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks. works, such as semiconductor masks.
@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program. License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License. 13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work, License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License, but the work with which it is combined will remain governed by version
section 13, concerning interaction through a network will apply to the 3 of the GNU General Public License.
combination as such.
14. Revised Versions of this License. 14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will the GNU Affero General Public License from time to time. Such new versions
be similar in spirit to the present version, but may differ in detail to will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns. address new problems or concerns.
Each version is given a distinguishing version number. If the Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation. by the Free Software Foundation.
If the Program specifies that a proxy can decide which future If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you public statement of acceptance of a version permanently authorizes you
to choose that version for the Program. to choose that version for the Program.
@ -635,40 +633,29 @@ the "copyright" line and a pointer to where the full notice is found.
Copyright (C) <year> <name of author> Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU Affero General Public License as published
the Free Software Foundation, either version 3 of the License, or by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU Affero General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short If your software can interact with users remotely through a computer
notice like this when it starts in an interactive mode: network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
<program> Copyright (C) <year> <name of author> interface could display a "Source" link that leads users to an archive
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. of the code. There are many ways you could offer source, and different
This is free software, and you are welcome to redistribute it solutions will be better for different programs; see section 13 for the
under certain conditions; type `show c' for details. specific requirements.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school, You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary. if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>. <https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@ -67,10 +67,10 @@ Install the latest version throuth npm:
```sh ```sh
# recommend # recommend
$ cd hexo-site $ cd hexo-site
$ npm update hexo-theme-keep $ npm install hexo-theme-keep@latest
``` ```
Or update to latest master branch: Or update to the latest master branch:
```sh ```sh
$ cd themes/keep $ cd themes/keep

View File

@ -1,12 +1,13 @@
## ====================================================================================== ## ======================================================================================
## Keep v3.5.2 ## Keep v3.6.0
## Preview: https://xpoet.cn ## Preview: https://xpoet.cn
## Document: https://keep-docs.xpoet.cn ## Documents: https://keep-docs.xpoet.cn
## Repository: https://github.com/XPoet/hexo-theme-keep ## Repository: https://github.com/XPoet/hexo-theme-keep
## ====================================================================================== ## ======================================================================================
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# Your basic info # Your basic info
# Docs: https://keep-docs.xpoet.cn/tutorial/configuration-guide/base_info.html
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
base_info: base_info:
# Your blog website title # Your blog website title
@ -17,13 +18,14 @@ base_info:
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# Theme style settings # Theme style settings
# Docs: https://keep-docs.xpoet.cn/tutorial/configuration-guide/style.html
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
style: style:
# Theme primary color # Theme primary color
primary_color: "#0066cc" primary_color: "#0066cc"
# Your blog website logo image # Your blog website logo image
# You can use local image, image external link or dont fill # You can use local image, image external link or don't fill
logo: /images/logo.svg logo: /images/logo.svg
# Favicon (You can use local image or image external link) # Favicon (You can use local image or image external link)
@ -42,16 +44,16 @@ style:
# Mouse hover style settings # Mouse hover style settings
hover: hover:
# Shadow effect when the mouse hover. # Shadow effect when the mouse hover
shadow: false # Option values: true | false shadow: false # Option values: true | false
# Scale effect when the mouse hovers. # Scale effect when the mouse hovers
scale: false # Option values: true | false scale: false # Option values: true | false
# First screen style settings # First screen style settings
first_screen: first_screen:
enable: false # Option values: true | false enable: false # Option values: true | false
# Set transparent background for header. # Set transparent background for header
header_transparent: false # Option values: true | false header_transparent: false # Option values: true | false
# First screen background image (You can use local image or image external link) # First screen background image (You can use local image or image external link)
@ -78,6 +80,7 @@ style:
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# Navigation menu # Navigation menu
# Docs: https://keep-docs.xpoet.cn/tutorial/configuration-guide/menu.html
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# If you want to enable Categories and Tags, you need to create categories and tags pages # If you want to enable Categories and Tags, you need to create categories and tags pages
# e.g. `hexo new page categories` or `hexo new page tags` # e.g. `hexo new page categories` or `hexo new page tags`
@ -93,6 +96,7 @@ menu:
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# Social contact link # Social contact link
# Docs: https://keep-docs.xpoet.cn/tutorial/configuration-guide/social_contact.html
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
social_contact: social_contact:
enable: false # Option values: true | false enable: false # Option values: true | false
@ -112,19 +116,21 @@ social_contact:
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# Home page article block display settings # Home page article block display settings
# Docs: https://keep-docs.xpoet.cn/tutorial/configuration-guide/home_article.html
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
home_article: home_article:
# Show category in home page article block. # Show category in home page article block
category: category:
enable: false # Option values: true | false enable: false # Option values: true | false
limit: 3 # Max number of categories shown in home page article block limit: 3 # Max number of categories shown in home page article block
# Show tags in home page article block. # Show tags in home page article block
tag: tag:
enable: false # Option values: true | false enable: false # Option values: true | false
limit: 5 # Max number of tags shown in home page article block limit: 5 # Max number of tags shown in home page article block
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# Post page Settings # Post page Settings
# Docs: https://keep-docs.xpoet.cn/tutorial/configuration-guide/post.html
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
post: post:
# Author label in the post # Author label in the post
@ -154,6 +160,7 @@ post:
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# Code block # Code block
# Docs: https://keep-docs.xpoet.cn/tutorial/configuration-guide/code_block.html
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
code_block: code_block:
# Toolbar include: "code copy", "code block collapse" and "code language" # Toolbar include: "code copy", "code block collapse" and "code language"
@ -164,11 +171,12 @@ code_block:
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# Table of Contents in the Sidebar # Table of Contents in the Sidebar
# Docs: https://keep-docs.xpoet.cn/tutorial/configuration-guide/toc.html
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
toc: toc:
enable: false # Option values: true | false enable: false # Option values: true | false
# Automatically add list number to toc. # Automatically add list number to toc
number: false # Option values: true | false number: false # Option values: true | false
# If true, all level of TOC in a post will be displayed, rather than the activated part of it. # If true, all level of TOC in a post will be displayed, rather than the activated part of it.
@ -179,6 +187,7 @@ toc:
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# Website count # Website count
# Docs: https://keep-docs.xpoet.cn/tutorial/configuration-guide/website_count.html
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
website_count: website_count:
# busuanzi # busuanzi
@ -191,6 +200,7 @@ website_count:
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# Local Search # Local Search
# Docs: https://keep-docs.xpoet.cn/tutorial/configuration-guide/local_search.html
# Dependencies: hexo-generator-searchdb (`npm install hexo-generator-searchdb`) # Dependencies: hexo-generator-searchdb (`npm install hexo-generator-searchdb`)
# See: https://github.com/theme-next/hexo-generator-searchdb # See: https://github.com/theme-next/hexo-generator-searchdb
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
@ -200,6 +210,7 @@ local_search:
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# Comment plugin # Comment plugin
# Docs: https://keep-docs.xpoet.cn/tutorial/configuration-guide/comment.html
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
comment: comment:
enable: false # Option values: true | false enable: false # Option values: true | false
@ -211,6 +222,7 @@ comment:
valine: valine:
appid: # Your leancloud application appid appid: # Your leancloud application appid
appkey: # Your leancloud application appkey appkey: # Your leancloud application appkey
server_urls: # Your Server URL
placeholder: # Input box placeholder placeholder: # Input box placeholder
# Gitalk # Gitalk
@ -218,18 +230,19 @@ comment:
# https://gitalk.github.io # https://gitalk.github.io
gitalk: gitalk:
github_id: # GitHub repo owner github_id: # GitHub repo owner
github_admins: # GitHub Admins (in Array type), optional. github_admins: # GitHub Admins (in Array type), optional
repository: # Repository name to store issues repository: # Repository name to store issues
client_id: # GitHub Application Client ID client_id: # GitHub Application Client ID
client_secret: # GitHub Application Client Secret client_secret: # GitHub Application Client Secret
proxy: # GitHub oauth request reverse proxy for CORS
# Twikoo # Twikoo
# See: https://github.com/imaegoo/twikoo # See: https://github.com/imaegoo/twikoo
# https://twikoo.js.org # https://twikoo.js.org
twikoo: twikoo:
env_id: # Tencent Cloud environment id env_id: # Tencent Cloud environment id
region: # Environment region. If select Guangzhou, fill in "ap-guangzhou". region: # Environment region. If select Guangzhou, fill in "ap-guangzhou"
version: 1.6.7 # Twikoo version, default use v1.6.7 version: 1.6.8 # Twikoo version, default use v1.6.8
# Waline # Waline
# See: https://github.com/walinejs/waline # See: https://github.com/walinejs/waline
@ -241,7 +254,8 @@ comment:
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# RSS # RSS
# Dependencies: hexo-generator-feed # Docs: https://keep-docs.xpoet.cn/tutorial/configuration-guide/rss.html
# Dependencies: hexo-generator-feed (`npm install hexo-generator-feed`)
# See: https://github.com/hexojs/hexo-generator-feed # See: https://github.com/hexojs/hexo-generator-feed
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
rss: rss:
@ -249,12 +263,14 @@ rss:
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# Lazyload image # Lazyload image
# Docs: https://keep-docs.xpoet.cn/tutorial/configuration-guide/lazyload.html
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
lazyload: lazyload:
enable: false # Option values: true | false enable: false # Option values: true | false
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# CDN # CDN
# Docs: https://keep-docs.xpoet.cn/tutorial/configuration-guide/cdn.html
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
cdn: cdn:
enable: false # Option values: true | false enable: false # Option values: true | false
@ -262,14 +278,19 @@ cdn:
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# PJAX # PJAX
# Docs: https://keep-docs.xpoet.cn/tutorial/configuration-guide/pjax.html
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
pjax: pjax:
enable: false # Option values: true | false enable: false # Option values: true | false
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
# Footer settings # Footer settings
# Docs: https://keep-docs.xpoet.cn/tutorial/configuration-guide/footer.html
# --------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------
footer: footer:
since: 2020 # the starting year of your website. Can be null since: 2020 # The starting year of your website, Can be null
icp: # ICP record number of your website. Can be null icp: # ICP record number of your website, Can be null
upyun: # If your site is deployed on upyun, your can fill the upyun url. Can be null site_deploy:
enable: false # Option values: true | false
provider: github # Option values: github | vercel | netlify | gitee | aliyun | tencent_cloud | upyun
url: # Your deployment provider url, Can be null

View File

@ -66,7 +66,7 @@ theme: keep
```sh ```sh
# 推荐 # 推荐
$ cd hexo-site $ cd hexo-site
$ npm update hexo-theme-keep $ npm install hexo-theme-keep@latest
``` ```
或者通过 git 更新到最新的 master 分支: 或者通过 git 更新到最新的 master 分支:

View File

@ -67,7 +67,7 @@ theme: keep
```sh ```sh
# 推薦 # 推薦
$ cd hexo-site $ cd hexo-site
$ npm update hexo-theme-keep $ npm install hexo-theme-keep@latest
``` ```
或者透過 git 更新到最新的 master 分支: 或者透過 git 更新到最新的 master 分支:

View File

@ -10,7 +10,6 @@ page: Page %d
recent_posts: Recent Posts recent_posts: Recent Posts
share: Share share: Share
powered_by: "Powered by %s" powered_by: "Powered by %s"
footer_upyun: "CDN acceleration and Cloud storage services are provided by %s"
theme: Theme theme: Theme
rss_feed: RSS Feed rss_feed: RSS Feed
category: Category category: Category
@ -51,13 +50,20 @@ code_block:
copied: Copied copied: Copied
fold: Fold code block fold: Fold code block
folded: Folded folded: Folded
copy_copyright:
copy: Copy copyright info
copied: Copied
title: Original article title
author: Original article author
link: Original article link
copyright: copyright:
author: Post author author: Post author
title: Post title title: Post title
link: Post link link: Post link
create_time: Create time create_time: Create time
license_title: Copyright Notice license_title: Copyright notice
license_content: "All articles in this blog are licensed under %s unless stating additionally." license_content: "All articles in this blog are licensed under %s unless stating additionally."
article-aging: "It has been %s days since the last update of this article. Some contents may be outdated. Please pay attention to screening."
ago: ago:
second: "%s seconds ago" second: "%s seconds ago"
minute: "%s minutes ago" minute: "%s minutes ago"
@ -66,3 +72,12 @@ ago:
week: "%s weeks ago" week: "%s weeks ago"
month: "%s months ago" month: "%s months ago"
year: "%s years ago" year: "%s years ago"
footer_deploy: "This site is provided with deployment services by %s"
deploy_provider:
github: GitHub Pages
vercel: Vercel
netlify: Netlify
gitee: Gitee Pages
aliyun: Alibaba Cloud
tencent_cloud: Tencent Cloud
upyun: UPYUN

View File

@ -10,7 +10,6 @@ page: 第 %d 页
recent_posts: 最新文章 recent_posts: 最新文章
share: 分享 share: 分享
powered_by: "由 %s 驱动" powered_by: "由 %s 驱动"
footer_upyun: "本站由 %s 提供 CDN 加速和云存储服务"
theme: 主题 theme: 主题
rss_feed: RSS Feed rss_feed: RSS Feed
category: 分类 category: 分类
@ -51,6 +50,12 @@ code_block:
copied: 已复制 copied: 已复制
fold: 折叠代码块 fold: 折叠代码块
folded: 已折叠 folded: 已折叠
copy_copyright:
copy: 复制版权信息
copied: 已复制
title: 原文标题
author: 原文作者
link: 原文链接
copyright: copyright:
title: 本文标题 title: 本文标题
author: 本文作者 author: 本文作者
@ -58,6 +63,7 @@ copyright:
create_time: 创建时间 create_time: 创建时间
license_title: 版权声明 license_title: 版权声明
license_content: "本博客所有文章除特别声明外,均采用 %s 许可协议。转载请注明出处!" license_content: "本博客所有文章除特别声明外,均采用 %s 许可协议。转载请注明出处!"
article-aging: "本文距离上次更新已过去 %s 天,部分内容可能已经过时,请注意甄别。"
ago: ago:
second: "%s 秒前" second: "%s 秒前"
minute: "%s 分钟前" minute: "%s 分钟前"
@ -66,3 +72,12 @@ ago:
week: "%s 周前" week: "%s 周前"
month: "%s 个月前" month: "%s 个月前"
year: "%s 年前" year: "%s 年前"
footer_deploy: "本站由 %s 提供部署服务"
deploy_provider:
github: GitHub Pages
vercel: Vercel
netlify: Netlify
gitee: Gitee Pages
aliyun: 阿里云
tencent_cloud: 腾讯云
upyun: 又拍云

View File

@ -10,7 +10,6 @@ page: 第 %d 頁
recent_posts: 之前的文章 recent_posts: 之前的文章
share: 分享 share: 分享
powered_by: "%s 框架" powered_by: "%s 框架"
footer_upyun: "本站由 %s 提供 CDN 加速和雲存儲服務"
theme: 主題 theme: 主題
rss_feed: RSS 訂閱 rss_feed: RSS 訂閱
category: 分類 category: 分類
@ -51,6 +50,12 @@ code_block:
copied: 已復製 copied: 已復製
fold: 折疊代碼塊 fold: 折疊代碼塊
folded: 已折疊 folded: 已折疊
copy_copyright:
copy: 復製版權信息
copied: 已復製
title: 原文標題
author: 原文作者
link: 原文鏈接
copyright: copyright:
author: 文章作者 author: 文章作者
title: 文章標題 title: 文章標題
@ -58,6 +63,7 @@ copyright:
create_time: 撰寫時間 create_time: 撰寫時間
license_title: 版權宣告 license_title: 版權宣告
license_content: "這個網站所有文章均使用 %s 授權" license_content: "這個網站所有文章均使用 %s 授權"
article-aging: "本文距離上次更新已過去 %s 天,部分內容可能已經過時,請註意甄別。"
ago: ago:
second: "%s 秒前" second: "%s 秒前"
minute: "%s 分鐘前" minute: "%s 分鐘前"
@ -66,3 +72,12 @@ ago:
week: "%s 周前" week: "%s 周前"
month: "%s 個月前" month: "%s 個月前"
year: "%s 年前" year: "%s 年前"
footer_deploy: "本站由 %s 提供部署服務"
deploy_provider:
github: GitHub Pages
vercel: Vercel
netlify: Netlify
gitee: Gitee Pages
aliyun: 阿裏雲
tencent_cloud: 騰訊雲
upyun: 又拍雲

View File

@ -1,19 +1,25 @@
<%
const colon = config.language === 'en' ? ': ' : ''
%>
<div class="article-copyright-info-container"> <div class="article-copyright-info-container">
<ul class="copyright-info-content"> <ul class="copyright-info-content">
<li> <li class="post-title">
<span class="type"><%- __('copyright.title') %></span><span class="content"><%= page.title %></span> <span class="type"><%- __('copyright.title') %></span><%= colon %><span class="content"><%= page.title %></span>
</li> </li>
<li> <li class="post-author">
<span class="type"><%- __('copyright.author') %></span><span class="content"><%= theme.base_info.author || config.author %></span> <span class="type"><%- __('copyright.author') %></span><%= colon %><span class="content"><%= theme.base_info.author || config.author %></span>
</li> </li>
<li> <li class="post-time">
<span class="type"><%- __('copyright.create_time') %></span><span class="content"><%= date(page.date, 'YYYY-MM-DD HH:mm:ss') %></span> <span class="type"><%- __('copyright.create_time') %></span><%= colon %><span class="content"><%= date(page.date, 'YYYY-MM-DD HH:mm:ss') %></span>
</li> </li>
<li class="post-link"> <li class="post-link">
<span class="type"><%- __('copyright.link') %></span><span class="content"><%= page.path %></span> <span class="type"><%- __('copyright.link') %></span><%= colon %><span class="content"><%= page.path %></span>
</li> </li>
<li> <li class="post-license">
<span class="type"><%- __('copyright.license_title') %></span><span class="content"><%- __('copyright.license_content', '<a class="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">BY-NC-SA</a>') %></span> <span class="type"><%- __('copyright.license_title') %></span><%= colon %><span class="content"><%- __('copyright.license_content', '<a class="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">BY-NC-SA</a>') %></span>
</li> </li>
</ul> </ul>
<div class="copy-copyright-info flex-center tooltip" data-content="<%= __('copy_copyright.copy') %>" data-offset-y="-2px">
<i class="fa-solid fa-copy"></i>
</div>
</div> </div>

View File

@ -5,7 +5,8 @@ const {
client_secret, client_secret,
repository, repository,
github_id, github_id,
github_admins github_admins,
proxy
} = theme.comment?.gitalk } = theme.comment?.gitalk
let cdn_css = '//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.css' let cdn_css = '//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.css'
let cdn_js = '//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.min.js' let cdn_js = '//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.min.js'
@ -46,6 +47,7 @@ if (t_cdn_enable === true) {
owner: '<%= github_id %>', owner: '<%= github_id %>',
admin: '<%= github_admins || [github_id] %>', admin: '<%= github_admins || [github_id] %>',
id: __gitalk__pathname, id: __gitalk__pathname,
proxy: '<%= proxy %>',
language: '<%= config.language %>' language: '<%= config.language %>'
}).render('gitalk-container'); }).render('gitalk-container');
} catch (e) { } catch (e) {

View File

@ -3,6 +3,7 @@ const { enable: pjax_enable } = theme?.pjax
const { const {
appid, appid,
appkey, appkey,
server_urls,
placeholder placeholder
} = theme.comment?.valine } = theme.comment?.valine
let cdn_url = '//cdn.jsdelivr.net/npm/valine@latest/dist/Valine.min.js' let cdn_url = '//cdn.jsdelivr.net/npm/valine@latest/dist/Valine.min.js'
@ -25,7 +26,8 @@ if (t_cdn_enable === true) {
<div id="vcomments"></div> <div id="vcomments"></div>
<script <%= pjax_enable === true ? 'data-pjax' : '' %>> <script <%= pjax_enable === true ? 'data-pjax' : '' %>>
function loadValine() { function loadValine() {
new Valine({
const config = {
el: '#vcomments', el: '#vcomments',
appId: '<%= appid %>', appId: '<%= appid %>',
appKey: '<%= appkey %>', appKey: '<%= appkey %>',
@ -34,48 +36,54 @@ if (t_cdn_enable === true) {
enableQQ: true, enableQQ: true,
placeholder: '<%= placeholder %>', placeholder: '<%= placeholder %>',
lang: '<%= config.language %>'.toLowerCase() lang: '<%= config.language %>'.toLowerCase()
}); }
if ('<%= server_urls %>') {
config.serverURLs = '<%= server_urls %>'
}
new Valine(config)
function getAuthor(language) { function getAuthor(language) {
switch (language) { switch (language) {
case 'en': case 'en':
return 'Author'; return 'Author'
case 'zh-CN': case 'zh-CN':
return '博主'; return '博主'
default: default:
return 'Master'; return 'Master'
} }
} }
// Add "Author" identify // Add "Author" identify
const getValineDomTimer = setInterval(() => { const getValineDomTimer = setInterval(() => {
const vcards = document.querySelectorAll('#vcomments .vcards .vcard'); const vcards = document.querySelectorAll('#vcomments .vcards .vcard')
if (vcards.length > 0) { if (vcards.length > 0) {
let author = '<%= theme.base_info.author || config.author %>'; let author = '<%= theme.base_info.author || config.author %>'
if (author) { if (author) {
for (let vcard of vcards) { for (let vcard of vcards) {
const vnick_dom = vcard.querySelector('.vhead .vnick'); const vnick_dom = vcard.querySelector('.vhead .vnick')
const vnick = vnick_dom.innerHTML; const vnick = vnick_dom.innerHTML
if (vnick === author) { if (vnick === author) {
vnick_dom.innerHTML = `${vnick} <span class="author">${getAuthor(KEEP.hexo_config.language)}</span>` vnick_dom.innerHTML = `${vnick} <span class="author">${getAuthor(KEEP.hexo_config.language)}</span>`
} }
} }
} }
clearInterval(getValineDomTimer); clearInterval(getValineDomTimer)
} else { } else {
clearInterval(getValineDomTimer); clearInterval(getValineDomTimer)
} }
}, 2000); }, 2000)
} }
if ('<%= pjax_enable %>' === 'true') { if ('<%= pjax_enable %>' === 'true') {
const loadValineTimeout = setTimeout(() => { const loadValineTimeout = setTimeout(() => {
loadValine(); loadValine()
clearTimeout(loadValineTimeout); clearTimeout(loadValineTimeout)
}, 1000); }, 1000)
} else { } else {
window.addEventListener('DOMContentLoaded', loadValine); window.addEventListener('DOMContentLoaded', loadValine)
} }
</script> </script>
</div> </div>

View File

@ -1,5 +1,9 @@
<% <%
const { since: f_since, icp: f_icp, upyun: f_upyun } = theme.footer const {
since: f_since,
icp: f_icp,
site_deploy: f_site_deploy
} = theme.footer
const { author: bi_author } = theme.base_info const { author: bi_author } = theme.base_info
const { author: hexo_author } = config const { author: hexo_author } = config
const { site_uv: bsz_site_uv, site_pv: bsz_site_pv, enable: bsz_enable } = theme.website_count.busuanzi_count const { site_uv: bsz_site_uv, site_pv: bsz_site_pv, enable: bsz_enable } = theme.website_count.busuanzi_count
@ -30,7 +34,7 @@ const { site_uv: bsz_site_uv, site_pv: bsz_site_pv, enable: bsz_enable } = theme
</div> </div>
<% } %> <% } %>
<div class="theme-info info-item"> <div class="theme-info info-item">
<%- __('powered_by', '<a target="_blank" href="https://hexo.io">Hexo</a>') %>&nbsp;|&nbsp;<%- __('theme') %>&nbsp;<a class="theme-version" target="_blank" href="https://github.com/XPoet/hexo-theme-keep">Keep v3.5.2</a> <%- __('powered_by', '<a target="_blank" href="https://hexo.io">Hexo</a>') %>&nbsp;|&nbsp;<%- __('theme') %>&nbsp;<a class="theme-version" target="_blank" href="https://github.com/XPoet/hexo-theme-keep">Keep v3.6.0</a>
</div> </div>
<% if (f_icp) { %> <% if (f_icp) { %>
<div class="icp-info info-item"> <div class="icp-info info-item">
@ -41,11 +45,18 @@ const { site_uv: bsz_site_uv, site_pv: bsz_site_pv, enable: bsz_enable } = theme
</a> </a>
</div> </div>
<% } %> <% } %>
<% if (f_upyun) { %> <% if (f_site_deploy?.enable === true && f_site_deploy?.provider !== '') { %>
<div class="ypyun-info info-item"> <div class="deploy-info info-item">
<a target="_blank" rel="nofollow" href="<%= f_upyun %>"> <% if (f_site_deploy?.url) { %>
<%- __('footer_upyun', '<img src="/images/upyun.png" height="20">') %> <a target="_blank" rel="nofollow" href="<%= f_site_deploy?.url %>">
<% } %>
<%- __(
'footer_deploy',
'<span class="tooltip" data-content="' + __('deploy_provider.' + f_site_deploy?.provider) + '"><img src="/images/deploy-provider/' + f_site_deploy?.provider + '.png"></span>'
) %>
<% if (f_site_deploy?.url) { %>
</a> </a>
<% } %>
</div> </div>
<% } %> <% } %>
</div> </div>

View File

@ -29,10 +29,10 @@
</title> </title>
<%- css('css/style') %> <%- css('css/style') %>
<%- favicon_tag(theme.style.favicon) %> <%- favicon_tag(theme.style.favicon) %>
<%- __css('fontawesome/css/fontawesome.min.css') %> <%- __css('font/css/fontawesome.min.css') %>
<%- __css('fontawesome/css/regular.min.css') %> <%- __css('font/css/regular.min.css') %>
<%- __css('fontawesome/css/solid.min.css') %> <%- __css('font/css/solid.min.css') %>
<%- __css('fontawesome/css/brands.min.css') %> <%- __css('font/css/brands.min.css') %>
<%- export_config() %> <%- exportConfig() %>
</head> </head>

View File

@ -32,6 +32,12 @@
<% } %> <% } %>
<div class="article-content keep-markdown-body"> <div class="article-content keep-markdown-body">
<% if (page?.aging === true) { %>
<div class="article-aging-tips" data-update-date="<%= page.updated %>" data-aging-days="<%= page?.agingDays %>">
<i class="fa-solid fa-circle-exclamation"></i><%- __('article-aging', '<span class="days">0</span>') %>
</div>
<% } %>
<%- page.content %> <%- page.content %>
</div> </div>

View File

@ -1,6 +1,6 @@
{ {
"name": "hexo-theme-keep", "name": "hexo-theme-keep",
"version": "3.5.2", "version": "3.6.0",
"private": false, "private": false,
"description": "A simple and elegant theme for Hexo.", "description": "A simple and elegant theme for Hexo.",
"scripts": { "scripts": {

View File

@ -10,7 +10,7 @@ const yaml = require('js-yaml')
/** /**
* Export theme config to js * Export theme config to js
*/ */
hexo.extend.helper.register('export_config', function () { hexo.extend.helper.register('exportConfig', function () {
const { config, theme } = this const { config, theme } = this
// ------------------------ export language to js ------------------------ // ------------------------ export language to js ------------------------
@ -50,10 +50,11 @@ hexo.extend.helper.register('export_config', function () {
} }
return `<script id="hexo-configurations"> return `<script id="hexo-configurations">
let KEEP = window.KEEP || {}; let KEEP = window.KEEP || {}
KEEP.hexo_config = ${JSON.stringify(hexo_config)}; KEEP.hexo_config = ${JSON.stringify(hexo_config)}
KEEP.theme_config = ${JSON.stringify(theme_config)}; KEEP.theme_config = ${JSON.stringify(theme_config)}
KEEP.language_ago = ${JSON.stringify(languageContent['ago'])}; KEEP.language_ago = ${JSON.stringify(languageContent['ago'])}
KEEP.language_code_block = ${JSON.stringify(languageContent['code_block'])}; KEEP.language_code_block = ${JSON.stringify(languageContent['code_block'])}
KEEP.language_copy_copyright = ${JSON.stringify(languageContent['copy_copyright'])}
</script>` </script>`
}) })

View File

@ -261,6 +261,7 @@ button {
padding 0.2rem 0.6rem padding 0.2rem 0.6rem
color var(--text-color-6) color var(--text-color-6)
font-size 0.8rem font-size 0.8rem
letter-spacing 0.8px
white-space nowrap white-space nowrap
background var(--text-color-1) background var(--text-color-1)
border-radius 0.3rem border-radius 0.3rem

View File

@ -103,12 +103,18 @@ $scrollbar-background-color = darken($background-color-1, 10%)
$toc-scrollbar-color = alpha($text-color-3, 0.1) $toc-scrollbar-color = alpha($text-color-3, 0.1)
$copyright-info-color = #cc0033 $copyright-info-color = #cc0033
$avatar-background-color = $primary-color-dark-1 $avatar-background-color = $primary-color-dark-1
$header-transparent-background-1 = alpha($background-color-1, 0.28) $header-transparent-background-1 = alpha($background-color-1, 0.28)
$header-transparent-background-2 = alpha($background-color-1, 0.58) $header-transparent-background-2 = alpha($background-color-1, 0.4)
$pjax-progress-bar-color = linear-gradient(45deg, #f10006, #ef5b00, #e59c01, #19ca05, #00cab5, #0264c8, #c303c3) $pjax-progress-bar-color = linear-gradient(45deg, #f10006, #ef5b00, #e59c01, #19ca05, #00cab5, #0264c8, #c303c3)
$article-aging-tips-color = #b78d0f
$article-aging-tips-background-color = alpha($article-aging-tips-color, 0.1)
$article-aging-tips-border-color = alpha($article-aging-tips-color, 0.6)
// ============================================================================================== // ==============================================================================================
// theme dark mode color set // theme dark mode color set
@ -141,13 +147,18 @@ $dark-scrollbar-background-color = lighten($dark-background-color-1, 20%)
$dark-toc-scrollbar-color = alpha($dark-text-color-3, 0.1) $dark-toc-scrollbar-color = alpha($dark-text-color-3, 0.1)
$dark-copyright-info-color = darken($copyright-info-color, 20%) $dark-copyright-info-color = darken($copyright-info-color, 20%)
$dark-avatar-background-color = darken($avatar-background-color, 20%) $dark-avatar-background-color = darken($avatar-background-color, 20%)
$dark-header-transparent-background-1 = alpha($dark-background-color-1, 0.28) $dark-header-transparent-background-1 = alpha($dark-background-color-1, 0.28)
$dark-header-transparent-background-2 = alpha($dark-background-color-1, 0.58) $dark-header-transparent-background-2 = alpha($dark-background-color-1, 0.4)
$dark-pjax-progress-bar-color = linear-gradient(45deg, #ea404a, #ea722f, #e9a71f, #67e559, #18ecec, #1b85f1, #ee1dee) $dark-pjax-progress-bar-color = linear-gradient(45deg, #ea404a, #ea722f, #e9a71f, #67e559, #18ecec, #1b85f1, #ee1dee)
$dark-article-aging-tips-color = #ecc34d
$dark-article-aging-tips-background-color = alpha($dark-article-aging-tips-color, 0.1)
$dark-article-aging-tips-border-color = alpha($dark-article-aging-tips-color, 0.6)
// ============================================================================================== // ==============================================================================================
// font settings // font settings
@ -210,13 +221,23 @@ root-color(mode) {
--scrollbar-background-color mode == 'light' ? $scrollbar-background-color : $dark-scrollbar-background-color --scrollbar-background-color mode == 'light' ? $scrollbar-background-color : $dark-scrollbar-background-color
--toc-scrollbar-color mode == 'light' ? $toc-scrollbar-color : $dark-toc-scrollbar-color --toc-scrollbar-color mode == 'light' ? $toc-scrollbar-color : $dark-toc-scrollbar-color
// copyright info left side color
--copyright-info-color mode == 'light' ? $copyright-info-color : $dark-copyright-info-color --copyright-info-color mode == 'light' ? $copyright-info-color : $dark-copyright-info-color
// avatar background color
--avatar-background-color mode == 'light' ? $avatar-background-color : $dark-avatar-background-color --avatar-background-color mode == 'light' ? $avatar-background-color : $dark-avatar-background-color
// header transparent background color
--header-transparent-background-1 mode == 'light' ? $header-transparent-background-1 : $dark-header-transparent-background-1 --header-transparent-background-1 mode == 'light' ? $header-transparent-background-1 : $dark-header-transparent-background-1
--header-transparent-background-2 mode == 'light' ? $header-transparent-background-2 : $dark-header-transparent-background-2 --header-transparent-background-2 mode == 'light' ? $header-transparent-background-2 : $dark-header-transparent-background-2
// pjax progress bar color
--pjax-progress-bar-color mode == 'light' ? $pjax-progress-bar-color : $dark-pjax-progress-bar-color --pjax-progress-bar-color mode == 'light' ? $pjax-progress-bar-color : $dark-pjax-progress-bar-color
// article aging tips primary color
--article-aging-tips-color mode == 'light' ? $article-aging-tips-color : $dark-article-aging-tips-color
--article-aging-tips-background-color mode == 'light' ? $article-aging-tips-background-color : $dark-article-aging-tips-background-color
--article-aging-tips-border-color mode == 'light' ? $article-aging-tips-border-color : $dark-article-aging-tips-border-color
} }

View File

@ -2,7 +2,7 @@
position relative position relative
box-sizing border-box box-sizing border-box
width 100% width 100%
overflow hidden padding 0.8rem 0.8rem 0.8rem 1.3rem
font-size 1rem font-size 1rem
background var(--background-color-2) background var(--background-color-2)
@ -17,15 +17,21 @@
} }
&:hover {
.copy-copyright-info {
visibility visible
}
}
.copyright-info-content { .copyright-info-content {
position relative position relative
box-sizing border-box box-sizing border-box
padding 0.8rem 0.8rem 0.8rem 1.3rem
overflow-x auto overflow-x auto
&::-webkit-scrollbar { &::-webkit-scrollbar {
width 0.4rem width 0.3rem
height 0.4rem height 0.3rem
transition all 0.2s ease transition all 0.2s ease
} }
@ -56,4 +62,20 @@
} }
} }
} }
.copy-copyright-info {
position absolute
top 0.4rem
right 0.4rem
box-sizing border-box
padding 0.3rem
visibility hidden
cursor pointer
transition-t("visibility", "0", "0.2", "ease-in-out")
i {
color var(--text-color-3)
}
}
} }

View File

@ -17,7 +17,6 @@ $first-screen-font-color = $temp-font-color ? convert($temp-font-color) : var(--
if (!(hexo-config('style.first_screen.header_transparent') == true)) { if (!(hexo-config('style.first_screen.header_transparent') == true)) {
background-position-y $header-height background-position-y $header-height
}
+keep-tablet() { +keep-tablet() {
background-position-y $header-height * 0.9 background-position-y $header-height * 0.9
@ -26,6 +25,7 @@ $first-screen-font-color = $temp-font-color ? convert($temp-font-color) : var(--
+keep-mobile() { +keep-mobile() {
background-position-y $header-height * 0.8 background-position-y $header-height * 0.8
} }
}
.content { .content {
position relative position relative

View File

@ -2,7 +2,6 @@
color var(--text-color-4) color var(--text-color-4)
font-size 1rem font-size 1rem
a { a {
color var(--text-color-4) color var(--text-color-4)
@ -12,24 +11,33 @@
} }
.info-container { .info-container {
padding-bottom 1rem
text-align center
}
.info-item {
margin 0.3rem 0
color var(--text-color-4)
&.ypyun-info a {
display flex display flex
flex-direction column
align-items center align-items center
justify-content center justify-content center
padding-bottom 1rem
.info-item {
margin 0.2rem 0
color var(--text-color-4)
&.deploy-info {
display flex
a
.tooltip {
display flex
align-items center
}
img { img {
margin 0 0.3rem height 1.2rem
margin 0 0.4rem
} }
} }
} }
}
.icon-animate { .icon-animate {
animation icon-animate 1.2s ease-in-out infinite animation icon-animate 1.2s ease-in-out infinite

View File

@ -145,6 +145,28 @@ $toc-container-width = 15rem
color var(--text-color-3) color var(--text-color-3)
word-wrap break-word word-wrap break-word
.article-aging-tips {
position relative
display none
box-sizing border-box
margin-bottom 1.8rem
padding 1rem
color var(--article-aging-tips-color)
line-height 1.6
background var(--article-aging-tips-background-color)
border 0.1rem solid var(--article-aging-tips-border-color)
border-radius 0.4rem
i {
margin-right 0.4rem
color var(--article-aging-tips-color)
}
.days {
color var(--article-aging-tips-color)
}
}
if (hexo-config('post.copyright_info') == true || hexo-config('copyright_info.enable') == true) { if (hexo-config('post.copyright_info') == true || hexo-config('copyright_info.enable') == true) {
border-bottom 0.1rem dashed var(--border-color) border-bottom 0.1rem dashed var(--border-color)
} }

View File

@ -5,11 +5,6 @@
height auto height auto
background var(--background-color-1) background var(--background-color-1)
+keep-tablet() {
padding-left 0 !important
}
.page-main-content { .page-main-content {
position relative position relative
box-sizing border-box box-sizing border-box
@ -18,13 +13,18 @@
&.is-home { &.is-home {
.transparent-1 { .transparent-1 {
background var(--header-transparent-background-1) background var(--header-transparent-background-1)
-webkit-backdrop-filter blur(4px)
backdrop-filter blur(4px)
} }
.transparent-2 { .transparent-2 {
background var(--header-transparent-background-2) background var(--header-transparent-background-2)
-webkit-backdrop-filter blur(5px)
backdrop-filter blur(5px)
} }
} }
.header-shrink & { .header-shrink & {
padding-top $header-shrink-height padding-top $header-shrink-height
@ -78,7 +78,6 @@
+keep-tablet() { +keep-tablet() {
height $header-height * 0.9 height $header-height * 0.9
padding-left 0 !important
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -114,14 +114,74 @@ function initToggleShowToc() {
observer.observe(commentsCountDom, config) observer.observe(commentsCountDom, config)
}, },
// set post link
initSetPostLink() { initSetPostLink() {
const postLinkContentDom = document.querySelector( const postLinkContentDom = document.querySelector(
'.copyright-info-content .post-link .content' '.copyright-info-content .post-link .content'
) )
postLinkContentDom && (postLinkContentDom.innerHTML = decodeURI(window.location.href)) postLinkContentDom && (postLinkContentDom.innerHTML = decodeURI(window.location.href))
},
// copy copyright info
copyCopyrightInfo() {
const cicDom = document.querySelector('.copyright-info-content')
const copyDom = document.querySelector('.copy-copyright-info')
const copyIcon = copyDom.querySelector('i')
const ccLang = KEEP.language_copy_copyright
const colon = KEEP.hexo_config.language === 'en' ? ': ' : ''
let isCopied = false
const setCopyDomContent = (class1, class2, content, copied) => {
if (copyIcon) {
copyIcon.classList.remove(class1)
copyIcon.classList.add(class2)
}
const tooltipDom = copyDom.querySelector('.tooltip-content')
tooltipDom && (tooltipDom.innerHTML = content)
isCopied = copied
}
copyDom.addEventListener('click', () => {
if (!isCopied) {
const author = cicDom.querySelector('.post-author .content').innerHTML
const link = cicDom.querySelector('.post-link .content').innerHTML
const tgtTxt = `${ccLang.author}${colon}${author}\n${ccLang.link}${colon}${link}`
navigator.clipboard.writeText(tgtTxt).then(() => {
setCopyDomContent('fa-copy', 'fa-check', ccLang.copied, true)
})
}
})
copyDom.addEventListener('mouseleave', () => {
setTimeout(() => {
setCopyDomContent('fa-check', 'fa-copy', ccLang.copy, false)
}, 500)
})
},
// set article aging tips
setArticleAgingDays() {
const agingTipsDom = document.querySelector('.article-content .article-aging-tips')
if (agingTipsDom) {
const daysDom = agingTipsDom.querySelector('.days')
const nowTimestamp = Date.now()
const tmpTimeLength = 24 * 60 * 60 * 1000
const agingDaysTimestamp = (agingTipsDom.dataset?.agingDays || 30) * tmpTimeLength
const postUpdateTimestamp = new Date(agingTipsDom.dataset.updateDate).getTime()
const timeDifference = nowTimestamp - postUpdateTimestamp
const timeDifferenceDays = (timeDifference / tmpTimeLength).toFixed(0)
if (timeDifference >= agingDaysTimestamp) {
daysDom.innerHTML = timeDifferenceDays
agingTipsDom.style.display = 'block'
}
}
} }
} }
KEEP.utils.postHelper.initSetPostToolsLeft() KEEP.utils.postHelper.initSetPostToolsLeft()
KEEP.utils.postHelper.setArticleAgingDays()
if (KEEP.theme_config.toc?.enable === true) { if (KEEP.theme_config.toc?.enable === true) {
KEEP.utils.postHelper.initToggleToc() KEEP.utils.postHelper.initToggleToc()
} }
@ -131,6 +191,7 @@ function initToggleShowToc() {
} }
if (KEEP.theme_config.post?.copyright_info === true) { if (KEEP.theme_config.post?.copyright_info === true) {
KEEP.utils.postHelper.initSetPostLink() KEEP.utils.postHelper.initSetPostLink()
KEEP.utils.postHelper.copyCopyrightInfo()
} }
} }