Move inline CSS to layout.css

This commit is contained in:
Alexandre Iooss 2022-03-11 18:22:29 +01:00
parent 5973612776
commit 3a0e08f3f5
6 changed files with 58 additions and 50 deletions

View file

@ -6,10 +6,3 @@ SPDX-License-Identifier: GPL-3.0-or-later
{% endcomment %}
{% block title %}{% block head_title %}{% endblock %}{% endblock title %}
{% block extracss %}
<style>
.asteriskField { display: none; }
.form-group { margin-top: 0.5em;}
</style>
{% endblock %}

View file

@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
{% block head_title %}{% trans "Sign In" %}{% endblock %}
{% block content %}
<div class="card mx-auto" style="max-width: 35rem;">
<div class="card mx-auto login">
<h3 class="card-header text-center">
{% trans "Sign In" %}
</h3>

View file

@ -16,6 +16,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
<meta name="description" content="{% trans "The ENS Paris-Saclay pictures server." %}">
<link rel="stylesheet" href="{% static "bootstrap5/css/bootstrap.min.css" %}">
<link rel="stylesheet" href="{% static "bootstrap5/css/bootstrap-dark-plugin.min.css" %}">
<link rel="stylesheet" href="{% static "layout.css" %}">
<link rel="icon" type="image/png" sizes="16x16" href="{% static "favicon-16x16.png" %}">
<link rel="icon" type="image/png" sizes="32x32" href="{% static "favicon-32x32.png" %}">
<meta name="theme-color" content="#212529">
@ -109,9 +110,25 @@ SPDX-License-Identifier: GPL-3.0-or-later
{% endblock %}
</main>
<footer>
<p class="small text-center text-muted mt-1">
<a class="text-reset" href="https://gitlab.crans.org/bde/photo21/">{% trans "Source code" %}</a>
</p>
<form action="{% url 'set_language' %}" method="post">
{% csrf_token %}
<p class="small text-center text-muted mt-1">
{% if request.user.is_authenticated %}
{% trans "Connected as" %} <code>{{ request.user.username }}</code> &middot;
{% endif %}
<a class="text-reset" href="https://gitlab.crans.org/bde/photo21/">{% trans "Source code" %}</a> &middot;
<select title="language" name="language" class="lang-select" onchange="this.form.submit()">
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% for lang_code, lang_name in LANGUAGES %}
<option value="{{ lang_code }}" {% if lang_code == LANGUAGE_CODE %}selected{% endif %}>
{{ lang_name }} ({{ lang_code }})
</option>
{% endfor %}
</select>
<noscript><input type="submit"></noscript>
</p>
</form>
</footer>
<script src="{% static "bootstrap5/js/bootstrap.min.js" %}"></script>

View file

@ -48,22 +48,4 @@ SPDX-License-Identifier: GPL-3.0-or-later
</div>
{% endfor %}
</div>
<hr/>
{% trans "Connected as" %} <code>{{ request.user.username }}</code>.
<form action="{% url 'set_language' %}" method="post" style="max-width: 15em;">
{% csrf_token %}
{% trans "Select another language:" %}
<select title="language" name="language" class="form-control form-control-sm" onchange="this.form.submit()">
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% for lang_code, lang_name in LANGUAGES %}
<option value="{{ lang_code }}" {% if lang_code == LANGUAGE_CODE %}selected{% endif %}>
{{ lang_name }} ({{ lang_code }})
</option>
{% endfor %}
</select>
<noscript><input type="submit"></noscript>
</form>
{% endblock %}