echoip-slatecave/templates/base.html

57 lines
3.0 KiB
HTML
Raw Normal View History

2023-02-23 21:24:35 +01:00
{% import "helpers.html" as helper %}
<!DOCTYPE html>
<html lang="{{extra.language | default(value="en")}}">
<head>
<meta charset="utf-8">
<title>{% block title %}{{ extra[view].title | default(value="…") }}{% endblock %} | {{extra.site_name|default(value="echoip")}}</title>
<meta content="width=device-width, initial-scale=1" name="viewport">
<!-- Open-Graph -->
{% block metadata %}
<meta name="description" property="og:description" content="{% block description %}{{ extra[view].description | default(value="One of the best echoip services") | escape_xml }}{% endblock %}" />
<meta property="og:title" content="{% block og_title %}{{ extra[view].title | default(value="") | escape_xml }}{% endblock %}" />
<meta property="og:type" content="website">
<meta property="og:url" content="{% block og_url %}{{ extra.base_url }}{% block og_path %}{% endblock %}{% endblock %}">
{% set og_image = extra.og_image | default(value="") %}
{% set og_image = extra[view].og_image | default(value=og_image) %}
{% if og_image %}<meta property="og:image" content="{{og_image}}">{%endif%}
{% endblock %}
<!-- Styling -->
<meta name="color-scheme" content="light dark">
{% if extra.stylesheet %}<link rel="stylesheet" href="{{extra.stylesheet}}" type="text/css" />{% endif %}
{% if extra.favicon %}<link rel="icon" href="{{extra.favicon}}" type="{{extra.favicon_mimetype|default(value="image/png")}}" \>{% endif %}
<!-- View: {{view}} -->
2023-02-23 21:24:35 +01:00
</head>
<body>
<header>
<nav>
<a href="{{ extra.base_url }}" class="sitename">{{extra.site_name|default(value="echoip")}}</a>
<form class="search" method="GET" action="{{ extra.base_url }}">
2023-02-24 20:17:25 +01:00
<input type="search" name="query" autocomplete="on" maxlength="260"
2023-02-23 21:24:35 +01:00
title="Search for an IP-Adress, Domain-Name, or ASN."
2023-02-24 20:17:25 +01:00
placeholder="1.2.3.4, 2001::1:2:3:4, example.org, AS1234"
value="{% if view == "dig" %}{{ data.query }}{% elif view == "ip" %}{{ data.result.address }}{% elif view == "asn"%}AS{{ data.asn }}{% endif %}"/>
2023-08-06 01:32:23 +02:00
{% if dns_resolvers | length > 1 %}
<select name="dns" title="DNS Resolver">
2023-08-05 21:09:56 +02:00
{% for r in dns_resolvers %}
2023-08-05 22:36:28 +02:00
<option value="{{ r.id }}" {% if r.id == dns_resolver_id %}selected{%endif%}>{{ r.name }}</option>
2023-08-05 21:09:56 +02:00
{% endfor %}
</select>
2023-08-06 01:32:23 +02:00
{% endif %}
2023-02-23 21:24:35 +01:00
<input type="submit" value="Query"/>
</form>
</nav>
</header>
<main>
<h1>{% block h1 %}{{ extra[view].title | default(value="…") }}{% endblock %}</h1>
{% block content %}
<p>If you see this the templating is broken. Greetings from the base template.</p>
{% endblock %}
</main>
2023-02-24 20:17:25 +01:00
<footer>
<p>You can find the <a href="https://codeberg.org/slatian/service.echoip-slatecave">echoip-slatecave sourcecode on Codeberg</a>. If you found a bug or have an idea, feature, etc. please get in touch (I also accept E-Mails!).</p>
<!-- If you made your own template, link to it here -->
2023-04-29 13:05:48 +02:00
<p>This service works in its current form because nobody is abusing it, please keep that in mind. If you want to do frequent automated requests please host your own instance. Thank you for being awesome!</p>
2023-02-24 20:17:25 +01:00
</footer>
2023-02-23 21:24:35 +01:00
</body>
</html>