45 lines
1.5 KiB
HTML
45 lines
1.5 KiB
HTML
{% 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 { id, text, size } %}
|
|
<h{{ size }} id="{{ id }}">{{ text }}</h{{ size }}>
|
|
{% when BlockTypes::IMAGE { content } %}
|
|
{% match content %}
|
|
{% when Some with (image) %}
|
|
<div class="image">
|
|
<img class="image"
|
|
src="{{ image.url }}"
|
|
{% match image.alt %}
|
|
{% when Some with (alt) %}
|
|
alt="{{ alt }}"
|
|
{% when None %}
|
|
{% endmatch %}
|
|
/>
|
|
{% match image.description %}
|
|
{% when Some with (image_description) %}
|
|
<i class="image">{{ image_description }}</i>
|
|
{% when None %}
|
|
{% endmatch %}
|
|
</div>
|
|
|
|
<br />
|
|
{% when None %}
|
|
{% endmatch %}
|
|
{% when BlockTypes::QUOTE { quote, caption } %}
|
|
<figure>
|
|
<blockquote>
|
|
<p>{{ quote }}</p>
|
|
</blockquote>
|
|
<cite>
|
|
{{ caption }}
|
|
</cite>
|
|
</figure>
|
|
{% else %}
|
|
<b>UNSUPPORTED block type here!</b>
|
|
{% endmatch %}
|