initial
This commit is contained in:
26
themes/next/layout/_partials/post/post-copyright.swig
Normal file
26
themes/next/layout/_partials/post/post-copyright.swig
Normal file
@ -0,0 +1,26 @@
|
||||
{% set ccLicense = theme.creative_commons.license | lower %}
|
||||
{% set ccLanguage = theme.creative_commons.language %}
|
||||
{% set ccIcon = '<i class="fa fa-fw fa-creative-commons"></i>' %}
|
||||
{% set ccText = ccLicense | upper %}
|
||||
{% if ccLicense === 'zero' %}
|
||||
{% set ccType = 'publicdomain/zero/1.0/' + ccLanguage %}
|
||||
{% else %}
|
||||
{% set ccType = 'licenses/' + ccLicense + '/4.0/' + ccLanguage %}
|
||||
{% endif %}
|
||||
{% set ccURL = 'https://creativecommons.org/' + ccType %}
|
||||
|
||||
<ul class="post-copyright">
|
||||
<li class="post-copyright-author">
|
||||
<strong>{{ __('post.copyright.author') + __('symbol.colon') }} </strong>{#
|
||||
#}{{ post.author || author }}{#
|
||||
#}</li>
|
||||
<li class="post-copyright-link">
|
||||
<strong>{{ __('post.copyright.link') + __('symbol.colon') }}</strong>
|
||||
{% set postURL = post.url || post.permalink %}
|
||||
{{ next_url(postURL, postURL, {title: post.title}) }}
|
||||
</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>
|
20
themes/next/layout/_partials/post/post-related.swig
Normal file
20
themes/next/layout/_partials/post/post-related.swig
Normal file
@ -0,0 +1,20 @@
|
||||
{% set popular_posts = popular_posts_json(theme.related_posts.params, post) %}
|
||||
{% if popular_posts.json and popular_posts.json.length > 0 %}
|
||||
<div class="popular-posts-header">{{ theme.related_posts.title | default(__('post.related_posts')) }}</div>
|
||||
<ul class="popular-posts">
|
||||
{% for popular_post in popular_posts.json %}
|
||||
<li class="popular-posts-item">
|
||||
{% if popular_post.date and popular_post.date != '' %}
|
||||
<div class="popular-posts-date">{{ popular_post.date }}</div>
|
||||
{% endif %}
|
||||
{% if popular_post.img && popular_post.img != '' %}
|
||||
<div class="popular-posts-img"><img src="{{ popular_post.img }}"/></div>
|
||||
{% endif %}
|
||||
<div class="popular-posts-title"><a href="{{ popular_post.path }}" rel="bookmark">{{ popular_post.title }}</a></div>
|
||||
{% if popular_post.excerpt && popular_post.excerpt != '' %}
|
||||
<div class="popular-posts-excerpt"><p>{{ popular_post.excerpt }}</p></div>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
22
themes/next/layout/_partials/post/reward.swig
Normal file
22
themes/next/layout/_partials/post/reward.swig
Normal file
@ -0,0 +1,22 @@
|
||||
<div id="reward-container">
|
||||
<div>{{ theme.reward_settings.comment }}</div>
|
||||
<button id="reward-button" disable="enable" onclick="var qr = document.getElementById("qr"); qr.style.display = (qr.style.display === 'none') ? 'block' : 'none';">
|
||||
{{ __('reward.donate') }}
|
||||
</button>
|
||||
<div id="qr" style="display: none;">
|
||||
|
||||
{% for name, image in theme.reward %}
|
||||
{% set builtin = ['wechatpay', 'alipay', 'bitcoin'] %}
|
||||
{% if builtin.indexOf(name) !== -1 %}
|
||||
{% set translation = __('reward.' + name) %}
|
||||
{% else %}
|
||||
{% set translation = name %}
|
||||
{% endif %}
|
||||
<div style="display: inline-block">
|
||||
<img src="{{ url_for(image) }}" alt="{{ author }} {{ translation }}"/>
|
||||
<p>{{ translation }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</div>
|
4
themes/next/layout/_partials/post/wechat-subscriber.swig
Normal file
4
themes/next/layout/_partials/post/wechat-subscriber.swig
Normal file
@ -0,0 +1,4 @@
|
||||
<div id="wechat_subscriber" style="display: block; padding: 10px 0; margin: 20px auto; width: 100%; text-align: center;">
|
||||
<img id="wechat_subscriber_qcode" src="{{ url_for(theme.wechat_subscriber.qcode) }}" alt="{{ author }} wechat" style="width: 200px; max-width: 100%;"/>
|
||||
<div>{{ theme.wechat_subscriber.description }}</div>
|
||||
</div>
|
Reference in New Issue
Block a user