From ca9b16ee1014986d1afaf01ccdacfb6fa06fbadd Mon Sep 17 00:00:00 2001 From: shiroku <3091742436@qq.com> Date: Wed, 22 Jul 2020 11:08:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86?= =?UTF-8?q?=E7=94=A8=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _config.yml | 36 ++++++++++++++++++------------------ languages/default.yml | 2 +- languages/en.yml | 2 +- languages/zh-CN.yml | 6 +++--- languages/zh-TW.yml | 8 ++++---- layout/includes/footer.pug | 31 ++++++++++++++++--------------- 6 files changed, 43 insertions(+), 42 deletions(-) diff --git a/_config.yml b/_config.yml index 11b2fe7..4a8560f 100644 --- a/_config.yml +++ b/_config.yml @@ -94,7 +94,7 @@ avatar: # the banner image of home page index_img: -# if the banner of page not setting,it will show the top_img +# if the banner of page not setting, it will show the top_img default_top_img: https://i.loli.net/2020/05/01/IuWi8QbHvzjlOPw.jpg # the banner image of archive page @@ -159,7 +159,7 @@ wordcount: # Display the article introduction on homepage # 1: description -# 2: both (if the description exists, it will show description. or show the auto_excerpt) +# 2: both (if the description exists, it will show description, or show the auto_excerpt) # 3: auto_excerpt (default) index_post_content: method: 3 @@ -252,7 +252,7 @@ comments: # - Disqus text: true # Display the comment name next to the button load_begin: false # The second comment system will auto load when visiting the website - count: false # Dispaly comment count in top_img + count: false # Display comment count in top_img # disqus # https://disqus.com/ @@ -260,7 +260,7 @@ disqus: shortname: # Alternative Disqus - Render comments with Disqus API -# DisqusJS評論系統,可以實現在網路審查地區載入 Disqus 評論列表,兼容原版 +# DisqusJS 評論系統,可以實現在網路審查地區載入 Disqus 評論列表,兼容原版 # https://github.com/SukkaW/DisqusJS disqusjs: shortname: @@ -271,7 +271,7 @@ disqusjs: admin: adminLabel: -# livere(來必力) +# livere (來必力) # https://www.livere.com/ livere: uid: @@ -298,8 +298,8 @@ valine: pageSize: 10 # comment list page size avatar: monsterid # gravatar style https://valine.js.org/#/avatar lang: en # i18n: zh-CN/zh-TW/en/ja - placeholder: Please leave your footprints # valine comment input placeholder(like: Please leave your footprints ) - guest_info: nick,mail,link #valine comment header info (nick/mail/link) + placeholder: Please leave your footprints # valine comment input placeholder (like: Please leave your footprints) + guest_info: nick,mail,link # valine comment header info (nick/mail/link) recordIP: false # Record reviewer IP serverURLs: # This configuration is suitable for domestic custom domain name users, overseas version will be automatically detected (no need to manually fill in) bg: # valine background @@ -363,17 +363,17 @@ gitter: # Footer Settings # -------------------------------------- -since: 2020 - -footer_custom_text: - -footer_copyright: true - -ICP: - enable: false - url: - text: - icon: /img/icp.png +footer: + owner: # 顯示站長信息 + enable: true + since: 2020 + custom_text: Hi, welcome to my blog! # 頁腳自定義文本 + copyright: true # 顯示框架及主題作者信息 + ICP: # 備案信息 + enable: false + url: + text: + icon: /img/icp.png # Analysis # -------------------------------------- diff --git a/languages/default.yml b/languages/default.yml index df86004..e3a5524 100644 --- a/languages/default.yml +++ b/languages/default.yml @@ -3,7 +3,7 @@ sidebar: have_read: You've read footer: - driven: Driven + framework: Framework theme: Theme copy: diff --git a/languages/en.yml b/languages/en.yml index df86004..e3a5524 100644 --- a/languages/en.yml +++ b/languages/en.yml @@ -3,7 +3,7 @@ sidebar: have_read: You've read footer: - driven: Driven + framework: Framework theme: Theme copy: diff --git a/languages/zh-CN.yml b/languages/zh-CN.yml index d49227b..ae6b207 100644 --- a/languages/zh-CN.yml +++ b/languages/zh-CN.yml @@ -3,7 +3,7 @@ sidebar: have_read: 你已经读了 footer: - driven: 驱动 + framework: 框架 theme: 主题 copy: @@ -39,13 +39,13 @@ post: search: 搜索 algolia_search: input_placeholder: 搜索文章 - hits_empty: '找不到您查询的内容:${query}' + hits_empty: '找不到您查询的内容:${query}' hits_stats: '找到 ${hits} 条结果,用时 ${time} 毫秒' local_search: label: 本地搜索 input_placeholder: 搜索文章 - hits_empty: '找不到您查询的内容:${query}' + hits_empty: '找不到您查询的内容:${query}' powered: '提供支持' by: 由 diff --git a/languages/zh-TW.yml b/languages/zh-TW.yml index 361e5d6..74902a2 100644 --- a/languages/zh-TW.yml +++ b/languages/zh-TW.yml @@ -3,8 +3,8 @@ sidebar: have_read: 你已經讀了 footer: - driven: Power by - theme: Theme + framework: 框架 + theme: 主題 copy: success: 複製成功 @@ -39,13 +39,13 @@ post: search: 搜尋 algolia_search: input_placeholder: 搜尋文章 - hits_empty: '找不到您查詢的內容:${query}' + hits_empty: '找不到您查詢的內容:${query}' hits_stats: '找到 ${hits} 條結果,用時 ${time} 毫秒' local_search: label: 本地搜尋 input_placeholder: 搜尋文章 - hits_empty: '找不到您查詢的內容:${query}' + hits_empty: '找不到您查詢的內容:${query}' powered: '提供支援' by: 由 diff --git a/layout/includes/footer.pug b/layout/includes/footer.pug index c1e710d..0d7388d 100644 --- a/layout/includes/footer.pug +++ b/layout/includes/footer.pug @@ -1,24 +1,25 @@ #footer-wrap - - var now = new Date() - - var nowYear = now.getFullYear() - if theme.since && theme.since != nowYear - .copyright!= `©${theme.since} - ${nowYear} By ${config.author}` - else - .copyright!= `©${nowYear} By ${config.author}` - if theme.footer_copyright + if theme.footer.owner.enable + - var now = new Date() + - var nowYear = now.getFullYear() + if theme.footer.owner.since && theme.footer.owner.since != nowYear + .copyright!= `©${theme.footer.owner.since} - ${nowYear} By ${config.author}` + else + .copyright!= `©${nowYear} By ${config.author}` + if theme.footer.copyright .framework-info - span= _p('footer.driven') + ' ' + span= _p('footer.framework') + ' ' a(href='https://hexo.io') span Hexo span.footer-separator | span= _p('footer.theme') + ' ' a(href='https://github.com/jerryc127/hexo-theme-butterfly') span Butterfly - if theme.footer_custom_text - .footer_custom_text!=`${theme.footer_custom_text}` - if theme.ICP.enable + if theme.footer.custom_text + .footer.custom_text!=`${theme.footer.custom_text}` + if theme.footer.ICP.enable .icp - a(href=theme.ICP.url) - if theme.ICP.icon - img.icp-icon(src=url_for(theme.ICP.icon)) - span=theme.ICP.text + a(href=theme.footer.ICP.url) + if theme.footer.ICP.icon + img.icp-icon(src=url_for(theme.footer.ICP.icon)) + span=theme.footer.ICP.text \ No newline at end of file From 6d0931eb9ca43d3ef3ef165ec887e946462b142b Mon Sep 17 00:00:00 2001 From: Akira Lin <64728373+SerokSSR@users.noreply.github.com> Date: Wed, 22 Jul 2020 15:37:29 +0800 Subject: [PATCH 2/2] Update footer.pug --- layout/includes/footer.pug | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/includes/footer.pug b/layout/includes/footer.pug index 0d7388d..1016589 100644 --- a/layout/includes/footer.pug +++ b/layout/includes/footer.pug @@ -16,10 +16,10 @@ a(href='https://github.com/jerryc127/hexo-theme-butterfly') span Butterfly if theme.footer.custom_text - .footer.custom_text!=`${theme.footer.custom_text}` + .footer_custom_text!=`${theme.footer.custom_text}` if theme.footer.ICP.enable .icp a(href=theme.footer.ICP.url) if theme.footer.ICP.icon img.icp-icon(src=url_for(theme.footer.ICP.icon)) - span=theme.footer.ICP.text \ No newline at end of file + span=theme.footer.ICP.text