Skip to content

Commit

Permalink
Rename «Words count in article» on «Symbols count in article».
Browse files Browse the repository at this point in the history
1. Refactored `wordscount` on `symbols_count`.
2. Fixed excess `post-description` spaces.
  • Loading branch information
ivan-nginx committed Jan 23, 2018
1 parent 03e357b commit 9d46733
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions languages/_en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ post:
untitled: Untitled
toc_empty: This post does not have a Table of Contents
visitors: Visitors
wordcount: Words count in article
min2read: Reading time
totalcount: Site words total count
totaltime: Site reading time
symbols_count: Symbols count in article
symbols_time: Reading time
total_symbols: Symbols count total
total_time: Reading time total
copyright:
author: Post author
link: Post link
Expand Down
16 changes: 8 additions & 8 deletions layout/_macro/post.swig
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
{% endif %}

{% if config.symbols_count_time.symbols or config.symbols_count_time.time %}
<div class="post-wordcount">
<div class="post-symbolscount">
{% if not theme.symbols_count_time.separated_meta %}
<span class="post-meta-divider">|</span>
{% endif %}
Expand All @@ -232,9 +232,9 @@
<i class="fa fa-file-word-o"></i>
</span>
{% if theme.symbols_count_time.item_text_post %}
<span class="post-meta-item-text">{{ __('post.wordcount') }}&#58;</span>
<span class="post-meta-item-text">{{ __('post.symbols_count') }}&#58;</span>
{% endif %}
<span title="{{ __('post.wordcount') }}">{#
<span title="{{ __('post.symbols_count') }}">{#
#}{{ symbolsCount(post.content) }}{#
#}</span>
{% endif %}
Expand All @@ -248,19 +248,19 @@
<i class="fa fa-clock-o"></i>
</span>
{% if theme.symbols_count_time.item_text_post %}
<span class="post-meta-item-text">{{ __('post.min2read') }} &asymp;</span>
<span class="post-meta-item-text">{{ __('post.symbols_time') }} &asymp;</span>
{% endif %}
<span title="{{ __('post.min2read') }}">{#
<span title="{{ __('post.symbols_time') }}">{#
#}{{ symbolsTime(post.content, theme.symbols_count_time.awl, theme.symbols_count_time.wpm) }}{#
#}</span>
{% endif %}
</div>
{% endif %}

{% if post.description and (not theme.excerpt_description or not is_index) %}
<div class="post-description">
{{ post.description }}
</div>
<div class="post-description">{#
#}{{ post.description }}{#
#}</div>
{% endif %}

</div>
Expand Down
8 changes: 4 additions & 4 deletions layout/_partials/footer.swig
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<i class="fa fa-area-chart"></i>
</span>
{% if theme.symbols_count_time.item_text_total %}
<span class="post-meta-item-text">{{ __('post.totalcount') }}&#58;</span>
<span class="post-meta-item-text">{{ __('post.total_symbols') }}&#58;</span>
{% endif %}
<span title="{{ __('post.totalcount') }}">{#
<span title="{{ __('post.total_symbols') }}">{#
#}{{ symbolsCountTotal(site) }}{#
#}</span>
{% endif %}
Expand All @@ -26,9 +26,9 @@
<i class="fa fa-coffee"></i>
</span>
{% if theme.symbols_count_time.item_text_total %}
<span class="post-meta-item-text">{{ __('post.totaltime') }}&#58;</span>
<span class="post-meta-item-text">{{ __('post.total_time') }}&#58;</span>
{% endif %}
<span title="{{ __('post.totaltime') }}">{#
<span title="{{ __('post.total_time') }}">{#
#}{{ symbolsTimeTotal(site, theme.symbols_count_time.awl, theme.symbols_count_time.wpm) }}{#
#}</span>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion source/css/_common/components/post/post-meta.styl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
}

.post-wordcount {
.post-symbolscount {
if !hexo-config('symbols_count_time.separated_meta') { display: inline-block; }
}

Expand Down

0 comments on commit 9d46733

Please sign in to comment.