Refactor music management UI: separate group musics into its own template, enhance form structure, and improve responsiveness

Fix #5
This commit is contained in:
Edgar P. Burkhart 2025-06-15 16:37:09 +02:00
parent b30ee77132
commit c7b907f115
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
5 changed files with 113 additions and 76 deletions

View file

@ -179,9 +179,25 @@ table select {
color: var(--pico-color-red-500);}
}
table.results {
table.results, table.musics {
white-space: nowrap;
}
.sc i {
margin-right: .5em;
}
@media (width < 576px) {
[role="group"] {
display: grid;
& > :first-child {
border-radius: var(--pico-border-radius) var(--pico-border-radius) 0 0 !important;
}
& > :not(:first-child) {
margin-left: 0 !important;
margin-top: calc(var(--pico-border-width) * -1);
}
& > :last-child {
border-radius: 0 0 var(--pico-border-radius) var(--pico-border-radius) !important;
}
}
}

View file

@ -1,6 +1,24 @@
{% extends "base.html" %}
{% load form %}
{% block content %}
<h1>Créer un compte</h1>
{% form form submit="Créer mon compte" %}
{% endblock content %}
<h1>Créer mon compte</h1>
{% for error in form.non_field_errors %}<article class="message error">{{ error }}</article>{% endfor %}
<form method="post" {% if action %}action="{% url action %}"{% endif %}>
{% csrf_token %}
<fieldset>
{% for field in form %}
<label for="{{ field.id_for_label }}">
{{ field.label }}
{{ field }}
{% if field.errors %}
<small id="{{ field.errors.field_id }}_error" class="form-error">{{ field.errors|join:", " }}</small>
{% endif %}
</label>
{% endfor %}
</fieldset>
<button type="submit">Créer mon compte</button>
<fieldset>
<a href="{% url "login" %}" role="button" class="secondary">J'ai déjà un compte</a>
</fieldset>
</form>
{% endblock content %}

View file

@ -5,9 +5,9 @@
<form method="post" {% if action %}action="{% url action %}"{% endif %}>
{% csrf_token %}
{% for field in form %}
<fieldset>
{% if field.id_for_label %}
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
{% if field.id_for_label %}
<label for="{{ field.id_for_label }}">
{{ field.label }}
{% else %}
<legend>{{ field.label }}</legend>
{% endif %}
@ -15,16 +15,16 @@
{% if field.errors %}
<small id="{{ field.errors.field_id }}_error" class="form-error">{{ field.errors|join:", " }}</small>
{% endif %}
</fieldset>
</label>
{% endfor %}
<button type="submit">Me connecter</button>
<p>
<fieldset>
<a href="{% url "signup" %}" role="button" class="secondary">Créer mon compte</a>
</p>
<p>
</fieldset>
<fieldset>
<a href="{% url "password_reset" %}"
role="button"
class="outline secondary">J'ai oublié mon mot de passe</a>
</p>
</fieldset>
</form>
{% endblock content %}