echoip-slatecave/templates/base.html

43 lines
2.1 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 %}
</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 }}">
<input type="text" name="query" autocomplete="on" maxlength="260"
title="Search for an IP-Adress, Domain-Name, or ASN."
value="{% if view == "dig" %}{{ data.query }}{% elif view == "ip" %}{{ data.result.address }}{% endif %}"/>
<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>
</body>
</html>