This repository has been archived on 2025-06-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
joeac.net-symfony/templates/notes.html.twig

65 lines
2.1 KiB
Twig

{% extends 'base.html.twig' %}
{% block content %}
<section class="h-feed">
<h1 class="p-name">Joe Carstairs' notes</h1>
<p hidden>
These links are collected by
<a class="p-author h-card" href="{{ path('index') }}">
Joe Carstairs
</a>.
</p>
<p hidden>
<a class="u-url" href="{{ path('notes') }}">Permalink</a>
</p>
<nav class="skip-to">
Skip to:
<ul>
{% for year in years %}
<li><a href="#{{ year }}">{{ year }}</a></li>
{% endfor %}
</ul>
</nav>
{% for year in years %}
<h2 id="{{ year }}">{{ year }}</h2>
<nav class="skip-to">
Skip to:
<ul>
{% for month in months[year] %}
<li><a href="#{{ year }}-{{ month }}">
{{ monthNames[month] }} <span class="visually-hidden">{{ year }}</span>
</a></li>
{% endfor %}
</ul>
</nav>
{% for month in months[year] %}
<h3 id="{{ year }}-{{ month }}">{{ monthNames[month] }}</h3>
{% for note in notes[year][month] %}
<section class="h-entry">
<h4><a class="p-name u-url" href="/notes/{{ note.slug }}">
Note {{ note.slug }}
</a></h4>
<time class="dt-published" datetime="{{ note.publishedDate.format('c') }}">
{{ note.publishedDate.format('j F Y') }}
</time>
<section class="e-content">
{% apply markdown_to_html %}
{{ note.content }}
{% endapply %}
</section>
</section>
{% endfor %}
{% endfor %}
{% else %}
<p>I have no notes.</p>
{% endfor %}
</section>
{% endblock %}