Skip to content
This repository has been archived by the owner on Sep 11, 2021. It is now read-only.

Update tag/categories #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
20 changes: 13 additions & 7 deletions _includes/JB/categories_list
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,22 @@ Usage:
{% else %}
{% if categories_list.first[0] == null %}
{% for category in categories_list %}
<li><a href="{{ BASE_PATH }}{{ site.JB.categories_path }}#{{ category }}-ref">
{{ category | join: "/" }} <span>{{ site.categories[category].size }}</span>
</a></li>
<li>
<a href="{{ BASE_PATH }}{{ site.JB.categories_path }}#{{ category }}-ref">
{{ category | join: "/" }}
</a>
<mark>{{ site.categories[category].size }}</mark>
</li>
{% endfor %}
{% else %}
{% for category in categories_list %}
<li><a href="{{ BASE_PATH }}{{ site.JB.categories_path }}#{{ category[0] }}-ref">
{{ category[0] | join: "/" }} <span>{{ category[1].size }}</span>
</a></li>
<li>
<a href="{{ BASE_PATH }}{{ site.JB.categories_path }}#{{ category[0] }}-ref">
{{ category[0] | join: "/" }}
</a>
<mark>{{ category[1].size }}</mark>
</li>
{% endfor %}
{% endif %}
{% endif %}
{% assign categories_list = nil %}
{% assign categories_list = nil %}
14 changes: 12 additions & 2 deletions _includes/JB/tags_list
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,21 @@ Usage:
{% else %}
{% if tags_list.first[0] == null %}
{% for tag in tags_list %}
<li><a href="{{ BASE_PATH }}{{ site.JB.tags_path }}#{{ tag }}-ref">{{ tag }} <span>{{ site.tags[tag].size }}</span></a></li>
<li>
<a href="{{ BASE_PATH }}{{ site.JB.tags_path }}#{{ tag }}-ref">
{{ tag }}
</a>
<mark>{{ site.tags[tag].size }}</mark>
</li>
{% endfor %}
{% else %}
{% for tag in tags_list %}
<li><a href="{{ BASE_PATH }}{{ site.JB.tags_path }}#{{ tag[0] }}-ref">{{ tag[0] }} <span>{{ tag[1].size }}</span></a></li>
<li>
<a href="{{ BASE_PATH }}{{ site.JB.tags_path }}#{{ tag[0] }}-ref">
{{ tag[0] }}
</a>
<mark>{{ tag[1].size }}</mark>
</li>
{% endfor %}
{% endif %}
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions _includes/themes/bootstrap/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ <h1>{{ page.title }} {% if page.tagline %}<small>{{page.tagline}}</small>{% endi
</div>

{% unless page.categories == empty %}
<ul class="tag_box inline">
<ul class="tag_box list-inline">
<li><i class="icon-folder-open"></i></li>
{% assign categories_list = page.categories %}
{% include JB/categories_list %}
</ul>
{% endunless %}

{% unless page.tags == empty %}
<ul class="tag_box inline">
<ul class="tag_box list-inline">
<li><i class="icon-tags"></i></li>
{% assign tags_list = page.tags %}
{% include JB/tags_list %}
Expand Down