Add tag support
This commit is contained in:
parent
ce10245c51
commit
ae440be40c
24 changed files with 475 additions and 15 deletions
28
templates/front/tag/detail.html.twig
Normal file
28
templates/front/tag/detail.html.twig
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Tags | Alex Daniels{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<section class="tag">
|
||||
{% if posts|length %}
|
||||
<div class="posts">
|
||||
<h2>Posts</h2>
|
||||
<ul>
|
||||
{% for post in posts %}
|
||||
<li><a href="/words/{{post.url}}">{{post.title}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if photos|length %}
|
||||
<div class="photos">
|
||||
<h2>Photos</h2>
|
||||
<ul>
|
||||
{% for photo in photos %}
|
||||
<li><a href="/photos/{{photo.url}}">{{photo.title}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endblock %}
|
||||
16
templates/front/tag/index.html.twig
Normal file
16
templates/front/tag/index.html.twig
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Tags | Alex Daniels{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<section class="tags">
|
||||
<h2>Tags</h2>
|
||||
<ul>
|
||||
{% for tag in tags %}
|
||||
<li>
|
||||
<a href="/tags/{{tag['urlSafeTitle']}}">{{tag['title']}} ({{tag['count']}})</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue