blog posts

This commit is contained in:
2025-05-25 08:59:30 +01:00
parent 87722cb95e
commit 20e604cf68
20 changed files with 509 additions and 123 deletions

View File

@@ -1,23 +1,28 @@
{% extends 'base.html.twig' %}
{% block content %}
{% block main %}
{% if note %}
<section class="h-entry">
<h1 class="p-name">Note {{ note.slug }}</h1>
<a hidden class="p-author h-card" href="{{ url('index') }}">Joe Carstairs</a>
<a hidden class="u-url" href="{{ url('note', { slug: note.slug }) }}">Permalink</a>
<time class="dt-published">{{ note.publishedDate.format('c') }}
{% apply markdown_to_html %}
<section class="e-content">
{{ note.content }}
</section>
{% endapply %}
</section>
<article class="h-entry">
<header>
<h1 class="p-name">Note {{ note.slug }}</h1>
<p hidden><a class="p-author h-card" href="{{ url('index') }}">Joe Carstairs</a></p>
<p hidden <a class="u-url" href="{{ url('note', { slug: note.slug }) }}">Permalink</a></p>
<p>Added: <time class="dt-published">{{ note.publishedDate.format('c') }}</time></p>
</header>
<section class="e-content">
{{ note.content|markdown_to_html }}
</section>
</article>
{% else %}
<section>
<h1>Note not found</h1>
<p>I don't have a note '{{ slug }}'.</p>
<p>Go back to <a href="/notes">Notes</a>.</p>
</section>
<main>
<header>
<h1>Note not found</h1>
</header>
<section>
<p>I don't have a note '{{ slug }}'.</p>
<p>Go back to <a href="/notes">Notes</a>.</p>
</section>
</main>
{% endif %}
{% endblock %}