From e2c61a4ec388c954f98d3c9ad2ea3f3843a22771 Mon Sep 17 00:00:00 2001 From: genroot Date: Mon, 17 May 2021 15:01:47 +0800 Subject: [PATCH 1/7] feat: get upyun support --- _config.yml | 86 +++++++++++++++---------------------- layout/_partial/footer.ejs | 5 +++ source/images/upyun.png | Bin 0 -> 28041 bytes 3 files changed, 40 insertions(+), 51 deletions(-) create mode 100644 source/images/upyun.png diff --git a/_config.yml b/_config.yml index d7a94b1..efe722a 100644 --- a/_config.yml +++ b/_config.yml @@ -8,13 +8,12 @@ base_info: # Logo image (You can use local image, image external link or don’t fill) logo_img: - # --------------------------------------------------------------------------------------- # Theme style settings # --------------------------------------------------------------------------------------- style: # Theme primary color - primary_color: '#0066CC' + primary_color: "#0066CC" # Avatar (You can use local image or image external link) avatar: /images/avatar.svg @@ -33,13 +32,13 @@ style: # Mouse hover hover: - shadow: false # shadow effect when the mouse hover - scale: false # scale effect when the mouse hover + shadow: false # shadow effect when the mouse hover + scale: false # scale effect when the mouse hover # First screen first_screen: enable: false - background_img: /images/bg.svg # You can use local image or image external link + background_img: /images/bg.svg # You can use local image or image external link description: Keep writing and Keep loving. # Scroll style settings @@ -49,22 +48,20 @@ style: percent: enable: false - # --------------------------------------------------------------------------------------- # Social contact link # --------------------------------------------------------------------------------------- social_contact: enable: false links: - github: # your GitHub URL - weixin: # your WeChat QR-Code URL - qq: # your QQ QR-Code URL - weibo: # your WeiBo URL - zhihu: # your ZhiHu URL - twitter: # your twitter URL - facebook: # your facebook URL - email: # your email - + github: # your GitHub URL + weixin: # your WeChat QR-Code URL + qq: # your QQ QR-Code URL + weibo: # your WeiBo URL + zhihu: # your ZhiHu URL + twitter: # your twitter URL + facebook: # your facebook URL + email: # your email # --------------------------------------------------------------------------------------- # Navigation menu @@ -79,18 +76,16 @@ menu: # Changelog: /changelog # ...... - # --------------------------------------------------------------------------------------- # Home page article block display settings # --------------------------------------------------------------------------------------- home_article: category: - enable: false # show category in home page article block - limit: 3 # max number of categories shown in home page article block + enable: false # show category in home page article block + limit: 3 # max number of categories shown in home page article block tag: - enable: false # show tags in home page article block - limit: 5 # max number of tags shown in home page article block - + enable: false # show tags in home page article block + limit: 5 # max number of tags shown in home page article block # --------------------------------------------------------------------------------------- # Post page Settings @@ -101,24 +96,22 @@ post: # See: https://github.com/willin/hexo-wordcount word_count: enable: false - wordcount: false # word count, one article - min2read: false # time to read, one article + wordcount: false # word count, one article + min2read: false # time to read, one article # Author label author_label: enable: true - auto: true # if true, show Lv1, Lv2, Lv3... , If false, show custom label + auto: true # if true, show Lv1, Lv2, Lv3... , If false, show custom label # label array item can be one or more - custom_label_list: [ "Trainee", "Engineer", "Architect", "CTO", "BOSS" ] - + custom_label_list: ["Trainee", "Engineer", "Architect", "CTO", "BOSS"] # --------------------------------------------------------------------------------------- # Code copy # --------------------------------------------------------------------------------------- code_copy: enable: false - style: default # values: default | mac - + style: default # values: default | mac # --------------------------------------------------------------------------------------- # Table of Contents in the Sidebar @@ -135,14 +128,12 @@ toc: # If true, open TOC every time when you enter the article page init_open: false - # --------------------------------------------------------------------------------------- # Post copyright info # --------------------------------------------------------------------------------------- copyright_info: enable: false - # --------------------------------------------------------------------------------------- # Website count # --------------------------------------------------------------------------------------- @@ -155,7 +146,6 @@ website_count: site_pv: false page_pv: false - # --------------------------------------------------------------------------------------- # Local Search # Dependencies: hexo-generator-searchdb @@ -163,37 +153,35 @@ website_count: # --------------------------------------------------------------------------------------- local_search: enable: false - preload: false # Preload the search data when the page loads - + preload: false # Preload the search data when the page loads # --------------------------------------------------------------------------------------- # Comment plugin # --------------------------------------------------------------------------------------- comment: enable: false - use: valine # values: valine | gitalk | twikoo + use: valine # values: valine | gitalk | twikoo # Valine # See: https://github.com/xCss/Valine valine: - appid: # your leancloud application appid - appkey: # your leancloud application appkey - placeholder: # your placeholder + appid: # your leancloud application appid + appkey: # your leancloud application appkey + placeholder: # your placeholder # Gitalk # See: https://github.com/gitalk/gitalk gitalk: - github_id: # GitHub repo owner - repository: # Repository name to store issues - client_id: # GitHub Application Client ID - client_secret: # GitHub Application Client Secret + github_id: # GitHub repo owner + repository: # Repository name to store issues + client_id: # GitHub Application Client ID + client_secret: # GitHub Application Client Secret # Twikoo # See: https://github.com/imaegoo/twikoo twikoo: - env_id: # Tencent Cloud environment id - region: # environment region. If select Guangzhou, fill in "ap-guangzhou". - + env_id: # Tencent Cloud environment id + region: # environment region. If select Guangzhou, fill in "ap-guangzhou". # --------------------------------------------------------------------------------------- # RSS @@ -203,35 +191,31 @@ comment: rss: enable: false - # --------------------------------------------------------------------------------------- # Lazyload image # --------------------------------------------------------------------------------------- lazyload: enable: false - # --------------------------------------------------------------------------------------- # CDN # --------------------------------------------------------------------------------------- cdn: enable: false - # --------------------------------------------------------------------------------------- # PJAX # --------------------------------------------------------------------------------------- pjax: enable: false - # --------------------------------------------------------------------------------------- # Footer settings # --------------------------------------------------------------------------------------- footer: - since: 2020 # the starting year of your website, Can be null - icp: # ICP record number 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 + upyun: # url # --------------------------------------------------------------------------------------- # Keep version (Please don't modify) diff --git a/layout/_partial/footer.ejs b/layout/_partial/footer.ejs index 51e4d25..0211f4d 100644 --- a/layout/_partial/footer.ejs +++ b/layout/_partial/footer.ejs @@ -28,5 +28,10 @@ <% if (theme.footer.hasOwnProperty('icp') && theme.footer.icp) { %>
<%= theme.footer.icp %>
<% } %> + <% if (theme.footer.hasOwnProperty('upyun') && theme.footer.upyun) { %> +
本网站由 + upyun + 提供CDN加速/云存储服务
+ <% } %> diff --git a/source/images/upyun.png b/source/images/upyun.png new file mode 100644 index 0000000000000000000000000000000000000000..bf8ee10087c82cb9db09c8fd615bae64587f969f GIT binary patch literal 28041 zcmeIbby!qe`|v+Q3KEJS0@Bjm9ZE||Nl6b4GjvL*fS`0YlF}WLV-S)OO2epx^dQ~u z=A84Ko~UA=Mk4-869y#)dZ&0A~gxacS=37bLf*-gx$rVw@y zdl*m}1QM0-fSH)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%|Fnl9&`BeYWXen^08G;IA~;SM{M+4f?88prYO&1SL+)XFg#G<-Jb^+U2_iSZYN+i zxjbPN!ONRs5h0Ushm#(fS$$MSTT7&CRPX4L^_G_22(sTW^B<&uVL;^t?5hP9NkW3iNRe?@T= ze#*-E4Z!tNZ$p3#<91$`yLW~=zP#~;<&0M=fTA`xe|yN=G-)W7jXU^*pA64cuR@ZdR@AzPV`` z0WM7h#UclrP}VIWbmQ_0rajVg8{X@w93;cAWf~4y3ha)Ex#=pp(7)i zlR6Z5UgyZy)3k&uJs&aV=KJ721P?e;@fFmSC$_~PyQFeiS6(J literal 0 HcmV?d00001 From 7eef517ca054aea91946f9a3fc9fb53e2685ba32 Mon Sep 17 00:00:00 2001 From: xiongzhi Date: Wed, 19 May 2021 21:44:42 +0800 Subject: [PATCH 2/7] fix: add 'code-theme.styl' into 'style.styl' to enable the 'mac' code theme in deployment --- source/css/style.styl | 1 + 1 file changed, 1 insertion(+) diff --git a/source/css/style.styl b/source/css/style.styl index 9b2c540..dea0030 100644 --- a/source/css/style.styl +++ b/source/css/style.styl @@ -2,6 +2,7 @@ @import "common/markdown.styl" @import "common/codeblock/highlight.styl" @import "common/codeblock/copy-code.styl" +@import "common/codeblock/code-theme.styl" @import "layout/page.styl" @import "layout/_partial/local-search.styl" @import "layout/_partial/toc.styl" From 0cff21ce976973394d152142843a5456ee954135 Mon Sep 17 00:00:00 2001 From: Wait Date: Wed, 2 Jun 2021 15:37:14 +0800 Subject: [PATCH 3/7] footer: remove since extra space --- layout/_partial/footer.ejs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layout/_partial/footer.ejs b/layout/_partial/footer.ejs index 51e4d25..3ad5280 100644 --- a/layout/_partial/footer.ejs +++ b/layout/_partial/footer.ejs @@ -3,7 +3,8 @@ From 0dcfdcea5a0732dc9aa0784646508f40244a65ce Mon Sep 17 00:00:00 2001 From: you Date: Sun, 20 Jun 2021 11:31:51 +0800 Subject: [PATCH 4/7] feat: Traditional Chinese language added. --- languages/zh-TW.yml | 46 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 languages/zh-TW.yml diff --git a/languages/zh-TW.yml b/languages/zh-TW.yml new file mode 100644 index 0000000..a7451f1 --- /dev/null +++ b/languages/zh-TW.yml @@ -0,0 +1,46 @@ +search: 搜尋... +prev: 上一頁 +next: 下一頁 +prev_posts: 上一篇 +next_posts: 下一篇 +page: 第 %d 頁 +recent_posts: 之前的文章 +share: 分享 +powered_by: "%s 框架" +theme: 主題 +rss_feed: RSS 訂閱 +category: 分類 +categories: 分類 +tag: 標籤 +tags: 標籤 +tagcloud: 標籤雲 +comment: 留言 +comments: 留言 +home: 首頁 +archive: 歸檔 +archives: 歸檔 +about: 關於 +site_uv: 讀者 +site_pv: 閱覽 +links: 友鏈 +link: 友鏈 +top: 頂端 +read_more: 繼續閱讀... +wordcount: 字數 +min2read: 分鐘 +changelog: 日誌 +copyright: + author: 文章作者 + title: 文章標題 + link: 永久連結 + create_time: 撰寫時間 + license_title: 版權宣告 + license_content: "這個網站所有文章均使用 %s 授權。" +ago: + second: "%s 秒前" + minute: "%s 分鐘前" + hour: "%s 小時前" + day: "%s 天前" + week: "%s 周前" + month: "%s 個月前" + year: "%s 年前" From f178b727661bf35ed5784c42a4bb54e81bfc4cd9 Mon Sep 17 00:00:00 2001 From: you Date: Sun, 20 Jun 2021 12:01:07 +0800 Subject: [PATCH 5/7] feat: Traditional Chinese readme added. --- README.md | 6 ++- README_zh-CN.md | 5 ++- README_zh-TW.md | 112 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 119 insertions(+), 4 deletions(-) create mode 100644 README_zh-TW.md diff --git a/README.md b/README.md index 15aa500..4b50047 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@
Language: English - 中文 + 简中 + 繁中 +
Keep @@ -108,5 +110,5 @@ This project exists thanks to all the people who contribute. ## :memo: License -[MIT](https://github.com/XPoet/picx/blob/master/LICENSE) Copyright © 2020 XPoet +[MIT](https://github.com/XPoet/picx/blob/master/LICENSE) Copyright © 2020-2021 XPoet diff --git a/README_zh-CN.md b/README_zh-CN.md index 91016e8..880c466 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -1,7 +1,8 @@
语言: - 中文 + 简中 English + 繁中
Keep @@ -108,4 +109,4 @@ $ git stash pop ## :memo: 许可 -[MIT](https://github.com/XPoet/picx/blob/master/LICENSE) Copyright © 2020 XPoet +[MIT](https://github.com/XPoet/picx/blob/master/LICENSE) Copyright © 2020-2021 XPoet diff --git a/README_zh-TW.md b/README_zh-TW.md new file mode 100644 index 0000000..c9fe568 --- /dev/null +++ b/README_zh-TW.md @@ -0,0 +1,112 @@ +
+ 語言: + 繁中 + English + 简中 +
+ +Keep + +# hexo-theme-keep + +«Keep» 是一款簡約優雅的 [Hexo](https://hexo.io) 主題。它能讓你更專注於寫作。 + +[![Github License](https://img.shields.io/github/license/XPoet/hexo-theme-keep.svg?style=flat-square)](https://github.com/XPoet/hexo-theme-ils/blob/master/LICENSE) +[![Github Release](https://img.shields.io/github/release/XPoet/hexo-theme-keep.svg?style=flat-square)](https://github.com/XPoet/hexo-theme-ils/releases) +[![NPM version](https://img.shields.io/npm/v/hexo-theme-keep?color=red&logo=npm&style=flat-square)](https://www.npmjs.com/package/hexo-theme-keep) +[![Required Hexo version](https://img.shields.io/badge/hexo-%3E=5.0.0-blue?style=flat-square&logo=hexo)](https://hexo.io) +[![Node.js Version](https://img.shields.io/badge/node-%3E=12.0-success.svg?style=flat-square&logo=Node.js&longCache=true)](https://hexo.io) +[![jsDelivr hits](https://img.shields.io/jsdelivr/npm/hm/hexo-theme-keep?style=flat-square&logo=jsdelivr)](https://www.jsdelivr.com/package/npm/hexo-theme-keep) + +## :star2: 線上預覽 + +- **[XPoet's Blog](https://xpoet.cn/)** +- **[keep 預覽網頁](https://keep.xpoet.cn/)** +- **[keep 官方文檔](https://keep-docs.xpoet.cn/)** + +## :rocket: 安装 + +如果你在使用 Hexo 5.0 或更高版本,最簡單的安裝方式是透過 npm: + +```sh +$ cd hexo-site +$ npm install hexo-theme-keep +``` + +你也可以直接 clone 整個原始碼庫: + +```sh +$ cd hexo-site +$ git clone https://github.com/XPoet/hexo-theme-keep themes/keep +``` + +安裝完成後,在 Hexo 配置文件中將 `theme` 設定為 `keep`。 + +```yml +theme: keep +``` + +## :wrench: 使用 + +請查看 «Keep» 官方文檔: + +- **[Keep 官方文檔](https://keep-docs.xpoet.cn/)** +- **[Keep 主題配置指南](https://keep-docs.xpoet.cn/usage-tutorial/configuration-guide.html)** +- **[Keep 主題進階使用](https://keep-docs.xpoet.cn/usage-tutorial/advanced.html)** + +不推薦直接修改 «Keep» 主題的文件。因為這可能導致錯誤(例如 git merge 衝突),並且在更新主題時修改的文件可能丟失。 + +## :dart: 更新 + +«Keep» 不定期發布新版本。你可以透過如下命令更新 «Keep»。 + +透過 npm 安裝最新版本: + +```sh +$ cd hexo-site +$ npm update hexo-theme-keep +``` + +或者透過 git 更新到最新的 master 分支: + +```sh +$ cd themes/keep +$ git pull +``` + +_如果你修改了主題原始碼:_ + +```sh +$ git add . +$ git stash +$ git pull +$ git stash pop +``` + +## :art: 貢獻 + +我們歡迎你加入 «Keep» 的開發,貢獻出你的一份力量。請看[Keep 原始碼貢獻指南](https://keep.xpoet.cn/2020/11/Keep-代码贡献指南/)。 + +## :clapper: 貢獻者 + +這個項目的存在多虧了所有的貢獻者。 + + + + + +## :sparkling_heart: 銘謝 + +«Keep» 特别感謝這些支持我們核心基本設施的優質服務: + + + +> GitHub 允許我們存放 Git 原始碼庫及運行測試。 + + + +> jsDelivr 提供了 CDN 服務。 + +## :memo: 許可 + +[MIT](https://github.com/XPoet/picx/blob/master/LICENSE) Copyright © 2020-2021 XPoet From 04303ad18bb41ce3db9ae1c1d3089026dc0de484 Mon Sep 17 00:00:00 2001 From: nspyf <316851756@qq.com> Date: Fri, 8 Oct 2021 13:55:03 +0800 Subject: [PATCH 6/7] feat: add page.keywords and page.description --- layout/_partial/head.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index 43573db..d111e68 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -1,8 +1,8 @@ - - + + <% let title = page.title; From e64439573150e308cbd9ed379f7e0e6591cbf96b Mon Sep 17 00:00:00 2001 From: XPoet Date: Tue, 19 Oct 2021 23:21:32 +0800 Subject: [PATCH 7/7] ui: optimize page container style --- source/css/common/basic.styl | 3 +++ source/css/layout/page.styl | 7 +++++-- source/js/utils.js | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/source/css/common/basic.styl b/source/css/common/basic.styl index 3f5d52a..b619a28 100644 --- a/source/css/common/basic.styl +++ b/source/css/common/basic.styl @@ -36,6 +36,9 @@ // html, body // ====================================================================== html, body { + position: relative; + width: 100%; + height: 100%; margin: 0; padding: 0; color: var(--default-text-color); diff --git a/source/css/layout/page.styl b/source/css/layout/page.styl index 8e99334..d4bf0b6 100644 --- a/source/css/layout/page.styl +++ b/source/css/layout/page.styl @@ -1,8 +1,12 @@ $temp-width = hexo-config('style.left_side_width'); -$page-aside-width = $temp-width ? convert($temp-width):260px; +$page-aside-width = $temp-width ? convert($temp-width) : 260px; .page-container { position: relative; + box-sizing: border-box; + width: 100%; + height: auto; + background: var(--background-color); transition-t("padding-left", "0", "0.3", "ease-out"); @@ -85,7 +89,6 @@ $page-aside-width = $temp-width ? convert($temp-width):260px; display: flex; justify-content: center; padding: $component-spacing-value 0; - background: var(--background-color); +keep-tablet() { padding: $component-spacing-value * 0.8 0; diff --git a/source/js/utils.js b/source/js/utils.js index b7794bb..f8b15b1 100644 --- a/source/js/utils.js +++ b/source/js/utils.js @@ -197,7 +197,7 @@ KEEP.initUtils = () => { const innerHeight = window.innerHeight; const pb_dom = document.querySelector('.page-main-content-bottom'); if (allDomHeight < innerHeight) { - pb_dom.style.marginTop = (innerHeight - allDomHeight) + 'px'; + pb_dom.style.marginTop = Math.floor(innerHeight - allDomHeight) + 'px'; } },