{% macro genurl(string, force=False) %} {% if (force or ( string.startswith('/') and not string.startswith('//') )) %} {% set url = '/'.join([SITEURL.rstrip('/'),string.lstrip('/')]) %} {{- url -}} {% else %} {% set url = '/'.join([SITEURL, string]) %} {{- url -}} {% endif %} {% endmacro %} {% macro newtab(string, force=False) %} {% if ( string.startswith('http://') or string.startswith('https://')) %} target="_blank" {% endif %} {% endmacro %} {% macro article_panel_list(parent='', id='', title_left='', title_right='', entry_list=[], show_date=False, title_left_link='') %} {% if not title_left_link %} {% set title_left_link = "#%s" % id %} {% endif %}
{{- title_left -}}
{% endmacro %} {% macro pagetitle(name) %} {% if name and name != '' %} {{ name }} · {{ SITENAME }} {% else %} {{ SITENAME }} {% endif %} {% endmacro %} {% macro pageheader(name, link) %} {% if name and name != '' %} {% endif %} {% endmacro %} {% macro navbar(link) %} {% endmacro %} {% macro footer() %} {% endmacro %} {% macro pagination() %} {% if DEFAULT_PAGINATION %} {% endif %} {% endmacro %} {% macro article_info(article) %} {% if article.tags %} · {% for tag in article.tags %} {{- tag -}} {% endfor %} {% endif %} {% if article.locale_date %} {% set year = article.date|strftime('%Y') %} {% set month = article.date|strftime('%m') %} {% set day = article.date|strftime('%d') %} {{ year }} {{- '-' -}} {{ month }} {{- '-' -}} {{ day }} {% endif %} {% endmacro %} {% macro taglist(list,prefix='',suffix='') %} {% for tag, articles in list|sort %} {{- tag }} {{ articles|count }} {% endfor %} {% endmacro %}