aboutsummaryrefslogtreecommitdiffhomepage
path: root/apioforum/templates/common.html
diff options
context:
space:
mode:
Diffstat (limited to 'apioforum/templates/common.html')
-rw-r--r--apioforum/templates/common.html16
1 files changed, 14 insertions, 2 deletions
diff --git a/apioforum/templates/common.html b/apioforum/templates/common.html
index 46402df..fae4b7c 100644
--- a/apioforum/templates/common.html
+++ b/apioforum/templates/common.html
@@ -67,8 +67,20 @@
<time title="{{dt.isoformat(' ')}}" datetime="{{dt.isoformat(' ')}}">{{dt | fuzzy}}</time>
{%- endmacro %}
-{% macro tag(the_tag) -%}
-<span class="tag" style="color: {{the_tag.text_colour}}; background-color: {{the_tag.bg_colour}}">{{the_tag.name}}</span>
+{% macro tag(the_tag,href=None) -%}
+{% if href is none %}
+{% set el = "span" %}
+{% else %}
+{% set el = "a" %}
+{% endif %}
+<{{el}}
+ class="tag"
+ style="color: {{the_tag.text_colour}}; background-color: {{the_tag.bg_colour}}"
+ {% if href is not none -%}
+ href="{{href}}"
+ {%- endif -%}>
+ {{-the_tag.name-}}
+</{{el}}>
{%- endmacro %}
{% macro ab(name,href) -%}