Add tag support

This commit is contained in:
Alex 2026-06-08 13:00:11 -07:00
parent ce10245c51
commit ae440be40c
24 changed files with 475 additions and 15 deletions

View 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 %}

View 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 %}