feat(home):feat(templates): Move style to the sass bundle

This commit is contained in:
Tom Hubrecht 2024-09-22 20:13:55 +02:00
parent ef9877ea60
commit 26fdcbe8ef
Signed by: thubrecht
SSH key fingerprint: SHA256:r+nK/SIcWlJ0zFZJGHtlAoRwq1Rm+WcKAm5ADYMoQPc
6 changed files with 76 additions and 58 deletions

View file

@ -7,7 +7,7 @@ $dark: rgb(46, 46, 46);
@use "sass" with (
$primary: $blue,
$link: rgb(72, 95, 199),
$dark: $dark,
$dark: $dark
);
body {
@ -17,6 +17,26 @@ body {
justify-content: space-between;
}
.bt-link {
display: flex;
width: 100%;
margin-bottom: calc(0.5 * var(--bulma-block-spacing));
font-size: 1.25rem;
// Dark color for text
--bulma-color-l: var(--bulma-dark-l);
--bulma-color-l-delta: 0%;
color: hsl(
var(--bulma-dark-h),
var(--bulma-dark-s),
calc(var(--bulma-color-l) + var(--bulma-color-l-delta))
);
}
.grid.groups {
--bulma-grid-column-min: 24rem;
}
#notifications {
margin-left: -0.75rem;
margin-right: -0.75rem;

View file

@ -1,11 +1,12 @@
{% extends "base.html" %}
{% load i18n %}
{% block content %}
<h2 class="subtitle">{% trans "Création de compte Kanidm" %}</h2>
<hr>
<form class="container is-max-tablet" method="post">
<form method="post">
{% csrf_token %}
{% include "bulma/form.html" with form=form %}

View file

@ -1,4 +1,5 @@
{% extends "base.html" %}
{% load i18n %}
{% block content %}

View file

@ -1,13 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
{% block extra_head %}
<style>
.grid.groups {
--bulma-grid-column-min: 24rem;
}
</style>
{% endblock extra_head %}
{% load i18n %}
{% block content %}
<h2 class="subtitle">
@ -19,13 +12,11 @@
{% if user.kanidm.radius_secret %}
<h3 class="has-text-weight-bold mb-3">{% trans "Mot de passe WiFi :" %}</h3>
<input
id="radius-secret"
<input id="radius-secret"
onclick="document.querySelector('#radius-secret').select()"
class="button is-fullwidth is-primary is-size-4"
value="{{ user.kanidm.radius_secret }}"
readonly
/>
readonly />
<br>
{% endif %}
@ -39,13 +30,11 @@
<h3 class="has-text-weight-bold mb-3">{% trans "Identifiant unique :" %}</h3>
<input
id="uuid"
<input id="uuid"
onclick="document.querySelector('#uuid').select()"
class="button is-fullwidth"
value="{{ user.kanidm.person.uuid }}"
readonly
/>
readonly />
<br>
<h3 class="has-text-weight-bold mb-3">{% trans "Membre des groupes suivants :" %}</h3>
@ -56,6 +45,8 @@
{% endfor %}
</div>
{% else %}
<div class="notification px-5 py-5 is-warning is-light has-text-centered is-size-4 mt-6">{% trans "Pas de compte DGNum répertorié." %}</div>
<div class="notification px-5 py-5 is-warning is-light has-text-centered is-size-4 mt-6">
{% trans "Pas de compte DGNum répertorié." %}
</div>
{% endif %}
{% endblock content %}

View file

@ -1,12 +1,16 @@
{% extends "base.html" %}
{% load i18n %}
{% block content %}
<section class="section">
{% if user.is_authenticated %}
<a class="button is-fullwidth is-size-4 is-primary has-text-dark block" href="{% url 'dgsi:dgn-profile' %}">{% trans "Mon profil" %}</a>
<a class="button bt-link is-primary" href="{% url 'dgsi:dgn-profile' %}">{% trans "Mon profil" %}</a>
{% endif %}
{% if user.is_admin %}
<a class="button is-fullwidth is-size-4 is-danger has-text-dark block" href="{% url 'dgsi:dgn-create_user' %}">{% trans "Créer un nouveau compte" %}</a>
<a class="button is-fullwidth is-size-4 is-warning has-text-dark block" href="{% url 'admin:index' %}">{% trans "Interface admin" %}</a>
<a class="button bt-link is-danger"
href="{% url 'dgsi:dgn-create_user' %}">{% trans "Créer un nouveau compte Kanidm" %}</a>
<a class="button bt-link is-warning" href="{% url 'admin:index' %}">{% trans "Interface admin" %}</a>
{% endif %}
</section>
{% endblock content %}

View file

@ -1,4 +1,5 @@
{% load allauth socialaccount %}
{% get_providers as socialaccount_providers %}
{% if socialaccount_providers %}
{% element provider_list %}