hexo-theme-next/layout/_partials/post/post-copyright.njk
2020-08-20 00:41:09 +08:00

30 lines
1.1 KiB
Plaintext

{%- set ccIcon = '<i class="fab fa-fw fa-creative-commons"></i>' %}
{%- set ccText = theme.creative_commons.license | upper %}
<div class="post-copyright">
<ul>
<li class="post-copyright-author">
{%- if page.author %}
<strong>{{ __('post.copyright.post_author') + __('symbol.colon') }} </strong>
{{- page.author }}
{%- elif author %}
<strong>{{ __('post.copyright.author') + __('symbol.colon') }} </strong>
{{- author }}
{%- endif %}
</li>
<li class="post-copyright-link">
{%- if page.post_link %}
<strong>{{ __('post.copyright.post_link') + __('symbol.colon') }}</strong>
{{ next_url(page.post_link, page.post_link, {title: page.title}) }}
{%- else %}
<strong>{{ __('post.copyright.link') + __('symbol.colon') }}</strong>
{{ next_url(page.permalink, page.permalink, {title: page.title}) }}
{%- endif %}
</li>
<li class="post-copyright-license">
<strong>{{ __('post.copyright.license_title') + __('symbol.colon') }} </strong>
{{- __('post.copyright.license_content', next_url(ccURL, ccIcon + ccText)) }}
</li>
</ul>
</div>