2024-06-13 21:52:18 +03:00
|
|
|
{% macro span_date(value) %}
|
|
|
|
<span class="{%- match df -%}
|
|
|
|
{% when DateFormat::RFC3339 %}
|
|
|
|
date-rfc3339
|
|
|
|
{% when DateFormat::Strftime(_) %}
|
|
|
|
{%- endmatch -%}">{{ value|date(df) }}</span>
|
|
|
|
{% endmacro %}
|
2024-05-01 23:12:52 +03:00
|
|
|
{% macro table(post) %}
|
2024-06-13 21:52:18 +03:00
|
|
|
<div class="table">
|
2024-05-01 23:12:52 +03:00
|
|
|
{% match post.created_at %}
|
|
|
|
{% when Some(created_at) %}
|
2024-06-13 21:52:18 +03:00
|
|
|
<div class="created">written</div>
|
|
|
|
<div class="created value">{% call span_date(created_at) %}</div>
|
2024-05-01 23:12:52 +03:00
|
|
|
{% when None %}
|
|
|
|
{% endmatch %}
|
|
|
|
{% match post.modified_at %}
|
|
|
|
{% when Some(modified_at) %}
|
2024-06-13 21:52:18 +03:00
|
|
|
<div class="modified">last modified</div>
|
|
|
|
<div class="modified value">{% call span_date(modified_at) %}</div>
|
2024-05-01 23:12:52 +03:00
|
|
|
{% when None %}
|
|
|
|
{% endmatch %}
|
|
|
|
{% if !post.tags.is_empty() %}
|
2024-06-13 21:52:18 +03:00
|
|
|
<div class="tags">tags</div>
|
|
|
|
<div class="tags value">
|
2024-05-01 23:12:52 +03:00
|
|
|
{% for tag in post.tags %}
|
|
|
|
<a href="/?tag={{ tag }}" title="view all posts with this tag">{{ tag }}</a>
|
2024-06-13 21:52:18 +03:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
2024-05-01 23:12:52 +03:00
|
|
|
{% endif %}
|
2024-06-13 21:52:18 +03:00
|
|
|
</div>
|
2024-05-01 23:12:52 +03:00
|
|
|
{% endmacro %}
|