{% extends "base.html" %}

{% block title %}{{ title }}{% endblock %}

{% block description %}
    {% match summary %}
        {% when Some with (summary_content) %}
            {{ summary_content }}
        {% when None %}
            A post on eviee.gay
    {% endmatch %}
{% endblock %}

{% block content %}
    <h1>{{ title }}</h1>
    {% match summary %}
        {% when Some with (summary_content) %}
            <h2>{{ summary_content }}</h2>
        {% when None %}
    {% endmatch %}
    {% match last_updated %}
        {% when Some with (last_updated_date) %}
            <p>Published: {{ publish_date }} | Last updated: {{ last_updated_date }}</p>
        {% when None %}
            <p>Published: {{ publish_date }}</p>
    {% endmatch %}

    <br />

    {% for content_block in content_blocks %}
        {% match content_block %}
            {% when BlockTypes::HR %}
                <hr />
            {% when BlockTypes::PARAGRAPH { text } %}
                <p>{{ text }}</p>
            {% when BlockTypes::MARKDOWN { content } %}
                {{ content|markdown }}
            {% when BlockTypes::HEADER { text, size } %}
                <h{{size}}>{{text}}</h{{size}}>
            {% when BlockTypes::UNSUPPORTED %}
                <b>UNSUPPORTED block type here!</b>
        {% endmatch %}
    {% endfor %}

    <br />

    <i>Comments are W.I.P</i>
{% endblock %}