New templates!

This commit is contained in:
Slatian
2023-02-23 21:24:35 +01:00
parent bb872bef3c
commit 67b2103f5a
8 changed files with 173 additions and 97 deletions

View File

@@ -5,3 +5,15 @@
{% endif %}
{% endmacro place_dl %}
{% macro dig_link(extra, name) %}
{{ extra.base_url }}/dig/{{ name | trim_end_matches(pat=".") | urlencode_strict | replace(from="%2e", to=".") | safe }}
{% endmacro dig_link %}
{% macro dig(extra, name, fqdn=false, prefix="") %}
<a href="{{ self::dig_link(extra=extra, name=name) }}">{% if prefix %}{{ prefix }} {% endif %}{% if fqdn or name=="." %}{{ name }}{% else %}{{ name | trim_end_matches(pat=".") }}{% endif %}</a>
{% endmacro dig %}
{% macro ip(extra, ip) %}
<a href="{{ extra.base_url }}/ip/{{ ip | urlencode_strict | replace(from="%2e", to=".") | replace(from="%3a", to=":") | safe }}"><code>{{ ip }}</code></a>
{% endmacro dig %}