Files
rustyip/templates/index.html
T

293 lines
12 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ t_title }} - {{ site_domain }}{% endblock %}
{% block head_meta %}
{% if is_query %}
<meta name="robots" content="noindex, nofollow">
{% else %}
<meta name="description" content="{{ t_description }}">
<link rel="canonical" href="https://{{ site_domain }}/{{ lang_tag }}">
<meta property="og:title" content="{{ t_title }} - {{ site_domain }}">
<meta property="og:description" content="{{ t_description }}">
<meta property="og:type" content="website">
<meta property="og:url" content="https://{{ site_domain }}/{{ lang_tag }}">
<meta property="og:image" content="https://{{ site_domain }}/static/icons/android-chrome-512x512.png">
<meta property="og:image:width" content="512">
<meta property="og:image:height" content="512">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="{{ t_title }} - {{ site_domain }}">
<meta name="twitter:description" content="{{ t_description }}">
<meta name="twitter:image" content="https://{{ site_domain }}/static/icons/android-chrome-512x512.png">
{% for l in all_locales %}
<link rel="alternate" hreflang="{{ l.tag() }}" href="https://{{ site_domain }}/{{ l.tag() }}">
{% endfor %}
<link rel="alternate" hreflang="x-default" href="https://{{ site_domain }}/">
{% endif %}
<meta name="theme-color" content="#007AFF" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#0A84FF" media="(prefers-color-scheme: dark)">
{% endblock %}
{% block head_extra %}
{% if !is_query %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "{{ site_domain }}",
"url": "https://{{ site_domain }}/",
"description": "{{ t_description }}",
"applicationCategory": "UtilitiesApplication",
"operatingSystem": "All",
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD"
},
"inLanguage": "{{ lang_tag }}",
"availableLanguage": [{% for l in all_locales %}{% if !loop.first %}, {% endif %}"{{ l.tag() }}"{% endfor %}],
"image": "https://{{ site_domain }}/static/icons/android-chrome-512x512.png"
}
</script>
{% endif %}
{% endblock %}
{% block head_preconnect %}
<link rel="preconnect" href="https://cdnjs.cloudflare.com" crossorigin>
{% endblock %}
{% block head_stylesheets %}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/simple-line-icons/2.5.5/css/simple-line-icons.min.css">
{% endblock %}
{% block content %}
{% let autofocus = false %}
{% include "_search_form.html" %}
<div itemscope itemtype="https://schema.org/WebPage"
data-ipv4-domain="{{ ipv4_domain }}"
data-copied-text="{{ t_copied }}"
id="ip-info-root">
<div class="ip-copy-wrap" data-copied="{{ t_copied }}">
<h1 class="ip-display" itemprop="name">{{ ip }}</h1>
<span class="ip-copied-tooltip" aria-live="polite" hidden>{{ t_copied }}</span>
</div>
<table class="info-table" aria-label="{{ t_table_aria }}">
<tbody>
{% if !asn.is_empty() %}
<tr>
<th scope="row">{{ t_asn }}</th>
<td>{% if let Some(n) = asn_number %}<a href="https://bgp.tools/as/{{ n }}" target="_blank" rel="noopener noreferrer">{{ asn }}</a>{% else %}{{ asn }}{% endif %}</td>
</tr>
{% endif %}
{% if !org.is_empty() %}
<tr>
<th scope="row">{{ t_org }}</th>
<td itemprop="publisher" itemscope itemtype="https://schema.org/Organization"><span itemprop="name">{{ org }}</span></td>
</tr>
{% endif %}
{% if !country.is_empty() %}
<tr itemprop="contentLocation" itemscope itemtype="https://schema.org/Place">
<th scope="row">{{ t_country }}</th>
<td itemprop="address" itemscope itemtype="https://schema.org/PostalAddress"><span itemprop="addressCountry">{{ country }}</span>{% if !country_code.is_empty() %}<meta itemprop="addressCountry" content="{{ country_code }}">{% endif %}</td>
</tr>
{% endif %}
{% if !city.is_empty() %}
<tr>
<th scope="row">{{ t_city }}</th>
<td itemprop="contentLocation" itemscope itemtype="https://schema.org/Place"><span itemprop="name">{{ city }}</span></td>
</tr>
{% endif %}
<tr>
<th scope="row">{{ t_proxy }}</th>
<td>{% if is_proxy %}<i class="icon-check bool-true" aria-hidden="true"></i><span class="sr-only">{{ t_yes }}</span>{% else %}<i class="icon-minus bool-false" aria-hidden="true"></i><span class="sr-only">{{ t_no }}</span>{% endif %}</td>
</tr>
<tr>
<th scope="row">{{ t_vpn }}</th>
<td>{% if is_vpn %}<i class="icon-check bool-true" aria-hidden="true"></i><span class="sr-only">{{ t_yes }}</span>{% else %}<i class="icon-minus bool-false" aria-hidden="true"></i><span class="sr-only">{{ t_no }}</span>{% endif %}</td>
</tr>
<tr>
<th scope="row">{{ t_hosting }}</th>
<td>{% if is_hosting %}<i class="icon-check bool-true" aria-hidden="true"></i><span class="sr-only">{{ t_yes }}</span>{% else %}<i class="icon-minus bool-false" aria-hidden="true"></i><span class="sr-only">{{ t_no }}</span>{% endif %}</td>
</tr>
<tr>
<th scope="row">{{ t_tor }}</th>
<td>{% if is_tor %}<i class="icon-check bool-true" aria-hidden="true"></i><span class="sr-only">{{ t_yes }}</span>{% else %}<i class="icon-minus bool-false" aria-hidden="true"></i><span class="sr-only">{{ t_no }}</span>{% endif %}</td>
</tr>
</tbody>
</table>
<div id="alt-ip-section" hidden></div>
</div>
<section class="faq" aria-label="{{ t_faq_aria }}" itemscope itemtype="https://schema.org/FAQPage">
<h2 class="faq-title">{{ t_faq }}</h2>
<details open itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<summary itemprop="name">{{ t_faq_cli_q }}</summary>
<div class="faq-content" itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<div itemprop="text">
<p>{{ t_faq_cli_a }}</p>
<p>{{ t_faq_cli_query_current }}</p>
<pre><code>curl {{ site_domain }}</code></pre>
<p>{{ t_faq_cli_query_own }}</p>
<pre><code>curl {{ site_domain }}/asn
curl {{ site_domain }}/org
curl {{ site_domain }}/country
curl {{ site_domain }}/city
curl {{ site_domain }}/proxy
curl {{ site_domain }}/vpn
curl {{ site_domain }}/hosting
curl {{ site_domain }}/tor</code></pre>
<p>{{ t_faq_cli_json }}</p>
<pre><code>curl {{ site_domain }}/json
{
"ip": "1.1.1.1",
"continent": { ... },
"country": { ... },
"city": { ... },
"location": { ... },
"asn": { ... },
"proxy": { ... }
}</code></pre>
<p>{{ t_faq_cli_specific }}</p>
<pre><code>curl {{ site_domain }}/json?ip=1.1.1.1
{
"ip": "1.1.1.1",
"continent": { ... },
"country": { ... },
"city": { ... },
"location": { ... },
"asn": { ... },
"proxy": { ... }
}</code></pre>
</div>
</div>
</details>
<details open itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<summary itemprop="name">{{ t_faq_ipv46_q }}</summary>
<div class="faq-content" itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<div itemprop="text">
<p>{{ t_faq_ipv46_a|safe }}</p>
</div>
</div>
</details>
<details open itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<summary itemprop="name">{{ t_faq_json_q }}</summary>
<div class="faq-content" itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<div itemprop="text">
<p>{{ t_faq_json_a|safe }}</p>
</div>
</div>
</details>
<details open itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<summary itemprop="name">{{ t_faq_automate_q }}</summary>
<div class="faq-content" itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<div itemprop="text">
<p>{{ t_faq_automate_a1 }}</p>
<p>{{ t_faq_automate_a2|safe }}</p>
</div>
</div>
</details>
<details open itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<summary itemprop="name">{{ t_faq_data_q }}</summary>
<div class="faq-content" itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<div itemprop="text">
<p>{{ t_faq_data_a|safe }}</p>
<p>{{ t_faq_data_attr }}</p>
<ul>
<li>MaxMind GeoLite2: <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a></li>
<li>IPinfo Lite: <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a></li>
<li>DB-IP: <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a></li>
<li>RouteViews ASN: <a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0 1.0</a></li>
<li>OpenProxyDB: <a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0 1.0</a></li>
</ul>
</div>
</div>
</details>
<details open itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<summary itemprop="name">{{ t_faq_selfhost_q }}</summary>
<div class="faq-content" itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<div itemprop="text">
<p>{{ t_faq_selfhost_a }}</p>
<ul>
<li><a href="https://github.com/NetworkCats/rustyip">https://github.com/NetworkCats/rustyip</a></li>
<li><a href="https://github.com/NetworkCats/Merged-IP-Data">https://github.com/NetworkCats/Merged-IP-Data</a></li>
</ul>
</div>
</div>
</details>
<details open itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<summary itemprop="name">{{ t_faq_diff_q }}</summary>
<div class="faq-content" itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<div itemprop="text">
<p>{{ t_faq_diff_a1 }}</p>
<p>{{ t_faq_diff_a2 }}</p>
<p>{{ t_faq_diff_a3 }}</p>
</div>
</div>
</details>
<details open itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<summary itemprop="name">{{ t_faq_stable_q }}</summary>
<div class="faq-content" itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<div itemprop="text">
<p>{{ t_faq_stable_a1 }}</p>
<p>{{ t_faq_stable_a2 }}</p>
<p>{{ t_faq_stable_a3 }}</p>
</div>
</div>
</details>
<details open itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
<summary itemprop="name">{{ t_faq_sponsor_q }}</summary>
<div class="faq-content" itemscope itemprop="acceptedAnswer" itemtype="https://schema.org/Answer">
<div itemprop="text">
<p>{{ t_faq_sponsor_a }} <a href="mailto:networkcatlol@gmail.com">networkcatlol@gmail.com</a></p>
</div>
</div>
</details>
</section>
{% endblock %}
{% block scripts %}
<script src="/static/script.js?v={{ js_version }}" defer></script>
{% endblock %}
{% block footer %}
<footer class="site-footer">
<div class="footer-inner">
<div class="footer-left">
{% include "_footer.html" %}
<div class="footer-attribution">
<p>{{ t_footer_attribution }}</p>
<ul>
<li><a href="https://www.maxmind.com/">MaxMind GeoLite2</a></li>
<li><a href="https://ipinfo.io/">IPinfo Lite</a></li>
<li><a href="https://db-ip.com/">DB-IP</a></li>
<li><a href="https://www.routeviews.org/">RouteViews ASN</a></li>
</ul>
</div>
</div>
<div class="footer-right">
{% include "_footer_lang.html" %}
</div>
</div>
</footer>
{% endblock %}