Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed comment count and reward QR #595

Merged
merged 2 commits into from
Feb 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions layout/_macro/post.swig
Original file line number Diff line number Diff line change
Expand Up @@ -148,37 +148,43 @@
{% endmacro %}
{% if theme.facebook_comments_plugin.enable %}
{{ comments() }}
<span class="post-meta-item-text">{{ __('post.comments_count') + __('symbol.colon') }}</span>
<a href="{{ url_for(post.path) }}#comments" itemprop="discussionUrl">
<span class="post-meta-item-text">{{ __('post.comments_count') + __('symbol.colon') }}</span> <span class="post-comments-count fb-comments-count" data-href="{{ post.permalink }}" itemprop="commentCount">0</span>
<span class="post-comments-count fb-comments-count" data-href="{{ post.permalink }}" itemprop="commentCount">0</span>
</a>
</span>
{% elseif theme.disqus.enable and theme.disqus.count %}
{{ comments() }}
<span class="post-meta-item-text">{{ __('post.comments_count') + __('symbol.colon') }}</span>
<a href="{{ url_for(post.path) }}#comments" itemprop="discussionUrl">
<span class="post-meta-item-text">{{ __('post.comments_count') + __('symbol.colon') }}</span> <span class="post-comments-count disqus-comment-count" data-disqus-identifier="{{ post.path }}" itemprop="commentCount"></span>
<span class="post-comments-count disqus-comment-count" data-disqus-identifier="{{ post.path }}" itemprop="commentCount"></span>
</a>
</span>
{% elseif theme.changyan.enable and theme.changyan.appid and theme.changyan.appkey %}
{{ comments() }}
{% if is_post() %}
<span class="post-meta-item-text">{{ __('post.comments_count') + __('symbol.colon') }}</span>
<a href="{{ url_for(post.path) }}#SOHUCS" itemprop="discussionUrl">
<span class="post-meta-item-text">{{ __('post.comments_count') + __('symbol.colon') }}</span> <span id="changyan_count_unit" class="post-comments-count hc-comment-count" data-xid="{{ post.path }}" itemprop="commentCount"></span>
<span id="changyan_count_unit" class="post-comments-count hc-comment-count" data-xid="{{ post.path }}" itemprop="commentCount"></span>
</a>
{% else %}
<span class="post-meta-item-text">{{ __('post.comments_count') + __('symbol.colon') }}</span>
<a href="{{ url_for(post.path) }}#SOHUCS" itemprop="discussionUrl">
<span class="post-meta-item-text">{{ __('post.comments_count') + __('symbol.colon') }}</span> <span id="url::{{ post.permalink }}" class="cy_cmt_count" data-xid="{{ post.path }}" itemprop="commentCount"></span>
<span id="url::{{ post.permalink }}" class="cy_cmt_count" data-xid="{{ post.path }}" itemprop="commentCount"></span>
</a>
{% endif %}
{% elseif is_post() and theme.gitment.enable and theme.gitment.mint and theme.gitment.count %}
{{ comments() }}
<span class="post-meta-item-text">{{ __('post.comments_count') + __('symbol.colon') }}</span>
<a href="{{ url_for(post.path) }}#comments" itemprop="discussionUrl">
<span class="post-meta-item-text">{{ __('post.comments_count') + __('symbol.colon') }}</span> <span class="post-comments-count gitment-comments-count" data-xid="{{ url_for(post.path) }}" itemprop="commentCount"></span>
<span class="post-comments-count gitment-comments-count" data-xid="{{ url_for(post.path) }}" itemprop="commentCount"></span>
</a>
</span>
{% elseif (is_post() or theme.valine.comment_count) and theme.valine.enable and theme.valine.appid and theme.valine.appkey %}
{{ comments() }}
<span class="post-meta-item-text">{{ __('post.comments_count') + __('symbol.colon') }}</span>
<a href="{{ url_for(post.path) }}#comments" itemprop="discussionUrl">
<span class="post-meta-item-text">{{ __('post.comments_count') + __('symbol.colon') }}</span> <span class="post-comments-count valine-comment-count" data-xid="{{ url_for(post.path) }}" itemprop="commentCount"></span>
<span class="post-comments-count valine-comment-count" data-xid="{{ url_for(post.path) }}" itemprop="commentCount"></span>
</a>
</span>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion layout/_partials/post/reward.swig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
<div>{{ theme.reward.comment }}</div>
<button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
<button id="rewardButton" disable="enable" onclick="var qr = document.getElementById(&quot;QR&quot;); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
<span>{{ __('reward.donate') }}</span>
</button>
<div id="QR" style="display: none;">
Expand Down