mirror of
https://codeberg.org/slatian/service.echoip-slatecave.git
synced 2025-06-25 19:48:05 +02:00
Added plain text (gemtext like) templates
This commit is contained in:
@ -1,9 +1,13 @@
|
||||
{% macro place_dl(place, label="", iso_code_prefix="") %}
|
||||
{% if place %}
|
||||
{% macro place_dl(place, label="", iso_code_prefix="") -%}
|
||||
{%- if place -%}
|
||||
{%- if format=="text/html" %}
|
||||
{% if label %}<dt>{{label}}</dt>{% endif %}
|
||||
<dd>{{place.name}} {% if place.iso_code%}({% if iso_code_prefix %}{{iso_code_prefix}}-{% endif %}{{place.iso_code}}){% endif %}</dd>
|
||||
{% endif %}
|
||||
{% endmacro place_dl %}
|
||||
{% else -%}
|
||||
* {% if label %}{{label}}: {% endif %}{{place.name}}{% if place.iso_code%} ({% if iso_code_prefix %}{{iso_code_prefix}}-{% endif %}{{place.iso_code}}){% endif %}
|
||||
{%- endif -%}
|
||||
{%- 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 }}
|
||||
@ -28,3 +32,7 @@
|
||||
{% endfor %}
|
||||
|
||||
{% endmacro breadcrumb_domain %}
|
||||
|
||||
{% macro ip_info(ip_info) -%}
|
||||
{{ip_info.scope | title}} {{ip_info.cast | title}} IPv{% if ip_info.is_v6_address %}6{% else %}4{% endif %}
|
||||
{%- endmacro ip_info %}
|
||||
|
Reference in New Issue
Block a user