From 2a56ddfe2c3cbf932f535e4922f294df85011214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E6=A1=93=E6=A1=93?= Date: Sun, 27 Mar 2022 10:04:53 +0800 Subject: [PATCH 01/30] feat: solve #136 --- layout/_partial/comment/twikoo.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/_partial/comment/twikoo.ejs b/layout/_partial/comment/twikoo.ejs index 4f1882d..957f6b8 100644 --- a/layout/_partial/comment/twikoo.ejs +++ b/layout/_partial/comment/twikoo.ejs @@ -1,7 +1,7 @@ <% if(theme.comment.use === 'twikoo' && theme.comment.twikoo.env_id) { %>
+ <% } %> <% if (theme.social_contact.enable) { %>
<% for (const key in theme.social_contact.links) { %> diff --git a/source/js/utils.js b/source/js/utils.js index f89e74f..58ddab0 100644 --- a/source/js/utils.js +++ b/source/js/utils.js @@ -330,25 +330,6 @@ KEEP.initUtils = () => { }, 200); }, - - // loading hitokoto - initHitokoto() { - - if (KEEP.theme_config.style.first_screen.enable === true && KEEP.theme_config.style.first_screen.hitokoto && window.location.pathname === '/') { - - fetch(KEEP.theme_config.style.first_screen.hitokoto) - .then((res) => { - return res.json(); - }) - .then((data) => { - this.firstScreen_dom.querySelector('.description').innerText = data.hitokoto; - }) - .catch((err) => { - console.error(err); - }) - } - - } } // init scroll @@ -378,7 +359,4 @@ KEEP.initUtils = () => { // set how long age in home article block KEEP.utils.setHowLongAgoInHome(); - // loading hitokoto - KEEP.utils.initHitokoto(); - } From b0afe56663503b7a123dc54e24c861c4bf5b065a Mon Sep 17 00:00:00 2001 From: AOAOSTAR <86001674+aoaostar@users.noreply.github.com> Date: Wed, 27 Apr 2022 15:07:30 +0800 Subject: [PATCH 05/30] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E4=B8=8Btable=E6=98=BE=E7=A4=BA=E6=BA=A2=E5=87=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/css/common/markdown.styl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/css/common/markdown.styl b/source/css/common/markdown.styl index 73f11fb..f3a6dbd 100644 --- a/source/css/common/markdown.styl +++ b/source/css/common/markdown.styl @@ -210,6 +210,12 @@ width: 100%; overflow: auto; + @media screen and (max-width: 768px) { + & { + table-layout: fixed; + } + } + td, th { padding: 0; From 989cbfef5eac6c39d20c3bededbf658098f6db44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E6=A1=93=E6=A1=93?= Date: Wed, 11 May 2022 19:44:44 +0800 Subject: [PATCH 06/30] feat: allows gitalk to support multi-admins --- layout/_partial/comment/gitalk.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/_partial/comment/gitalk.ejs b/layout/_partial/comment/gitalk.ejs index 2c5b73f..0d743ad 100644 --- a/layout/_partial/comment/gitalk.ejs +++ b/layout/_partial/comment/gitalk.ejs @@ -24,7 +24,7 @@ clientSecret: '<%= theme.comment.gitalk.client_secret %>', repo: '<%= theme.comment.gitalk.repository %>', owner: '<%= theme.comment.gitalk.github_id %>', - admin: ['<%= theme.comment.gitalk.github_id %>'], + admin: <% if (theme.comment.gitalk.github_admins) { %><%= theme.comment.gitalk.github_admins %><% } else { %>['<%= theme.comment.gitalk.github_id %>']<% } %>, id: __gitalk__pathname, language: '<%= config.language %>' }).render('gitalk-container'); From a226c99958a6afa1353414bb51452c6025a9f924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E6=A1=93=E6=A1=93?= Date: Wed, 11 May 2022 19:50:55 +0800 Subject: [PATCH 07/30] feat: add `github_admins` option in ex. config --- _config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/_config.yml b/_config.yml index c982f3b..9b47d2e 100644 --- a/_config.yml +++ b/_config.yml @@ -173,6 +173,7 @@ comment: # See: https://github.com/gitalk/gitalk gitalk: github_id: # GitHub repo owner + github_admins: # GitHub Admins (in Array type), optional. repository: # Repository name to store issues client_id: # GitHub Application Client ID client_secret: # GitHub Application Client Secret From 2d80c45ec5f3f557e29ff72c43628f6339bcb64f Mon Sep 17 00:00:00 2001 From: XPoet Date: Fri, 23 Sep 2022 14:23:26 +0800 Subject: [PATCH 08/30] style(gitalk): gitalk.ejs code optimization --- layout/_partial/comment/gitalk.ejs | 69 ++++++++++++++++-------------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/layout/_partial/comment/gitalk.ejs b/layout/_partial/comment/gitalk.ejs index 0d743ad..423928a 100644 --- a/layout/_partial/comment/gitalk.ejs +++ b/layout/_partial/comment/gitalk.ejs @@ -1,46 +1,49 @@ +<% const { client_id, client_secret, repository, github_id, github_admins } = theme.comment.gitalk %> + <% if( theme.comment.use === 'gitalk' - && theme.comment.gitalk.client_id - && theme.comment.gitalk.client_secret - && theme.comment.gitalk.github_id - && theme.comment.gitalk.repository + && client_id + && client_secret + && github_id + && repository ) { %>
<% } %> From 49e0e1212feb38633b9eab76fea884a1fd2eda24 Mon Sep 17 00:00:00 2001 From: XPoet Date: Fri, 23 Sep 2022 14:51:16 +0800 Subject: [PATCH 09/30] perf(config): optimize base_info.logo settings --- _config.yml | 12 ++++++++++-- layout/_partial/header.ejs | 11 ++++++++--- source/css/layout/_partial/header.styl | 2 +- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/_config.yml b/_config.yml index 9b47d2e..bd289da 100644 --- a/_config.yml +++ b/_config.yml @@ -2,11 +2,19 @@ # Your basic info # --------------------------------------------------------------------------------------- base_info: + # Your website title title: Keep Theme + + # Your blog author name author: Keep Team + + # Your website url url: https://keep.xpoet.cn/ - # Logo image (You can use local image, image external link or don’t fill) - logo_img: + + # Your website logo image + # You can use local image, image external link or don’t fill + logo: /images/logo.svg + # --------------------------------------------------------------------------------------- # Theme style settings diff --git a/layout/_partial/header.ejs b/layout/_partial/header.ejs index 93c5b75..6c241dd 100644 --- a/layout/_partial/header.ejs +++ b/layout/_partial/header.ejs @@ -1,14 +1,19 @@
+ <% + const { title, logo, logo_img } = theme.base_info + const { title: configTitle } = config + %> +
diff --git a/source/css/layout/_partial/header.styl b/source/css/layout/_partial/header.styl index 444bf6b..bb4ab0a 100644 --- a/source/css/layout/_partial/header.styl +++ b/source/css/layout/_partial/header.styl @@ -50,7 +50,7 @@ $logo-image-box-width = 46px; } - if (hexo-config('base_info.logo_img') && hexo-config('base_info.logo_img') != '') { + if (hexo-config('base_info.logo_img') || hexo-config('base_info.logo')) { .logo-image { width: $logo-image-box-width; height: $logo-image-box-width; From 6bfc5a7f8ade4a2b55047acb799e655305077759 Mon Sep 17 00:00:00 2001 From: XPoet Date: Fri, 23 Sep 2022 17:38:19 +0800 Subject: [PATCH 10/30] perf(footer): optimize footer style and configuration --- _config.yml | 8 ++-- layout/_partial/footer.ejs | 60 +++++++++++++++++-------- source/css/layout/_partial/footer.styl | 14 +++++- source/images/upyun.png | Bin 28041 -> 16877 bytes 4 files changed, 56 insertions(+), 26 deletions(-) diff --git a/_config.yml b/_config.yml index 10b4341..ed3de9c 100644 --- a/_config.yml +++ b/_config.yml @@ -15,7 +15,6 @@ base_info: # You can use local image, image external link or don’t fill logo: /images/logo.svg - # --------------------------------------------------------------------------------------- # Theme style settings # --------------------------------------------------------------------------------------- @@ -223,10 +222,9 @@ pjax: # Footer settings # --------------------------------------------------------------------------------------- footer: - since: 2020 # the starting year of your website, Can be null - icp: # ICP record number of your website, Can be null - upyun: # url - code: # Statistical codes 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: # If your site is deployed on upyun, Your can fill the upyun url (Can be null) # --------------------------------------------------------------------------------------- # Keep version (Please don't modify) diff --git a/layout/_partial/footer.ejs b/layout/_partial/footer.ejs index be95069..38f760b 100644 --- a/layout/_partial/footer.ejs +++ b/layout/_partial/footer.ejs @@ -1,22 +1,33 @@ +<% +const { version } = theme +const { since: f_since, icp: f_icp, upyun: f_upyun } = theme.footer +const { author: bi_author } = theme.base_info +const { author: hexo_author } = config +const { site_uv: bsz_site_uv, site_pv: bsz_site_pv, enable: bsz_enable } = theme.website_count.busuanzi_count +%>