Shrink down text / make it easier to understand

This commit is contained in:
Nico Schottelius 2019-02-05 14:59:46 +01:00
parent 29684a52e0
commit daa48c907f
2 changed files with 25 additions and 41 deletions

View File

@ -35,55 +35,37 @@
margin: 50px 0 25px; margin: 50px 0 25px;
} }
</style> </style>
<title>{{ domain|default:"This part of the Internet" }} is not reachable by IPv4</title> <title>{{ domain|default:"This part of the Internet" }} is not
reachable by IPv4</title>
<meta name="keywords" content="IPv6, IPv4, End of IPv4, IPv6 only">
<meta name="description" content="The end of the IPv4 Internet">
</head> </head>
<body> <body>
<img src="{% static 'img/ipv6onlyhosting-ungleich-deadend.jpg' %}" <img src="{% static 'img/ipv6onlyhosting-ungleich-deadend.jpg' %}"
alt="ipv6onlyhosting-ungleich-deadend" alt="ipv6onlyhosting-ungleich-deadend"
class="responsive" width="600" height="400"> class="responsive" width="600" height="400">
<div class="center content-margin"> <div class="center content-margin">
<p> <p>
Welcome to the end of the IPv4 Internet. Unfortunately the site you tried reach is not reachable by IPv4. To access {% if domain != "" %}<a href="{{ back_to_url }}" target="_blank">{{ domain }}</a>{% else %}this part of the Internet{% endif %}, you need to enable IPv6 on your computer. You have reached the end of the IPv4 Internet.
</p> <br>
<section> {% if domain != "" %}
<div class="para-title">How to enable IPv6 ?</div> The site you tried to access is not reachable by IPv4.
<div class="para-description"> To access <a href="{{ back_to_url }}" target="_blank">{{ domain }}</a>
Your Internet provider (ISP) should support IPv6. If you haven't, you should first contact your ISP and ask them for IPv6 addresses.<br/> {% else %}this part of the Internet{% endif %}, you need to enable
If your ISP does not support IPv6, you can use an IPv6 tunnel to get IPv6 connectivity. IPv6 on your computer.
<ul> Find
<li>ungleich offers <a href="https://ipv6onlyhosting.com/en-us/cms/ipv6-shop/" target="_blank">IPv6 VPNs</a></li> out
<li>HE.net offers the <a href="https://tunnelbroker.net/" target="_blank">IPv6 tunnel broker service</a></li> <a href="https://ungleich.ch/en-us/cms/blog/2019/02/05/how-to-get-ipv6/">
</ul> how to enable IPv6</a>
</div> or
</section> <a href="https://redmine.ungleich.ch/projects/open-infrastructure/wiki/How_to_disable_IPv4_on_your_website">How
<section> to use this service for your IPv6 only service.</a>
<div class="para-title">How to create an IPv6 only website</div> </p>
<div class="para-description">
If you want your website to be only available by IPv6, you can do the following:
<ul>
<li>Create an AAAA DNS entry that points to the IPv6 address of your website.</li>
<li>Create an A DNS entry that points to 185.203.114.115 (that is this site).</li>
<li>From now on visitors that use IPv4 and try to reach your site will be shown this page.</li>
</ul>
</div>
</section>
<section>
<div class="para-title">How to make some content only accessible by IPv6?</div>
<div class="para-description">
<ul>
<li>If parts of your website should only be reachable by IPv6, you can redirect the user to <a href="https://no-ipv4-here.ungleich.ch/?back_to=YOUR_URL">https://no-ipv4-here.ungleich.ch/?back_to=YOUR_URL</a></li>
<li>Replace YOUR_URL with the URL that you want the user to come back to, when they have IPv6 enabled</li>
<li>We suggest to use a HTTP 302 (temporary location changed) for this</li>
</ul>
</div>
</section>
</div> </div>
<footer class="center"> <footer class="center">
This service is provided to you by <a href="https://ungleich.ch" target="_blank">ungleich</a>. This service is provided to you by <a href="https://ungleich.ch" target="_blank">ungleich</a>.
</footer> </footer>
</body> </body>
</html> </html>

View File

@ -9,12 +9,14 @@ class IndexView(TemplateView):
template_name = 'no_ipv4_here/index.html' template_name = 'no_ipv4_here/index.html'
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
import pprint
pprint.pprint(self.request.META)
context = super(IndexView, self).get_context_data(**kwargs) context = super(IndexView, self).get_context_data(**kwargs)
back_to_url = "" back_to_url = ""
if "back_to" in self.request.GET: if "back_to" in self.request.GET:
back_to_url = self.request.GET["back_to"] back_to_url = self.request.GET["back_to"]
elif 'HTTP_HOST' in self.request.META: elif 'HTTP_HOST' in self.request.META:
back_to_url = self.request.META['HTTP_HOST'] back_to_url = "http://{}".format(self.request.META['HTTP_HOST'])
context['back_to_url'] = back_to_url context['back_to_url'] = back_to_url
if back_to_url != "": if back_to_url != "":
context['domain'] = (urlsplit(back_to_url)).netloc context['domain'] = (urlsplit(back_to_url)).netloc