Ajustement boutons administration

This commit is contained in:
Jean-Marie Favreau 2024-12-28 12:03:46 +01:00
parent 9cf1f437ef
commit 045cf06e06
2 changed files with 63 additions and 18 deletions

View File

@ -497,6 +497,15 @@ body > main {
padding-top: 0.2em;
}
body.authenticated > main {
padding-top: 0.8em;
}
@media only screen and (min-width: 700px) {
body.authenticated > main {
padding-top: 0.2em;
}
}
article {
margin: 1em 0;
}
@ -853,7 +862,7 @@ nav>div {
}
@media only screen and (min-width: 992px) {
@media only screen and (min-width: 1400px) {
.header li {
float: left;
}
@ -895,6 +904,38 @@ nav>div {
color: var(--secondary-inverse);
}
#badges {
position: absolute;
font-size: 70%;
top:3.5em;
left: 0;
padding: 0.2em .5em 0.2em 0.2em;
background: var(--background-color);
box-shadow: 1px 1px 0 rgba(115, 130, 140, 0.2);
display: inline-block;
.badge {
margin: 0;
border-radius: 0;
}
.link {
margin-left: .5em;
}
}
@media only screen and (min-width: 700px) {
#badges {
left: 50%;
top: 0;
transform: translate(-50%, 0);
padding: 0 .5em .2em .5em;
z-index: 1000;
}
}
.tw-badge {
background: black;
border-color: black;

View File

@ -34,7 +34,7 @@
{% endblock %}
</head>
<body class="{% block body-class %}contenu{% endblock %}">
<body class="{% block body-class %}contenu{% endblock %} {% if user.is_authenticated %}authenticated{% endif %}">
<div id="boutons-fixes">
<ul>
{% block sidemenu-bouton %}{% endblock %}
@ -48,7 +48,6 @@
<input class="menu-btn" type="checkbox" id="menu-btn" />
<label class="menu-icon" for="menu-btn">{% picto_from_name "menu" %}</label>
<ul class="menu">
{% if user.is_authenticated %}{% block configurer-menu %}<li id="menu-configurer" class="configurer-bouton"><a href="{% url 'administration' %}">Administrer {% picto_from_name "settings" %}</a></li>{% endblock %}{% endif %}
{% block ajouter-menu %}<li id="menu-ajouter" class="ajouter-bouton"><a href="{% url 'add_event' %}">Ajouter un événement {% picto_from_name "plus-circle" %}</a></li>{% endblock %}
{% block rechercher-menu %}<li id="menu-rechercher" class="rechercher-bouton"><a href="{% url 'event_search' %}">Rechercher {% picto_from_name "search" %}</a></li>{% endblock %}
<li><a href="{% url 'a_venir' %}{% block a_venir_parameters %}{% endblock %}">Maintenant</a></li>
@ -65,21 +64,6 @@
</li>
<li>
<div>
{% if perms.agenda_culturel.view_recurrentimport %}
{% show_badges_rimports "bottom" %}
{% endif %}
{% if perms.agenda_culturel.change_event %}
{% show_badges_events "bottom" %}
{% endif %}
{% if perms.agenda_culturel.change_duplicatedevents %}
{% show_badge_duplicated "bottom" %}
{% endif %}
{% if perms.agenda_culturel.change_place and perms.agenda_culturel.change_event %}
{% show_badge_unknown_places "bottom" %}
{% endif %}
{% if perms.agenda_culturel.view_message %}
{% show_badge_messages "bottom" %}
{% endif %}
{% if user.is_authenticated %}
{{ user.username }} @
{% endif %}
@ -89,6 +73,26 @@
</li>
</ul>
</nav>
{% if user.is_authenticated %}
<div id="badges">
{% if perms.agenda_culturel.view_recurrentimport %}
{% show_badges_rimports "bottom" %}
{% endif %}
{% if perms.agenda_culturel.change_event %}
{% show_badges_events "bottom" %}
{% endif %}
{% if perms.agenda_culturel.change_duplicatedevents %}
{% show_badge_duplicated "bottom" %}
{% endif %}
{% if perms.agenda_culturel.change_place and perms.agenda_culturel.change_event %}
{% show_badge_unknown_places "bottom" %}
{% endif %}
{% if perms.agenda_culturel.view_message %}
{% show_badge_messages "bottom" %}
{% endif %}
<a class="link" href="{% url 'administration' %}">Administrer {% picto_from_name "settings" %}</a>
</div>
{% endif %}
</div>
<main class="container{% block fluid %}-fluid{% endblock %}">
{% if messages %}