miribel: new theme (#64542)

This commit is contained in:
Thomas Jund 2022-04-12 14:41:54 +02:00
parent 8a84aa9fdc
commit 95d65dd64d
8 changed files with 761 additions and 0 deletions

557
static/miribel/_custom.scss Normal file
View File

@ -0,0 +1,557 @@
%red-caret {
padding-left: nth($title-padding, 2) * 2;
&::before {
content: "\f0da";
font-family: "fontawesome";
color: $red;
font-size: $fz-3;
position: absolute;
left: nth($title-padding, 2);
width: 1em;
}
}
%button {
display: inline-block;
text-transform: uppercase;
font-weight: bold;
box-shadow: none;
&:hover {
box-shadow: none;
}
}
%red-caret-button {
@extend %button;
@extend %red-caret;
margin-right: 0;
text-align: left;
&:hover {
background-color: $blue;
color: $blue-xdark;
}
}
%gray-button {
background-color: $gray;
&:hover {
background-color: $red;
}
}
%blue-button {
background-color: $blue;
}
%white-button {
}
.page-title {
font-family: $serif;
font-size: 35em / $base-font;
line-height: 1;
font-style: italic;
@media ($min-desktop-viewport) {
font-size: 40em / $base-font;
}
}
h1 {
@extend .page-title;
}
h2 {
@extend h1;
color: $blue;
}
h3 {
font-size: $fz-3;
color: $blue;
text-transform: uppercase;
}
h4 {
font-size: $fz-4;
text-transform: uppercase;
}
label {
font-weight: bold;
}
%title {
line-height: 1.1;
}
#page {
padding-top: 2em;
/* big M background */
background: url(img/big-m.svg) no-repeat transparent;
background-size: 500px auto;
background-position: top -50px center;
@media ($min-desktop-viewport) {
background-size: 900px auto;
background-position: top -50px right -250px;
}
}
//
// HEADER
//
.site-header {
padding-bottom: 1.5em;
}
h1#logo.has-logo {
@extend .page-title;
> a {
min-height: $logo-height;
min-width: $logo-width;
max-width: 15em;
padding-left: calc(#{$logo-width} + 2rem);
background-size: $logo-width $logo-height;
@media ($min-desktop-viewport) {
text-indent: 0;
}
}
}
#toplinks {
a {
color: $font-color;
font-size: $fz-small;
text-transform: uppercase;
text-decoration: underline;
&:hover {
color: $red;
}
}
@media ($max-mobile-viewport) {
max-width: calc(100vw - #{$logo-width} - 2.4em - #{$nav-menu-side})
}
}
//
// NAV
//
div.gru-nav {
padding: 0 0.7rem ;
> ul {
margin: 0;
> li {
> a {
@extend %button;
margin-right: 0;
}
}
//subnav
ul {
@media ($min-desktop-viewport) {
// add space between item menu & submenu
&::before {
content: "";
display: block;
height: 1em;
background: transparent;
}
li {
background-color: $blue-xdark;
&:first-child {
border-top-left-radius: $button-border-radius;
border-top-right-radius: $button-border-radius;
}
&:last-child {
border-bottom-left-radius: $button-border-radius;
border-bottom-right-radius: $button-border-radius;
}
}
}
li a {
text-transform: lowercase;
font-weight: normal;
text-align: left;
&:hover {
background-color: $blue-xdark;
color: $blue;
}
}
}
}
}
// right-to-left adaptation
@if $responsive-menu == left-to-right {
@media ($max-mobile-viewport) {
body {
border-left: none;
}
div#header {
width: auto;
margin-right: calc(#{$nav-menu-side} + 1em);
h1 {
padding-left: 0;
}
}
div.gru-nav .gru-nav-button {
border: 5px solid transparent;
left: auto;
right: 0;
top: 0;
+ ul {
transform: translateX(100%);
left: auto;
right: 0;
width: auto;
a {
text-align: left;
}
ul a {
padding-top: 0;
padding-bottom: 0.5em;
}
}
}
}
}
//
// MAIN
//
main {
padding-top: 1.75em;
background-color: $blue-fade;
}
#main-content {
padding: 0 0.7rem;
}
//
// cells
//
// ajust cell padding on $title-padding
.column div.a2-block,
.gru-content div.cell,
.block {
& h2 + div,
.cell--body {
padding: $title-padding;
}
}
.gru-content .cell.wcsformsofcategorycell {
h2 ~ div.intro {
padding: $title-padding;
}
}
.a2-block {
& form, & p {
padding: $title-padding;
margin: 0;
}
}
%cell-links-list {
& > li {
> a {
padding: $title-padding;
}
div.description {
padding-left: nth($title-padding, 2);
padding-right: nth($title-padding, 2);
}
}
}
div.textcell {
p, h1, h2, h3, h4, h5 {
margin-left: nth($title-padding, 2);
margin-right: nth($title-padding, 2);
}
}
div.searchcell {
form {
padding: $title-padding;
}
.search-service-label {
padding-left: nth($title-padding, 2);
padding-right: nth($title-padding, 2);
}
}
// default cell
%cell {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
div.gru-content & {
margin-bottom: 2rem;
}
}
// cell image
.cell-img {
display: block;
margin-top: nth($title-padding, 1);
width: $cell-img-width;
height: $cell-img-height;
// if img is img tag
object-fit: scale-down;
object-position: left center;
// if img is bg image
background-repeat: no-repeat;
background-size: contain;
background-position: left center;
}
.gru-content div.link-list-cell.has-asset-picture,
.gru-content div.wcsformsofcategorycell.has-asset-picture {
picture {
img {
@extend .cell-img;
}
}
}
// Foldable option
div.cell.foldable > div > h2:first-child {
&:hover {
color: $blue;
}
&::after {
color: $red;
}
}
// Links list
%cell-links-list {
.gru-content & > li:not(.add-more-items) > a {
text-transform: uppercase;
@extend %red-caret;
}
}
// Custom cells
.dark-cell {
.gru-content &.cell {
background-color: $blue-xdark;
color: white;
.links-list {
ul > li a {
color: inherit;
padding-left: nth($title-padding, 2);
&::before {
content: "";
}
&:hover {
color: $blue-light;
}
}
}
}
}
.blue-light-cell {
.gru-content &.cell {
background-color: $blue-light;
border: 1px solid;
.links-list {
ul > li {
border-color: $blue-xdark;
a {
&::before {
color: $blue;
}
}
}
}
}
}
.link-cell,
.wcs-form-cell {
.gru-content &.cell {
background-color: transparent;
padding-top: 0;
padding-bottom: 0;
a {
@extend %red-caret-button;
display: block;
}
}
}
// link-cell template option
.btn-with-icon {
.gru-content &.cell {
.btn-with-icon {
&--link {
padding-left: 0;
padding-right: 0;
background-color: $blue;
&:hover {
background-color: $blue-xdark;
color: $blue;
}
&::before {
content: none;
}
}
&--icon {
@extend .cell-img;
}
&--label {
@extend %title;
display: block;
}
}
}
}
.tracking-code-input-cell {
.gru-content &.cell {
background-color: $red;
color: white;
input {
width: 100%;
margin-bottom: 0.5em;
}
button {
@extend %inverted-button;
}
}
}
//
// WCS
//
div#tracking-code {
color: $red;
h3 {
padding-bottom: 0;
padding-left: 0;
}
a {
padding-left: 0;
text-decoration: underline;
color: inherit;
}
}
div#rub_service {
padding: 1rem;
border-radius: 5px;
margin-bottom: 4rem !important;
@media ($min-desktop-viewport) {
padding: 3rem;
}
}
.wcs-steps {
font-weight: bold;
}
.wcs-step {
&--label {
font-size: 1rem;
}
&--marker {
border: 2px solid;
span {
@mixin desktop-vertical-steps() {
transform: translateY(-0.05em);
}
}
}
&.current {
.wcs-step--marker {
border: none;
}
}
}
.form-content--title {
@extend .page-title;
padding-left: 0;
@media ($min-desktop-viewport) {
padding-left: calc(#{$form-sidebar-width} + #{$form-sidebar-gutter});
background: url(img/vague.svg) no-repeat left bottom 0.5em;
}
}
.widget-with-error .error {
color: $red;
background-position: center left;
}
.form-content--body .form-previous{
@extend %blue-button;
}
@media (max-width: $very-small-limit) {
.form-content--body .buttons {
column-gap: 1.5rem;
> * {
flex: 1 0 30%;
.content, .content button {
width: 100%;
margin-right: 0;
}
&.submit-button {
flex-basis: 100%;
}
}
}
}
//
// PWA
//
.pwa-navigation div > ul li a {
background-size: auto 40%;
display: flex;
span {
font-size: $fz-xsmall;
margin: auto;
height: auto;
}
}
//
// FOOTER
//
#footer-wrapper {
padding-top: 3.5em;
margin-top: 0;
position: relative;
&::before {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: 100%;
height: 20px;
background: url(img/vague-footer.svg) repeat-x left bottom;
background-size: auto 20px;
}
}
#footer .menucell li a {
color: $font-color;
}

