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

{% block title %} {{post.title}} - Writing | Alex Daniels{% endblock %}

{% block metatitle %}{{post.title}} - Writing | Alex Daniels {% endblock %}
{% block twittertitle %}{{post.title}} - Writing | Alex Daniels{% endblock %}
{% block metadescription %}{{post.description|striptags }} {% endblock %}
{% block ogdescription %}{{post.description|striptags}} {% endblock %}
{% block twitterdescription %}{{post.description|striptags }} {% endblock %}

{% block ogurl %}https://alexdaniels.me/words/{{post.url}}{% endblock %}
{% block twitterurl %}https://alexdaniels.me/words/{{post.url}}{% endblock %}

{% block body %}
    <article class="post">
        <h2 class="title">{{post.title}}</h2>
        <div class="meta">
            {% if app.user %}
                <div class="admin-actions">
                    <a href="/brain/post/edit/{{post.id}}">Edit</a>
                </div>
            {% endif %}
            <p class="category">Filed under: <a href="/categories/{{urlSafeCategory}}">{{ post.category.getTitle() }}</a></p>
            <time class="published">{{ post.date|date('l M d Y') }}</time>
        </div>
        <div class="text">
            {{ post.text|raw }}
        </div>
        <div class="tags">
            <ul class="list">
            <p>More like this:</p>
            {% for tag in post.tags %}
                <li class="tag"><a href="/tags/{{tag.getUrlSafeTitle()}}">{{ tag.title }}</a></li>
            {% endfor %}
            </ul
        </div>
    </article>
{% endblock %}
