django-cats/cats/templates/base.html

37 lines
1.5 KiB
HTML
Raw Permalink Normal View History

{% load static %}{% load i18n %}<!doctype html>
{% get_current_language as LANGUAGE_CODE %}
<html lang="{{ LANGUAGE_CODE }}">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{% translate "CAcert - CATS" %}{% endblock title %}</title>
<link rel="icon" href="{% static 'favicon.ico' %}">
<link rel="stylesheet" href="{% static 'cats.css' %}">
</head>
<body>
<header>
<a href="https://www.cacert.org/"><img
src="{% static 'CAcert-logo.svg' %}" alt="CAcert logo"
aria-description="CAcert logo" width="270" height="62"></a>
</header>
<main>{% block content %}{% endblock content %}</main>
<nav class="sidebar">
{% block sidebar_content %}
<form method="post" action="{% url "switch_language" %}?next={{ request.path }}">
{% csrf_token %}
<label for="choose_language">
{% translate "Choose language" %}
</label>
<select id="choose_language" name="choose_language">
{% get_available_languages as LANGUAGES %}
{% for lang in LANGUAGES %}
<option value="{{ lang.0 }}"{% if lang.0 == LANGUAGE_CODE %}
selected{% endif %}>{{ lang.1 }}</option>
{% endfor %}
</select>
<button type="submit">{% translate "Change" %}</button>
</form>
{% endblock sidebar_content %}
</nav>
<footer></footer>
</body>
</html>