Merge pull request #283 from Plume-org/hashtags

Support hashtags
This commit is contained in:
Baptiste Gelez
2018-10-21 13:53:15 +01:00
committed by GitHub
20 changed files with 215 additions and 66 deletions
+3 -1
View File
@@ -43,7 +43,9 @@
<p>{{ "This article is under the {{ license }} license." | _(license=article.post.license) }}</p>
<ul class="tags">
{% for tag in article.tags %}
<li><a href="/tag/{{ tag.tag }}">{{ tag.tag }}</a></li>
{% if not tag.is_hashtag %}
<li><a href="/tag/{{ tag.tag }}">{{ tag.tag }}</a></li>
{% endif %}
{% endfor %}
</ul>
<div class="flex">
+13 -7
View File
@@ -2,16 +2,22 @@
{% import "macros" as macros %}
{% block title %}
{{ 'Articles tagged "{{ tag }}"' | _(tag=tag.tag) }}
{{ 'Articles tagged "{{ tag }}"' | _(tag=tag) }}
{% endblock title %}
{% block content %}
<h1>{{ 'Articles tagged "{{ tag }}"' | _(tag=tag.tag) }}</h1>
<h1>{{ 'Articles tagged "{{ tag }}"' | _(tag=tag) }}</h1>
<div class="cards">
{% for article in articles %}
{{ macros::post_card(article=article) }}
{% endfor %}
</div>
{% if articles| length != 0 %}
<div class="cards">
{% for article in articles %}
{{ macros::post_card(article=article) }}
{% endfor %}
</div>
{% else %}
<section>
<h2>{{ "There is currently no article with that tag" | _ }}</h2>
</section>
{% endif %}
{{ macros::paginate(page=page, total=n_pages) }}
{% endblock content %}