mirror of
https://codeberg.org/slatian/service.echoip-slatecave.git
synced 2025-07-16 22:13:30 +02:00
Added a templating helper
This commit is contained in:
@ -1,39 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
{% set r = data.result %}
|
||||
{% set q = data.query %}
|
||||
<html>
|
||||
<head>
|
||||
<title>Dig: {{ dig_query }}</title>
|
||||
<title>Dig: {{ q.name }}</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Lookup for: {{ dig_query }}</h1>
|
||||
{% if dig_result.a %}
|
||||
<h1>Lookup for: {{ q.name }}</h1>
|
||||
{% if r.a %}
|
||||
<p>A (IPv4) records:</p>
|
||||
<ul>
|
||||
{% for address in dig_result.a%}
|
||||
{% for address in r.a%}
|
||||
<li><code>{{address}}</code></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if dig_result.aaaa %}
|
||||
{% if r.aaaa %}
|
||||
<p>AAAA (IPv6) records:</p>
|
||||
<ul>
|
||||
{% for address in dig_result.aaaa%}
|
||||
{% for address in r.aaaa%}
|
||||
<li><code>{{address}}</code></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if dig_result.mx %}
|
||||
{% if r.mx %}
|
||||
<p>MX (Mail Exchange) records:</p>
|
||||
<ul>
|
||||
{% for mx in dig_result.mx%}
|
||||
{% for mx in r.mx%}
|
||||
<li>{{mx.preference}} <code><a href="/dig?name={{mx.exchange}}">{{mx.exchange}}</a></code></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Your IP: {{ ip }}</title>
|
||||
<title>Your IP: {{ data.query.ip }}</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Your IP-Address is: {{ ip }}</h1>
|
||||
<h1>Your IP-Address is: {{ data.query.ip }}</h1>
|
||||
<p>Your requested format was: <b>{{format}}</b></p>
|
||||
{% if hostname %}
|
||||
<p>Hostname: <b>{{hostname}}</b></p>
|
||||
<p>Hostname: <b>{{data.result.hostname}}</b></p>
|
||||
{% endif %}
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user