114
static/miribel/_vars.scss Normal file
View File

@ -0,0 +1,114 @@
// Colors
$blue: hsl(193,61%,59%);
$blue-fade: hsla(193, 61%, 59%, 0.3);
$blue-light: #cceaf3;
$blue-xdark: #353D55;
$gray-blue: hsl(223,17%,34%);
$gray-blue-fade: hsla(223, 17%, 34%, 0.4);
$gray: #c1c1c1;
$red: #EF4B51;
// Fonts
$base-font: 16;
$fz-1: 30em / $base-font;
$fz-2: 24em / $base-font;
$fz-3: 21em / $base-font;
$fz-4: 18em / $base-font;
$fz-small: 14em / $base-font;
$fz-xsmall: 11em / $base-font;
$ss-serif: Mundial, sans-serif;
$serif: "bree-serif", serif;
// Img
$cell-img-width: 60%;
$cell-img-height: 100px;
//Logo
$logo-width: 160px;
$logo-height: 90px;
// Core vars
$width: 1200em / $base-font;
$mobile-limit: 64em;
$very-small-limit: 35em;
$mobile-width: 50em;
$columns-gutter: 2rem;
$sidebar-width: calc(33% + 1rem);
$primary-color: $blue;
$link-color: $red;
$font-size: 100%;
$font-family: $ss-serif;
$font-color: $gray-blue;
$toplinks-style: none;
$nav-background: linear-gradient(to bottom, transparent 50%, $blue-fade 50%);
$nav-full-width-background: true;
$nav-after-image: false;
$nav-item-spacing: 1rem;
$nav-item-selected-background: $red;
$nav-submenu-background: transparent;
$responsive-menu: left-to-right; // right-to-left adaptation
$nav-mobile-menu-background: $blue-xdark;
$nav-mobile-menu-item-color: white;
$nav-mobile-menu-item-hover-background: $blue-xdark;
$nav-mobile-menu-item-hover-color: $blue;
$nav-menu-side: 40px;
$nav-button-background: $blue-xdark;
$nav-button-bar-height: 3px;
$nav-border-color: white; // used to change button toggled color
$nav-mobile-bottom-bar-background: $blue-xdark;
$nav-mobile-bottom-bar-color: white;
$nav-mobile-bottom-bar-item-hover-background: $nav-mobile-bottom-bar-background;
$nav-mobile-bottom-bar-item-hover-color: $blue;
$title-background: transparent;
$title-color: inherit;
$title-font-family: $serif;
$title-font-size: $fz-1;
$title-weight: 700;
$title-padding: 0.75rem 1.5rem;
$button-background: $blue-xdark;
$button-color: white;
$button-hover-background: $red;
$button-border-radius: 4px;
$cell-title-cover-border: fasle;
$cell-border: none;
$cell-entry-color: $blue-xdark;
$cell-entry-hover-color: $red;
$cell-entry-hover-background: transparent;
$cell-entry-border: 1px solid $blue-light;
$cell-image-position: top;
$cell-image-padding: 0;
$cell-border-radius: 5px;
$form-sidebar-width: 25%;
$form-sidebar-gutter: 2rem;
$widget-border: 1px solid $gray-blue-fade;
$widget-focus-border: 1px solid $gray-blue;
$widget-border-radius: 4px;
$widget-unique-checkbox-position: left;
$cancel-button-style: '%gray-button';
$buttons-order: previous, cancel (grow), submit;
$wcs-steps-spacing: 1rem;
$wcs-step-color: $font-color;
$wcs-step-current-color: $wcs-step-color;
$wcs-step-border-bottom: 1px solid $primary-color;
$wcs-step-current-border-bottom: $wcs-step-border-bottom;
$wcs-step-marker-type: disc;
$wcs-step-current-marker-color: white;
$wcs-step-current-marker-background: $primary-color;
$wcs-steps-small-layout-limit: $mobile-limit;
$or-separator: false;
$footer-background: white;
$footer-color: $font-color;

