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

46 lines
1.4 KiB
Twig

{% extends 'base.html.twig' %}
{% block content %}
<section>
<h1>Notes</h1>
<p>
Skip to:
<ul>
{% for year in years %}
<li><a href="#{{ year }}">{{ year }}</a></li>
{% endfor %}
</ul>
</p>
{% for year in years %}
<h2 id="{{ year }}">{{ year }}</h2>
<p>
Skip to:
<ul>
{% for month in months[year] %}
<li><a href="#{{ year }}-{{ month }}">{{ monthNames[month] }} {{ year }}</a></li>
{% endfor %}
</ul>
</p>
{% for month in months[year] %}
<h3 id="{{ year }}-{{ month }}">{{ monthNames[month] }}</h3>
{% for note in notes[year][month] %}
<h4><a href="/notes/{{ note.slug }}">Note {{ note.slug }}</a></h4>
<time datetime="{{ note.publishedDate.format('c') }}">
{{ note.publishedDate.format('j F Y') }}
</time>
{% apply markdown_to_html %}
{{ note.content }}
{% endapply %}
{% endfor %}
{% endfor %}
{% else %}
<p>I have no notes.</p>
{% endfor %}
</section>
{% endblock %}