diff options
Diffstat (limited to 'templates/macros.html')
| -rw-r--r-- | templates/macros.html | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/templates/macros.html b/templates/macros.html deleted file mode 100644 index 3922659..0000000 --- a/templates/macros.html +++ /dev/null @@ -1,45 +0,0 @@ -{% macro toc(page) %} -<nav class="toc"> - <ul> - {% for h in page.toc %} - <li><a href="{{ h.permalink }}">{{ h.title }}</a></li> - {% if h.children %} - <ul> - {% for c in h.children %} - <li><a href="{{ c.permalink }}">{{ c.title }}</a></li> - {% endfor %} - </ul> - {% endif %} - {% endfor %} - </ul> -</nav> -{% endmacro %} - -{% macro linklog(page) %} -{% set lh_data = load_data(path="linklog.json") %} -<ul class="archive-list"> -{% for lh_post in lh_data.posts %} - <li class="archive-entry"> - <a href="{{ lh_post.href }}">{{ lh_post.description }}</a> - <small>({{ lh_post.time | date(format='%Y-%m-%d') }})</small> - </li> -{% endfor %} -</ul> -{% endmacro %} - -{% macro page_h1(page) %} -<h1> - {{ page.title }}<br /> - {% if page.date %} - <small>({{ page.date }})</small> - {% endif %} - {% if page.extra.kind %} - <small>[{{ page.extra.kind }}]</small> - {% endif %} -</h1> -{% endmacro %} - -{% macro page_content(page) %} -{{ self::page_h1(page=page) }} -{{ page.content | replace(from="<!-- toc -->", to=macros::toc(page=page)) | safe }} -{% endmacro %} |