View File

@ -0,0 +1,30 @@
{
"label": "miribel",
"variables": {
"pwa_display": "standalone",
"theme_color": "#57BCD7",
"email_header_asset": "emails:logo"
},
"settings": {
"combo": {
"COMBO_ASSET_SLOTS.update": {
"header:logo": { "label": "Têtière : logo" },
"emails:logo": {"label": "Emails : logo"}
},
"COMBO_CELL_TEMPLATES.update" : {
"data_linkcell" : {
"big-btn-icon" : {
"extra-css-classes" : "btn-with-icon",
"label" : "bouton avec image (grand)",
"template" : "combo/cells/big-btn-with-icon/link-cell.html"
}
}
},
"COMBO_CELL_ASSET_SLOTS.update": {
"data_linkcell": {
"picture": {"prefix": "Icône"}
}
}
}
}
}

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="94" height="60" version="1.1" viewBox="139 36.903 94 60" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<g data-name="Groupe 36">
<g transform="translate(139,36.903)" clip-path="url(#g)" data-name="Groupe 33">
<g data-name="Groupe 32">
<path d="m10.1 21.978-6e-3 -0.12c-0.11-2.48-0.993-3.74-1.415-3.837-0.33-0.064-2.05 0.517-4.346 4.817a2.302 2.302 0 0 1-3.115 0.945 2.295 2.295 0 0 1-1.125-1.383 2.291 2.291 0 0 1 0.18-1.73 27.455 27.455 0 0 1 1.439-2.41c3.045-4.516 5.872-5.149 7.85-4.755a5.238 5.238 0 0 1 0.133 0.028 5.54 5.54 0 0 1 3.421 2.535c0.515 0.796 0.917 1.75 1.19 2.833a13.521 13.521 0 0 1 0.357 2.23 37.115 37.115 0 0 1 0-3e-3 100.96 100.96 0 0 1 0.304-0.807 51.593 51.593 0 0 1 2.291-5.187c3.049-5.915 6.469-8.913 9.89-8.57a5.368 5.368 0 0 1 0.28 0.037c2.387 0.368 5.24 2.458 6.67 9.628a39.37 39.37 0 0 1 0.431 2.666 65.47 65.47 0 0 1 1.23-3.995 43.4 43.4 0 0 1 0.812-2.167c3.259-8.013 7.914-12.733 12.412-12.733a6.365 6.365 0 0 1 1.308 0.136 6.415 6.415 0 0 1 0.922 0.268c2.35 0.875 6.208 3.806 5.542 13.503a35.023 35.023 0 0 1-2e-3 0.036 314.68 314.68 0 0 0-0.278 4.407c-1.329 23.872 1.325 30.814 5.365 33.955a16.593 16.593 0 0 0 3.57 1.991 14.544 14.544 0 0 0 5.94 1.197c7.427 0 15.061-4.77 17.53-8.19a7.045 7.045 0 0 0 0.24-0.354 2.291 2.291 0 0 1 1.348-0.99c0.6-0.162 1.263-0.08 1.83 0.278a2.291 2.291 0 0 1 0.99 1.348c0.16 0.6 0.08 1.263-0.28 1.83a12.473 12.473 0 0 1-0.899 1.234c-3.68 4.479-12.012 9.238-20.43 9.24a28.885 28.885 0 0 1-3.004-0.148 17.898 17.898 0 0 1-5.34-1.335 17.03 17.03 0 0 1-10.362-11.926c-1.886-6.597-1.973-16.254-0.953-30.835a450.55 450.55 0 0 1 0.13-1.82 24.762 24.762 0 0 0 0.05-0.892c0.2-5.276-1.471-8.002-2.85-8.291a1.547 1.547 0 0 0-0.31-0.03c-1.64 0-4.803 2.229-7.654 8.567a39.096 39.096 0 0 0-0.551 1.29 43.324 43.324 0 0 0-1.342 3.873c-1.657 5.536-2.83 12.385-3.59 17.41a348.68 348.68 0 0 0-0.395 2.694 178.74 178.74 0 0 1-0.175 1.046c-0.73 4.269-0.995 4.627-1.667 4.986a8.71 8.71 0 0 1-0.112 0.058 2.307 2.307 0 0 1-1.006 0.255h-0.048a2.3 2.3 0 0 1-1.308-0.408 2.305 2.305 0 0 1-0.995-1.897 2.319 2.319 0 0 1 0.015-0.256c0.026-0.213 0.232-0.658 0.526-4.033 0.322-3.718 0.23-6.555-0.114-12.525a1608.4 1608.4 0 0 0-0.17-2.88 49.38 49.38 0 0 0-0.205-2.445c-0.717-6.522-2.463-8.683-3.29-9.115a0.762 0.762 0 0 0-0.23-0.082c-0.804-0.102-3.933 1.587-7.46 10.814a99.044 99.044 0 0 0-0.748 2.031c-2.731 7.638-5.886 18.817-5.922 18.94a2.303 2.303 0 0 1-2.214 1.678 2.29 2.29 0 0 1-0.579-0.075 2.301 2.301 0 0 1-1.724-2.226c0-0.165 0.018-0.333 0.055-0.501a2.345 2.345 0 0 1 8e-3 -0.034c2.4-10.097 2.244-13.543 1.957-19.799z" fill="#57bcd7" fill-opacity=".3" fill-rule="evenodd" data-name="Tracé 36"/>
</g>
</g>
</g>
<defs>
<clipPath id="g">
<path transform="translate(0,86.518)" d="m0 4.507h162v-91.025h-162z" data-name="Tracé 37"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="80" height="20" version="1.1" viewBox="138.98 254.98 80 20" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<path d="m138.98 274.77c0.5319 0.0337 1.0647 0.0511 1.5976 0.0522h0.0433c9.2346 0 13.806-4.6292 18.654-9.5351l0.50087-0.50656c4.8506-4.8989 10.02-9.7986 19.967-9.7986 0.0216-3e-5 0.0431-3e-5 0.0646 0 10.021 0.021 15.183 4.9706 20.041 9.9201l0.46363 0.47228c4.5337 4.6222 8.8317 9.0083 16.999 9.5515 0.55564 0.0366 1.669 0.0561 1.669 0.0561z" fill="#fff" fill-rule="evenodd" stroke-width=".76963" data-name="Tracé 1197"/>
</svg>

