Skip to content

Commit 8c018f7

Browse files
Alex LEEgeekrainy
authored andcommitted
Add comment text (theme-next#186)
* Add comment text * Update the comment text in hyperlink * Update comment text's style * Add symbol.colon in comment text
1 parent 38b0cf3 commit 8c018f7

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

languages/_en.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ post:
3232
untitled: Untitled
3333
toc_empty: This post does not have a Table of Contents
3434
views: Views
35+
comments_count: Comments
3536
symbols_count: Symbols count in article
3637
symbols_time: Reading time
3738
total_symbols: Symbols count total

layout/_macro/post.swig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
<i class="fa fa-comment-o"></i>
137137
</span>
138138
<a href="{{ url_for(post.path) }}#comments" itemprop="discussionUrl">
139-
<span class="post-comments-count fb-comments-count" data-href="{{ post.permalink }}" itemprop="commentCount">0</span> comments
139+
<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>
140140
</a>
141141
</span>
142142
{% elseif theme.disqus.enable and theme.disqus.count %}
@@ -158,7 +158,7 @@
158158
<i class="fa fa-comment-o"></i>
159159
</span>
160160
<a href="{{ url_for(post.path) }}#comments" itemprop="discussionUrl">
161-
<span class="post-comments-count hc-comment-count" data-xid="{{ post.path }}" itemprop="commentsCount"></span>
161+
<span class="post-meta-item-text">{{ __('post.comments_count') + __('symbol.colon') }}</span> <span class="post-comments-count hc-comment-count" data-xid="{{ post.path }}" itemprop="commentsCount"></span>
162162
</a>
163163
</span>
164164
<!--/noindex-->
@@ -170,11 +170,11 @@
170170
</span>
171171
{% if is_post() %}
172172
<a href="{{ url_for(post.path) }}#SOHUCS" itemprop="discussionUrl">
173-
<span id="changyan_count_unit" class="post-comments-count hc-comment-count" data-xid="{{ post.path }}" itemprop="commentsCount"></span>
173+
<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="commentsCount"></span>
174174
</a>
175175
{% else %}
176176
<a href="{{ url_for(post.path) }}#SOHUCS" itemprop="discussionUrl">
177-
<span id="url::{{ post.permalink }}" class="cy_cmt_count" data-xid="{{ post.path }}" itemprop="commentsCount" ></span>
177+
<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="commentsCount" ></span>
178178
</a>
179179
{% endif %}
180180
{% elseif is_post() and theme.gitment.enable and theme.gitment.mint and theme.gitment.count %}
@@ -184,7 +184,7 @@
184184
<i class="fa fa-comment-o"></i>
185185
</span>
186186
<a href="{{ url_for(post.path) }}#comments" itemprop="discussionUrl">
187-
<span class="post-comments-count gitment-comments-count" data-xid="{{ url_for(post.path) }}" itemprop="commentsCount"></span>
187+
<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="commentsCount"></span>
188188
</a>
189189
</span>
190190
{% elseif theme.valine.enable and theme.valine.appid and theme.valine.appkey %}
@@ -194,7 +194,7 @@
194194
<i class="fa fa-comment-o"></i>
195195
</span>
196196
<a href="{{ url_for(post.path) }}#comments" itemprop="discussionUrl">
197-
<span class="post-comments-count valine-comment-count" data-xid="{{ url_for(post.path) }}" itemprop="commentCount"></span>
197+
<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>
198198
</a>
199199
</span>
200200
{% endif %}

0 commit comments

Comments
 (0)