Added a button for Switching IP-Protocol in case someone has configured the addresses

This commit is contained in:
Slatian 2023-02-25 16:41:36 +01:00
parent 9905b93c68
commit 02612dd490
3 changed files with 15 additions and 2 deletions

View File

@ -12,6 +12,11 @@ stylesheet = "/style.css"
# favicon_mimetype = "image/png"
# favicon_mimetype = "image/jpeg"
# Urls to look up v4 and v6 addresses explicitly
# If you have not configured them, comment them out, the button will stay hidden
v4_url="http://v4.localhost:3000/"
v6_url="http://v6.localhost:3000/"
[404]
# configure the 404 page, this is available for other pages too!
title = "Nothing here"

View File

@ -12,7 +12,15 @@
{% block og_path %}/{% endblock %}
{% block other_ip_button %}
<!-- TODO -->
{% if data.ressult.ip_info.is_v6_address %}
{% if extra.v4_url %}
<p class="button-paragraph"><a href="{{extra.v4_url}}">Look up your IPv4 address instead <small>(You'll get an error if you live in the future)</small></a></p>
{% endif %}
{% else %}
{% if extra.v6_url %}
<p class="button-paragraph"><a href="{{extra.v6_url}}">Look up your IPv6 address instead <small>(You'll get an error if you live in the past)</small></a></p>
{% endif %}
{% endif %}
{% endblock %}
{% block extra_content %}

View File

@ -24,8 +24,8 @@
<dd>AS{{r.asn.asn}}</dd>
<dt>AS Name</dt>
<dd>{{ r.asn.name }}</dd>
</dl>
{% endif %}
</dl>
{% block other_ip_button %}{% endblock %}
</section>
{% if r.location %}