about c3nav

This commit is contained in:
Laura Klünder 2018-12-17 19:49:17 +01:00
parent d842539c1b
commit f18462bf2a
6 changed files with 48 additions and 3 deletions

View file

@ -90,6 +90,9 @@ SVG_RENDERER = config.get('c3nav', 'svg_renderer', fallback='rsvg-convert')
CACHE_TILES = config.getboolean('c3nav', 'cache_tiles', fallback=not DEBUG)
CACHE_RESOLUTION = config.getint('c3nav', 'cache_resolution', fallback=4)
IMPRINT_ADDRESS = config.get('c3nav', 'imprint_address', fallback=None)
IMPRINT_PATRONS = config.get('c3nav', 'imprint_patrons', fallback=None)
INITIAL_LEVEL = config.get('c3nav', 'initial_level', fallback=None)
INITIAL_BOUNDS = config.get('c3nav', 'initial_bounds', fallback='').split(' ')

View file

@ -267,6 +267,10 @@ h2 {
margin: 0;
}
h4 {
margin: 2rem 0 1rem;
}
section.details {
display: flex;
flex-direction: column;

View file

@ -0,0 +1,28 @@
{% extends 'site/base.html' %}
{% load i18n %}
{% block content %}
<main class="account">
{% if not request.mobileclient %}
<a href="{% url 'site.index' %}" class="float-right">&laquo; {% trans 'back to c3nav' %}</a>
{% endif %}
<h2>{% trans 'About c3nav' %}</h2>
<p>{% blocktrans %}c3nav is open source software, find out more about it on <a href="https://github.com/c3nav">c3nav</a>.{% endblocktrans %}</p>
<p>{% blocktrans %}Keep yourself up to date on c3nav by following us on <a href="https://github.com/twitter">Twitter</a>.{% endblocktrans %}</p>
{% if patrons %}
<p>{% blocktrans %}Development of the software was supported by the following patrons on <a href="https://c3nav.de/patreon">Patreon</a>:{% endblocktrans %} {{ patrons }}</p>
{% endif %}
{% if address %}
<h4>{% trans 'Responsible for this website:' %}</h4>
<p>{{ address }}</p>
{% endif %}
<h4>{% trans 'Data privacy' %}</h4>
<p>{% trans 'We do not collect any personal data.' %}</p>
<p>{% trans 'Any data that your device sends to c3nav that might be used to track you will either be discarded after processing it or saved in a way that does not allow us to connect it to you.' %}</p>
<p>{% trans 'If you register an account, we do not ask for personal data either.' %}</p>
</main>
{% endblock %}

View file

@ -16,7 +16,8 @@
{% endif %}
<a href="/api/" target="_blank">{% trans 'API' %}</a> //
<a href="https://twitter.com/c3nav/" rel="external" target="_blank">Twitter</a> //
<a href="https://github.com/c3nav/c3nav/" rel="external" target="_blank">GitHub</a>
<a href="https://github.com/c3nav/c3nav/" rel="external" target="_blank">GitHub</a> //
<a href="{% url 'site.about' %}">{% trans 'about c3nav' %}</a>
</section>
{% endif %}
<section id="map" data-bounds="{{ bounds }}"

View file

@ -1,7 +1,7 @@
from django.conf.urls import url
from c3nav.site.views import (access_redeem_view, account_view, change_password_view, choose_language, login_view,
logout_view, map_index, qr_code, register_view)
from c3nav.site.views import (about_view, access_redeem_view, account_view, change_password_view, choose_language,
login_view, logout_view, map_index, qr_code, register_view)
slug = r'(?P<slug>[a-z0-9-_.:]+)'
slug2 = r'(?P<slug2>[a-z0-9-_.:]+)'
@ -24,4 +24,5 @@ urlpatterns = [
url(r'^account/change_password$', change_password_view, name='site.account.change_password'),
url(r'^access/(?P<token>[^/]+)$', access_redeem_view, name='site.access.redeem'),
url(r'^lang/$', choose_language, name='site.language'),
url(r'^about/$', about_view, name='site.about'),
]

View file

@ -337,3 +337,11 @@ def access_redeem_view(request, token):
def choose_language(request):
return render(request, 'site/language.html', {})
@never_cache
def about_view(request):
return render(request, 'site/about.html', {
'address': settings.IMPRINT_ADDRESS,
'patrons': settings.IMPRINT_PATRONS,
})