Évolutions thème Saumur (#73875) #144

Merged
smihai merged 3 commits from wip/73323-saumur-improvments into main 2023-01-27 12:52:36 +01:00
3 changed files with 113 additions and 49 deletions

View File

@ -13,7 +13,7 @@ $banner-height: 300px;
text-transform: uppercase; text-transform: uppercase;
} }
// golbal layout // global layout
main { main {
background: white; background: white;
@ -25,7 +25,7 @@ main {
.site-header { .site-header {
background-color: white; background-color: white;
height: 150px; height: 200px;
@media screen and ($min-desktop-viewport) { @media screen and ($min-desktop-viewport) {
height: 300px; height: 300px;
} }
@ -33,19 +33,54 @@ main {
body.has-header-background .site-header { body.has-header-background .site-header {
background-color: white; background-color: white;
background-image: var(--banner-url); background-image: var(--banner-url, url(/assets/header:background));
background-size: cover; background-size: cover;
background-position: center; background-position: center;
} }
#logo.has-logo a {
height: 100px; div#header {
width: 250px; max-width: 1600px;
@media screen and ($max-mobile-viewport) { }
margin-top: $space-medium;
#top {
display: flex;
align-items: center;
justify-content: space-between;
@media ($max-mobile-viewport) {
flex-wrap: wrap;
} }
@media screen and ($min-desktop-viewport) { @media ($min-desktop-viewport) {
height: 200px; padding-top: 2.5rem;
width: 500px; }
}
#logo.has-logo {
padding-left: 0;
max-width: 50%;
a {
height: 100px;
width: 250px;
max-width: 100%;
@media screen and ($min-desktop-viewport) {
height: 200px;
width: 500px;
}
}
}
.logo-commune {
max-width: 40%;
&--link {
display: block;
}
&--img {
width: 100px;
height: 100px;
object-fit: contain;
@media screen and ($min-desktop-viewport) {
height: 200px;
width: 200px;
}
} }
} }
@ -61,14 +96,21 @@ div#nav {
#toplinks { #toplinks {
@media screen and ($max-mobile-viewport) { @media screen and ($max-mobile-viewport) {
right: $space-xlarge * 2; position: static;
order: -1;
flex: 1 1 100%;
padding-right: calc(#{$nav-menu-side} + 2em);
max-width: none;
min-height: $nav-menu-side;
margin-left: -0.7em;
margin-right: -0.7em;
} }
} }
div.gru-nav { div.gru-nav {
@media screen and ($max-mobile-viewport) { @media screen and ($max-mobile-viewport) {
.gru-nav-button { .gru-nav-button {
top: $space-small; top: 0;
right: $space-small; right: 0.7rem;
left: unset; left: unset;
& + ul::before { & + ul::before {
display: none; display: none;
@ -101,14 +143,21 @@ h3 {
%cell-links-list { %cell-links-list {
font-family: Roboto, sans-serif; font-family: Roboto, sans-serif;
li a { li a {
z-index: 0; padding-top: 0.65rem;
} padding-bottom: 0.65rem;
li div.description p {
margin-left: 0; &:hover + .description {
margin-top: -$space-large * 0.7; background-color: $cell-entry-hover-background;
position: relative; }
z-index: 1000;
} }
li div.description {
margin-top: -0.65rem;
padding-bottom: 0.65rem;
p {
margin: 0;
position: relative;
}
}
} }
.search-cell.transparent { .search-cell.transparent {
@ -252,7 +301,7 @@ div#services-communes {
#footer-wrapper { #footer-wrapper {
padding-bottom: 0; padding-bottom: 0;
#footer { #footer {
max-width: 100%; max-width: $width * 0.75;
} }
margin-top: 0; margin-top: 0;
border-top: 3px solid $orange; border-top: 3px solid $orange;
@ -260,29 +309,22 @@ div#services-communes {
a { a {
text-decoration: none; text-decoration: none;
} }
& > div {
max-width: $width;
margin: 0 auto;
}
} }
.text-cell:first-child { .text-cell{
> div {
max-width: $width * 0.75;
}
strong { strong {
color: $orange; color: $orange;
} }
} }
.text-cell:not(:first-child) { }
background: $orange; .orange-footer-wrapper {
background: $orange;
color: white;
a {
color: white; color: white;
a {
color: white;
}
} }
} }
div#tracking-code a { div#tracking-code a {
padding-right: 0; padding-right: 0;
font-size: 110%; font-size: 110%;
} }

View File

@ -50,8 +50,10 @@ $nav-button-background: $white;
$nav-background: $pink; $nav-background: $pink;
$nav-after-image: false; $nav-after-image: false;
$nav-button-color: $black; $nav-button-color: $black;
$nav-button-background: $gray-light-2;
$nav-color: white; $nav-color: white;
$nav-mobile-menu-background: $white; $nav-mobile-menu-background: $white;
$nav-border-color: none;
$nav-item-selected-background: $orange; $nav-item-selected-background: $orange;
$nav-item-selected-color: $white; $nav-item-selected-color: $white;
@ -78,6 +80,7 @@ $cell-entry-border: 2px dotted $gray-dark-1;
$cell-title-cover-border: false; $cell-title-cover-border: false;
$title-color: $gray-dark-1; $title-color: $gray-dark-1;
$title-transform: uppercase; $title-transform: uppercase;
$cell-entry-hover-background: #eee;
$button-background: $light-green; $button-background: $light-green;
$button-color: $gray-dark-1; $button-color: $gray-dark-1;

View File

@ -1,24 +1,43 @@
{% extends 'combo/page_template.html' %} {% extends 'combo/page_template.html' %}
{% load assets combo i18n %} {% load assets combo i18n %}
{% block header-title %}
{{ block.super }}
{% if code_postal_commune %}
{% with cards|objects:"commune-1"|filter_by:"code_postal"|filter_value:code_postal_commune|include_fields|first|get:"fields" as commune_card %}
{% with commune_card|get:'banner' as banner %}
{% if banner %}
<style>
:root {
--banner-url: url('{% make_public_url banner.url %}');
}
</style>
{% endif %}
{% endwith %}
{% if commune_card.logocommune %}
<div class="logo-commune">
<a class="logo-commune--link" href="{{ commune_card.urlsitecommune }}" title="Aller sur le portail de {{ commune_card.nomcommune }}">
<img class="logo-commune--img" src="{% make_public_url commune_card.logocommune.url %}" alt="{{ commune_card.nomcommune }}">
</a>
</div>
{% endif %}
{% endwith %}
{% endif %}
{% endblock %}
{% block before-main-content %} {% block before-main-content %}
<style>
:root {
{% if code_postal_commune %}
{% with cards|objects:"commune"|filter_by:"code_postal"|filter_value:code_postal_commune|include_fields|first|get:"fields" as commune_card %}
{% with commune_card|get:'banner' as banner %}
--banner-url: url('{% make_public_url banner.url %}');
{% endwith %}
{% endwith %}
{% else %}
--banner-url: url(/assets/header:background);
{% endif %}
}
</style>
{{ block.super }} {{ block.super }}
{% if banner_background %} {% if banner_background %}
<div class="banner"></div> <div class="banner"></div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block footer-post %}
<div class="orange-footer-wrapper">
<div class="orange-footer page-width">
{% placeholder "orange-footer" acquired=True name="Pied de page orange" optional=True %}
</div>
</div>
{% endblock %}