After

Width:  |  Height:  |  Size: 935 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="258.017" height="29.533" viewBox="138.983 254.983 258.017 29.533"><path d="m139 258.432.01-3.432a34.256 34.256 0 0 1 8.166.946c8.12 2 13.275 6.874 18.193 11.748a883.881 883.881 0 0 1 .637.632 527.27 527.27 0 0 0 1.032 1.024c5.63 5.565 11.259 10.62 21.449 11.248a35.216 35.216 0 0 0 2.11.065 37.372 37.372 0 0 0 .085 0c11.472 0 17.479-5.301 23.486-11.187a521.965 521.965 0 0 0 1.065-1.048c6.598-6.495 13.42-13.223 26.978-13.223a41.067 41.067 0 0 1 .084 0c13.606.028 20.404 6.789 26.978 13.326a514.641 514.641 0 0 0 1.058 1.05c5.62 5.555 11.242 10.59 21.412 11.22a35.248 35.248 0 0 0 2.102.067 37.44 37.44 0 0 0 .057 0c12.15 0 18.165-5.94 24.543-12.235a821.01 821.01 0 0 1 .659-.65c6.382-6.286 13.183-12.573 26.271-12.573a40.959 40.959 0 0 1 .085 0c13.185.027 19.977 6.378 26.368 12.729a843.55 843.55 0 0 1 .61.606c5.965 5.931 11.62 11.559 22.366 12.256a35.157 35.157 0 0 0 2.196.072l-.01 3.423a34.14 34.14 0 0 1-8.15-.94c-8.106-1.995-13.254-6.863-18.167-11.731a927.799 927.799 0 0 1-.66-.655c-5.982-5.956-11.651-11.599-22.455-12.263a35.213 35.213 0 0 0-2.108-.065 37.258 37.258 0 0 0-.085 0c-12.13 0-18.142 5.946-24.514 12.225-6.58 6.505-13.391 13.233-26.931 13.233a40.939 40.939 0 0 1-.085 0c-13.605-.028-20.403-6.789-26.977-13.335a542.294 542.294 0 0 0-1.058-1.048c-5.997-5.92-11.994-11.263-23.514-11.28-11.543-.027-17.574 5.3-23.605 11.21a520.57 520.57 0 0 0-1.042 1.024 823 823 0 0 1-.66.651c-6.404 6.3-13.23 12.6-26.392 12.573a34.256 34.256 0 0 1-8.166-.947c-8.47-2.086-13.715-7.3-18.83-12.38-5.992-5.955-11.67-11.606-22.481-12.271a35.216 35.216 0 0 0-2.11-.065Z" fill="#485065" fill-rule="evenodd" data-name="Tracé 1197"/></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,6 @@
@charset "UTF-8";
@import url("https://use.typekit.net/bav6lse.css");
@import 'vars';
@import '../includes/publik';
@import 'custom';

View File

@ -0,0 +1,16 @@
{% load assets %}
{% get_asset cell=cell type='picture' as asset %}
<a class="btn-with-icon--link" href="{{url}}">
{% if asset %}
<span
class="btn-with-icon--icon"
style="background-image: url({{asset.asset.url}})"
></span>
{% endif %}
<span class="btn-with-icon--label">{{ title }}</span>
{% if description %}
<div class="description">
{{ description }}
</div>
{% endif %}
</a>