From d6b4336e9c73afea2d7fb9ee4a73d14da4f2fa3c Mon Sep 17 00:00:00 2001 From: AOAOSTAR <86001674+aoaostar@users.noreply.github.com> Date: Fri, 15 Apr 2022 21:02:52 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BA=95=E9=83=A8?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E4=BB=A3=E7=A0=81=20(#2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _config.yml | 1 + layout/_partial/footer.ejs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/_config.yml b/_config.yml index c982f3b..d9e7b4f 100644 --- a/_config.yml +++ b/_config.yml @@ -216,6 +216,7 @@ 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 # --------------------------------------------------------------------------------------- # Keep version (Please don't modify) diff --git a/layout/_partial/footer.ejs b/layout/_partial/footer.ejs index 476b75e..be95069 100644 --- a/layout/_partial/footer.ejs +++ b/layout/_partial/footer.ejs @@ -34,5 +34,10 @@ upyun 提供CDN加速/云存储服务 <% } %> + <% if (theme.footer.hasOwnProperty('code') && theme.footer.code) { %> +
+ <%- theme.footer.code %> +
+ <% } %> From ff697b2aff90cbb076a34bfb2c222604edf8a1e7 Mon Sep 17 00:00:00 2001 From: AOAOSTAR <86001674+aoaostar@users.noreply.github.com> Date: Sun, 17 Apr 2022 23:38:45 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A6=96=E5=B1=8F?= =?UTF-8?q?=E6=96=87=E5=AD=97=E6=8E=A5=E5=85=A5=E4=B8=80=E8=A8=80=20(#103)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _config.yml | 1 + source/js/utils.js | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/_config.yml b/_config.yml index d9e7b4f..ab20c1d 100644 --- a/_config.yml +++ b/_config.yml @@ -40,6 +40,7 @@ style: enable: false background_img: /images/bg.svg # You can use local image or image external link description: Keep writing and Keep loving. + hitokoto: # Hitokoto api. https://v1.hitokoto.cn # Scroll style settings scroll: diff --git a/source/js/utils.js b/source/js/utils.js index 5578c4d..f89e74f 100644 --- a/source/js/utils.js +++ b/source/js/utils.js @@ -329,6 +329,25 @@ KEEP.initUtils = () => { }, 200); }, 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); + }) + } + } } @@ -359,4 +378,7 @@ KEEP.initUtils = () => { // set how long age in home article block KEEP.utils.setHowLongAgoInHome(); + // loading hitokoto + KEEP.utils.initHitokoto(); + } From 18fb91d6db7413549d47d05b569aca361b447fec Mon Sep 17 00:00:00 2001 From: AOAOSTAR <86001674+aoaostar@users.noreply.github.com> Date: Wed, 27 Apr 2022 14:30:06 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E8=A8=80?= =?UTF-8?q?=E4=B8=BAjs=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _config.yml | 2 +- layout/_partial/first-screen.ejs | 5 ++++- source/js/utils.js | 22 ---------------------- 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/_config.yml b/_config.yml index ab20c1d..fc7c0a6 100644 --- a/_config.yml +++ b/_config.yml @@ -40,7 +40,7 @@ style: enable: false background_img: /images/bg.svg # You can use local image or image external link description: Keep writing and Keep loving. - hitokoto: # Hitokoto api. https://v1.hitokoto.cn + hitokoto: # Hitokoto api. https://v1.hitokoto.cn/?encode=js # Scroll style settings scroll: diff --git a/layout/_partial/first-screen.ejs b/layout/_partial/first-screen.ejs index 5351a1f..398af3c 100644 --- a/layout/_partial/first-screen.ejs +++ b/layout/_partial/first-screen.ejs @@ -1,8 +1,11 @@
-
+
<%= theme.style.first_screen.description || config.description %>
+ <% if (theme.style.first_screen.hitokoto) { %> + + <% } %> <% 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 4/4] =?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;