Skip to content

Commit

Permalink
Update footer.swig
Browse files Browse the repository at this point in the history
1. Fix by comments some blocks.
2. Target blank in external links.
3. Separate `powered`, `theme` and `custom` options & refactor some formatting.
  • Loading branch information
ivan-nginx authored Sep 28, 2017
1 parent 1744875 commit 3ec54ae
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions layout/_partials/footer.swig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="copyright" >
{% set current = date(Date.now(), "YYYY") %}
&copy; {% if theme.footer.since and theme.footer.since != current %} {{ theme.footer.since }} &mdash; {% endif %}
<span itemprop="copyrightYear">{{ current }}</span>
<div class="copyright">{#
#}{% set current = date(Date.now(), "YYYY") %}{#
#}&copy; {% if theme.footer.since and theme.footer.since != current %}{{ theme.footer.since }} &mdash; {% endif %}{#
#}<span itemprop="copyrightYear">{{ current }}</span>
<span class="with-love">
<i class="fa fa-{{ theme.footer.icon }}"></i>
</span>
Expand All @@ -15,31 +15,33 @@
{% if theme.post_wordcount.item_text %}
<span class="post-meta-item-text">{{ __('post.totalcount') }}&#58;</span>
{% endif %}
<span title="{{ __('post.totalcount') }}">
{{ totalcount(site, '0,0.0a') }}
</span>
<span title="{{ __('post.totalcount') }}">{#
#}{{ totalcount(site, '0,0.0a') }}{#
#}</span>
{% endif %}
</div>

{% if theme.footer.powered %}
<div class="powered-by">{#
#}{{ __('footer.powered', '<a class="theme-link" href="https://hexo.io">Hexo</a>') }}{#
#}{{ __('footer.powered', '<a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a>') }}{#
#}</div>
{% endif %}

{% if theme.footer.theme %}
<span class="post-meta-divider">|</span>
<div class="theme-info">{#
#}{{ __('footer.theme') }} &mdash; {#
#}<a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">{#
#}NexT.{{ theme.scheme }}{#
#}</a>{% if theme.footer.version %} v{{ theme.version }}{% endif %}{#
#}</div>
{% endif %}
{% if theme.footer.powered and theme.footer.theme.enable %}
<span class="post-meta-divider">|</span>
{% endif %}

{% if theme.footer.custom_text %}
<span class="post-meta-divider">|</span>
<div class="powered-by">{#
#}{{ theme.footer.custom_text }}{#
#}</div>
{% endif %}
{% if theme.footer.theme.enable %}
<div class="theme-info">{#
#}{{ __('footer.theme') }} &mdash; {#
#}<a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">{#
#}NexT.{{ theme.scheme }}{#
#}</a>{% if theme.footer.theme.version %} v{{ theme.version }}{% endif %}{#
#}</div>
{% endif %}

{% if theme.footer.custom_text %}
<div class="footer-custom">{#
#}{{ theme.footer.custom_text }}{#
#}</div>
{% endif %}

0 comments on commit 3ec54ae

Please sign in to comment.