Add support for hashtag on user interface

Add migration to fix typo
Add support for linking hashtags with posts
Rework tag search page so it says a nicer message than page not found
when no post use that tag
Add new string to translation
This commit is contained in:
Trinity Pointard
2018-10-20 19:27:49 +02:00
parent 4fa3a0f6ee
commit 95ea248518
16 changed files with 96 additions and 28 deletions
+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 %}