From 45dfbddb95fd428a6004ac2a29612e89008060ff Mon Sep 17 00:00:00 2001 From: jokiestrunk Date: Sun, 17 Sep 2017 10:55:08 -0400 Subject: [PATCH 1/4] Options to better control footer. Signed-off-by: jokiestrunk --- _config.yml | 20 ++++++++++++++------ layout/_partials/footer.swig | 28 ++++++++++++++++++---------- 2 files changed, 32 insertions(+), 16 deletions(-) diff --git a/_config.yml b/_config.yml index a8a361372..89e97179d 100755 --- a/_config.yml +++ b/_config.yml @@ -21,15 +21,23 @@ keywords: "Hexo, NexT" # Set rss to specific value if you have burned your feed already. rss: -# Specify the date when the site was setup -#since: 2015 +footer: + # Specify the date when the site was setup. + #since: 2015 -# icon between year and author @Footer -authoricon: heart + # Icon between year and copyright info. + icon: heart -# Footer `powered-by` and `theme-info` copyright -copyright: true + # Hexo link (Powered by Hexo). + powered: true + # Theme & scheme info link (Theme - NexT.scheme). + theme: true + + # NexT version info (vX.X.X). + version: true + + #custom_text: # --------------------------------------------------------------- # SEO Settings diff --git a/layout/_partials/footer.swig b/layout/_partials/footer.swig index bf74da67a..26b7bbf2e 100644 --- a/layout/_partials/footer.swig +++ b/layout/_partials/footer.swig @@ -1,9 +1,9 @@ -{% if theme.copyright %} +{% if theme.footer.powered %}
{# #}{{ __('footer.powered', 'Hexo') }}{# #}
- + {% if theme.footer.theme %} + +
{# + #}{{ __('footer.theme') }} — {# + #}{# + #}NexT.{{ theme.scheme }}{# + #}{% if theme.footer.version %} v{{ theme.version }}{% endif %}{# + #}
+ {% endif %} -
{# - #}{{ __('footer.theme') }} — {# - #}{# - #}NexT.{{ theme.scheme }}{# - #} v{{ theme.version }}{# -#}
+ {% if theme.footer.custom_text %} + +
{# + #}{{ theme.footer.custom_text }}{# + #}
+ {% endif %} {% endif %} From 1744875bda8b5bb8048637687061461afb702343 Mon Sep 17 00:00:00 2001 From: jokiestrunk Date: Mon, 18 Sep 2017 13:25:51 -0400 Subject: [PATCH 2/4] Added option to overried author from Hexo main config. Signed-off-by: jokiestrunk --- _config.yml | 3 +++ layout/_partials/footer.swig | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 89e97179d..0f3300fdb 100755 --- a/_config.yml +++ b/_config.yml @@ -37,6 +37,9 @@ footer: # NexT version info (vX.X.X). version: true + # If value not defined, will be used `author` from Hexo main config. + copyright: + #custom_text: # --------------------------------------------------------------- diff --git a/layout/_partials/footer.swig b/layout/_partials/footer.swig index 26b7bbf2e..ac6535da8 100644 --- a/layout/_partials/footer.swig +++ b/layout/_partials/footer.swig @@ -5,7 +5,7 @@ - {{ config.author }} + {{ theme.footer.copyright || config.author }} {% if theme.post_wordcount.totalcount %} From 3ec54aed4a5c435d48a40b97e86d7fcaeeb1fbc2 Mon Sep 17 00:00:00 2001 From: "Ivan.Nginx" Date: Fri, 29 Sep 2017 01:39:58 +0300 Subject: [PATCH 3/4] Update footer.swig 1. Fix by comments some blocks. 2. Target blank in external links. 3. Separate `powered`, `theme` and `custom` options & refactor some formatting. --- layout/_partials/footer.swig | 48 +++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/layout/_partials/footer.swig b/layout/_partials/footer.swig index ac6535da8..68e7e5ef3 100644 --- a/layout/_partials/footer.swig +++ b/layout/_partials/footer.swig @@ -1,7 +1,7 @@ -