{% extends "base.html" %}
{% block title %}{{ title }}{% endblock %}
{% block description %}
{% match summary %}
{% when Some with (summary_content) %}
{{ summary_content }}
{% when None %}
A post on {{ settings.site_name }}
{% endmatch %}
{% endblock %}
{% block content %}
{% if draft == true -%}
<blockquote>
⚠️ This post is marked as a <b>draft</b>! It may not yet be complete!
</blockquote>
{% endif -%}
<h1>{{ title }}</h1>
<b>{{ summary_content }}</b>
{% match last_updated %}
{% when Some with (last_updated_date) %}
<p>Published: {{ publish_date }} | Last updated: {{ last_updated_date }}</p>
<p>Published: {{ publish_date }}</p>
<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::HTML { content } %}
{{ content|safe }}
{% when BlockTypes::HEADER { text, size } %}
<h{{size}}>{{text}}</h{{size}}>
{% else %}
<b>UNSUPPORTED block type here!</b>
{% endfor %}