new theme villeneuve-dascq (#44400)

This commit is contained in:
Thomas Jund 2020-06-08 15:07:04 +02:00
parent b3352aa836
commit 339c9e60d4
18 changed files with 2263 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,93 @@
// Colors
$blue: #5787f5;
$green: #8fe489;
$red: #e85f5b;
$black-blue: #172029;
$gray: rgb(78, 86, 96);
$gray-light: #f0f0f0;
$gray-dark: rgb(23, 32, 41);
// Fonts size:
$fz-h1: 2.8em; // 45px
$fz-h2: 2.5em; // 39px
$fz-h3: 1.875em;// 30px
$fz-h4: 1.55em; // 25px
$fz-h5: 1.25em; // 20px
$fz-h6: 1.125em;// 18px
$fz-small: 0.875em; // 14px
$fz-xsmall: 0.75em; // 12px
$theme-gutter: 2rem;
$theme-gutter-mobile: 1.25rem;
$theme-half-gutter: $theme-gutter / 2;
$theme-half-gutter-mobile: $theme-gutter / 2;
$theme-page-padding: 7.5rem;
// Core vars
$primary-color: $blue;
$font-family: muli, sans-serif;
$font-color: $gray-dark;
$link-color: $primary-color;
$very-small-limit: 560px;
$mobile-limit: 1023px;
$width: 1380px;
$columns-gutter: $theme-gutter * 2;
$nav-mobile-limit: 9999px;
$nav-active-color: transparent;
$nav-item-selected-color: $link-color;
$nav-item-selected-background: white;
$nav-button-background: none;
$nav-button-color: $link-color;
$nav-menu-side: 30px;
$nav-mobile-menu-background: $gray-light;
$nav-mobile-menu-item-color: $font-color;
$title-background: transparent !default;
$title-color: $primary-color;
$title-weight: 900;
$title-font-size: $fz-h4;
$title-padding: 1rem $theme-gutter-mobile ;
$cell-border: none;
$cell-border-radius: 10px;
$cell-title-cover-border: false;
$cell-image-padding: 0;
$cell-entry-color: $font-color;
$cell-entry-hover-color: $link-color;
$cell-entry-hover-background: none;
$carrousel-text-position: top left;
$carrousel-navigation-bullet-size: 1rem;
$carrousel-navigation-bullet-border: 2px solid white;
$carrousel-height: 25rem;
$error-color: #e95f5c;
$button-background: $primary-color;
$button-color: white;
$button-border-radius: 3em;
$buttons-order: cancel, previous (grow), submit;
$buttons-alignment: space-between;
$widget-border-radius: 5px;
$widget-border: 1px solid $primary-color;
$widget-focus-color: $primary-color;
$wcs-step-color: $font-color;
$wcs-step-current-color: white;
$wcs-step-current-background: $primary-color;
$wcs-step-border-bottom: 1px solid $primary-color;
$wcs-step-current-border-bottom: $wcs-step-border-bottom;
$wcs-steps-small-layout-limit: $mobile-limit;
$notification_error_color: $error-color;
$notification_warning_color: #EC892F;
$notification_success_color: #15b350;
$notification_info_color: #3562da;
$footer-full-width-background: false;
$footer-background: $primary-color;

View File

@ -0,0 +1,17 @@
{
"label": "Villeneuve d'Ascq",
"variables": {
"pwa_display": "standalone",
"theme_color": "#5787f5"
},
"settings": {
"combo": {
"COMBO_PUBLIC_TEMPLATES.update": {
"three_columns": {
"name": "trois colonnes",
"template": "combo/page_template_3cols.html"
}
}
}
}
}

View File

@ -0,0 +1,153 @@
// TOP Search CELL
// Fix cell On right of window when she's activated (input get focus)
(function(d){
'use strict';
let top_search;
let el_to_move;
let closeBtn;
let mask;
// CSS class name
const fixed = "search-cell-fixed";
const on_top = "search-cell-move-on-top";
// Status
let is_fixed = false;
let is_fixed_on_top = false;
const debug = function(func) {
console.log(func);
console.log("is_fixed", is_fixed);
console.log("is_fixed_on_top", is_fixed_on_top);
};
const createCloseBtn = function(){
closeBtn = d.createElement('button');
closeBtn.className = "top-search-close-btn";
closeBtn.setAttribute("aria-label", "Fermer la fenêtre de recherche");
closeBtn.setAttribute("role", "button");
};
const addCloseBtn = function(){
createCloseBtn();
$(el_to_move).prepend(closeBtn);
};
const createMask = function() {
mask = d.createElement('span');
mask.className = "top-search-mask";
mask.setAttribute("role", "button");
top_search.append(mask);
};
const fixLayout = function() {
if (is_fixed) return;
const elLayout = el_to_move.getBoundingClientRect()
el_to_move.style.top = elLayout.top + "px";
el_to_move.style.left = elLayout.left + "px";
el_to_move.style.height = elLayout.height + "px";
el_to_move.style.width = elLayout.width + "px";
top_search.style.height = elLayout.height + "px";
top_search.classList.add(fixed);
is_fixed = true;
};
const removeLayout = function() {
if (!is_fixed) return;
top_search.classList.remove(fixed);
top_search.removeAttribute('style');
el_to_move.removeAttribute('style');
is_fixed = false;
};
const fixOnTop = function(callback) {
if ( !is_fixed || top_search.classList.contains(on_top) ) return;
top_search.classList.add(on_top);
is_fixed_on_top = true;
};
const detachTop = function(callback) {
if ( !is_fixed_on_top || !top_search.classList.contains(on_top) ) return;
$(el_to_move).one('transitionend', function(e){
e.stopPropagation();
if (callback) {
callback();
}
});
top_search.classList.remove(on_top);
is_fixed_on_top = false;
};
const open = function() {
if (is_fixed_on_top) return;
d.body.classList.add('no-overflow');
fixLayout();
setTimeout(function () {
fixOnTop();
}, 20);
};
const close = function() {
if (!is_fixed_on_top) return;
detachTop(function(){
removeLayout();
d.body.classList.remove('no-overflow');
})
};
const init = function() {
top_search = d.querySelector('.pwa-navigation--wrapper .search-cell');
if (!top_search) return;
el_to_move = top_search.querySelector('div');
const form = top_search.querySelector('form');
const input = top_search.querySelector('input');
addCloseBtn();
createMask();
// when focus change
document.addEventListener('focusin', function(e) {
if (e.target === input && !is_fixed_on_top) {
open();
} else {
// close if activeElement is not a child of el_to_move
if ( !el_to_move.contains(d.activeElement) ) {
close();
}
}
});
// Open Input click
$(input).on('click keydown', function(){
if (input === d.activeElement) {
open();
}
});
// open when submit form
$(form).on('submit', open);
// close esc
document.addEventListener('keydown', function(e){
if (e.keyCode === 27) {
close();
}
});
// close click btn
$(closeBtn).on('click', close);
// close on mask
$(mask).on('click', close);
};
$(function() {
init();
});
})(document)

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1" viewBox="0 0 12 12" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -28.34)">
<g transform="translate(-14.1 14.34)">
<path d="m24.6 15.5-9 9m0-9 9 9" fill="none" stroke="#172029" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 384 B

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20" height="22" version="1.1" viewBox="0 0 20 22" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
<path d="m10 2.463c2.293 0 4.439 0.878 6.049 2.488 1.61 1.61 2.488 3.756 2.488 6.049 0 2.293-0.878 4.439-2.488 6.049-1.61 1.61-3.756 2.488-6.049 2.488-2.293 0-4.439-0.878-6.049-2.488-3.317-3.317-3.317-8.732 0-12.05 1.61-1.659 3.756-2.537 6.049-2.537m0-1.463c-2.537 0-5.122 0.9756-7.073 2.927-3.902 3.902-3.902 10.24 0 14.15 1.951 1.951 4.488 2.927 7.073 2.927 2.585 0 5.122-0.9756 7.073-2.927 3.902-3.902 3.902-10.24 0-14.15-1.951-1.951-4.537-2.927-7.073-2.927zm-4.494 4.871a0.7318 0.7318 0 0 0-0.5117 1.254l3.998 4.021-3.998 4.02a0.732 0.732 0 0 0 1.037 1.033l3.992-4.016 3.994 4.016a0.732 0.732 0 0 0 1.037-1.033l-3.998-4.02 3.998-4.021a0.7318 0.7318 0 0 0-0.5352-1.254 0.7318 0.7318 0 0 0-0.502 0.2227l-3.994 4.016-3.992-4.016a0.7318 0.7318 0 0 0-0.5254-0.2227z" fill="#5787f5" stroke-width=".4878"/></svg>

After

Width:  |  Height:  |  Size: 968 B

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20" height="22" version="1.1" viewBox="0 0 20 22" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
<style type="text/css">
.st0{fill:none;stroke:#5787F5;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
</style>
<path d="m9.928 0.003906a0.984 1.009 0 0 0-0.6562 0.2871l-8.953 8.98a0.984 1.009 0 1 0 1.377 1.443l0.2949-0.2949v10.57a0.984 1.009 0 1 0 1.969 0v-10.9h12v10.9a0.984 1.009 0 1 0 1.967 0v-10.67l0.4004 0.3965a0.984 1.009 0 1 0 1.367-1.451l-9.053-8.98a0.984 1.009 0 0 0-0.7148-0.2832zm0.03516 2.416 5.701 5.656h-11.34l5.637-5.656zm-1.676 14.63a0.984 1.009 0 0 0-0.9844 1.01v2.926a0.984 1.009 0 1 0 1.969 0v-1.918h1.475v1.918a0.984 1.009 0 1 0 1.969 0v-2.926a0.984 1.009 0 0 0-0.9844-1.01h-3.443z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#5787f5" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 80 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="20" height="22" version="1.1" viewBox="0 0 20 22" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
<style type="text/css">
.st0{fill:#5787F5;}
.st1{fill-rule:evenodd;clip-rule:evenodd;fill:none;stroke:#5787F5;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
</style>
<g transform="translate(0 .5)">
<path d="m10 10.49c-5.541 0-10 4.448-10 9.975a1.021 1.018 0 1 0 2.041 0c0-4.447 3.501-7.94 7.96-7.94 4.459 0 7.958 3.493 7.958 7.94a1.021 1.018 0 1 0 2.041 0c0-5.527-4.457-9.975-9.999-9.975zm0-8.957c1.939 0 3.469 1.527 3.469 3.461s-1.531 3.461-3.469 3.461c-1.939 0-3.571-1.527-3.571-3.461s1.633-3.461 3.571-3.461m0-2.036c-3.061 0-5.51 2.443-5.51 5.496 0 3.053 2.449 5.496 5.51 5.496 3.061 0 5.51-2.443 5.51-5.496 0-3.053-2.449-5.496-5.51-5.496z" clip-rule="evenodd" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#5787f5" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,6 @@
@charset "UTF-8";
@import '../includes/fonts/muli';
@import 'vars';
@import '../includes/publik';
@import 'custom';

View File

@ -0,0 +1,38 @@
{% extends "combo/page_template.html" %}
{% load combo static %}
{% block user-info %}
<span class="theme-back-home">
<a href="{{site_base}}" title="retour à l'accueil">Accueil</a>
</span>
{{ block.super }}
{% endblock %}
{% block before-main-content %}
<div class="pwa-navigation--wrapper">
{{ block.super }}
{% placeholder "top-search" name="zone de recherche" %}
</div>
{% endblock %}
{% block content-pre %}
{% block main-header %}
<header class="theme-page-header">
{% placeholder "main-title" name="Titre de la page" %}
{% if page.title %}
<h1 class="theme-page-title--default">
{{ page.title }}
</h1>
{% endif %}
</header>
{% endblock %}
{% endblock %}
{% block footer %}
<div class="footer-imgs">
<img class="logo-blanc" src="{{site_base}}{% static "" %}{{css_variant}}/img/vasqc-logo-blanc.png">
<img class="skyline" src="{{site_base}}{% static "" %}{{css_variant}}/img/skyline.svg" >
</div>
{{ block.super }}
{% endblock %}

View File

@ -0,0 +1,15 @@
{% extends "combo/page_template.html" %}
{% block combo-content %}
<div id="columns" class="theme-3cols-layout">
<div id="left" class="column">
{% placeholder "left" name="Colonne gauche" %}
</div>
<div id="center" class="column">
{% placeholder "content" name="Colonne centrale" %}
</div>
<div id="right" class="column">
{% placeholder "right" name="Colonne droite" %}
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,9 @@
{% extends "combo/page_template_3cols.html" %}
{% load combo assets i18n %}
{% block before-main-content %}
<div class="top-bandeau">
{% placeholder "bandeau" name="Bandeau" %}
</div>
{{ block.super }}
{% endblock %}

View File

@ -0,0 +1,3 @@
{% extends "combo/search-cell.html" %}
{% block submit-content %}{% endblock %}

View File

@ -0,0 +1,5 @@
{% extends "combo/wcs/tracking_code_input.html" %}
{% block submit-content %}
<span class="btn-label">Valider</span>
{% endblock %}

View File

@ -0,0 +1,12 @@
{% extends "wcs/base.html" %}
{% block main-title %}
{% if title %}
<h1 class="wcs-page-title">
{{ title }}
<span
class="wcs-page-title--image"
style="background-image: url({{portal_url}}assets/wcs:category:picture:eservices:{{global_context.category_slug}})"></span>
</h1>
{% endif %}
{% endblock %}