{% extends 'base.html.twig' %}

{% block content %}
    {% if note %}
        <section>
            <h1>Note {{ note.slug }}</h1>
            <time>{{ note.publishedDate.format('c') }}
            {% apply markdown_to_html %}
                {{ note.content }}
            {% endapply %}
        </section>
    {% 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>
    {% endif %}
{% endblock %}
