Skip to content
Merged
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
16 changes: 14 additions & 2 deletions layout/page.swig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@
{% if page.type === "tags" %}
<div class="tag-cloud">
<div class="tag-cloud-title">
{{ _p('counter.tag_cloud', site.tags.length) }}
{% set visibleTags = 0 %}
{% for tag in site.tags %}
{% if tag.length %}
{% set visibleTags += 1 %}
{% endif %}
{% endfor %}
{{ _p('counter.tag_cloud', visibleTags) }}
</div>
<div class="tag-cloud-tags">
{{ tagcloud({min_font: 12, max_font: 30, amount: 300, color: true, start_color: '#ccc', end_color: '#111'}) }}
Expand All @@ -40,7 +46,13 @@
{% elif page.type === 'categories' %}
<div class="category-all-page">
<div class="category-all-title">
{{ _p('counter.categories', site.categories.length) }}
{% set visibleCategories = 0 %}
{% for cat in site.categories %}
{% if cat.length %}
{% set visibleCategories += 1 %}
{% endif %}
{% endfor %}
{{ _p('counter.categories', visibleCategories) }}
</div>
<div class="category-all">
{{ list_categories() }}
Expand Down