add some intro texts

This commit is contained in:
Nico Schottelius 2020-12-04 22:17:47 +01:00
parent 8925e939a7
commit 5b733a6172
4 changed files with 80 additions and 70 deletions

View File

@ -151,8 +151,10 @@ AUTH_USER_MODEL = 'ipv6ula.User'
CRISPY_TEMPLATE_PACK = 'bootstrap4' CRISPY_TEMPLATE_PACK = 'bootstrap4'
LOGIN_REDIRECT_URL = '/'
LOGOUT_URL="/logout" LOGOUT_URL="/logout"
# Overwrite in local settings # Overwrite in local settings
try: try:
from ipv6ula.local_settings import * from ipv6ula.local_settings import *

View File

@ -10,64 +10,33 @@
<link rel="stylesheet" href="{% static '/bootstrap/css/bootstrap.min.css' %}"> <link rel="stylesheet" href="{% static '/bootstrap/css/bootstrap.min.css' %}">
<link rel="stylesheet" href="{% static '/css/sticky-footer-navbar.css' %}"> <link rel="stylesheet" href="{% static '/css/sticky-footer-navbar.css' %}">
<title>The IPv6 ULA registry</title> <title>The IPv6 ULA registry by ungleich.ch</title>
</head> </head>
<body> <body>
<nav class="navbar navbar-expand-lg navbar-light bg-light"> <nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="/">{{ site_name }}</a> <a class="navbar-brand" href="/">The IPv6 ULA registry</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
<div class="collapse navbar-collapse" id="navbarSupportedContent"> <div class="collapse navbar-collapse"
id="navbarSupportedContent">
<ul class="navbar-nav mr-auto"> <ul class="navbar-nav mr-auto">
{% if page_obj.has_previous %} <li class="nav-item"> <a class="nav-link" href="/submit">Submit prefix</a></li>
<li class="nav-item">
<a class="nav-link" href="?page=1">first</a>
</li>
<li class="nav-item">
<a class="nav-link" href="?page={{ page_obj.previous_page_number }}">previous</a>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link disabled" href="#">first</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#">previous</a>
</li>
{% endif %}
<li class="nav-item active">
<a class="nav-link" href="#">{{ page_obj.number }} / {{ page_obj.paginator.num_pages }}</a>
</li>
{% if page_obj.has_next %}
<li class="nav-item">
<a class="nav-link" href="?page={{ page_obj.next_page_number }}">next</a>
</li>
<li class="nav-item">
<a class="nav-link" href="?page={{ page_obj.paginator.num_pages }}">last</a>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link disabled" href="#">next</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#">last</a>
</li>
{% endif %}
<li class="nav-item">
<a class="nav-link" href="/submit">submit</a>
</li>
</ul>
{% if user.is_authenticated %} {% if user.is_authenticated %}
<span class="navbar-text">Logged in as {{ user }}.</span> <span class="navbar-text">Logged in as {{ user }}.</span>
<ul class="navbar-nav mr-auto">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="/logout">Logout</a> <a class="nav-link" href="/logout">Logout</a>
</li> </li>
{% else %}
<li class="nav-item">
<a class="nav-link" href="/login">Login</a>
</li>
</ul> </ul>
{% endif %} {% endif %}
</div> </div>
</nav> </nav>
@ -77,7 +46,7 @@
<footer class="footer"> <footer class="footer">
<div class="container"> <div class="container">
<span class="text-muted">Powered by <span class="text-muted">Powered by
<a href="http://ungleich.ch/u/projects/ipv6ula">ipv6ula</a>, <a href="http://ungleich.ch/u/projects/ipv6ula/">ipv6ula</a>,
a FOSS project created by <a href="https://ungleich.ch">ungleich</a>.</span> a FOSS project created by <a href="https://ungleich.ch">ungleich</a>.</span>
</div> </div>
</footer> </footer>

View File

@ -3,12 +3,24 @@
{% block content %} {% block content %}
<div class="container"> <div class="container">
<div class="row">
<div class="col">
<form method="post"> All ULA prefixes are /48 networks. Simply add the first IP address
{% csrf_token %} (without any netmask, for instance fd23:2323:2323::).
{{ form|crispy }}
<input type="submit" value="Submit"> You can choose the name of your liking and an optional
</form> organization name.
</div>
<div class="col">
<form method="post">
{% csrf_token %}
{{ form|crispy }}
<input type="submit" value="Submit">
</form>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -1,27 +1,54 @@
{% extends 'ipv6ula/base.html' %} {% extends 'ipv6ula/base.html' %}
{% block content %} {% block content %}
<div class="container"> <div class="container">
<table class="table"> <div class="row">
<thead> <p>
<tr> This is the new IPv6 ULA registry. It is inspired by the original
<th>Prefix</th> <a href="https://www.sixxs.net/tools/grh/ula/list/">ULA registry
<th>Name</th> from sixxs</a> and (will contain!) contains all of the prefixes
<th>Organization</th> that were in the sixxs database.
<th>URL</th> </p>
</tr>
</thead> <p>
<tbody> While is is debatable whether or not there should be a ULA
{% for ula in object_list %} registry at all, we at ungleich frequently were asked to provide a
<tr> ULA registry for those who don't have the resources to use global
<td>{{ ula.prefix }}</td> unique addresses, but still want to indicate that a network is
<td>{{ ula.name }}</td> used.
<td>{{ ula.organization }}</td> </p>
<td><a href="{{ ula.website }}">{{ ula.website }}</a></td>
</tr> <p>
{% endfor %} At <a href="https://ungleich.ch">ungleich</a>
</tbody> we neither endorse nor condemn the use of ULA. Our objective is
</table> to enable everyone everywhere with IPv6. In this regard we
hope that this ULA registry is enabling some additional people
to migrate to IPv6.
</p>
</div>
<div class="row">
<table class="table table-striped">
<thead>
<tr>
<th>Prefix</th>
<th>Name</th>
<th>Organization</th>
<th>URL</th>
</tr>
</thead>
<tbody>
{% for ula in object_list %}
<tr>
<td>{{ ula.prefix }}</td>
<td>{{ ula.name }}</td>
<td>{{ ula.organization }}</td>
<td><a href="{{ ula.website }}">{{ ula.website }}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div> </div>
{% endblock %} {% endblock %}