30 lines
894 B
HTML
30 lines
894 B
HTML
|
{% macro message(content) %}
|
||
|
<p class="message">{{ content }}</p>
|
||
|
{% endmacro message %}
|
||
|
|
||
|
{% macro read_time(words) %}
|
||
|
<span class="reading-time" title="Estimated read time">
|
||
|
{% if words < 470 %}
|
||
|
1 min read
|
||
|
{% else %}
|
||
|
{{ words / 250 | round }} min read
|
||
|
{% endif %}
|
||
|
</span>
|
||
|
{% endmacro read_time %}
|
||
|
|
||
|
{% macro toc(toc) %}
|
||
|
<details open id = "toc-inline">
|
||
|
<summary><b>Table of Contents</b></summary>
|
||
|
<ul>
|
||
|
{% for h2 in toc %}<li>
|
||
|
<a href="#{{h2.id | safe}}">{{ h2.title | safe }}</a>
|
||
|
{% if h2.children %}<ul>
|
||
|
{% for h3 in h2.children %}<li>
|
||
|
<a href="#{{h3.id | safe}}">{{ h3.title | safe }}</a>
|
||
|
</li>{% endfor %}
|
||
|
</ul>{% endif %}
|
||
|
</li>{% endfor %}
|
||
|
</ul>
|
||
|
</details>
|
||
|
{% endmacro toc %}
|