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

@ -1,18 +1,22 @@
{% extends "base.html" %}
{% import "helpers.html" as helper %}
<!DOCTYPE html>
<html>
<head>
<title>{{ data.query.ip }}</title>
</head>
<body>
{% block title %}{{ data.result.address }}{% endblock %}
{% block og_title %}Lookup {{ data.result.address }}{% endblock %}
{% block h1 %}Lookup <code>{{ data.result.address }}</code>{% endblock %}
{% block og_path %}/ip/{{ data.result.address }}{% endblock %}
{% block content %}
{% set r = data.result %}
<h1>About IP-Address: {{ data.query.ip }}</h1>
<section>
<h2>Network Information</h2>
<dl>
<dh>Type of Address</dh>
<dd>{{r.ip_info.scope}} {{r.ip_info.cast}} IPv{% if r.ip_info.is_v6_address %}6{% else %}4{% endif %}</dd>
{% if r.hostname %}
<dh>Hostname</dh>
<dd><a href="/dig?name={{r.hostname|trim_end_matches(pat=".")}}">{{r.hostname|trim_end_matches(pat=".")}}</a></dd>
<dd>{{ helper::dig(extra=extra, name=r.hostname) }}</dd>
{% endif %}
{% if r.asn %}
<dh><abbr="Autonomous System Number">ASN</abbr></dh>
@ -52,6 +56,6 @@
</small></p>
</section>
{% endif %}
</body>
</html>
{% block extra_content %}{% endblock %}
{% endblock %}