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

Fix blog tags logic. #110

Merged
merged 1 commit into from
May 10, 2018
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
8 changes: 4 additions & 4 deletions components/tags-blog.tpl
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<section class="content-topbar">
{% if site.has_language_tags? %}
{% if blog.has_tags? %}
<nav class="menu-tags menu-sub">
<div class="tags-left">
<span class="tags-title">{{ 'filter_posts' | lc }}</span>
</div>
<div class="tags-right">
<ul class="menu">
<li class="menu-item">
<a class="menu-link js-tags-all" href="/{{ page.path }}">{{ 'all_posts' | lc }}</a>
<a class="menu-link js-tags-all" href="/{{ blog.page.path_with_lang }}">{{ 'all_posts' | lc }}</a>
</li>
{% for tag in site.language_tags %}
{% for tag in blog.tags %}
{% assign activestr = " " %}
{% for tmptag in tags %}
{% if tmptag.name == tag.name %}
{% assign activestr = " active" %}
{% endif %}
{% endfor %}
<li class="menu-item">
<a class="menu-link{{ activestr }}" href="/{{ page.path }}/tagged/{{ tag.path }}">{{ tag.name }}</a>
<a class="menu-link{{ activestr }}" href="/{{ blog.page.path_with_lang }}/tagged/{{ tag.path }}">{{ tag.name }}</a>
</li>
{% endfor %}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion components/tags-post.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<nav class="menu-tags">
<ul class="menu">
{% for tag in article.tags %}
<li class="menu-item"><a class="menu-link" href="{{ site.url }}{{ site.blogs.first.page.path }}/tagged/{{ tag.path }}">{{ tag.name }}</a>{% unless forloop.last %},{% endunless %}</li>
<li class="menu-item"><a class="menu-link" href="/{{ article.page.path_with_lang }}/tagged/{{ tag.path }}">{{ tag.name }}</a>{% unless forloop.last %},{% endunless %}</li>
{% endfor %}
</ul>
</nav>
Expand Down