diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2021-12-02 12:51:25 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2021-12-02 12:51:25 +1300 |
commit | cbd62c2dfa9bd8d04480d67b557a6fc326e532ca (patch) | |
tree | 5c0f6ae3a6df610179f9222910f94430d9695211 /project/templates/tags/base_tag.xhtml | |
parent | 3112ecee11aa7f560848834a8475b3fb0b52fd79 (diff) |
Validator links no longer use referer, tag templates now use macros
Diffstat (limited to 'project/templates/tags/base_tag.xhtml')
-rw-r--r-- | project/templates/tags/base_tag.xhtml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/project/templates/tags/base_tag.xhtml b/project/templates/tags/base_tag.xhtml new file mode 100644 index 0000000..a2c8b9f --- /dev/null +++ b/project/templates/tags/base_tag.xhtml @@ -0,0 +1,43 @@ + +{%- extends "base_plain.xhtml" -%} + + + +{%- macro tag_title(label) -%}{{ label | capitalize }} Tag{%- endmacro -%} + + + +{%- block style %} + <link href="/css/index.css" rel="stylesheet" /> +{% endblock -%} + + + +{%- macro tag_content(label) %} +<h4>Tag: {{ label | capitalize }}</h4> + +<ul class="index"> + {%- for item in articles -%} + {%- if label|lower in item.taglist -%} + {%- if item.updated -%} + {%- set postclass = "update" -%} + {%- set postverb = "Updated" -%} + {%- else -%} + {%- set postclass = "post" -%} + {%- set postverb = "Posted" -%} + {%- endif %} + <li><a href="{{ item.anchor }}">{{ item.title }}</a><br /> + <span class="taglist">{{ item.taglist | join(", ") }}</span><br /> + <span class="{{ postclass }}">({{ postverb }} {{ item.postdate }})</span></li> + {%- endif -%} + {%- endfor %} +</ul> +{% endmacro -%} + + + +{%- macro tag_footer(anchor) -%} + {{ plain_footer ('tags/' ~ anchor) }} +{%- endmacro -%} + + |