2024-11-25
fonc(db) exporte la BDD de production corvée(images) ajoute les images téléversées corvée(images) ajoute les images téléversées fonc(db) exporte la BDD de production fonc(db) exporte la BDD de production
This commit is contained in:
parent
d8dbe1370e
commit
d1d1a46f84
1439 changed files with 61187 additions and 14029 deletions
27
web/app/themes/haiku-atelier-2024/404.php
Normal file
27
web/app/themes/haiku-atelier-2024/404.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
* Le modèle de la Page 404.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Timber\Timber;
|
||||
|
||||
// Contexte et modèles
|
||||
$contexte = Timber::context();
|
||||
$modeles = ["404.twig"];
|
||||
|
||||
// Charge les scripts et styles de la page
|
||||
function charge_scripts_styles_page_404(): void {
|
||||
wp_enqueue_style(
|
||||
handle: "haiku-atelier-2024-styles-page-a-propos",
|
||||
src: get_template_directory_uri() . "/assets/css/pages/page-modele-simple.css",
|
||||
deps: [],
|
||||
ver: filemtime(get_template_directory() . "/assets/css/pages/page-modele-simple.css"),
|
||||
media: "all",
|
||||
);
|
||||
}
|
||||
add_action("wp_enqueue_scripts", "charge_scripts_styles_page_404");
|
||||
|
||||
// Rendu
|
||||
Timber::render(filenames: $modeles, data: $contexte);
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
/* Dimensions */
|
||||
--en-tete-hauteur: 61px;
|
||||
--menu-categories-produits-hauteur: 54.39px;
|
||||
--pied-de-page-hauteur: calc(var(--espace-m) * 2 + 3lh);
|
||||
--pied-de-page-hauteur: 90.55px;
|
||||
--contenu-page-hauteur-minimale-sans-categories: calc(
|
||||
100svh - var(--en-tete-hauteur) - var(--pied-de-page-hauteur)
|
||||
);
|
||||
|
|
@ -474,7 +474,7 @@ body:has(#menu-mobile:not([aria-hidden=true])) {
|
|||
padding-top: var(--espace-m);
|
||||
padding-bottom: var(--espace-m);
|
||||
}
|
||||
@media (width >= 1000px) {
|
||||
@media (width > 1000px) {
|
||||
#menu-mobile {
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -521,6 +521,11 @@ body:has(#menu-mobile:not([aria-hidden=true])) {
|
|||
#en-tete .logo picture, #en-tete .logo img {
|
||||
background: transparent;
|
||||
}
|
||||
#en-tete .logo img {
|
||||
image-rendering: crisp-edges;
|
||||
shape-rendering: geometricPrecision;
|
||||
object-fit: contain;
|
||||
}
|
||||
#en-tete .logo button {
|
||||
display: block;
|
||||
align-content: center;
|
||||
|
|
@ -563,11 +568,11 @@ body:has(#menu-mobile:not([aria-hidden=true])) {
|
|||
text-align: center; /* 4 */
|
||||
}
|
||||
#en-tete .menu-navigation__entree--courante {
|
||||
background: url("/app/themes/haiku-atelier-2024/assets/img/icons/cloud.svg") center/auto 90% no-repeat;
|
||||
background: url("/app/themes/haiku-atelier-2024/assets/img/icons/cloud-penche.svg") center/auto 90% no-repeat;
|
||||
}
|
||||
@media (hover: hover) {
|
||||
#en-tete .menu-navigation__entree:hover {
|
||||
background: url("/app/themes/haiku-atelier-2024/assets/img/icons/cloud.svg") center/auto 90% no-repeat;
|
||||
background: url("/app/themes/haiku-atelier-2024/assets/img/icons/cloud-penche.svg") center/auto 90% no-repeat;
|
||||
}
|
||||
}
|
||||
@media (width <= 1000px) {
|
||||
|
|
@ -815,9 +820,7 @@ body:has(#menu-mobile:not([aria-hidden=true])) {
|
|||
top: var(--colonne-gauche-position-haut);
|
||||
height: var(--colonne-gauche-photo-hauteur);
|
||||
}
|
||||
.photos-produit .colonne.colonne-gauche figure,
|
||||
.photos-produit .colonne.colonne-gauche picture,
|
||||
.photos-produit .colonne.colonne-gauche img {
|
||||
.photos-produit .colonne.colonne-gauche figure, .photos-produit .colonne.colonne-gauche picture, .photos-produit .colonne.colonne-gauche img {
|
||||
height: 100%;
|
||||
}
|
||||
.photos-produit .colonne.colonne-droite img {
|
||||
|
|
@ -1286,7 +1289,6 @@ body:has(#menu-mobile:not([aria-hidden=true])) {
|
|||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
row-gap: var(--espace-xl);
|
||||
padding: var(--espace-m);
|
||||
}
|
||||
.produits-similaires .grille-produits-similaires article figure a {
|
||||
position: relative;
|
||||
|
|
@ -1323,6 +1325,7 @@ body:has(#menu-mobile:not([aria-hidden=true])) {
|
|||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--espace-xl);
|
||||
padding: 0 var(--espace-m);
|
||||
}
|
||||
.produits-similaires .grille-produits-similaires article figure figcaption h3 {
|
||||
font-style: italic;
|
||||
|
|
@ -1342,17 +1345,15 @@ body:has(#menu-mobile:not([aria-hidden=true])) {
|
|||
}
|
||||
|
||||
#pied-de-page {
|
||||
/* Marges */
|
||||
--pied-de-page-marges-internes-bloc: var(--espace-m);
|
||||
--pied-de-page-marges-internes-ligne: var(--espace-xl);
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
place-items: center;
|
||||
max-width: 100vw;
|
||||
height: var(--pied-de-page-hauteur);
|
||||
padding: var(--pied-de-page-marges-internes-bloc) var(--pied-de-page-marges-internes-ligne);
|
||||
padding: var(--espace-m);
|
||||
background: var(--couleur-jaune);
|
||||
border-top: 1px solid var(--couleur-noir);
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
#pied-de-page .zone-menu-navigation-secondaire {
|
||||
justify-self: start;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["../../../src/sass/pages/page-404.scss"],"names":[],"mappings":"AAEA;EAEE;EAGA;EAEA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAKN;EACE;IACE;IACA","file":"page-404.css"}
|
||||
|
|
@ -2,27 +2,22 @@
|
|||
--images-longueur-maximale: 1300px;
|
||||
--page-marges-bloc-debut: var(--en-tete-hauteur);
|
||||
--images-marges-ligne: var(--espace-xl) * 2;
|
||||
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
margin-top: var(--page-marges-bloc-debut);
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling {
|
||||
padding: var(--espace-xl) 0;
|
||||
color: var(--couleur-gris-fonce);
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling__conteneur {
|
||||
position: relative;
|
||||
width: min(var(--images-longueur-maximale), 100% - var(--images-marges-ligne));
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling picture {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling picture::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
|
|
@ -37,7 +32,6 @@
|
|||
filter: opacity(0%);
|
||||
animation: 1s clignotement infinite alternate both linear;
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling img {
|
||||
position: relative;
|
||||
width: max-content;
|
||||
|
|
@ -45,48 +39,38 @@
|
|||
object-fit: contain;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .epingle {
|
||||
position: absolute;
|
||||
right: 46.5%;
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .epingle img {
|
||||
pointer-events: none;
|
||||
display: block;
|
||||
width: 1.5rem;
|
||||
filter: drop-shadow(1px 1px 3px var(--couleur-gris-fonce));
|
||||
transition: 0.2s filter;
|
||||
width: 1.75rem;
|
||||
/* filter: drop-shadow(1px 1px 3px var(--couleur-gris-fonce)); */
|
||||
/* transition: 0.2s filter; */
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="1"] {
|
||||
top: 2%;
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="2"] {
|
||||
top: 23%;
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="3"] {
|
||||
top: 35%;
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="4"] {
|
||||
top: 58%;
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="5"] {
|
||||
top: 76%;
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="6"] {
|
||||
top: 95.5%;
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .epingle[data-ensemble-epingle-boite-actif] img {
|
||||
filter: drop-shadow(1px 1px 5px var(--couleur-gris-fonce));
|
||||
/* filter: drop-shadow(1px 1px 5px var(--couleur-gris-fonce)); */
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .boite-texte {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
|
@ -103,7 +87,6 @@
|
|||
border: 1px solid var(--couleur-noir);
|
||||
transition: 0.2s opacity, 0.2s visibility;
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .boite-texte button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
|
@ -111,60 +94,44 @@
|
|||
align-self: end;
|
||||
padding: var(--espace-xs);
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .boite-texte button img {
|
||||
pointer-events: none;
|
||||
aspect-ratio: 1;
|
||||
width: 1.5rem;
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .boite-texte button:active {
|
||||
background: var(--couleur-jaune);
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .boite-texte p {
|
||||
max-width: 15rem;
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .boite-texte p + p {
|
||||
margin-top: var(--espace-m);
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .boite-texte[data-ensemble-epingle-boite-actif] {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .boite-texte[data-id-ensemble-epingle-boite="2"] {
|
||||
--hauteur-boite: calc(7lh + 1rem + var(--espace-l) * 2);
|
||||
|
||||
top: calc(23% - var(--hauteur-boite) / 2);
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .boite-texte[data-id-ensemble-epingle-boite="3"] {
|
||||
--hauteur-boite: calc(7lh + 1rem + var(--espace-l) * 2);
|
||||
|
||||
top: calc(35% - var(--hauteur-boite) / 2);
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .boite-texte[data-id-ensemble-epingle-boite="4"] {
|
||||
--hauteur-boite: calc(8lh + 2rem + var(--espace-l) * 2);
|
||||
|
||||
top: calc(58% - var(--hauteur-boite) / 2);
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .boite-texte[data-id-ensemble-epingle-boite="5"] {
|
||||
--hauteur-boite: calc(12lh + 2rem + var(--espace-l) * 2);
|
||||
|
||||
top: calc(76% - var(--hauteur-boite) / 2);
|
||||
}
|
||||
|
||||
#page-a-propos .storytelling .boite-texte[data-id-ensemble-epingle-boite="6"] {
|
||||
--hauteur-boite: calc(7lh + 1rem + var(--espace-l) * 2);
|
||||
|
||||
top: calc(95.5% - var(--hauteur-boite) / 2);
|
||||
}
|
||||
|
||||
@media (width <= 700px) {
|
||||
#page-a-propos {
|
||||
--images-marges-ligne: var(--espace-m);
|
||||
|
|
@ -176,3 +143,5 @@
|
|||
filter: opacity(30%);
|
||||
}
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=page-a-propos.css.map */
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["../../../src/sass/pages/page-a-propos.scss"],"names":[],"mappings":"AAEA;EAEE;EAGA;EACA;EAEA;EACA;EACA;;AAEA;EACE;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;;AAGA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKJ;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAIA;EACE;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;;AAIJ;EACE;;AAEA;EACE;;AAIJ;EACE;EACA;;AAGF;EACE;EAEA;;AAGF;EACE;EAEA;;AAGF;EACE;EAEA;;AAGF;EACE;EAEA;;AAGF;EACE;EAEA;;AAKN;EA7KF;IA8KI;;;;AAIJ;EACE;IACE","file":"page-a-propos.css"}
|
||||
{"version":3,"sourceRoot":"","sources":["../../../src/sass/pages/page-a-propos.scss"],"names":[],"mappings":"AAEA;EAEE;EAGA;EACA;EAEA;EACA;EACA;;AAEA;EACE;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;;AAGA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKJ;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAEA;EACE;EACA;EACA;AACA;AACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAIA;AACE;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;;AAIJ;EACE;;AAEA;EACE;;AAIJ;EACE;EACA;;AAGF;EACE;EAEA;;AAGF;EACE;EAEA;;AAGF;EACE;EAEA;;AAGF;EACE;EAEA;;AAGF;EACE;EAEA;;AAKN;EA7KF;IA8KI;;;;AAIJ;EACE;IACE","file":"page-a-propos.css"}
|
||||
|
|
@ -1 +1 @@
|
|||
#page-a-propos{--images-longueur-maximale:1300px;--page-marges-bloc-debut:var(--en-tete-hauteur);--images-marges-ligne:var(--espace-xl)*2;margin-top:var(--page-marges-bloc-debut);flex-flow:column;display:flex}#page-a-propos .storytelling{padding:var(--espace-xl)0;color:var(--couleur-gris-fonce)}#page-a-propos .storytelling__conteneur{width:min(var(--images-longueur-maximale),100% - var(--images-marges-ligne));margin:auto;position:relative}#page-a-propos .storytelling picture{position:relative}#page-a-propos .storytelling picture:before{content:"";filter:opacity(0%);background-image:url(/app/themes/haiku-atelier-2024/assets/img/icons/cloud-gris.svg);background-position:50%;background-repeat:space;background-size:contain;width:100%;height:100%;animation:1s linear infinite alternate both clignotement;position:absolute;top:0;left:0}#page-a-propos .storytelling img{object-fit:contain;background:0 0;width:max-content;height:auto;position:relative}#page-a-propos .storytelling .epingle{position:absolute;right:46.5%}#page-a-propos .storytelling .epingle img{pointer-events:none;width:1.5rem;filter:drop-shadow(1px 1px 3px var(--couleur-gris-fonce));transition:filter .2s;display:block}#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="1"]{top:2%}#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="2"]{top:23%}#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="3"]{top:35%}#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="4"]{top:58%}#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="5"]{top:76%}#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="6"]{top:95.5%}#page-a-propos .storytelling .epingle[data-ensemble-epingle-boite-actif] img{filter:drop-shadow(1px 1px 5px var(--couleur-gris-fonce))}#page-a-propos .storytelling .boite-texte{top:0;right:calc(46.5% - (15rem + var(--espace-l))/2);padding:var(--espace-l);color:var(--couleur-noir);visibility:hidden;opacity:0;background:var(--couleur-fond);border:1px solid var(--couleur-noir);flex-flow:column;font-size:.8rem;font-style:italic;transition:opacity .2s,visibility .2s;display:flex;position:absolute}#page-a-propos .storytelling .boite-texte button{top:0;right:calc(-1.5rem - var(--espace-m) - var(--espace-xs));padding:var(--espace-xs);align-self:end;position:absolute}#page-a-propos .storytelling .boite-texte button img{pointer-events:none;aspect-ratio:1;width:1.5rem}#page-a-propos .storytelling .boite-texte button:active{background:var(--couleur-jaune)}#page-a-propos .storytelling .boite-texte p{max-width:15rem}#page-a-propos .storytelling .boite-texte p+p{margin-top:var(--espace-m)}#page-a-propos .storytelling .boite-texte[data-ensemble-epingle-boite-actif]{visibility:visible;opacity:1}#page-a-propos .storytelling .boite-texte[data-id-ensemble-epingle-boite="2"]{--hauteur-boite:calc(7lh + 1rem + var(--espace-l)*2);top:calc(23% - var(--hauteur-boite)/2)}#page-a-propos .storytelling .boite-texte[data-id-ensemble-epingle-boite="3"]{--hauteur-boite:calc(7lh + 1rem + var(--espace-l)*2);top:calc(35% - var(--hauteur-boite)/2)}#page-a-propos .storytelling .boite-texte[data-id-ensemble-epingle-boite="4"]{--hauteur-boite:calc(8lh + 2rem + var(--espace-l)*2);top:calc(58% - var(--hauteur-boite)/2)}#page-a-propos .storytelling .boite-texte[data-id-ensemble-epingle-boite="5"]{--hauteur-boite:calc(12lh + 2rem + var(--espace-l)*2);top:calc(76% - var(--hauteur-boite)/2)}#page-a-propos .storytelling .boite-texte[data-id-ensemble-epingle-boite="6"]{--hauteur-boite:calc(7lh + 1rem + var(--espace-l)*2);top:calc(95.5% - var(--hauteur-boite)/2)}@media (width<=700px){#page-a-propos{--images-marges-ligne:var(--espace-m)}}@keyframes clignotement{to{filter:opacity(30%)}}
|
||||
#page-a-propos{--images-longueur-maximale:1300px;--page-marges-bloc-debut:var(--en-tete-hauteur);--images-marges-ligne:var(--espace-xl)*2;margin-top:var(--page-marges-bloc-debut);flex-flow:column;display:flex}#page-a-propos .storytelling{padding:var(--espace-xl)0;color:var(--couleur-gris-fonce)}#page-a-propos .storytelling__conteneur{width:min(var(--images-longueur-maximale),100% - var(--images-marges-ligne));margin:auto;position:relative}#page-a-propos .storytelling picture{position:relative}#page-a-propos .storytelling picture:before{content:"";filter:opacity(0%);background-image:url(/app/themes/haiku-atelier-2024/assets/img/icons/cloud-gris.svg);background-position:50%;background-repeat:space;background-size:contain;width:100%;height:100%;animation:1s linear infinite alternate both clignotement;position:absolute;top:0;left:0}#page-a-propos .storytelling img{object-fit:contain;background:0 0;width:max-content;height:auto;position:relative}#page-a-propos .storytelling .epingle{position:absolute;right:46.5%}#page-a-propos .storytelling .epingle img{pointer-events:none;width:1.75rem;display:block}#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="1"]{top:2%}#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="2"]{top:23%}#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="3"]{top:35%}#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="4"]{top:58%}#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="5"]{top:76%}#page-a-propos .storytelling .epingle[data-id-ensemble-epingle-boite="6"]{top:95.5%}#page-a-propos .storytelling .boite-texte{top:0;right:calc(46.5% - (15rem + var(--espace-l))/2);padding:var(--espace-l);color:var(--couleur-noir);visibility:hidden;opacity:0;background:var(--couleur-fond);border:1px solid var(--couleur-noir);flex-flow:column;font-size:.8rem;font-style:italic;transition:opacity .2s,visibility .2s;display:flex;position:absolute}#page-a-propos .storytelling .boite-texte button{top:0;right:calc(-1.5rem - var(--espace-m) - var(--espace-xs));padding:var(--espace-xs);align-self:end;position:absolute}#page-a-propos .storytelling .boite-texte button img{pointer-events:none;aspect-ratio:1;width:1.5rem}#page-a-propos .storytelling .boite-texte button:active{background:var(--couleur-jaune)}#page-a-propos .storytelling .boite-texte p{max-width:15rem}#page-a-propos .storytelling .boite-texte p+p{margin-top:var(--espace-m)}#page-a-propos .storytelling .boite-texte[data-ensemble-epingle-boite-actif]{visibility:visible;opacity:1}#page-a-propos .storytelling .boite-texte[data-id-ensemble-epingle-boite="2"]{--hauteur-boite:calc(7lh + 1rem + var(--espace-l)*2);top:calc(23% - var(--hauteur-boite)/2)}#page-a-propos .storytelling .boite-texte[data-id-ensemble-epingle-boite="3"]{--hauteur-boite:calc(7lh + 1rem + var(--espace-l)*2);top:calc(35% - var(--hauteur-boite)/2)}#page-a-propos .storytelling .boite-texte[data-id-ensemble-epingle-boite="4"]{--hauteur-boite:calc(8lh + 2rem + var(--espace-l)*2);top:calc(58% - var(--hauteur-boite)/2)}#page-a-propos .storytelling .boite-texte[data-id-ensemble-epingle-boite="5"]{--hauteur-boite:calc(12lh + 2rem + var(--espace-l)*2);top:calc(76% - var(--hauteur-boite)/2)}#page-a-propos .storytelling .boite-texte[data-id-ensemble-epingle-boite="6"]{--hauteur-boite:calc(7lh + 1rem + var(--espace-l)*2);top:calc(95.5% - var(--hauteur-boite)/2)}@media (width<=700px){#page-a-propos{--images-marges-ligne:var(--espace-m)}}@keyframes clignotement{to{filter:opacity(30%)}}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
#page-contact {
|
||||
--page-hauteur-minimale: calc(
|
||||
100svh - var(--en-tete-hauteur) - var(--pied-de-page-hauteur) - var(--espace-xl) - 1px
|
||||
);
|
||||
--page-marges-bloc-debut: var(--en-tete-hauteur);
|
||||
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
margin-top: var(--page-marges-bloc-debut);
|
||||
margin-bottom: var(--espace-xl);
|
||||
border-bottom: 1px solid var(--couleur-noir);
|
||||
}
|
||||
|
||||
#page-contact .contenu {
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
place-items: center;
|
||||
width: min(50rem, 100%);
|
||||
min-height: var(--page-hauteur-minimale);
|
||||
margin: auto;
|
||||
font-weight: 500;
|
||||
font-style: italic;
|
||||
border: 1px solid var(--couleur-noir);
|
||||
border-bottom: initial;
|
||||
}
|
||||
|
||||
#page-contact .contenu__en-tete {
|
||||
width: 100%;
|
||||
padding: var(--espace-m) var(--espace-xl);
|
||||
color: var(--couleur-blanc);
|
||||
background: var(--couleur-noir);
|
||||
}
|
||||
|
||||
#page-contact .contenu__en-tete h2 {
|
||||
width: fit-content;
|
||||
margin: auto;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: var(--espacement-inter-lettres-etendu-l);
|
||||
}
|
||||
|
||||
#page-contact .contenu__textuel {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-flow: column nowrap;
|
||||
place-content: center;
|
||||
max-width: 34rem;
|
||||
height: 100%;
|
||||
padding: 0 var(--espace-xl);
|
||||
text-wrap: pretty;
|
||||
}
|
||||
|
||||
#page-contact .contenu__textuel p + p {
|
||||
margin-top: var(--espace-m);
|
||||
}
|
||||
|
||||
@media (width <= 50rem) {
|
||||
#page-contact .contenu {
|
||||
border-right: initial;
|
||||
border-left: initial;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
.page-modele-simple {
|
||||
--page-hauteur-minimale: calc(
|
||||
100svh - var(--en-tete-hauteur) - var(--pied-de-page-hauteur) - var(--espace-xl) - 1px
|
||||
);
|
||||
--page-marges-bloc-debut: var(--en-tete-hauteur);
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
margin-top: var(--page-marges-bloc-debut);
|
||||
margin-bottom: var(--espace-xl);
|
||||
border-bottom: 1px solid var(--couleur-noir);
|
||||
}
|
||||
.page-modele-simple .contenu {
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
place-items: center;
|
||||
width: min(50rem, 100%);
|
||||
min-height: var(--page-hauteur-minimale);
|
||||
margin: auto;
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
border: 1px solid var(--couleur-noir);
|
||||
border-bottom: initial;
|
||||
}
|
||||
.page-modele-simple .contenu__en-tete {
|
||||
width: 100%;
|
||||
padding: var(--espace-m) var(--espace-xl);
|
||||
color: var(--couleur-blanc);
|
||||
background: var(--couleur-noir);
|
||||
}
|
||||
.page-modele-simple .contenu__en-tete h2 {
|
||||
width: fit-content;
|
||||
margin: auto;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: var(--espacement-inter-lettres-etendu-l);
|
||||
}
|
||||
.page-modele-simple .contenu__textuel {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-flow: column nowrap;
|
||||
place-content: center;
|
||||
max-width: 34rem;
|
||||
height: 100%;
|
||||
padding: 0 var(--espace-xl);
|
||||
text-wrap: pretty;
|
||||
}
|
||||
.page-modele-simple .contenu__textuel p + p {
|
||||
margin-top: var(--espace-m);
|
||||
}
|
||||
@media (width <= 50rem) {
|
||||
.page-modele-simple .contenu {
|
||||
border-right: initial;
|
||||
border-left: initial;
|
||||
}
|
||||
}
|
||||
.page-modele-simple#page-cgv .contenu {
|
||||
font-style: normal;
|
||||
}
|
||||
.page-modele-simple#page-cgv .contenu header {
|
||||
font-style: italic;
|
||||
}
|
||||
.page-modele-simple#page-cgv .contenu__textuel {
|
||||
padding: 0;
|
||||
max-width: initial;
|
||||
}
|
||||
.page-modele-simple#page-cgv .contenu__textuel__section {
|
||||
width: 100%;
|
||||
}
|
||||
.page-modele-simple#page-cgv .contenu__textuel__section:first-of-type header {
|
||||
border-top: initial;
|
||||
}
|
||||
.page-modele-simple#page-cgv .contenu__textuel__section header {
|
||||
width: 100%;
|
||||
padding: var(--espace-m) var(--espace-xl);
|
||||
border-top: 1px solid var(--couleur-noir);
|
||||
border-bottom: 1px solid var(--couleur-noir);
|
||||
margin-bottom: var(--espace-l);
|
||||
}
|
||||
.page-modele-simple#page-cgv .contenu__textuel__section header h3 {
|
||||
width: fit-content;
|
||||
margin: auto;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: var(--espacement-inter-lettres-etendu-l);
|
||||
}
|
||||
.page-modele-simple#page-cgv .contenu__textuel__section ul {
|
||||
margin-bottom: 1lh;
|
||||
list-style: square;
|
||||
list-style-position: inside;
|
||||
padding: 0 var(--espace-xl);
|
||||
}
|
||||
.page-modele-simple#page-cgv .contenu__textuel__section p {
|
||||
padding: 0 var(--espace-xl);
|
||||
}
|
||||
.page-modele-simple#page-cgv .contenu__textuel__section p:last-of-type {
|
||||
margin-bottom: var(--espace-xl);
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=page-modele-simple.css.map */
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["../../../src/sass/pages/page-modele-simple.scss"],"names":[],"mappings":"AAEA;EAEE;AAAA;AAAA;EAKA;EAEA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAKN;EACE;IACE;IACA;;;AAKF;EACE;;AAEA;EACE;;AAGF;EACE;EACA;;AAEA;EACE;;AAGE;EACE;;AAIJ;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIJ;EACE;EACA;EACA;EACA;;AAKF;EACE;;AAEA;EACE","file":"page-modele-simple.css"}
|
||||
1
web/app/themes/haiku-atelier-2024/assets/css/pages/page-modele-simple.min.css
vendored
Normal file
1
web/app/themes/haiku-atelier-2024/assets/css/pages/page-modele-simple.min.css
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
.page-modele-simple{--page-hauteur-minimale:calc(100svh - var(--en-tete-hauteur) - var(--pied-de-page-hauteur) - var(--espace-xl) - 1px);--page-marges-bloc-debut:var(--en-tete-hauteur);margin-top:var(--page-marges-bloc-debut);margin-bottom:var(--espace-xl);border-bottom:1px solid var(--couleur-noir);flex-flow:column;display:flex}.page-modele-simple .contenu{width:min(50rem,100%);min-height:var(--page-hauteur-minimale);border:1px solid var(--couleur-noir);border-bottom:initial;flex-flow:column;place-items:center;margin:auto;font-style:italic;font-weight:400;display:flex}.page-modele-simple .contenu__en-tete{width:100%;padding:var(--espace-m)var(--espace-xl);color:var(--couleur-blanc);background:var(--couleur-noir)}.page-modele-simple .contenu__en-tete h2{text-transform:uppercase;width:fit-content;letter-spacing:var(--espacement-inter-lettres-etendu-l);margin:auto}.page-modele-simple .contenu__textuel{max-width:34rem;height:100%;padding:0 var(--espace-xl);text-wrap:pretty;flex-flow:column;flex:1;place-content:center;display:flex}.page-modele-simple .contenu__textuel p+p{margin-top:var(--espace-m)}@media (width<=50rem){.page-modele-simple .contenu{border-right:initial;border-left:initial}}.page-modele-simple#page-cgv .contenu{font-style:normal}.page-modele-simple#page-cgv .contenu header{font-style:italic}.page-modele-simple#page-cgv .contenu__textuel{max-width:initial;padding:0}.page-modele-simple#page-cgv .contenu__textuel__section{width:100%}.page-modele-simple#page-cgv .contenu__textuel__section:first-of-type header{border-top:initial}.page-modele-simple#page-cgv .contenu__textuel__section header{width:100%;padding:var(--espace-m)var(--espace-xl);border-top:1px solid var(--couleur-noir);border-bottom:1px solid var(--couleur-noir);margin-bottom:var(--espace-l)}.page-modele-simple#page-cgv .contenu__textuel__section header h3{text-transform:uppercase;width:fit-content;letter-spacing:var(--espacement-inter-lettres-etendu-l);margin:auto}.page-modele-simple#page-cgv .contenu__textuel__section ul{padding:0 var(--espace-xl);margin-bottom:1lh;list-style:square inside}.page-modele-simple#page-cgv .contenu__textuel__section p{padding:0 var(--espace-xl)}.page-modele-simple#page-cgv .contenu__textuel__section p:last-of-type{margin-bottom:var(--espace-xl)}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="2.433 9.473 85.134 70.17"><path fill="#E7FFB4" d="M84.857 38.272c-2.238-3.079-6.335-4.365-11.182-3.978 6.131-6.94 8.302-14.885 4.751-19.772-4.576-6.298-16.933-5.12-27.595 2.63-2.749 1.998-5.11 4.235-7.031 6.565l-.041-.06c-4.577-6.299-16.937-5.12-27.597 2.632C5.498 34.041.565 45.429 5.143 51.729c2.068 2.845 5.73 4.16 10.101 4.038-5.506 6.701-7.337 14.156-3.945 18.821 4.577 6.3 16.935 5.12 27.596-2.63 2.666-1.939 4.974-4.103 6.866-6.36.147.255.303.504.478.745 4.578 6.301 16.935 5.121 27.596-2.628 10.667-7.755 15.599-19.146 11.022-25.443"/></svg>
|
||||
|
After Width: | Height: | Size: 598 B |
|
|
@ -1 +1 @@
|
|||
<svg viewBox="30.048 56.889 207.767 78.951" xmlns="http://www.w3.org/2000/svg"><path d="M38.421 133.462c16.438 3.1 175.723 0 186.094 0 10.372 0 9.575-8.475 9.575-8.475s2.077-5.022-33.935-7.026c-36.015-2.005-63.796 3.282-81.213 6.912-17.419 3.628-69.872-.477-75.749-.747-5.878-.269-21.211 6.234-4.772 9.336m186.121-32.241c-93.052-1.36-136.54 7.504-168.887 5.27-21.829-1.507-22.188-9.818-22.495-13.744s0-7.943 36.014-9.948c36.013-2.005 58.187 7.146 82.195 8.191 24.01 1.049 67.293.823 73.173.972 10.61.268 21.215 9.568 0 9.259M44.52 58.509S173.376 56.27 221.333 60.3c10.344.87 9.046 9.92 9.046 9.92s-4.816 8.269-34.997 8.06c-36.054-.25-55.531-10.734-79.542-11.78-24.007-1.049-71.499 2.759-77.374 3.029-5.878.268-12.123-11.02 6.054-11.02" fill="#2B2B2B"/></svg>
|
||||
<svg viewBox="29.047 55.883 209.764 80.943" xmlns="http://www.w3.org/2000/svg"><path d="M38.421 133.462c16.438 3.1 175.723 0 186.094 0 10.372 0 9.575-8.475 9.575-8.475s2.077-5.022-33.935-7.026c-36.015-2.005-63.796 3.282-81.213 6.912-17.419 3.628-69.872-.477-75.749-.747-5.878-.269-21.211 6.234-4.772 9.336m6.099-74.953S173.376 56.27 221.333 60.3c10.344.87 9.046 9.92 9.046 9.92s-4.816 8.269-34.997 8.06c-36.054-.25-55.531-10.734-79.542-11.78-24.007-1.049-71.499 2.759-77.374 3.029-5.878.268-12.123-11.02 6.054-11.02m180.022 42.712c-93.052-1.36-136.54 7.504-168.887 5.27-21.829-1.507-22.188-9.818-22.495-13.744s0-7.943 36.014-9.948c36.013-2.005 58.187 7.146 82.195 8.191 24.01 1.049 67.293.823 73.173.972 10.61.268 21.215 9.568 0 9.259" fill="#2B2B2B"/></svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 760 B After Width: | Height: | Size: 760 B |
|
|
@ -12,27 +12,36 @@
|
|||
],
|
||||
"integrity": "sha512-zBecrvIRiJOu6YYRpnc0k8S2hhntD+UpPtg3zhLd4KQSyWdXQTt6ubhfDTOhBtMYi/W1LLcZX89krSQqxkWfGA=="
|
||||
},
|
||||
"_belt_Option-91f3b350.cBye8bLJ.js": {
|
||||
"file": "belt_Option-91f3b350.cBye8bLJ.js",
|
||||
"_belt_Option-91f3b350.1ugmHD3b.js": {
|
||||
"file": "belt_Option-91f3b350.1ugmHD3b.js",
|
||||
"name": "belt_Option-91f3b350",
|
||||
"imports": [
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts"
|
||||
],
|
||||
"integrity": "sha512-9jLdf+ptxzABI2/IowOZjgnuQLIzj36EJ7+u1FMIXffUF+jtqNSBFfsTSpmVe1MaAivun9Bb3/fjur20hZhk8w=="
|
||||
"integrity": "sha512-1Ha/TLTB5vU68OZq5Y0Q/igV7d0JrdxNOKkFD5N9MaLUdyfz8Ay/KUe4dxgJquHmZd9H5+78YPKTE1+732JdGw=="
|
||||
},
|
||||
"_exports.B84S-6H1.js": {
|
||||
"file": "exports.B84S-6H1.js",
|
||||
"name": "exports",
|
||||
"integrity": "sha512-rYFoHD4l6MsBUw4QxiKCaIfX00GsFaTGihRiDcawuDV0+592g9cOFlQq8btqldNq3/pKWpS8Rg5N/j5u4C0dow=="
|
||||
},
|
||||
"_index-0eef19ec.DoJSf22Z.js": {
|
||||
"file": "index-0eef19ec.DoJSf22Z.js",
|
||||
"_index-0eef19ec.DKzz249a.js": {
|
||||
"file": "index-0eef19ec.DKzz249a.js",
|
||||
"name": "index-0eef19ec",
|
||||
"imports": [
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts",
|
||||
"_belt_Option-91f3b350.cBye8bLJ.js"
|
||||
"_belt_Option-91f3b350.1ugmHD3b.js"
|
||||
],
|
||||
"integrity": "sha512-BYIJDDOI3NTIytshd2k13/Wyep1oJ6pfwg9dCdZ18XVQrzO9uj99f5wF9bS0pjKa7OkbM2F27wF817UKn6thgg=="
|
||||
"integrity": "sha512-mQU5w+PJ1f+21yDjlW847XSCH1C3GmRErHt1fgM+/6aWyMYwV4EP3DqpO+udL969q2YuoaMREv9syAwmU+W+Kg=="
|
||||
},
|
||||
"_index-c1cc4c86.yxhuU5oc.js": {
|
||||
"file": "index-c1cc4c86.yxhuU5oc.js",
|
||||
"name": "index-c1cc4c86",
|
||||
"imports": [
|
||||
"_belt_Option-91f3b350.1ugmHD3b.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts"
|
||||
],
|
||||
"integrity": "sha512-X0+lt+zeXBc8Ftxky2RPu0TziIXXJKe6dg+wvzu3303DbpClSTmee6N91Uq8Ldr9n/ENrjij5OjeQ65Er1QktQ=="
|
||||
},
|
||||
"_index.BAmxwLeJ.js": {
|
||||
"file": "index.BAmxwLeJ.js",
|
||||
|
|
@ -68,7 +77,7 @@
|
|||
"name": "dom",
|
||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/constantes/dom.ts",
|
||||
"isEntry": true,
|
||||
"integrity": "sha512-zrRYjeLsGft8dotzdw4tkD1FXuWNpnW/rZMcat4ryVVD3JHAg/0ubE+ewPmg1aWxnPKKv4bSHTND8KmajUaI2w=="
|
||||
"integrity": "sha512-8eFKrXscQHhcvh3ZBxPrqltvWU3bENb79/PQ8TFSA0Cb5/CuQs9WI98gN5iuMX1WnSkNwVHm672PPu6VEDRhwQ=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/erreurs.ts": {
|
||||
"file": "erreurs.js",
|
||||
|
|
@ -92,18 +101,11 @@
|
|||
"integrity": "sha512-M8me/iGRLfItVHaEf+BhA3xdEIxEwdyNuN+H87daJ1jl1oOENbROB7ub6RPP47NdFsQUChTRphEhQglT+qc6RA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/orders.ts": {
|
||||
"file": "orders2.js",
|
||||
"file": "orders3.js",
|
||||
"name": "orders",
|
||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/constantes/orders.ts",
|
||||
"isEntry": true,
|
||||
"integrity": "sha512-wV9B3cW/1TnjBcesuc4a2M+28+67nsmX2++/Up1QUraP4Bdzbn9RiToohkone5Z+1mZNOjB/Hrd8x7Gc+jtVvg=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/pays.ts": {
|
||||
"file": "pays.js",
|
||||
"name": "pays",
|
||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/constantes/pays.ts",
|
||||
"isEntry": true,
|
||||
"integrity": "sha512-/CgY6GFeg59NtZamE/OT4dht8avB/GGy3sOOsyGpUaXZhWWoIApYWzCjITzLdWQfnktSDp9oYrKrB9FHlXaaYQ=="
|
||||
"integrity": "sha512-dLV15du4JF6iPF2I93pExJpqAG13hXNCrRj8hF1dO47SFaa/7S74hT3puqnojjF5g1vStbjuGX+dLVklMIZuOw=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/products.ts": {
|
||||
"file": "products2.js",
|
||||
|
|
@ -129,7 +131,10 @@
|
|||
"name": "animations",
|
||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/animations.ts",
|
||||
"isEntry": true,
|
||||
"integrity": "sha512-SD+1/duJm9OdEuU10TyTp/l4GTZulyECskFYLi5TBLOf5GLkbtiI7wgYto28fXhXRPVcoWuD1Coul4mXCiyAng=="
|
||||
"imports": [
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/dom.ts"
|
||||
],
|
||||
"integrity": "sha512-w5h0lq01go6dZyCfJwq4DVRMBDX+cpUGA7Hzyib+be7JwRi7I1Vf0zoq9xuJKRKalKlc3r6rBQNlfe97+q8Bzw=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts": {
|
||||
"file": "dom2.js",
|
||||
|
|
@ -142,7 +147,7 @@
|
|||
"_Either.wHNxn7Os.js",
|
||||
"_exports.B84S-6H1.js"
|
||||
],
|
||||
"integrity": "sha512-5Xiq6SPZBkHe/fYOdutQl14td9r3b4mQRtef8524PEN+QWMLOGN83Zwfg3aHVnFQ0AZc3AG9U50zWXg89tcv4w=="
|
||||
"integrity": "sha512-smpA89wxMeeoV41hc0f8x4XC08J/30sIUO/HaZQO87NXhE3o8H1ZpW0zv3a1jaZK5TaTCx5402w1jSFEF1wXvA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts": {
|
||||
"file": "erreurs2.js",
|
||||
|
|
@ -207,7 +212,10 @@
|
|||
"name": "nombres",
|
||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/nombres.ts",
|
||||
"isEntry": true,
|
||||
"integrity": "sha512-yddD95sZWt7ejVWNrDZWkst46WEV2uLxhXOp85ZQRILH6/Pyd326sUBUC/3AO7EX5JtEsICqaFq89gK3PoPvYg=="
|
||||
"imports": [
|
||||
"_pipe.XPB0wEfw.js"
|
||||
],
|
||||
"integrity": "sha512-06khJTZNUuajBiAE00g7BIsd/lNV8uETVMVSv0uaQBcwtbVfvza9QC1+c5spWkVxE7WV0dJIAcMfNM/EEBycVg=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/reseau.ts": {
|
||||
"file": "reseau.js",
|
||||
|
|
@ -223,7 +231,7 @@
|
|||
"_pipe.XPB0wEfw.js",
|
||||
"_exports.B84S-6H1.js"
|
||||
],
|
||||
"integrity": "sha512-loMYXW+YiwXjqxLKLopE4gh/wO00B/rmhp/IU0pBYDHP2Ty5lLIqZQ+9CAtveN8wzokcZhrWlshJGkmKfK0Ekw=="
|
||||
"integrity": "sha512-krHxv4r1IqVZIbtQL7T2L+BICaADADgezYtugQ7JlAlpxeVsc/LU83Y3+ExJnFH+okbUI5jxEMQM7CWGBu8bMw=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts": {
|
||||
"file": "adresses.js",
|
||||
|
|
@ -353,7 +361,7 @@
|
|||
"integrity": "sha512-n7UHTZAPwgAZ8IEW3ZE3RVOPFQTMLNEw9dbyjxCVaTraee+pb4XK7Ap9zp69/AMrqsK4qp2g22HakNjkRssbYw=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/v3/orders.ts": {
|
||||
"file": "orders.js",
|
||||
"file": "orders2.js",
|
||||
"name": "orders",
|
||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/v3/orders.ts",
|
||||
"isEntry": true,
|
||||
|
|
@ -362,7 +370,7 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/orders.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts"
|
||||
],
|
||||
"integrity": "sha512-9xPXYXbYYX6m2Q8yJ608vjvjQv87nXHHtzBS0/xH7bXYaIeOvxMyXC1wQbBnT5h8dAxLECJXp7j2owACusFkVw=="
|
||||
"integrity": "sha512-vAauiGQ2konMkkZOBjCOu7z1yrv4nok6oxnz57kdM9Rb5kkOl6yti86hk87TzFjTJNt3NBy5b8tItm8MKGTavg=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/v3/products.ts": {
|
||||
"file": "products.js",
|
||||
|
|
@ -392,11 +400,11 @@
|
|||
"integrity": "sha512-9WH8aFHYVFBnQi/lSGLegnhrEOMIiRs7lFc2mbHi5vE88oMARO1HjSYOtKIOd2bvM7oMKLMtaMt2EVqnNkg89w=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/types/api/v3/orders.ts": {
|
||||
"file": "orders3.js",
|
||||
"file": "orders.js",
|
||||
"name": "orders",
|
||||
"src": "web/app/themes/haiku-atelier-2024/src/scripts/lib/types/api/v3/orders.ts",
|
||||
"isEntry": true,
|
||||
"integrity": "sha512-nqCjj7B9DjVJS7/4WgLDt58w1LMfLMxDfutD7vY99PNX9rjdiF1ckCffcMuxCGureeEu8qw9RCRKMavMDEX2bw=="
|
||||
"integrity": "sha512-FxX8RZIDDZuWNSNyFz9fYxNVJyRtwOZfK0KQ6c3Vn98d/Ovd3m+OjmjXXiYnENzH86EpLIuHjxc/RiUIVsAvDQ=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/types/api/v3/products.ts": {
|
||||
"file": "products4.js",
|
||||
|
|
@ -417,7 +425,7 @@
|
|||
"_Either.wHNxn7Os.js",
|
||||
"_exports.B84S-6H1.js"
|
||||
],
|
||||
"integrity": "sha512-drCe9+Fkclf5BaZypqhMqTxhsMoKFsmrplcG/oOVBM/cqECfRMwxkfMdeQDXUZ/WPRtfUPmnVZSqBl+hoqhu2w=="
|
||||
"integrity": "sha512-hxsXMO8cqBPSSiBbn5A1El0lDNq7A60qY1ofCRp9ENuNCKUgiUxssu28AWKY/3P/0s04dXYg8iumy/VFzM8MBw=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/validation.ts": {
|
||||
"file": "validation.js",
|
||||
|
|
@ -482,13 +490,15 @@
|
|||
"imports": [
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/dom.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts",
|
||||
"_pipe.XPB0wEfw.js",
|
||||
"_index-c1cc4c86.yxhuU5oc.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
||||
"_exports.B84S-6H1.js",
|
||||
"_pipe.XPB0wEfw.js",
|
||||
"_Either.wHNxn7Os.js"
|
||||
"_Either.wHNxn7Os.js",
|
||||
"_belt_Option-91f3b350.1ugmHD3b.js"
|
||||
],
|
||||
"integrity": "sha512-tnv/ti8Uzabwvh5ElET2Xn15WO1gm4k+yO5+uu3QPTcoZ1VFs8eEtIuElZUSvckVC19fry54RDR8+B1pjn+vtQ=="
|
||||
"integrity": "sha512-bgaTWx4ZY+JD6kKZVeuv2fIuXIpOjJSTDoElEqJuBOoRVM8JXohI151BvED+l0QyuZnSNo00ye1AnL49+R/gJA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-a-propos.ts": {
|
||||
"file": "scripts-page-a-propos.js",
|
||||
|
|
@ -500,12 +510,13 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts",
|
||||
"_pipe.XPB0wEfw.js",
|
||||
"_belt_Option-91f3b350.cBye8bLJ.js",
|
||||
"_index-c1cc4c86.yxhuU5oc.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
||||
"_exports.B84S-6H1.js",
|
||||
"_Either.wHNxn7Os.js"
|
||||
"_Either.wHNxn7Os.js",
|
||||
"_belt_Option-91f3b350.1ugmHD3b.js"
|
||||
],
|
||||
"integrity": "sha512-ulL6aTirmFGcB1CKVwL+YfyG2gD7xNEBEerFJXcFk2O5tVXmSnAmycsFUJ1MWvpm+QbrL61WYO/lXAGrnnHDJA=="
|
||||
"integrity": "sha512-vz9tPjHkCR8J47Eoao1KdUeYocl1RJW+g6H3yPRhTWtD2x1H2CV14ZocUFnQqocw94b5vquWnCW4M0OSpSETKA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-accueil.ts": {
|
||||
"file": "scripts-page-accueil.js",
|
||||
|
|
@ -516,13 +527,13 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/dom.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/nombres.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts",
|
||||
"_pipe.XPB0wEfw.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/dom.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs.ts",
|
||||
"_exports.B84S-6H1.js",
|
||||
"_pipe.XPB0wEfw.js",
|
||||
"_Either.wHNxn7Os.js"
|
||||
],
|
||||
"integrity": "sha512-mADFi63KVG8KWanBRhSCayLMNWNvUl/4/Kokhs3Ia0UuA5B4znYXCEMhIWAtqF3w9GhurzJvHG+3s0+RPrSX7A=="
|
||||
"integrity": "sha512-6feJ1wIcRXMbBj1XSOcjanUmaG79srBJeXt55LpHeZbQB8LZ7IqxEGR0UOyJIrQmSVOCHz1J+axIkuUvPaHUtw=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-boutique.ts": {
|
||||
"file": "scripts-page-boutique.js",
|
||||
|
|
@ -543,14 +554,14 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/validation.ts",
|
||||
"_MaybeAsync.AE1jnxuc.js",
|
||||
"_pipe.XPB0wEfw.js",
|
||||
"_index-0eef19ec.DoJSf22Z.js",
|
||||
"_index-0eef19ec.DKzz249a.js",
|
||||
"_Either.wHNxn7Os.js",
|
||||
"_exports.B84S-6H1.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/erreurs.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/products.ts",
|
||||
"_belt_Option-91f3b350.cBye8bLJ.js"
|
||||
"_belt_Option-91f3b350.1ugmHD3b.js"
|
||||
],
|
||||
"integrity": "sha512-mDfRg6AUV7ELjlESpovRKnM+SrJO2VwWrdYdVtwVsK8XujQYKi4DBX7N/t9kIdz3wc2EqJf2EkmMM3vEXgxj4A=="
|
||||
"integrity": "sha512-wm1h+XJoHJrqCu23CW0fZGzXjlAZNZtyYPc1cW+atNmc+kAFWyBUFp2uDLb7l0mS6kbHUm28o2XSrLuC3dwEoA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-panier-adresses.ts": {
|
||||
"file": "scripts-page-panier-adresses.js",
|
||||
|
|
@ -584,7 +595,7 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart-coupons.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/constantes/orders.ts"
|
||||
],
|
||||
"integrity": "sha512-ZniV1xRjm+fUp37n+6FG7vxj4uf/j/huaXzKPt4RpWzsvqM8EQ0HA1rJQap/nkQcDlfJoyS4mgHZB/9KreIBVg=="
|
||||
"integrity": "sha512-P03NCzlyajnVHTsEOG4qoCB5TKAmT12hqObSrH2+lmU65p033Q6ntSlK+gdyYBcbWo9qXJpDDAWCJtNIpvgZig=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-panier-code-promo.ts": {
|
||||
"file": "scripts-page-panier-code-promo.js",
|
||||
|
|
@ -603,6 +614,7 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs/codes-promo.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/gardes.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/messages.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/nombres.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/reseau.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart-apply-coupon.ts",
|
||||
|
|
@ -621,7 +633,7 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart-coupons.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/couts-livraison.ts"
|
||||
],
|
||||
"integrity": "sha512-8Jh+A5tydtawNbmBv9ppykEhVOwSOe26NSrcnwbYXBfwamkA2fq5elO4PXtr2c4TzT7zyJQgAonEt78qW5on5w=="
|
||||
"integrity": "sha512-/1w7HqEiRE/UlBc++7Smy8LdW9msTgvfhvyhtUte7cuGy1Wxe/GfhMLu/Jxls6wyTf/GVM5KqHTtor5HjWc8AA=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-panier.ts": {
|
||||
"file": "scripts-page-panier.js",
|
||||
|
|
@ -646,7 +658,7 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-panier-adresses.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-panier-code-promo.ts",
|
||||
"_pipe.XPB0wEfw.js",
|
||||
"_index-0eef19ec.DoJSf22Z.js",
|
||||
"_index-0eef19ec.DKzz249a.js",
|
||||
"_Either.wHNxn7Os.js",
|
||||
"_exports.B84S-6H1.js",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/erreurs.ts",
|
||||
|
|
@ -667,9 +679,9 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/erreurs/codes-promo.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart-apply-coupon.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart-remove-coupon.ts",
|
||||
"_belt_Option-91f3b350.cBye8bLJ.js"
|
||||
"_belt_Option-91f3b350.1ugmHD3b.js"
|
||||
],
|
||||
"integrity": "sha512-pqrzLLVckWlEUO4B0DziIEzQRxq3j8RsSCzqI/4ZZkQdOwf89sRx/iPgT+so/iVtJG2cGMJNi8VM94WUriCGZA=="
|
||||
"integrity": "sha512-vMARA6n2E5vTIkcjm2FuVBmtxRYxBSJMUHfFHDEOzUdp1sLmv4UD2rZpzq/pGCheFFp/OK4k7FOtQsyTr1jhag=="
|
||||
},
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/scripts-page-produit.ts": {
|
||||
"file": "scripts-page-produit.js",
|
||||
|
|
@ -690,7 +702,7 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/utils.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/validation.ts",
|
||||
"_pipe.XPB0wEfw.js",
|
||||
"_index-0eef19ec.DoJSf22Z.js",
|
||||
"_index-0eef19ec.DKzz249a.js",
|
||||
"_Either.wHNxn7Os.js",
|
||||
"_exports.B84S-6H1.js",
|
||||
"_index.BAmxwLeJ.js",
|
||||
|
|
@ -701,8 +713,8 @@
|
|||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/adresses.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/cart-coupons.ts",
|
||||
"web/app/themes/haiku-atelier-2024/src/scripts/lib/schemas/api/couts-livraison.ts",
|
||||
"_belt_Option-91f3b350.cBye8bLJ.js"
|
||||
"_belt_Option-91f3b350.1ugmHD3b.js"
|
||||
],
|
||||
"integrity": "sha512-mJ0+jacSm0UC339pLjBrtSm0bxhTF9VaZgWPBeS8JguId7qi6nQdgaHxUgvYHAqe6Yx1pjAWF7XM8kApUT6auQ=="
|
||||
"integrity": "sha512-7EPqPnQUb4k77Jpo+5evQBf4xQ3MpYyKbY7tVZZN1WeK6ekB3ktyMf4zIEeBrXV4ph7MqPp3roBLC04wBb9s5Q=="
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
import { r as ATTRIBUT_CHARGEMENT } from "./dom.js";
|
||||
const lanceAnimationCycleTexte = (args) => {
|
||||
const animation = {
|
||||
callback: () => {
|
||||
|
|
@ -15,7 +16,21 @@ const lanceAnimationCycleTexte = (args) => {
|
|||
};
|
||||
return animation;
|
||||
};
|
||||
const lanceAnimationCycleLoading = (element, delai) => {
|
||||
const animation = lanceAnimationCycleTexte({
|
||||
attribut: ATTRIBUT_CHARGEMENT,
|
||||
element,
|
||||
etapes: [
|
||||
"Loading",
|
||||
"Loading.",
|
||||
"Loading..",
|
||||
"Loading..."
|
||||
]
|
||||
});
|
||||
animation.callback();
|
||||
animation.interval = setInterval(animation.callback, delai);
|
||||
};
|
||||
export {
|
||||
lanceAnimationCycleTexte as l
|
||||
lanceAnimationCycleLoading as l
|
||||
};
|
||||
//# sourceMappingURL=animations.js.map
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"animations.js","sources":["../../src/scripts/lib/animations.ts"],"sourcesContent":["/** Fonctions pour la création de simples animations JavaScript. */\n\n// Types\ninterface AnimationCycleTexte {\n callback: () => void;\n etapes: Array<string>;\n index: number;\n interval: NodeJS.Timeout;\n}\n\ninterface ParametresAnimationCycleTexte {\n attribut: string;\n element: HTMLElement;\n etapes: Array<string>;\n}\n\n/**\n * Créer le nécessaire pour une animation s'exécutant jusqu'à ce que un interval soit manuellement arrêté. L'animation\n * consiste en la mise à jour d'un texte avec l'utilisation de toutes les valeurs d'un tableau, une par une.\n *\n * @param args Les paramètres nécessaires pour la création de l'animation.\n * @returns Un objet contenant les informations de l'animation, notamment l'interval utilisable pour son arrêt.\n */\nexport const lanceAnimationCycleTexte = (args: ParametresAnimationCycleTexte): AnimationCycleTexte => {\n const animation: AnimationCycleTexte = {\n callback: (): void => {\n // Arrête le cycle quand l'Attribut de chargement n'est plus présent\n if (!args.element.hasAttribute(args.attribut)) {\n clearInterval(animation.interval);\n return;\n }\n\n // Change le texte\n args.element.textContent = animation.etapes.at(animation.index) ?? \"Loading...\";\n // Incrémente ou réinitialise l'index\n animation.index = animation.index + 1 > animation.etapes.length - 1 ? 0 : animation.index + 1;\n },\n etapes: args.etapes,\n index: 0,\n interval: setInterval(() => {}, 2147483647),\n };\n\n return animation;\n};\n"],"names":[],"mappings":"AAuBa,MAAA,2BAA2B,CAAC,SAA6D;AACpG,QAAM,YAAiC;AAAA,IACrC,UAAU,MAAY;AAEpB,UAAI,CAAC,KAAK,QAAQ,aAAa,KAAK,QAAQ,GAAG;AAC7C,sBAAc,UAAU,QAAQ;AAChC;AAAA,MAAA;AAIF,WAAK,QAAQ,cAAc,UAAU,OAAO,GAAG,UAAU,KAAK,KAAK;AAEzD,gBAAA,QAAQ,UAAU,QAAQ,IAAI,UAAU,OAAO,SAAS,IAAI,IAAI,UAAU,QAAQ;AAAA,IAC9F;AAAA,IACA,QAAQ,KAAK;AAAA,IACb,OAAO;AAAA,IACP,UAAU,YAAY,MAAM;AAAA,IAAA,GAAI,UAAU;AAAA,EAC5C;AAEO,SAAA;AACT;"}
|
||||
{"version":3,"file":"animations.js","sources":["../../src/scripts/lib/animations.ts"],"sourcesContent":["/** Fonctions pour la création de simples animations JavaScript. */\n\nimport { ATTRIBUT_CHARGEMENT } from \"../constantes/dom\";\n\n// Types\ninterface AnimationCycleTexte {\n callback: () => void;\n etapes: Array<string>;\n index: number;\n interval: NodeJS.Timeout;\n}\n\ninterface ParametresAnimationCycleTexte {\n attribut: string;\n element: HTMLElement;\n etapes: Array<string>;\n}\n\n/**\n * Créer le nécessaire pour une animation s'exécutant jusqu'à ce que un interval soit manuellement arrêté. L'animation\n * consiste en la mise à jour d'un texte avec l'utilisation de toutes les valeurs d'un tableau, une par une.\n *\n * @param args Les paramètres nécessaires pour la création de l'animation.\n * @returns Un objet contenant les informations de l'animation, notamment l'interval utilisable pour son arrêt.\n */\nexport const lanceAnimationCycleTexte = (args: ParametresAnimationCycleTexte): AnimationCycleTexte => {\n const animation: AnimationCycleTexte = {\n callback: (): void => {\n // Arrête le cycle quand l'Attribut de chargement n'est plus présent\n if (!args.element.hasAttribute(args.attribut)) {\n clearInterval(animation.interval);\n return;\n }\n\n // Change le texte\n args.element.textContent = animation.etapes.at(animation.index) ?? \"Loading...\";\n // Incrémente ou réinitialise l'index\n animation.index = animation.index + 1 > animation.etapes.length - 1 ? 0 : animation.index + 1;\n },\n etapes: args.etapes,\n index: 0,\n interval: setInterval(() => {}, 2147483647),\n };\n\n return animation;\n};\n\nexport const lanceAnimationCycleLoading = (element: HTMLElement, delai: number): void => {\n const animation = lanceAnimationCycleTexte({\n attribut: ATTRIBUT_CHARGEMENT,\n element: element,\n etapes: [\n \"Loading\",\n \"Loading.\",\n \"Loading..\",\n \"Loading...\",\n ],\n });\n animation.callback();\n animation.interval = setInterval(animation.callback, delai);\n};\n"],"names":[],"mappings":";AAyBa,MAAA,2BAA2B,CAAC,SAA6D;AACpG,QAAM,YAAiC;AAAA,IACrC,UAAU,MAAY;AAEpB,UAAI,CAAC,KAAK,QAAQ,aAAa,KAAK,QAAQ,GAAG;AAC7C,sBAAc,UAAU,QAAQ;AAChC;AAAA,MAAA;AAIF,WAAK,QAAQ,cAAc,UAAU,OAAO,GAAG,UAAU,KAAK,KAAK;AAEzD,gBAAA,QAAQ,UAAU,QAAQ,IAAI,UAAU,OAAO,SAAS,IAAI,IAAI,UAAU,QAAQ;AAAA,IAC9F;AAAA,IACA,QAAQ,KAAK;AAAA,IACb,OAAO;AAAA,IACP,UAAU,YAAY,MAAM;AAAA,IAAA,GAAI,UAAU;AAAA,EAC5C;AAEO,SAAA;AACT;AAEa,MAAA,6BAA6B,CAAC,SAAsB,UAAwB;AACvF,QAAM,YAAY,yBAAyB;AAAA,IACzC,UAAU;AAAA,IACV;AAAA,IACA,QAAQ;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF,CACD;AACD,YAAU,SAAS;AACnB,YAAU,WAAW,YAAY,UAAU,UAAU,KAAK;AAC5D;"}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { v as valFromOption, k as some } from "./dom2.js";
|
||||
import { v as valFromOption, s as some } from "./dom2.js";
|
||||
function sub(n2, r, t) {
|
||||
var e = new Array(t);
|
||||
var u = 0;
|
||||
|
|
@ -135,15 +135,15 @@ function isNone(t) {
|
|||
}
|
||||
export {
|
||||
_1 as _,
|
||||
isSome as a,
|
||||
getWithDefault as b,
|
||||
getWithDefault as a,
|
||||
isNone as b,
|
||||
create as c,
|
||||
isNone as d,
|
||||
mapU as e,
|
||||
isSome as d,
|
||||
flatMapU as e,
|
||||
flatMap as f,
|
||||
getExn as g,
|
||||
flatMapU as h,
|
||||
mapWithDefaultU as h,
|
||||
is_extension as i,
|
||||
mapWithDefaultU as m
|
||||
mapU as m
|
||||
};
|
||||
//# sourceMappingURL=belt_Option-91f3b350.cBye8bLJ.js.map
|
||||
//# sourceMappingURL=belt_Option-91f3b350.1ugmHD3b.js.map
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -64,69 +64,69 @@ const SELECTEUR_IMAGE_COLONNE_GAUCHE = ".colonne-gauche img";
|
|||
const SELECTEUR_IMAGES_COLONNE_DROITE = ".colonne-droite img";
|
||||
const SELECTEUR_PRIX_PRODUIT = ".selecteur-produit__prix";
|
||||
export {
|
||||
ATTRIBUT_PRIX as $,
|
||||
SELECTEUR_FLECHE_DEFILEMENT_GAUCHE as $,
|
||||
ATTRIBUT_CONTIENT_ARTICLES as A,
|
||||
SELECTEUR_BOUTON_ACTIONS_FORMULAIRE as B,
|
||||
SELECTEUR_FORMULAIRE_PANIER as C,
|
||||
SELECTEUR_INSTRUCTIONS_CLIENT as D,
|
||||
SELECTEUR_MESSAGE_FORMULAIRE_ADRESSES as E,
|
||||
SELECTEUR_SOUS_TOTAL_LIVRAISON_COUT as F,
|
||||
SELECTEUR_SOUS_TOTAL_LIVRAISON_PRESTATAIRE as G,
|
||||
SELECTEUR_BOUTON_CODE_PROMO as H,
|
||||
SELECTEUR_CHAMP_CODE_PROMO as I,
|
||||
SELECTEUR_ENSEMBLE_CODE_PROMO as J,
|
||||
SELECTEUR_MESSAGE_CODE_PROMO as K,
|
||||
SELECTEUR_TOTAL_REDUCTION as L,
|
||||
ATTRIBUT_CODE_PROMO_PRESENT as M,
|
||||
SELECTEUR_BOUTON_AJOUT_PANIER as N,
|
||||
SELECTEUR_SELECTEUR_QUANTITE as O,
|
||||
SELECTEUR_LIENS_ONGLETS as P,
|
||||
SELECTEUR_SECTIONS_CONTENUS as Q,
|
||||
SELECTEUR_PRIX_PRODUIT as R,
|
||||
ATTRIBUT_CLE_PANIER as B,
|
||||
CLASS_BOUTON_FERMETURE_BOITE_TEXTE as C,
|
||||
SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE as D,
|
||||
SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER as E,
|
||||
SELECTEUR_BOUTON_ADDITION_QUANTITE as F,
|
||||
SELECTEUR_BOUTON_SUPPRESSION_PANIER as G,
|
||||
SELECTEUR_PRIX_LIGNE_PANIER as H,
|
||||
SELECTEUR_BOUTON_ACTIONS_FORMULAIRE as I,
|
||||
SELECTEUR_FORMULAIRE_PANIER as J,
|
||||
SELECTEUR_INSTRUCTIONS_CLIENT as K,
|
||||
SELECTEUR_MESSAGE_FORMULAIRE_ADRESSES as L,
|
||||
SELECTEUR_SOUS_TOTAL_LIVRAISON_COUT as M,
|
||||
SELECTEUR_SOUS_TOTAL_LIVRAISON_PRESTATAIRE as N,
|
||||
SELECTEUR_BOUTON_CODE_PROMO as O,
|
||||
SELECTEUR_CHAMP_CODE_PROMO as P,
|
||||
SELECTEUR_ENSEMBLE_CODE_PROMO as Q,
|
||||
SELECTEUR_MESSAGE_CODE_PROMO as R,
|
||||
SELECTEUR_BOUTON_PANIER as S,
|
||||
SELECTEUR_CONTENEUR_FLECHES_DEFILEMENT as T,
|
||||
SELECTEUR_FLECHE_DEFILEMENT_GAUCHE as U,
|
||||
SELECTEUR_FLECHE_DEFILEMENT_DROITE as V,
|
||||
SELECTEUR_PHOTOS_PRODUIT as W,
|
||||
SELECTEUR_IMAGE_COLONNE_GAUCHE as X,
|
||||
SELECTEUR_IMAGES_COLONNE_DROITE as Y,
|
||||
ATTRIBUT_INDEX_IMAGE_ACTIVE as Z,
|
||||
ATTRIBUT_ARIA_SELECTED as _,
|
||||
SELECTEUR_TOTAL_REDUCTION as T,
|
||||
ATTRIBUT_CODE_PROMO_PRESENT as U,
|
||||
SELECTEUR_BOUTON_AJOUT_PANIER as V,
|
||||
SELECTEUR_SELECTEUR_QUANTITE as W,
|
||||
SELECTEUR_LIENS_ONGLETS as X,
|
||||
SELECTEUR_SECTIONS_CONTENUS as Y,
|
||||
SELECTEUR_PRIX_PRODUIT as Z,
|
||||
SELECTEUR_CONTENEUR_FLECHES_DEFILEMENT as _,
|
||||
SELECTEUR_MENU_CATEGORIES_PRODUITS as a,
|
||||
SELECTEUR_BOUTON_MENU_MOBILE as a0,
|
||||
SELECTEUR_MENU_MOBILE as a1,
|
||||
ATTRIBUT_MENU_MOBILE_ACTIVE as a2,
|
||||
ATTRIBUT_ID_ENSEMBLE_EPINGLE_BOITE as a3,
|
||||
ATTRIBUT_ENSEMBLE_EPINGLE_BOITE_ACTIF as a4,
|
||||
CLASS_BOUTON_FERMETURE_BOITE_TEXTE as a5,
|
||||
CLASS_EPINGLE as a6,
|
||||
SELECTEUR_CONTENEUR_STORYTELLING_A_PROPOS as a7,
|
||||
SELECTEUR_EPINGLE as a8,
|
||||
SELECTEUR_BOITE_TEXTE as a9,
|
||||
SELECTEUR_FLECHE_DEFILEMENT_DROITE as a0,
|
||||
SELECTEUR_PHOTOS_PRODUIT as a1,
|
||||
SELECTEUR_IMAGE_COLONNE_GAUCHE as a2,
|
||||
SELECTEUR_IMAGES_COLONNE_DROITE as a3,
|
||||
ATTRIBUT_INDEX_IMAGE_ACTIVE as a4,
|
||||
ATTRIBUT_ARIA_SELECTED as a5,
|
||||
ATTRIBUT_PRIX as a6,
|
||||
SELECTEUR_BOUTON_MENU_MOBILE as a7,
|
||||
SELECTEUR_MENU_MOBILE as a8,
|
||||
ATTRIBUT_MENU_MOBILE_ACTIVE as a9,
|
||||
SELECTEUR_ENTREE_MENU_CATEGORIES_PRODUITS as b,
|
||||
SELECTEUR_CONTENEUR_STORYTELLING as c,
|
||||
SELECTEUR_IMAGES_STORYTELLING as d,
|
||||
ATTRIBUT_CACHE as e,
|
||||
ATTRIBUT_ARIA_HIDDEN as f,
|
||||
SELECTEUR_BOUTON_PLUS_PRODUITS as g,
|
||||
SELECTEUR_GRILLE_PRODUITS as h,
|
||||
ATTRIBUT_ID_CATEGORIE_PRODUITS as i,
|
||||
ATTRIBUT_PAGE as j,
|
||||
ATTRIBUT_DESACTIVE as k,
|
||||
ATTRIBUT_CHARGEMENT as l,
|
||||
ATTRIBUT_HIDDEN as m,
|
||||
SELECTEUR_ENTREES_PANIER as n,
|
||||
SELECTEUR_CONTENEUR_PANIER as o,
|
||||
SELECTEUR_SOUS_TOTAL_PRODUITS as p,
|
||||
SELECTEUR_TOTAL_REDUCTION_VALEUR as q,
|
||||
SELECTEUR_TOTAL_PANIER as r,
|
||||
SELECTEUR_BOUTON_SEPARATION_ADRESSES as s,
|
||||
SELECTEUR_FORMULAIRE_FACTURATION as t,
|
||||
ATTRIBUT_CLE_PANIER as u,
|
||||
SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE as v,
|
||||
SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER as w,
|
||||
SELECTEUR_BOUTON_ADDITION_QUANTITE as x,
|
||||
SELECTEUR_BOUTON_SUPPRESSION_PANIER as y,
|
||||
SELECTEUR_PRIX_LIGNE_PANIER as z
|
||||
ATTRIBUT_ID_ENSEMBLE_EPINGLE_BOITE as c,
|
||||
ATTRIBUT_ENSEMBLE_EPINGLE_BOITE_ACTIF as d,
|
||||
CLASS_EPINGLE as e,
|
||||
SELECTEUR_CONTENEUR_STORYTELLING_A_PROPOS as f,
|
||||
SELECTEUR_EPINGLE as g,
|
||||
SELECTEUR_BOITE_TEXTE as h,
|
||||
SELECTEUR_CONTENEUR_STORYTELLING as i,
|
||||
SELECTEUR_IMAGES_STORYTELLING as j,
|
||||
ATTRIBUT_CACHE as k,
|
||||
ATTRIBUT_ARIA_HIDDEN as l,
|
||||
SELECTEUR_BOUTON_PLUS_PRODUITS as m,
|
||||
SELECTEUR_GRILLE_PRODUITS as n,
|
||||
ATTRIBUT_ID_CATEGORIE_PRODUITS as o,
|
||||
ATTRIBUT_PAGE as p,
|
||||
ATTRIBUT_DESACTIVE as q,
|
||||
ATTRIBUT_CHARGEMENT as r,
|
||||
ATTRIBUT_HIDDEN as s,
|
||||
SELECTEUR_ENTREES_PANIER as t,
|
||||
SELECTEUR_CONTENEUR_PANIER as u,
|
||||
SELECTEUR_SOUS_TOTAL_PRODUITS as v,
|
||||
SELECTEUR_TOTAL_REDUCTION_VALEUR as w,
|
||||
SELECTEUR_TOTAL_PANIER as x,
|
||||
SELECTEUR_BOUTON_SEPARATION_ADRESSES as y,
|
||||
SELECTEUR_FORMULAIRE_FACTURATION as z
|
||||
};
|
||||
//# sourceMappingURL=dom.js.map
|
||||
|
|
|
|||
|
|
@ -2044,23 +2044,23 @@ export {
|
|||
accorderCibleASelecteur as d,
|
||||
eitherSessionStorageGet as e,
|
||||
recupereElementsOuLeve as f,
|
||||
equal as g,
|
||||
reduceU as g,
|
||||
html as h,
|
||||
identity as i,
|
||||
everyU as j,
|
||||
some$1 as k,
|
||||
values as l,
|
||||
fromArray as m,
|
||||
get$1 as n,
|
||||
forEachU as o,
|
||||
mapU as p,
|
||||
reduceU as q,
|
||||
equal as j,
|
||||
concat$1 as k,
|
||||
everyU as l,
|
||||
someU as m,
|
||||
nullable_to_opt as n,
|
||||
values as o,
|
||||
fromArray as p,
|
||||
get$1 as q,
|
||||
recupereElementOuLeve as r,
|
||||
someU as s,
|
||||
append as t,
|
||||
some$1 as s,
|
||||
forEachU as t,
|
||||
unsafeDeleteKey as u,
|
||||
valFromOption as v,
|
||||
nullable_to_opt as w,
|
||||
concat$1 as x
|
||||
mapU as w,
|
||||
append as x
|
||||
};
|
||||
//# sourceMappingURL=dom2.js.map
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { g as equal, j as everyU, s as someU, k as some, v as valFromOption } from "./dom2.js";
|
||||
import { i as is_extension, a as isSome, m as mapWithDefaultU } from "./belt_Option-91f3b350.cBye8bLJ.js";
|
||||
import { j as equal, l as everyU, m as someU, s as some, v as valFromOption } from "./dom2.js";
|
||||
import { i as is_extension, d as isSome, h as mapWithDefaultU } from "./belt_Option-91f3b350.1ugmHD3b.js";
|
||||
function internalToOCamlException(e) {
|
||||
if (is_extension(e)) {
|
||||
return e;
|
||||
|
|
@ -580,4 +580,4 @@ export {
|
|||
l,
|
||||
tap as t
|
||||
};
|
||||
//# sourceMappingURL=index-0eef19ec.DoJSf22Z.js.map
|
||||
//# sourceMappingURL=index-0eef19ec.DKzz249a.js.map
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,298 @@
|
|||
import { _ as _1, i as is_extension, c as create, g as getExn, a as getWithDefault$1, b as isNone, d as isSome, f as flatMap$1, m as mapU, e as flatMapU, h as mapWithDefaultU } from "./belt_Option-91f3b350.1ugmHD3b.js";
|
||||
import { s as some, g as reduceU, n as nullable_to_opt, v as valFromOption, j as equal, k as concat } from "./dom2.js";
|
||||
var t = create("Promise.JsError");
|
||||
function $$catch(r, s) {
|
||||
return r.catch(function(r2) {
|
||||
return _1(s, is_extension(r2) ? r2 : {
|
||||
RE_EXN_ID: t,
|
||||
_1: r2
|
||||
});
|
||||
});
|
||||
}
|
||||
function placeholder(n) {
|
||||
}
|
||||
function makeSome(n) {
|
||||
return some(n);
|
||||
}
|
||||
function makeNone(n) {
|
||||
}
|
||||
function fromNullable(n) {
|
||||
if (null == n) {
|
||||
return;
|
||||
} else {
|
||||
return some(n);
|
||||
}
|
||||
}
|
||||
function fromFalsy(n) {
|
||||
if (n) {
|
||||
return n;
|
||||
}
|
||||
}
|
||||
function _fromPredicate(n, t2) {
|
||||
return flatMap$1(null == n ? void 0 : some(n), function(n2) {
|
||||
if (t2(n2)) {
|
||||
return some(n2);
|
||||
}
|
||||
});
|
||||
}
|
||||
function fromPredicate() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _fromPredicate(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return _fromPredicate(arguments[0], arguments[1]);
|
||||
}
|
||||
function fromExecution(n) {
|
||||
try {
|
||||
return some(n(void 0));
|
||||
} catch (n2) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
function fromPromise(t2) {
|
||||
return $$catch(t2.then(function(n) {
|
||||
return some(n);
|
||||
}), function(n) {
|
||||
return Promise.resolve(void 0);
|
||||
});
|
||||
}
|
||||
var h = mapU;
|
||||
function map() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return h(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return h(arguments[0], arguments[1]);
|
||||
}
|
||||
var _ = flatMapU;
|
||||
function flatMap() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return _(arguments[0], arguments[1]);
|
||||
}
|
||||
var v = mapWithDefaultU;
|
||||
function mapWithDefault() {
|
||||
if (2 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return v(t2, n[0], n[1]);
|
||||
};
|
||||
}
|
||||
return v(arguments[0], arguments[1], arguments[2]);
|
||||
}
|
||||
function _mapNullable(n, t2) {
|
||||
if (void 0 !== n) {
|
||||
return nullable_to_opt(t2(valFromOption(n)));
|
||||
}
|
||||
}
|
||||
function mapNullable() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _mapNullable(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return _mapNullable(arguments[0], arguments[1]);
|
||||
}
|
||||
function _filter(n, t2) {
|
||||
return flatMapU(n, function(n2) {
|
||||
if (t2(n2)) {
|
||||
return some(n2);
|
||||
}
|
||||
});
|
||||
}
|
||||
function filter() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _filter(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return _filter(arguments[0], arguments[1]);
|
||||
}
|
||||
var g = getWithDefault$1;
|
||||
function getWithDefault() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return g(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return g(arguments[0], arguments[1]);
|
||||
}
|
||||
var N = getExn;
|
||||
function toNullable(n) {
|
||||
return getWithDefault$1(n, null);
|
||||
}
|
||||
function toUndefined(n) {
|
||||
return getWithDefault$1(n, void 0);
|
||||
}
|
||||
function _toResult(n, t2) {
|
||||
if (void 0 !== n) {
|
||||
return {
|
||||
TAG: 0,
|
||||
_0: valFromOption(n)
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
TAG: 1,
|
||||
_0: t2
|
||||
};
|
||||
}
|
||||
}
|
||||
function toResult() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _toResult(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return _toResult(arguments[0], arguments[1]);
|
||||
}
|
||||
function _match(n, t2, r) {
|
||||
if (void 0 !== n) {
|
||||
return t2(valFromOption(n));
|
||||
} else {
|
||||
return r(void 0);
|
||||
}
|
||||
}
|
||||
function match() {
|
||||
if (2 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _match(t2, n[0], n[1]);
|
||||
};
|
||||
}
|
||||
return _match(arguments[0], arguments[1], arguments[2]);
|
||||
}
|
||||
var b = isNone;
|
||||
var z = isSome;
|
||||
function _tap(n, t2) {
|
||||
if (void 0 !== n) {
|
||||
t2(valFromOption(n));
|
||||
return n;
|
||||
} else {
|
||||
return n;
|
||||
}
|
||||
}
|
||||
function tap() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _tap(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return _tap(arguments[0], arguments[1]);
|
||||
}
|
||||
function _contains(n, r) {
|
||||
return mapWithDefaultU(n, false, function(n2) {
|
||||
return equal(n2, r);
|
||||
});
|
||||
}
|
||||
function contains() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _contains(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return _contains(arguments[0], arguments[1]);
|
||||
}
|
||||
function _zip(n, t2) {
|
||||
if (void 0 !== n && void 0 !== t2) {
|
||||
return [valFromOption(n), valFromOption(t2)];
|
||||
}
|
||||
}
|
||||
function zip() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _zip(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return _zip(arguments[0], arguments[1]);
|
||||
}
|
||||
function _zipWith(n, t2, r) {
|
||||
if (void 0 !== n && void 0 !== t2) {
|
||||
return some(r(valFromOption(n), valFromOption(t2)));
|
||||
}
|
||||
}
|
||||
function zipWith() {
|
||||
if (2 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _zipWith(t2, n[0], n[1]);
|
||||
};
|
||||
}
|
||||
return _zipWith(arguments[0], arguments[1], arguments[2]);
|
||||
}
|
||||
function _fold(n, t2, r) {
|
||||
if (void 0 !== n) {
|
||||
return t2(valFromOption(n));
|
||||
} else {
|
||||
return r(void 0);
|
||||
}
|
||||
}
|
||||
function fold() {
|
||||
if (2 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _fold(t2, n[0], n[1]);
|
||||
};
|
||||
}
|
||||
return _fold(arguments[0], arguments[1], arguments[2]);
|
||||
}
|
||||
function all(n) {
|
||||
return reduceU(n, [], function(n2, t2) {
|
||||
return flatMapU(n2, function(n3) {
|
||||
if (void 0 !== t2) {
|
||||
return concat(n3, [valFromOption(t2)]);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
const Some = (n) => n;
|
||||
var P = {
|
||||
__proto__: null,
|
||||
Some,
|
||||
None: void 0,
|
||||
placeholder,
|
||||
makeSome,
|
||||
makeNone,
|
||||
fromNullable,
|
||||
fromFalsy,
|
||||
fromPredicate,
|
||||
fromExecution,
|
||||
fromPromise,
|
||||
map,
|
||||
flatMap,
|
||||
mapWithDefault,
|
||||
mapNullable,
|
||||
filter,
|
||||
getWithDefault,
|
||||
getExn: N,
|
||||
toNullable,
|
||||
toUndefined,
|
||||
toResult,
|
||||
match,
|
||||
isNone: b,
|
||||
isSome: z,
|
||||
tap,
|
||||
contains,
|
||||
zip,
|
||||
zipWith,
|
||||
fold,
|
||||
all
|
||||
};
|
||||
export {
|
||||
P
|
||||
};
|
||||
//# sourceMappingURL=index-c1cc4c86.yxhuU5oc.js.map
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,3 +1,4 @@
|
|||
import { p as pipe } from "./pipe.XPB0wEfw.js";
|
||||
function mod_(t2, n2) {
|
||||
if (0 === n2) {
|
||||
throw {
|
||||
|
|
@ -163,12 +164,12 @@ var n = {
|
|||
clamp
|
||||
};
|
||||
const estEntreDeuxNombres = (nombre, min, max) => n.gte(nombre, min) && n.lt(nombre, max);
|
||||
const diviseParCent = (n2) => Number(n2) / 100;
|
||||
const arrondisAZeroOuDeuxDecimales = (n2) => Number(n2) / Math.round(Number(n2)) === 1 ? Number(n2).toFixed(0) : Number(n2).toFixed(2);
|
||||
const inverseNombre = (n2) => Number(n2) * -1;
|
||||
const formateEnEuros = (n2) => `${String(n2)}€`;
|
||||
const diviseParCent = (nombre) => Number(nombre) / 100;
|
||||
const arrondisADeuxDecimales = (nombre) => pipe(Number(nombre), (n2) => n2.toFixed(2));
|
||||
const inverseNombre = (nombre) => Number(nombre) * -1;
|
||||
const formateEnEuros = (nombre) => `${String(nombre)}€`;
|
||||
export {
|
||||
arrondisAZeroOuDeuxDecimales as a,
|
||||
arrondisADeuxDecimales as a,
|
||||
diviseParCent as d,
|
||||
estEntreDeuxNombres as e,
|
||||
formateEnEuros as f,
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,162 +1,2 @@
|
|||
import { o as object, a as pipe, b as array, s as string, e as enum_, d as union, k as optional, c as boolean, u as unknown, h as integer, n as number, f as null_ } from "./index.BAmxwLeJ.js";
|
||||
import { T as TAX_STATUSES, O as ORDER_STATUSES } from "./orders2.js";
|
||||
import { W as WCStoreBillingAddressSchema, a as WCStoreShippingAddressSchema } from "./adresses.js";
|
||||
const WCV3OrdersCouponLineMetaDataSchema = object({
|
||||
id: pipe(number(), integer()),
|
||||
key: string(),
|
||||
value: unknown()
|
||||
});
|
||||
const WCV3OrdersCouponLineSchema = object({
|
||||
code: string(),
|
||||
discount: string(),
|
||||
discount_tax: string(),
|
||||
discount_type: string(),
|
||||
free_shipping: boolean(),
|
||||
id: pipe(number(), integer()),
|
||||
meta_data: array(WCV3OrdersCouponLineMetaDataSchema),
|
||||
nominal_amount: number()
|
||||
});
|
||||
const WCV3OrdersFeeLineMetaDataSchema = object({
|
||||
id: pipe(number(), integer()),
|
||||
key: string(),
|
||||
value: unknown()
|
||||
});
|
||||
const WCV3OrdersFeeLineTaxSchema = object({
|
||||
id: pipe(number(), integer()),
|
||||
subtotal: string(),
|
||||
total: string()
|
||||
});
|
||||
const WCV3OrdersFeeLineSchema = object({
|
||||
id: pipe(number(), integer()),
|
||||
meta_data: array(WCV3OrdersFeeLineMetaDataSchema),
|
||||
name: string(),
|
||||
tax_class: string(),
|
||||
tax_status: enum_(TAX_STATUSES),
|
||||
taxes: array(WCV3OrdersFeeLineTaxSchema),
|
||||
total: string(),
|
||||
total_tax: string()
|
||||
});
|
||||
const WCV3OrdersShippingLineMetaDataSchema = object({
|
||||
id: pipe(number(), integer()),
|
||||
key: string(),
|
||||
value: unknown()
|
||||
});
|
||||
const WCV3OrdersShippingLineTaxSchema = object({
|
||||
id: pipe(number(), integer()),
|
||||
total: string()
|
||||
});
|
||||
const WCV3OrdersShippingLineSchema = object({
|
||||
id: optional(pipe(number(), integer())),
|
||||
meta_data: optional(array(WCV3OrdersShippingLineMetaDataSchema)),
|
||||
method_id: optional(string()),
|
||||
method_title: optional(string()),
|
||||
taxes: optional(array(WCV3OrdersShippingLineTaxSchema)),
|
||||
total: optional(string()),
|
||||
total_tax: optional(string())
|
||||
});
|
||||
const WCV3OrdersLineItemImageSchema = object({
|
||||
id: union([string(), pipe(number(), integer())]),
|
||||
src: string()
|
||||
});
|
||||
const WCV3OrdersLineItemMetaDataSchema = object({
|
||||
display_key: string(),
|
||||
display_value: string(),
|
||||
id: pipe(number(), integer()),
|
||||
key: string(),
|
||||
value: unknown()
|
||||
});
|
||||
const WCV3OrdersLineItemTaxSchema = object({
|
||||
id: pipe(number(), integer()),
|
||||
subtotal: string(),
|
||||
total: string()
|
||||
});
|
||||
const WCV3OrdersLineItemSchema = object({
|
||||
id: optional(pipe(number(), integer())),
|
||||
image: optional(WCV3OrdersLineItemImageSchema),
|
||||
meta_data: optional(array(WCV3OrdersLineItemMetaDataSchema)),
|
||||
name: optional(string()),
|
||||
parent_name: optional(union([string(), null_()])),
|
||||
price: optional(number()),
|
||||
product_id: optional(pipe(number(), integer())),
|
||||
quantity: optional(pipe(number(), integer())),
|
||||
sku: optional(string()),
|
||||
subtotal: optional(string()),
|
||||
subtotal_tax: optional(string()),
|
||||
tax_class: optional(string()),
|
||||
taxes: optional(array(WCV3OrdersLineItemTaxSchema)),
|
||||
total: optional(string()),
|
||||
total_tax: optional(string()),
|
||||
variation_id: optional(pipe(number(), integer()))
|
||||
});
|
||||
const WCV3OrdersArgsSchema = object({
|
||||
billing: optional(WCStoreBillingAddressSchema),
|
||||
coupon_lines: optional(array(WCV3OrdersCouponLineSchema)),
|
||||
currency: optional(string()),
|
||||
customer_id: optional(pipe(number(), integer())),
|
||||
customer_note: optional(string()),
|
||||
fee_lines: optional(array(WCV3OrdersFeeLineSchema)),
|
||||
line_items: optional(array(WCV3OrdersLineItemSchema)),
|
||||
manual_update: optional(boolean()),
|
||||
parent_id: optional(pipe(number(), integer())),
|
||||
payment_method: optional(string()),
|
||||
payment_method_title: optional(string()),
|
||||
set_paid: optional(boolean()),
|
||||
shipping: optional(WCStoreShippingAddressSchema),
|
||||
shipping_lines: optional(array(WCV3OrdersShippingLineSchema)),
|
||||
status: optional(enum_(ORDER_STATUSES)),
|
||||
transaction_id: optional(string())
|
||||
});
|
||||
const WCV3OrderSchema = object({
|
||||
billing: WCStoreBillingAddressSchema,
|
||||
cart_hash: string(),
|
||||
cart_tax: string(),
|
||||
coupon_lines: array(WCV3OrdersCouponLineSchema),
|
||||
created_via: string(),
|
||||
currency: string(),
|
||||
currency_symbol: string(),
|
||||
customer_id: pipe(number(), integer()),
|
||||
customer_ip_address: string(),
|
||||
customer_note: string(),
|
||||
customer_user_agent: string(),
|
||||
date_completed: union([string(), null_()]),
|
||||
date_completed_gmt: union([string(), null_()]),
|
||||
// Date
|
||||
date_created: string(),
|
||||
date_created_gmt: string(),
|
||||
date_modified: string(),
|
||||
date_modified_gmt: string(),
|
||||
date_paid: union([string(), null_()]),
|
||||
date_paid_gmt: union([string(), null_()]),
|
||||
discount_tax: string(),
|
||||
discount_total: string(),
|
||||
fee_lines: array(WCV3OrdersFeeLineSchema),
|
||||
id: pipe(number(), integer()),
|
||||
is_editable: boolean(),
|
||||
line_items: array(WCV3OrdersLineItemSchema),
|
||||
meta_data: unknown(),
|
||||
needs_payment: boolean(),
|
||||
needs_processing: boolean(),
|
||||
number: string(),
|
||||
order_key: string(),
|
||||
parent_id: pipe(number(), integer()),
|
||||
payment_method: string(),
|
||||
payment_method_title: string(),
|
||||
payment_url: string(),
|
||||
prices_include_tax: boolean(),
|
||||
refunds: array(unknown()),
|
||||
shipping: WCStoreShippingAddressSchema,
|
||||
shipping_lines: array(WCV3OrdersShippingLineSchema),
|
||||
shipping_tax: string(),
|
||||
shipping_total: string(),
|
||||
status: enum_(ORDER_STATUSES),
|
||||
tax_lines: array(unknown()),
|
||||
total: string(),
|
||||
total_tax: string(),
|
||||
transaction_id: string(),
|
||||
version: string()
|
||||
});
|
||||
export {
|
||||
WCV3OrdersArgsSchema as W,
|
||||
WCV3OrderSchema as a
|
||||
};
|
||||
|
||||
//# sourceMappingURL=orders.js.map
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,20 +1,162 @@
|
|||
const ORDER_STATUSES = {
|
||||
AUTO_DRAFT: "auto-draft",
|
||||
CANCELLED: "cancelled",
|
||||
CHECKOUT_DRAFT: "checkout-draft",
|
||||
COMPLETED: "completed",
|
||||
FAILED: "failed",
|
||||
ON_HOLD: "on-hold",
|
||||
PENDING: "pending",
|
||||
PROCESSING: "processing",
|
||||
REFUNDED: "refuneded"
|
||||
};
|
||||
const TAX_STATUSES = {
|
||||
NONE: "none",
|
||||
TAXABLE: "taxable"
|
||||
};
|
||||
import { o as object, a as pipe, b as array, s as string, e as enum_, d as union, k as optional, c as boolean, u as unknown, h as integer, n as number, f as null_ } from "./index.BAmxwLeJ.js";
|
||||
import { T as TAX_STATUSES, O as ORDER_STATUSES } from "./orders3.js";
|
||||
import { W as WCStoreBillingAddressSchema, a as WCStoreShippingAddressSchema } from "./adresses.js";
|
||||
const WCV3OrdersCouponLineMetaDataSchema = object({
|
||||
id: pipe(number(), integer()),
|
||||
key: string(),
|
||||
value: unknown()
|
||||
});
|
||||
const WCV3OrdersCouponLineSchema = object({
|
||||
code: string(),
|
||||
discount: string(),
|
||||
discount_tax: string(),
|
||||
discount_type: string(),
|
||||
free_shipping: boolean(),
|
||||
id: pipe(number(), integer()),
|
||||
meta_data: array(WCV3OrdersCouponLineMetaDataSchema),
|
||||
nominal_amount: number()
|
||||
});
|
||||
const WCV3OrdersFeeLineMetaDataSchema = object({
|
||||
id: pipe(number(), integer()),
|
||||
key: string(),
|
||||
value: unknown()
|
||||
});
|
||||
const WCV3OrdersFeeLineTaxSchema = object({
|
||||
id: pipe(number(), integer()),
|
||||
subtotal: string(),
|
||||
total: string()
|
||||
});
|
||||
const WCV3OrdersFeeLineSchema = object({
|
||||
id: pipe(number(), integer()),
|
||||
meta_data: array(WCV3OrdersFeeLineMetaDataSchema),
|
||||
name: string(),
|
||||
tax_class: string(),
|
||||
tax_status: enum_(TAX_STATUSES),
|
||||
taxes: array(WCV3OrdersFeeLineTaxSchema),
|
||||
total: string(),
|
||||
total_tax: string()
|
||||
});
|
||||
const WCV3OrdersShippingLineMetaDataSchema = object({
|
||||
id: pipe(number(), integer()),
|
||||
key: string(),
|
||||
value: unknown()
|
||||
});
|
||||
const WCV3OrdersShippingLineTaxSchema = object({
|
||||
id: pipe(number(), integer()),
|
||||
total: string()
|
||||
});
|
||||
const WCV3OrdersShippingLineSchema = object({
|
||||
id: optional(pipe(number(), integer())),
|
||||
meta_data: optional(array(WCV3OrdersShippingLineMetaDataSchema)),
|
||||
method_id: optional(string()),
|
||||
method_title: optional(string()),
|
||||
taxes: optional(array(WCV3OrdersShippingLineTaxSchema)),
|
||||
total: optional(string()),
|
||||
total_tax: optional(string())
|
||||
});
|
||||
const WCV3OrdersLineItemImageSchema = object({
|
||||
id: union([string(), pipe(number(), integer())]),
|
||||
src: string()
|
||||
});
|
||||
const WCV3OrdersLineItemMetaDataSchema = object({
|
||||
display_key: string(),
|
||||
display_value: string(),
|
||||
id: pipe(number(), integer()),
|
||||
key: string(),
|
||||
value: unknown()
|
||||
});
|
||||
const WCV3OrdersLineItemTaxSchema = object({
|
||||
id: pipe(number(), integer()),
|
||||
subtotal: string(),
|
||||
total: string()
|
||||
});
|
||||
const WCV3OrdersLineItemSchema = object({
|
||||
id: optional(pipe(number(), integer())),
|
||||
image: optional(WCV3OrdersLineItemImageSchema),
|
||||
meta_data: optional(array(WCV3OrdersLineItemMetaDataSchema)),
|
||||
name: optional(string()),
|
||||
parent_name: optional(union([string(), null_()])),
|
||||
price: optional(number()),
|
||||
product_id: optional(pipe(number(), integer())),
|
||||
quantity: optional(pipe(number(), integer())),
|
||||
sku: optional(string()),
|
||||
subtotal: optional(string()),
|
||||
subtotal_tax: optional(string()),
|
||||
tax_class: optional(string()),
|
||||
taxes: optional(array(WCV3OrdersLineItemTaxSchema)),
|
||||
total: optional(string()),
|
||||
total_tax: optional(string()),
|
||||
variation_id: optional(pipe(number(), integer()))
|
||||
});
|
||||
const WCV3OrdersArgsSchema = object({
|
||||
billing: optional(WCStoreBillingAddressSchema),
|
||||
coupon_lines: optional(array(WCV3OrdersCouponLineSchema)),
|
||||
currency: optional(string()),
|
||||
customer_id: optional(pipe(number(), integer())),
|
||||
customer_note: optional(string()),
|
||||
fee_lines: optional(array(WCV3OrdersFeeLineSchema)),
|
||||
line_items: optional(array(WCV3OrdersLineItemSchema)),
|
||||
manual_update: optional(boolean()),
|
||||
parent_id: optional(pipe(number(), integer())),
|
||||
payment_method: optional(string()),
|
||||
payment_method_title: optional(string()),
|
||||
set_paid: optional(boolean()),
|
||||
shipping: optional(WCStoreShippingAddressSchema),
|
||||
shipping_lines: optional(array(WCV3OrdersShippingLineSchema)),
|
||||
status: optional(enum_(ORDER_STATUSES)),
|
||||
transaction_id: optional(string())
|
||||
});
|
||||
const WCV3OrderSchema = object({
|
||||
billing: WCStoreBillingAddressSchema,
|
||||
cart_hash: string(),
|
||||
cart_tax: string(),
|
||||
coupon_lines: array(WCV3OrdersCouponLineSchema),
|
||||
created_via: string(),
|
||||
currency: string(),
|
||||
currency_symbol: string(),
|
||||
customer_id: pipe(number(), integer()),
|
||||
customer_ip_address: string(),
|
||||
customer_note: string(),
|
||||
customer_user_agent: string(),
|
||||
date_completed: union([string(), null_()]),
|
||||
date_completed_gmt: union([string(), null_()]),
|
||||
// Date
|
||||
date_created: string(),
|
||||
date_created_gmt: string(),
|
||||
date_modified: string(),
|
||||
date_modified_gmt: string(),
|
||||
date_paid: union([string(), null_()]),
|
||||
date_paid_gmt: union([string(), null_()]),
|
||||
discount_tax: string(),
|
||||
discount_total: string(),
|
||||
fee_lines: array(WCV3OrdersFeeLineSchema),
|
||||
id: pipe(number(), integer()),
|
||||
is_editable: boolean(),
|
||||
line_items: array(WCV3OrdersLineItemSchema),
|
||||
meta_data: unknown(),
|
||||
needs_payment: boolean(),
|
||||
needs_processing: boolean(),
|
||||
number: string(),
|
||||
order_key: string(),
|
||||
parent_id: pipe(number(), integer()),
|
||||
payment_method: string(),
|
||||
payment_method_title: string(),
|
||||
payment_url: string(),
|
||||
prices_include_tax: boolean(),
|
||||
refunds: array(unknown()),
|
||||
shipping: WCStoreShippingAddressSchema,
|
||||
shipping_lines: array(WCV3OrdersShippingLineSchema),
|
||||
shipping_tax: string(),
|
||||
shipping_total: string(),
|
||||
status: enum_(ORDER_STATUSES),
|
||||
tax_lines: array(unknown()),
|
||||
total: string(),
|
||||
total_tax: string(),
|
||||
transaction_id: string(),
|
||||
version: string()
|
||||
});
|
||||
export {
|
||||
ORDER_STATUSES as O,
|
||||
TAX_STATUSES as T
|
||||
WCV3OrdersArgsSchema as W,
|
||||
WCV3OrderSchema as a
|
||||
};
|
||||
//# sourceMappingURL=orders2.js.map
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,20 @@
|
|||
|
||||
const ORDER_STATUSES = {
|
||||
AUTO_DRAFT: "auto-draft",
|
||||
CANCELLED: "cancelled",
|
||||
CHECKOUT_DRAFT: "checkout-draft",
|
||||
COMPLETED: "completed",
|
||||
FAILED: "failed",
|
||||
ON_HOLD: "on-hold",
|
||||
PENDING: "pending",
|
||||
PROCESSING: "processing",
|
||||
REFUNDED: "refuneded"
|
||||
};
|
||||
const TAX_STATUSES = {
|
||||
NONE: "none",
|
||||
TAXABLE: "taxable"
|
||||
};
|
||||
export {
|
||||
ORDER_STATUSES as O,
|
||||
TAX_STATUSES as T
|
||||
};
|
||||
//# sourceMappingURL=orders3.js.map
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"orders3.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
||||
{"version":3,"file":"orders3.js","sources":["../../src/scripts/constantes/orders.ts"],"sourcesContent":["export const ORDER_STATUSES = {\n AUTO_DRAFT: \"auto-draft\",\n CANCELLED: \"cancelled\",\n CHECKOUT_DRAFT: \"checkout-draft\",\n COMPLETED: \"completed\",\n FAILED: \"failed\",\n ON_HOLD: \"on-hold\",\n PENDING: \"pending\",\n PROCESSING: \"processing\",\n REFUNDED: \"refuneded\",\n} as const;\n\nexport const TAX_STATUSES = {\n NONE: \"none\",\n TAXABLE: \"taxable\",\n};\n"],"names":[],"mappings":"AAAO,MAAM,iBAAiB;AAAA,EAC5B,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,UAAU;AACZ;AAEO,MAAM,eAAe;AAAA,EAC1B,MAAM;AAAA,EACN,SAAS;AACX;"}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
//# sourceMappingURL=pays.js.map
|
||||
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"pays.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
||||
|
|
@ -39,7 +39,14 @@ const postBackend = (args) => fetch(
|
|||
}
|
||||
);
|
||||
const traiteReponseBackendWCSelonCodesHTTP = (corpsReponse, schemaReponse) => z(corpsReponse).with({ body: N.select(), status: 400 }, estWCError, leveBadRequestError).with({ body: N.select(), status: 401 }, estWCError, leveUnauthorizedError).with({ body: N.select(), status: 404 }, estWCError, leveNotFoundError).with(N._, (corpsOkInconnu) => parse(schemaReponse, corpsOkInconnu)).otherwise((e) => pipe(e, ErreurInconnue, leveErreur));
|
||||
const creeReponseSimplifiee = async (reponse) => {
|
||||
return {
|
||||
body: await reponse.json(),
|
||||
status: reponse.status
|
||||
};
|
||||
};
|
||||
export {
|
||||
creeReponseSimplifiee as c,
|
||||
getBackendAvecParametresUrl as g,
|
||||
postBackend as p,
|
||||
traiteReponseBackendWCSelonCodesHTTP as t
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,13 +1,15 @@
|
|||
var __defProp = Object.defineProperty;
|
||||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
||||
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
||||
import { a0 as SELECTEUR_BOUTON_MENU_MOBILE, a1 as SELECTEUR_MENU_MOBILE, a2 as ATTRIBUT_MENU_MOBILE_ACTIVE } from "./dom.js";
|
||||
import { a7 as SELECTEUR_BOUTON_MENU_MOBILE, a8 as SELECTEUR_MENU_MOBILE, a9 as ATTRIBUT_MENU_MOBILE_ACTIVE } from "./dom.js";
|
||||
import { a as recupereElementDansDocumentOuLeve } from "./utils.js";
|
||||
import "./dom2.js";
|
||||
import { p as pipe } from "./pipe.XPB0wEfw.js";
|
||||
import { P } from "./index-c1cc4c86.yxhuU5oc.js";
|
||||
import { R as Ra } from "./dom2.js";
|
||||
import "./erreurs2.js";
|
||||
import "./exports.B84S-6H1.js";
|
||||
import "./pipe.XPB0wEfw.js";
|
||||
import "./Either.wHNxn7Os.js";
|
||||
import "./belt_Option-91f3b350.1ugmHD3b.js";
|
||||
const not = {
|
||||
inert: ":not([inert]):not([inert] *)",
|
||||
negTabIndex: ':not([tabindex^="-"])',
|
||||
|
|
@ -295,16 +297,39 @@ if (typeof document !== "undefined") {
|
|||
instantiateDialogs();
|
||||
}
|
||||
}
|
||||
const BOUTON_MENU_MOBILE = recupereElementDansDocumentOuLeve(SELECTEUR_BOUTON_MENU_MOBILE);
|
||||
const MENU_MOBILE = recupereElementDansDocumentOuLeve(SELECTEUR_MENU_MOBILE);
|
||||
const E = {
|
||||
BOUTON_MENU_MOBILE: recupereElementDansDocumentOuLeve(SELECTEUR_BOUTON_MENU_MOBILE),
|
||||
CORPS_HTML: recupereElementDansDocumentOuLeve("body"),
|
||||
MENU_MOBILE: recupereElementDansDocumentOuLeve(SELECTEUR_MENU_MOBILE)
|
||||
};
|
||||
const initialiseBoutonMenuMobile = () => {
|
||||
const menuMobile = new A11yDialog(MENU_MOBILE);
|
||||
BOUTON_MENU_MOBILE.addEventListener("click", () => {
|
||||
BOUTON_MENU_MOBILE.toggleAttribute(ATTRIBUT_MENU_MOBILE_ACTIVE);
|
||||
const menuMobile = new A11yDialog(E.MENU_MOBILE);
|
||||
new ResizeObserver(
|
||||
(entrees) => (
|
||||
// Cache le Menu mobile pour les grandes tailles d'écrans
|
||||
pipe(
|
||||
Ra.head(entrees),
|
||||
P.filter((entree) => entree.borderBoxSize[0].inlineSize > 1e3),
|
||||
P.tap((_) => menuMobile.hide())
|
||||
)
|
||||
)
|
||||
).observe(E.CORPS_HTML);
|
||||
E.BOUTON_MENU_MOBILE.addEventListener("click", () => {
|
||||
if (window.innerWidth > 1e3) {
|
||||
window.location.href = "/";
|
||||
return;
|
||||
}
|
||||
if (E.BOUTON_MENU_MOBILE.hasAttribute(ATTRIBUT_MENU_MOBILE_ACTIVE)) {
|
||||
menuMobile.hide();
|
||||
return;
|
||||
}
|
||||
menuMobile.show();
|
||||
});
|
||||
menuMobile.on("show", () => {
|
||||
E.BOUTON_MENU_MOBILE.setAttribute(ATTRIBUT_MENU_MOBILE_ACTIVE, "");
|
||||
});
|
||||
menuMobile.on("hide", () => {
|
||||
BOUTON_MENU_MOBILE.toggleAttribute(ATTRIBUT_MENU_MOBILE_ACTIVE);
|
||||
E.BOUTON_MENU_MOBILE.removeAttribute(ATTRIBUT_MENU_MOBILE_ACTIVE);
|
||||
});
|
||||
};
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,303 +1,12 @@
|
|||
import { a3 as ATTRIBUT_ID_ENSEMBLE_EPINGLE_BOITE, a4 as ATTRIBUT_ENSEMBLE_EPINGLE_BOITE_ACTIF, a5 as CLASS_BOUTON_FERMETURE_BOITE_TEXTE, a6 as CLASS_EPINGLE, a7 as SELECTEUR_CONTENEUR_STORYTELLING_A_PROPOS, a8 as SELECTEUR_EPINGLE, a9 as SELECTEUR_BOITE_TEXTE } from "./dom.js";
|
||||
import { c as ATTRIBUT_ID_ENSEMBLE_EPINGLE_BOITE, d as ATTRIBUT_ENSEMBLE_EPINGLE_BOITE_ACTIF, C as CLASS_BOUTON_FERMETURE_BOITE_TEXTE, e as CLASS_EPINGLE, f as SELECTEUR_CONTENEUR_STORYTELLING_A_PROPOS, g as SELECTEUR_EPINGLE, h as SELECTEUR_BOITE_TEXTE } from "./dom.js";
|
||||
import { a as recupereElementDansDocumentOuLeve, b as recupereElementsDansDocumentOuLeve } from "./utils.js";
|
||||
import { k as some, q as reduceU, w as nullable_to_opt, v as valFromOption, g as equal, x as concat, R as Ra } from "./dom2.js";
|
||||
import { R as Ra } from "./dom2.js";
|
||||
import { p as pipe } from "./pipe.XPB0wEfw.js";
|
||||
import { _ as _1, i as is_extension, c as create, g as getExn, b as getWithDefault$1, d as isNone, a as isSome, f as flatMap$1, e as mapU, h as flatMapU, m as mapWithDefaultU } from "./belt_Option-91f3b350.cBye8bLJ.js";
|
||||
import { P } from "./index-c1cc4c86.yxhuU5oc.js";
|
||||
import "./erreurs2.js";
|
||||
import "./exports.B84S-6H1.js";
|
||||
import "./Either.wHNxn7Os.js";
|
||||
var t = create("Promise.JsError");
|
||||
function $$catch(r, s) {
|
||||
return r.catch(function(r2) {
|
||||
return _1(s, is_extension(r2) ? r2 : {
|
||||
RE_EXN_ID: t,
|
||||
_1: r2
|
||||
});
|
||||
});
|
||||
}
|
||||
function placeholder(n) {
|
||||
}
|
||||
function makeSome(n) {
|
||||
return some(n);
|
||||
}
|
||||
function makeNone(n) {
|
||||
}
|
||||
function fromNullable(n) {
|
||||
if (null == n) {
|
||||
return;
|
||||
} else {
|
||||
return some(n);
|
||||
}
|
||||
}
|
||||
function fromFalsy(n) {
|
||||
if (n) {
|
||||
return n;
|
||||
}
|
||||
}
|
||||
function _fromPredicate(n, t2) {
|
||||
return flatMap$1(null == n ? void 0 : some(n), function(n2) {
|
||||
if (t2(n2)) {
|
||||
return some(n2);
|
||||
}
|
||||
});
|
||||
}
|
||||
function fromPredicate() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _fromPredicate(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return _fromPredicate(arguments[0], arguments[1]);
|
||||
}
|
||||
function fromExecution(n) {
|
||||
try {
|
||||
return some(n(void 0));
|
||||
} catch (n2) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
function fromPromise(t2) {
|
||||
return $$catch(t2.then(function(n) {
|
||||
return some(n);
|
||||
}), function(n) {
|
||||
return Promise.resolve(void 0);
|
||||
});
|
||||
}
|
||||
var h = mapU;
|
||||
function map() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return h(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return h(arguments[0], arguments[1]);
|
||||
}
|
||||
var _ = flatMapU;
|
||||
function flatMap() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return _(arguments[0], arguments[1]);
|
||||
}
|
||||
var v = mapWithDefaultU;
|
||||
function mapWithDefault() {
|
||||
if (2 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return v(t2, n[0], n[1]);
|
||||
};
|
||||
}
|
||||
return v(arguments[0], arguments[1], arguments[2]);
|
||||
}
|
||||
function _mapNullable(n, t2) {
|
||||
if (void 0 !== n) {
|
||||
return nullable_to_opt(t2(valFromOption(n)));
|
||||
}
|
||||
}
|
||||
function mapNullable() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _mapNullable(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return _mapNullable(arguments[0], arguments[1]);
|
||||
}
|
||||
function _filter(n, t2) {
|
||||
return flatMapU(n, function(n2) {
|
||||
if (t2(n2)) {
|
||||
return some(n2);
|
||||
}
|
||||
});
|
||||
}
|
||||
function filter() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _filter(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return _filter(arguments[0], arguments[1]);
|
||||
}
|
||||
var g = getWithDefault$1;
|
||||
function getWithDefault() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return g(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return g(arguments[0], arguments[1]);
|
||||
}
|
||||
var N = getExn;
|
||||
function toNullable(n) {
|
||||
return getWithDefault$1(n, null);
|
||||
}
|
||||
function toUndefined(n) {
|
||||
return getWithDefault$1(n, void 0);
|
||||
}
|
||||
function _toResult(n, t2) {
|
||||
if (void 0 !== n) {
|
||||
return {
|
||||
TAG: 0,
|
||||
_0: valFromOption(n)
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
TAG: 1,
|
||||
_0: t2
|
||||
};
|
||||
}
|
||||
}
|
||||
function toResult() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _toResult(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return _toResult(arguments[0], arguments[1]);
|
||||
}
|
||||
function _match(n, t2, r) {
|
||||
if (void 0 !== n) {
|
||||
return t2(valFromOption(n));
|
||||
} else {
|
||||
return r(void 0);
|
||||
}
|
||||
}
|
||||
function match() {
|
||||
if (2 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _match(t2, n[0], n[1]);
|
||||
};
|
||||
}
|
||||
return _match(arguments[0], arguments[1], arguments[2]);
|
||||
}
|
||||
var b = isNone;
|
||||
var z = isSome;
|
||||
function _tap(n, t2) {
|
||||
if (void 0 !== n) {
|
||||
t2(valFromOption(n));
|
||||
return n;
|
||||
} else {
|
||||
return n;
|
||||
}
|
||||
}
|
||||
function tap() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _tap(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return _tap(arguments[0], arguments[1]);
|
||||
}
|
||||
function _contains(n, r) {
|
||||
return mapWithDefaultU(n, false, function(n2) {
|
||||
return equal(n2, r);
|
||||
});
|
||||
}
|
||||
function contains() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _contains(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return _contains(arguments[0], arguments[1]);
|
||||
}
|
||||
function _zip(n, t2) {
|
||||
if (void 0 !== n && void 0 !== t2) {
|
||||
return [valFromOption(n), valFromOption(t2)];
|
||||
}
|
||||
}
|
||||
function zip() {
|
||||
if (1 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _zip(t2, n[0]);
|
||||
};
|
||||
}
|
||||
return _zip(arguments[0], arguments[1]);
|
||||
}
|
||||
function _zipWith(n, t2, r) {
|
||||
if (void 0 !== n && void 0 !== t2) {
|
||||
return some(r(valFromOption(n), valFromOption(t2)));
|
||||
}
|
||||
}
|
||||
function zipWith() {
|
||||
if (2 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _zipWith(t2, n[0], n[1]);
|
||||
};
|
||||
}
|
||||
return _zipWith(arguments[0], arguments[1], arguments[2]);
|
||||
}
|
||||
function _fold(n, t2, r) {
|
||||
if (void 0 !== n) {
|
||||
return t2(valFromOption(n));
|
||||
} else {
|
||||
return r(void 0);
|
||||
}
|
||||
}
|
||||
function fold() {
|
||||
if (2 === arguments.length) {
|
||||
const n = arguments;
|
||||
return function fn(t2) {
|
||||
return _fold(t2, n[0], n[1]);
|
||||
};
|
||||
}
|
||||
return _fold(arguments[0], arguments[1], arguments[2]);
|
||||
}
|
||||
function all(n) {
|
||||
return reduceU(n, [], function(n2, t2) {
|
||||
return flatMapU(n2, function(n3) {
|
||||
if (void 0 !== t2) {
|
||||
return concat(n3, [valFromOption(t2)]);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
const Some = (n) => n;
|
||||
var P = {
|
||||
__proto__: null,
|
||||
Some,
|
||||
None: void 0,
|
||||
placeholder,
|
||||
makeSome,
|
||||
makeNone,
|
||||
fromNullable,
|
||||
fromFalsy,
|
||||
fromPredicate,
|
||||
fromExecution,
|
||||
fromPromise,
|
||||
map,
|
||||
flatMap,
|
||||
mapWithDefault,
|
||||
mapNullable,
|
||||
filter,
|
||||
getWithDefault,
|
||||
getExn: N,
|
||||
toNullable,
|
||||
toUndefined,
|
||||
toResult,
|
||||
match,
|
||||
isNone: b,
|
||||
isSome: z,
|
||||
tap,
|
||||
contains,
|
||||
zip,
|
||||
zipWith,
|
||||
fold,
|
||||
all
|
||||
};
|
||||
import "./belt_Option-91f3b350.1ugmHD3b.js";
|
||||
const CONTENEUR_STORYTELLING = recupereElementDansDocumentOuLeve(
|
||||
SELECTEUR_CONTENEUR_STORYTELLING_A_PROPOS
|
||||
);
|
||||
|
|
@ -315,7 +24,6 @@ Ra.forEachWithIndex(EPINGLES, (index, epingle) => {
|
|||
});
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
CONTENEUR_STORYTELLING.addEventListener("click", (evenement) => {
|
||||
console.time();
|
||||
const cible = evenement.target;
|
||||
pipe(
|
||||
cible,
|
||||
|
|
@ -354,7 +62,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
);
|
||||
})
|
||||
);
|
||||
console.timeEnd();
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=scripts-page-a-propos.js.map
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,10 +1,10 @@
|
|||
import { c as SELECTEUR_CONTENEUR_STORYTELLING, d as SELECTEUR_IMAGES_STORYTELLING, e as ATTRIBUT_CACHE, f as ATTRIBUT_ARIA_HIDDEN } from "./dom.js";
|
||||
import { i as SELECTEUR_CONTENEUR_STORYTELLING, j as SELECTEUR_IMAGES_STORYTELLING, k as ATTRIBUT_CACHE, l as ATTRIBUT_ARIA_HIDDEN } from "./dom.js";
|
||||
import { e as estEntreDeuxNombres } from "./nombres.js";
|
||||
import { a as recupereElementDansDocumentOuLeve, b as recupereElementsDansDocumentOuLeve } from "./utils.js";
|
||||
import "./pipe.XPB0wEfw.js";
|
||||
import "./dom2.js";
|
||||
import "./erreurs2.js";
|
||||
import "./exports.B84S-6H1.js";
|
||||
import "./pipe.XPB0wEfw.js";
|
||||
import "./Either.wHNxn7Os.js";
|
||||
const initialiseScrollStorytelling = () => {
|
||||
const STORYTELLING = recupereElementDansDocumentOuLeve(SELECTEUR_CONTENEUR_STORYTELLING);
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
import { z, N } from "./index.CeK6pfoJ.js";
|
||||
import { V as ValiError } from "./index.BAmxwLeJ.js";
|
||||
import { R as ROUTE_API_NOUVELLE_PRODUCTS } from "./api.js";
|
||||
import { g as SELECTEUR_BOUTON_PLUS_PRODUITS, h as SELECTEUR_GRILLE_PRODUITS, i as ATTRIBUT_ID_CATEGORIE_PRODUITS, j as ATTRIBUT_PAGE, k as ATTRIBUT_DESACTIVE, l as ATTRIBUT_CHARGEMENT, m as ATTRIBUT_HIDDEN } from "./dom.js";
|
||||
import { l as lanceAnimationCycleTexte } from "./animations.js";
|
||||
import { m as SELECTEUR_BOUTON_PLUS_PRODUITS, n as SELECTEUR_GRILLE_PRODUITS, o as ATTRIBUT_ID_CATEGORIE_PRODUITS, p as ATTRIBUT_PAGE, q as ATTRIBUT_DESACTIVE, r as ATTRIBUT_CHARGEMENT, s as ATTRIBUT_HIDDEN } from "./dom.js";
|
||||
import { l as lanceAnimationCycleLoading } from "./animations.js";
|
||||
import { h as html } from "./dom2.js";
|
||||
import { S as ServerError, B as BadRequestError } from "./erreurs2.js";
|
||||
import { g as getBackendAvecParametresUrl } from "./reseau.js";
|
||||
import { g as getBackendAvecParametresUrl, c as creeReponseSimplifiee } from "./reseau.js";
|
||||
import { W as WCV3ProductsArgsSchema, a as WCV3ProductsSchema } from "./products.js";
|
||||
import { a as recupereElementDansDocumentOuLeve } from "./utils.js";
|
||||
import { e as eitherParse } from "./validation.js";
|
||||
import { E as EitherAsync } from "./MaybeAsync.AE1jnxuc.js";
|
||||
import { p as pipe } from "./pipe.XPB0wEfw.js";
|
||||
import { t as tap } from "./index-0eef19ec.DoJSf22Z.js";
|
||||
import { t as tap } from "./index-0eef19ec.DKzz249a.js";
|
||||
import "./Either.wHNxn7Os.js";
|
||||
import "./exports.B84S-6H1.js";
|
||||
import "./erreurs3.js";
|
||||
import "./products2.js";
|
||||
import "./belt_Option-91f3b350.cBye8bLJ.js";
|
||||
import "./belt_Option-91f3b350.1ugmHD3b.js";
|
||||
const ETATS_PAGE = _etats;
|
||||
const E = {
|
||||
BOUTON_PLUS_DE_PRODUITS: recupereElementDansDocumentOuLeve(SELECTEUR_BOUTON_PLUS_PRODUITS),
|
||||
|
|
@ -35,18 +35,7 @@ const initialisePageBoutique = () => {
|
|||
void EitherAsync.liftEither(eitherParse(args, WCV3ProductsArgsSchema)).ifRight(() => {
|
||||
E.BOUTON_PLUS_DE_PRODUITS.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
E.BOUTON_PLUS_DE_PRODUITS.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
const animation = lanceAnimationCycleTexte({
|
||||
attribut: ATTRIBUT_CHARGEMENT,
|
||||
element: E.BOUTON_PLUS_DE_PRODUITS,
|
||||
etapes: [
|
||||
"Loading",
|
||||
"Loading.",
|
||||
"Loading..",
|
||||
"Loading..."
|
||||
]
|
||||
});
|
||||
animation.callback();
|
||||
animation.interval = setInterval(animation.callback, 500);
|
||||
lanceAnimationCycleLoading(E.BOUTON_PLUS_DE_PRODUITS, 500);
|
||||
}).chain(
|
||||
(args2) => EitherAsync(
|
||||
() => getBackendAvecParametresUrl({
|
||||
|
|
@ -58,11 +47,7 @@ const initialisePageBoutique = () => {
|
|||
)
|
||||
).chain(
|
||||
(reponse) => EitherAsync(async ({ throwE }) => {
|
||||
const reponseSimplifiee = {
|
||||
body: await reponse.json(),
|
||||
status: reponse.status
|
||||
};
|
||||
return z(reponseSimplifiee).with({ status: 500 }, () => throwE(new ServerError("500 Server Error"))).with({ status: 400 }, () => throwE(new BadRequestError("400 Server Error"))).with({ status: 200 }, () => reponseSimplifiee.body).run();
|
||||
return z(await creeReponseSimplifiee(reponse)).with({ status: 500 }, () => throwE(new ServerError("500 Server Error"))).with({ status: 400 }, () => throwE(new BadRequestError("400 Server Error"))).with({ status: 200 }, (r) => r.body).run();
|
||||
})
|
||||
).chain((corpsReponse) => EitherAsync.liftEither(eitherParse(corpsReponse, WCV3ProductsSchema))).ifRight((donnees) => {
|
||||
if (donnees.length < 12) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,17 +1,17 @@
|
|||
import { z, N } from "./index.CeK6pfoJ.js";
|
||||
import { V as ValiError } from "./index.BAmxwLeJ.js";
|
||||
import { c as ROUTE_API_MAJ_CLIENT, d as ROUTE_API_NOUVELLE_COMMANDES } from "./api.js";
|
||||
import { n as SELECTEUR_ENTREES_PANIER, B as SELECTEUR_BOUTON_ACTIONS_FORMULAIRE, C as SELECTEUR_FORMULAIRE_PANIER, D as SELECTEUR_INSTRUCTIONS_CLIENT, E as SELECTEUR_MESSAGE_FORMULAIRE_ADRESSES, F as SELECTEUR_SOUS_TOTAL_LIVRAISON_COUT, G as SELECTEUR_SOUS_TOTAL_LIVRAISON_PRESTATAIRE, k as ATTRIBUT_DESACTIVE, l as ATTRIBUT_CHARGEMENT } from "./dom.js";
|
||||
import { t as SELECTEUR_ENTREES_PANIER, I as SELECTEUR_BOUTON_ACTIONS_FORMULAIRE, J as SELECTEUR_FORMULAIRE_PANIER, K as SELECTEUR_INSTRUCTIONS_CLIENT, L as SELECTEUR_MESSAGE_FORMULAIRE_ADRESSES, M as SELECTEUR_SOUS_TOTAL_LIVRAISON_COUT, N as SELECTEUR_SOUS_TOTAL_LIVRAISON_PRESTATAIRE, q as ATTRIBUT_DESACTIVE, r as ATTRIBUT_CHARGEMENT } from "./dom.js";
|
||||
import { E as ERREUR_GENERIQUE_SOUMISSION_ADRESSES } from "./messages-utilisateur.js";
|
||||
import { l as lanceAnimationCycleTexte } from "./animations.js";
|
||||
import { l as lanceAnimationCycleLoading } from "./animations.js";
|
||||
import { e as eitherSessionStorageGet, c as eitherJsonParse } from "./dom2.js";
|
||||
import { S as ServerError, B as BadRequestError, a as leveErreur, l as leveServerError } from "./erreurs2.js";
|
||||
import { e as estReponse500 } from "./gardes.js";
|
||||
import { p as postBackend } from "./reseau.js";
|
||||
import { p as postBackend, c as creeReponseSimplifiee } from "./reseau.js";
|
||||
import { W as WCStoreCartSchema } from "./cart.js";
|
||||
import { W as WCStoreCartUpdateCustomerArgsSchema } from "./cart-update-customer.js";
|
||||
import { W as WCStoreShippingRateShippingRateSchema } from "./couts-livraison.js";
|
||||
import { W as WCV3OrdersArgsSchema, a as WCV3OrderSchema } from "./orders.js";
|
||||
import { W as WCV3OrdersArgsSchema, a as WCV3OrderSchema } from "./orders2.js";
|
||||
import { a as recupereElementDansDocumentOuLeve, c as recupereElementsDocumentEither } from "./utils.js";
|
||||
import { e as eitherParse } from "./validation.js";
|
||||
import { E as EitherAsync } from "./MaybeAsync.AE1jnxuc.js";
|
||||
|
|
@ -22,9 +22,9 @@ import "./erreurs3.js";
|
|||
import "./cart2.js";
|
||||
import "./adresses.js";
|
||||
import "./cart-coupons.js";
|
||||
import "./orders2.js";
|
||||
import "./orders3.js";
|
||||
const ETATS_PAGE = _etats;
|
||||
const ELEMENTS = {
|
||||
const E = {
|
||||
BOUTON_ACTIONS_FORMULAIRE: recupereElementDansDocumentOuLeve(SELECTEUR_BOUTON_ACTIONS_FORMULAIRE),
|
||||
ENTREES_PANIER_EITHER: recupereElementsDocumentEither(SELECTEUR_ENTREES_PANIER),
|
||||
FORMULAIRE_PANIER: recupereElementDansDocumentOuLeve(SELECTEUR_FORMULAIRE_PANIER),
|
||||
|
|
@ -38,24 +38,10 @@ const ELEMENTS = {
|
|||
)
|
||||
};
|
||||
const initialiseBoutonSoumissionAdresses = () => {
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.addEventListener("click", (evenement) => {
|
||||
Maybe.fromFalsy(ELEMENTS.FORMULAIRE_PANIER.checkValidity()).ifJust(() => {
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.addEventListener("click", (evenement) => {
|
||||
Maybe.fromFalsy(E.FORMULAIRE_PANIER.checkValidity()).ifJust(() => {
|
||||
evenement.preventDefault();
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
const animation = lanceAnimationCycleTexte({
|
||||
attribut: ATTRIBUT_CHARGEMENT,
|
||||
element: ELEMENTS.BOUTON_ACTIONS_FORMULAIRE,
|
||||
etapes: [
|
||||
"Loading",
|
||||
"Loading.",
|
||||
"Loading..",
|
||||
"Loading..."
|
||||
]
|
||||
});
|
||||
animation.callback();
|
||||
animation.interval = setInterval(animation.callback, 500);
|
||||
const donneesFormulaire = Object.fromEntries(new FormData(ELEMENTS.FORMULAIRE_PANIER));
|
||||
const donneesFormulaire = Object.fromEntries(new FormData(E.FORMULAIRE_PANIER));
|
||||
const argumentsFormulaire = {
|
||||
billing_address: {
|
||||
address_1: donneesFormulaire["facturation-adresse"] ?? donneesFormulaire["livraison-adresse"] ?? "",
|
||||
|
|
@ -83,70 +69,60 @@ const initialiseBoutonSoumissionAdresses = () => {
|
|||
state: donneesFormulaire["livraison-region-etat"] ?? ""
|
||||
}
|
||||
};
|
||||
void EitherAsync.liftEither(eitherParse(argumentsFormulaire, WCStoreCartUpdateCustomerArgsSchema)).map(
|
||||
(args) => postBackend({
|
||||
corps: JSON.stringify(args),
|
||||
nonce: ETATS_PAGE.nonce,
|
||||
route: ROUTE_API_MAJ_CLIENT
|
||||
})
|
||||
void EitherAsync.liftEither(eitherParse(argumentsFormulaire, WCStoreCartUpdateCustomerArgsSchema)).ifRight(() => {
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
lanceAnimationCycleLoading(E.BOUTON_ACTIONS_FORMULAIRE, 500);
|
||||
}).chain(
|
||||
(args) => EitherAsync(
|
||||
() => postBackend({
|
||||
corps: JSON.stringify(args),
|
||||
nonce: ETATS_PAGE.nonce,
|
||||
route: ROUTE_API_MAJ_CLIENT
|
||||
})
|
||||
)
|
||||
).chain(
|
||||
(reponse) => EitherAsync(async ({ throwE }) => {
|
||||
const reponseSimplifiee = {
|
||||
body: await reponse.json(),
|
||||
status: reponse.status
|
||||
};
|
||||
return z(reponseSimplifiee).with({ status: 500 }, () => throwE(new ServerError("500 Server Error"))).with({ status: 400 }, () => throwE(new BadRequestError("400 Bad Request Error"))).with({ status: 200 }, () => reponseSimplifiee.body).run();
|
||||
return z(await creeReponseSimplifiee(reponse)).with({ status: 500 }, () => throwE(new ServerError("500 Server Error"))).with({ status: 400 }, () => throwE(new BadRequestError("400 Server Error"))).with({ status: 200 }, (r) => r.body).run();
|
||||
})
|
||||
).chain((corsReponse) => EitherAsync.liftEither(eitherParse(corsReponse, WCStoreCartSchema))).ifRight((panier) => {
|
||||
console.debug(panier.shipping_rates);
|
||||
).chain((corpsReponse) => EitherAsync.liftEither(eitherParse(corpsReponse, WCStoreCartSchema))).ifRight((panier) => {
|
||||
const sousTotalLivraison = panier.totals.total_shipping === "0" ? "Free" : `${String(Number(panier.totals.total_shipping) / 100)}€`;
|
||||
const prestataireLivraison = panier.shipping_rates[0]?.shipping_rates[0]?.name ?? "";
|
||||
ELEMENTS.TOTAL_LIVRAISON_COUT.textContent = sousTotalLivraison;
|
||||
ELEMENTS.TOTAL_LIVRAISON_PRESTATAIRE.textContent = prestataireLivraison;
|
||||
E.TOTAL_LIVRAISON_COUT.textContent = sousTotalLivraison;
|
||||
E.TOTAL_LIVRAISON_PRESTATAIRE.textContent = prestataireLivraison;
|
||||
sessionStorage.setItem(
|
||||
"shipping_rates",
|
||||
JSON.stringify(panier.shipping_rates[0]?.shipping_rates[0] ?? "")
|
||||
);
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.textContent = "Check-out";
|
||||
initialiseBoutonCreationCommande();
|
||||
}).ifLeft(
|
||||
(erreur) => z(erreur).with(N.instanceOf(ValiError), (e) => {
|
||||
console.error(e.issues);
|
||||
ELEMENTS.MESSAGE_FORMULAIRE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||
E.MESSAGE_FORMULAIRE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||
}).with(N.instanceOf(ServerError), (e) => {
|
||||
console.error(e);
|
||||
ELEMENTS.MESSAGE_FORMULAIRE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||
E.MESSAGE_FORMULAIRE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||
}).exhaustive()
|
||||
).finally(() => {
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.removeAttribute(ATTRIBUT_CHARGEMENT);
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.removeAttribute(ATTRIBUT_DESACTIVE);
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.removeAttribute(ATTRIBUT_CHARGEMENT);
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.removeAttribute(ATTRIBUT_DESACTIVE);
|
||||
}).run();
|
||||
});
|
||||
});
|
||||
};
|
||||
const initialiseBoutonCreationCommande = () => {
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.outerHTML = ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.outerHTML;
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE = recupereElementDansDocumentOuLeve(
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.outerHTML = E.BOUTON_ACTIONS_FORMULAIRE.outerHTML;
|
||||
E.BOUTON_ACTIONS_FORMULAIRE = recupereElementDansDocumentOuLeve(
|
||||
SELECTEUR_BOUTON_ACTIONS_FORMULAIRE
|
||||
);
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.addEventListener("click", (evenement) => {
|
||||
Maybe.fromFalsy(ELEMENTS.FORMULAIRE_PANIER.checkValidity()).ifJust(() => {
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.textContent = "Check-out";
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.addEventListener("click", (evenement) => {
|
||||
Maybe.fromFalsy(E.FORMULAIRE_PANIER.checkValidity()).ifJust(() => {
|
||||
evenement.preventDefault();
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
const animation = lanceAnimationCycleTexte({
|
||||
attribut: ATTRIBUT_CHARGEMENT,
|
||||
element: ELEMENTS.BOUTON_ACTIONS_FORMULAIRE,
|
||||
etapes: [
|
||||
"Loading",
|
||||
"Loading.",
|
||||
"Loading..",
|
||||
"Loading..."
|
||||
]
|
||||
});
|
||||
animation.callback();
|
||||
animation.interval = setInterval(animation.callback, 500);
|
||||
const donneesFormulaire = Object.fromEntries(new FormData(ELEMENTS.FORMULAIRE_PANIER));
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
lanceAnimationCycleLoading(E.BOUTON_ACTIONS_FORMULAIRE, 500);
|
||||
const donneesFormulaire = Object.fromEntries(new FormData(E.FORMULAIRE_PANIER));
|
||||
const methodeLivraison = eitherSessionStorageGet("shipping_rates").chain(eitherJsonParse).chain(
|
||||
(json) => eitherParse(
|
||||
json,
|
||||
|
|
@ -155,10 +131,10 @@ const initialiseBoutonCreationCommande = () => {
|
|||
).ifLeft((e) => {
|
||||
if (e instanceof ValiError) console.error(e.issues);
|
||||
console.error("methodeLivraison", e);
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.textContent = "Check-out";
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.textContent = "Check-out";
|
||||
leveErreur(e);
|
||||
}).unsafeCoerce();
|
||||
const articlesPanier = ELEMENTS.ENTREES_PANIER_EITHER.orDefault([]).map((entree) => ({
|
||||
const articlesPanier = E.ENTREES_PANIER_EITHER.orDefault([]).map((entree) => ({
|
||||
product_id: Number(entree.getAttribute("data-id-produit")),
|
||||
quantity: Number(entree.getAttribute("data-quantite")),
|
||||
...entree.getAttribute("data-id-variation") && {
|
||||
|
|
@ -180,7 +156,7 @@ const initialiseBoutonCreationCommande = () => {
|
|||
state: donneesFormulaire["facturation-region-etat"] ?? donneesFormulaire["livraison-region-etat"] ?? ""
|
||||
},
|
||||
currency: methodeLivraison.currency_code,
|
||||
customer_note: ELEMENTS.INSTRUCTIONS_CLIENT.value,
|
||||
customer_note: E.INSTRUCTIONS_CLIENT.value,
|
||||
line_items: articlesPanier,
|
||||
shipping: {
|
||||
address_1: donneesFormulaire["livraison-adresse"] ?? "",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,14 +1,15 @@
|
|||
import { z, N } from "./index.CeK6pfoJ.js";
|
||||
import { V as ValiError } from "./index.BAmxwLeJ.js";
|
||||
import { e as ROUTE_API_APPLIQUE_COUPON, f as ROUTE_API_RETIRE_COUPON } from "./api.js";
|
||||
import { H as SELECTEUR_BOUTON_CODE_PROMO, I as SELECTEUR_CHAMP_CODE_PROMO, J as SELECTEUR_ENSEMBLE_CODE_PROMO, K as SELECTEUR_MESSAGE_CODE_PROMO, r as SELECTEUR_TOTAL_PANIER, L as SELECTEUR_TOTAL_REDUCTION, q as SELECTEUR_TOTAL_REDUCTION_VALEUR, k as ATTRIBUT_DESACTIVE, l as ATTRIBUT_CHARGEMENT, M as ATTRIBUT_CODE_PROMO_PRESENT, m as ATTRIBUT_HIDDEN } from "./dom.js";
|
||||
import { O as SELECTEUR_BOUTON_CODE_PROMO, P as SELECTEUR_CHAMP_CODE_PROMO, Q as SELECTEUR_ENSEMBLE_CODE_PROMO, R as SELECTEUR_MESSAGE_CODE_PROMO, x as SELECTEUR_TOTAL_PANIER, T as SELECTEUR_TOTAL_REDUCTION, w as SELECTEUR_TOTAL_REDUCTION_VALEUR, q as ATTRIBUT_DESACTIVE, r as ATTRIBUT_CHARGEMENT, U as ATTRIBUT_CODE_PROMO_PRESENT, s as ATTRIBUT_HIDDEN } from "./dom.js";
|
||||
import { E as ERREUR_CODE_PROMO_INVALIDE } from "./erreurs.js";
|
||||
import { l as lanceAnimationCycleTexte } from "./animations.js";
|
||||
import { l as lanceAnimationCycleLoading } from "./animations.js";
|
||||
import { d as accorderCibleASelecteur, i as identity } from "./dom2.js";
|
||||
import { S as ServerError } from "./erreurs2.js";
|
||||
import { E as ErreurCodePromoInvalide } from "./codes-promo.js";
|
||||
import { e as estReponse500 } from "./gardes.js";
|
||||
import { r as reponseEstCodeErreurWC } from "./messages.js";
|
||||
import { d as diviseParCent, a as arrondisADeuxDecimales, f as formateEnEuros, i as inverseNombre } from "./nombres.js";
|
||||
import { p as postBackend } from "./reseau.js";
|
||||
import { W as WCStoreCartSchema } from "./cart.js";
|
||||
import { W as WCStoreCartApplyCouponArgsSchema } from "./cart-apply-coupon.js";
|
||||
|
|
@ -27,7 +28,7 @@ import "./adresses.js";
|
|||
import "./cart-coupons.js";
|
||||
import "./couts-livraison.js";
|
||||
const ETATS_PAGE = _etats;
|
||||
const ELEMENTS = {
|
||||
const E = {
|
||||
BOUTON_CODE_PROMO: recupereElementDansDocumentOuLeve(SELECTEUR_BOUTON_CODE_PROMO),
|
||||
CHAMP_CODE_PROMO: recupereElementDansDocumentOuLeve(SELECTEUR_CHAMP_CODE_PROMO),
|
||||
ENSEMBLE_CODE_PROMO: recupereElementDansDocumentOuLeve(SELECTEUR_ENSEMBLE_CODE_PROMO),
|
||||
|
|
@ -37,9 +38,9 @@ const ELEMENTS = {
|
|||
TOTAL_REDUCTION_VALEUR: recupereElementDansDocumentOuLeve(SELECTEUR_TOTAL_REDUCTION_VALEUR)
|
||||
};
|
||||
const initialiseElementsCodePromo = () => {
|
||||
const recupereValeurCodePromo = () => Maybe.fromFalsy(ELEMENTS.CHAMP_CODE_PROMO.value.trim()).extractNullable();
|
||||
const recuperePresenceCodePromo = () => ELEMENTS.ENSEMBLE_CODE_PROMO.hasAttribute(ATTRIBUT_CODE_PROMO_PRESENT);
|
||||
ELEMENTS.ENSEMBLE_CODE_PROMO.addEventListener("click", (evenement) => z({
|
||||
const recupereValeurCodePromo = () => Maybe.fromFalsy(E.CHAMP_CODE_PROMO.value.trim()).extractNullable();
|
||||
const recuperePresenceCodePromo = () => E.ENSEMBLE_CODE_PROMO.hasAttribute(ATTRIBUT_CODE_PROMO_PRESENT);
|
||||
E.ENSEMBLE_CODE_PROMO.addEventListener("click", (evenement) => z({
|
||||
cible: evenement.target,
|
||||
codePromoPresent: recuperePresenceCodePromo(),
|
||||
valeurCodePromo: recupereValeurCodePromo()
|
||||
|
|
@ -52,21 +53,10 @@ const initialiseElementsCodePromo = () => {
|
|||
valeurCodePromo: N.string
|
||||
},
|
||||
({ valeurCodePromo }) => void EitherAsync.liftEither(eitherParse({ code: valeurCodePromo }, WCStoreCartApplyCouponArgsSchema)).ifRight(() => {
|
||||
ELEMENTS.BOUTON_CODE_PROMO.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
ELEMENTS.BOUTON_CODE_PROMO.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
ELEMENTS.MESSAGE_CODE_PROMO.textContent = "";
|
||||
const animation = lanceAnimationCycleTexte({
|
||||
attribut: ATTRIBUT_CHARGEMENT,
|
||||
element: ELEMENTS.BOUTON_CODE_PROMO,
|
||||
etapes: [
|
||||
"Loading",
|
||||
"Loading.",
|
||||
"Loading..",
|
||||
"Loading..."
|
||||
]
|
||||
});
|
||||
animation.callback();
|
||||
animation.interval = setInterval(animation.callback, 500);
|
||||
E.BOUTON_CODE_PROMO.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
E.BOUTON_CODE_PROMO.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
E.MESSAGE_CODE_PROMO.textContent = "";
|
||||
lanceAnimationCycleLoading(E.BOUTON_CODE_PROMO, 500);
|
||||
}).map(
|
||||
(args) => postBackend({
|
||||
corps: JSON.stringify(args),
|
||||
|
|
@ -85,30 +75,37 @@ const initialiseElementsCodePromo = () => {
|
|||
}, () => throwE(new ErreurCodePromoInvalide(recupereValeurCodePromo() ?? ""))).with({ status: 200 }, () => reponseSimplifiee.body).run();
|
||||
})
|
||||
).chain((corpsReponse) => EitherAsync.liftEither(eitherParse(corpsReponse, WCStoreCartSchema))).ifRight((panier) => {
|
||||
const totalReduction = pipe(Number(panier.totals.total_discount) / 100, String, (v) => `-${v}€`);
|
||||
const totalPanier = pipe(Number(panier.totals.total_price) / 100, String, (v) => `${v}€`);
|
||||
ELEMENTS.ENSEMBLE_CODE_PROMO.toggleAttribute(ATTRIBUT_CODE_PROMO_PRESENT);
|
||||
ELEMENTS.CHAMP_CODE_PROMO.toggleAttribute(ATTRIBUT_DESACTIVE);
|
||||
ELEMENTS.CHAMP_CODE_PROMO.value = panier.coupons[0]?.code ?? "";
|
||||
ELEMENTS.BOUTON_CODE_PROMO.textContent = "Remove";
|
||||
ELEMENTS.TOTAL_PANIER.textContent = totalPanier;
|
||||
ELEMENTS.TOTAL_REDUCTION_LIGNE.toggleAttribute(ATTRIBUT_HIDDEN);
|
||||
ELEMENTS.TOTAL_REDUCTION_VALEUR.textContent = totalReduction;
|
||||
E.ENSEMBLE_CODE_PROMO.toggleAttribute(ATTRIBUT_CODE_PROMO_PRESENT);
|
||||
E.CHAMP_CODE_PROMO.toggleAttribute(ATTRIBUT_DESACTIVE);
|
||||
E.CHAMP_CODE_PROMO.value = panier.coupons[0]?.code ?? "";
|
||||
E.BOUTON_CODE_PROMO.textContent = "Remove";
|
||||
E.TOTAL_PANIER.textContent = pipe(
|
||||
diviseParCent(panier.totals.total_price),
|
||||
arrondisADeuxDecimales,
|
||||
formateEnEuros
|
||||
);
|
||||
E.TOTAL_REDUCTION_LIGNE.toggleAttribute(ATTRIBUT_HIDDEN);
|
||||
E.TOTAL_REDUCTION_VALEUR.textContent = pipe(
|
||||
diviseParCent(panier.totals.total_discount),
|
||||
inverseNombre,
|
||||
arrondisADeuxDecimales,
|
||||
formateEnEuros
|
||||
);
|
||||
}).ifLeft((erreur) => {
|
||||
ELEMENTS.BOUTON_CODE_PROMO.textContent = "Apply";
|
||||
E.BOUTON_CODE_PROMO.textContent = "Apply";
|
||||
z(erreur).with(N.instanceOf(ValiError), (e) => console.error("ValiError", e.issues)).with(N.instanceOf(ErreurCodePromoInvalide), (e) => {
|
||||
ELEMENTS.MESSAGE_CODE_PROMO.textContent = "This promo code does not exist.";
|
||||
E.MESSAGE_CODE_PROMO.textContent = "This promo code does not exist.";
|
||||
console.error(e);
|
||||
}).with(N.instanceOf(ServerError), (e) => {
|
||||
ELEMENTS.MESSAGE_CODE_PROMO.textContent = "Sorry, something went wrong! Please refresh the page and try again.";
|
||||
E.MESSAGE_CODE_PROMO.textContent = "Sorry, something went wrong! Please refresh the page and try again.";
|
||||
console.error(e);
|
||||
}).with(N.instanceOf(TypeError), (e) => {
|
||||
ELEMENTS.MESSAGE_CODE_PROMO.textContent = "Sorry, something went wrong! Please refresh the page and try again.";
|
||||
E.MESSAGE_CODE_PROMO.textContent = "Sorry, something went wrong! Please refresh the page and try again.";
|
||||
console.error(e);
|
||||
}).exhaustive();
|
||||
}).finally(() => {
|
||||
ELEMENTS.BOUTON_CODE_PROMO.removeAttribute(ATTRIBUT_CHARGEMENT);
|
||||
ELEMENTS.BOUTON_CODE_PROMO.removeAttribute(ATTRIBUT_DESACTIVE);
|
||||
E.BOUTON_CODE_PROMO.removeAttribute(ATTRIBUT_CHARGEMENT);
|
||||
E.BOUTON_CODE_PROMO.removeAttribute(ATTRIBUT_DESACTIVE);
|
||||
}).run()
|
||||
).with(
|
||||
{
|
||||
|
|
@ -117,28 +114,9 @@ const initialiseElementsCodePromo = () => {
|
|||
valeurCodePromo: N.string
|
||||
},
|
||||
({ valeurCodePromo }) => void EitherAsync.liftEither(eitherParse({ code: valeurCodePromo }, WCStoreCartRemoveCouponArgsSchema)).ifRight(() => {
|
||||
ELEMENTS.BOUTON_CODE_PROMO.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
ELEMENTS.BOUTON_CODE_PROMO.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
const animation = {
|
||||
callback: () => {
|
||||
if (!ELEMENTS.BOUTON_CODE_PROMO.hasAttribute(ATTRIBUT_CHARGEMENT)) {
|
||||
clearInterval(animation.interval);
|
||||
return;
|
||||
}
|
||||
ELEMENTS.BOUTON_CODE_PROMO.textContent = animation.etapes.at(animation.index) ?? "Loading...";
|
||||
animation.index = animation.index + 1 > animation.etapes.length - 1 ? 0 : animation.index + 1;
|
||||
},
|
||||
etapes: [
|
||||
"Loading",
|
||||
"Loading.",
|
||||
"Loading..",
|
||||
"Loading..."
|
||||
],
|
||||
index: 0,
|
||||
interval: 0
|
||||
};
|
||||
animation.callback();
|
||||
animation.interval = setInterval(animation.callback, 500);
|
||||
E.BOUTON_CODE_PROMO.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
E.BOUTON_CODE_PROMO.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
lanceAnimationCycleLoading(E.BOUTON_CODE_PROMO, 500);
|
||||
}).map(
|
||||
(args) => postBackend({
|
||||
corps: JSON.stringify(args),
|
||||
|
|
@ -151,20 +129,23 @@ const initialiseElementsCodePromo = () => {
|
|||
return await reponse.json();
|
||||
})
|
||||
).chain((corpsReponse) => EitherAsync.liftEither(eitherParse(corpsReponse, WCStoreCartSchema))).ifRight((panier) => {
|
||||
const totalPanier = pipe(Number(panier.totals.total_price) / 100, String, (v) => `${v}€`);
|
||||
ELEMENTS.ENSEMBLE_CODE_PROMO.toggleAttribute(ATTRIBUT_CODE_PROMO_PRESENT);
|
||||
ELEMENTS.ENSEMBLE_CODE_PROMO.reset();
|
||||
ELEMENTS.CHAMP_CODE_PROMO.toggleAttribute(ATTRIBUT_DESACTIVE);
|
||||
ELEMENTS.CHAMP_CODE_PROMO.textContent = "";
|
||||
ELEMENTS.BOUTON_CODE_PROMO.textContent = "Apply";
|
||||
ELEMENTS.TOTAL_PANIER.textContent = totalPanier;
|
||||
ELEMENTS.TOTAL_REDUCTION_LIGNE.toggleAttribute(ATTRIBUT_HIDDEN);
|
||||
ELEMENTS.TOTAL_REDUCTION_VALEUR.textContent = "-0€";
|
||||
E.ENSEMBLE_CODE_PROMO.toggleAttribute(ATTRIBUT_CODE_PROMO_PRESENT);
|
||||
E.ENSEMBLE_CODE_PROMO.reset();
|
||||
E.CHAMP_CODE_PROMO.toggleAttribute(ATTRIBUT_DESACTIVE);
|
||||
E.CHAMP_CODE_PROMO.textContent = "";
|
||||
E.BOUTON_CODE_PROMO.textContent = "Apply";
|
||||
E.TOTAL_PANIER.textContent = pipe(
|
||||
diviseParCent(panier.totals.total_price),
|
||||
arrondisADeuxDecimales,
|
||||
formateEnEuros
|
||||
);
|
||||
E.TOTAL_REDUCTION_LIGNE.toggleAttribute(ATTRIBUT_HIDDEN);
|
||||
E.TOTAL_REDUCTION_VALEUR.textContent = "-0€";
|
||||
}).ifLeft(
|
||||
(erreur) => z(erreur).with(N.instanceOf(ValiError), (e) => console.error("retour ajout code promo", e.issues)).with(N.instanceOf(ServerError), (e) => console.error("retour ajout code promo", e)).with(N.instanceOf(TypeError), (e) => console.error("retour ajout code promo", e)).exhaustive()
|
||||
).finally(() => {
|
||||
ELEMENTS.BOUTON_CODE_PROMO.removeAttribute(ATTRIBUT_CHARGEMENT);
|
||||
ELEMENTS.BOUTON_CODE_PROMO.removeAttribute(ATTRIBUT_DESACTIVE);
|
||||
E.BOUTON_CODE_PROMO.removeAttribute(ATTRIBUT_CHARGEMENT);
|
||||
E.BOUTON_CODE_PROMO.removeAttribute(ATTRIBUT_DESACTIVE);
|
||||
}).run()
|
||||
).with(N._, identity));
|
||||
};
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,12 +1,12 @@
|
|||
import { p as parse } from "./index.BAmxwLeJ.js";
|
||||
import { a as ROUTE_API_RETIRE_ARTICLE_PANIER, b as ROUTE_API_MAJ_ARTICLE_PANIER } from "./api.js";
|
||||
import { n as SELECTEUR_ENTREES_PANIER, o as SELECTEUR_CONTENEUR_PANIER, p as SELECTEUR_SOUS_TOTAL_PRODUITS, q as SELECTEUR_TOTAL_REDUCTION_VALEUR, r as SELECTEUR_TOTAL_PANIER, s as SELECTEUR_BOUTON_SEPARATION_ADRESSES, t as SELECTEUR_FORMULAIRE_FACTURATION, u as ATTRIBUT_CLE_PANIER, v as SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE, w as SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER, x as SELECTEUR_BOUTON_ADDITION_QUANTITE, y as SELECTEUR_BOUTON_SUPPRESSION_PANIER, A as ATTRIBUT_CONTIENT_ARTICLES, z as SELECTEUR_PRIX_LIGNE_PANIER, m as ATTRIBUT_HIDDEN, k as ATTRIBUT_DESACTIVE } from "./dom.js";
|
||||
import { t as SELECTEUR_ENTREES_PANIER, u as SELECTEUR_CONTENEUR_PANIER, v as SELECTEUR_SOUS_TOTAL_PRODUITS, w as SELECTEUR_TOTAL_REDUCTION_VALEUR, x as SELECTEUR_TOTAL_PANIER, y as SELECTEUR_BOUTON_SEPARATION_ADRESSES, z as SELECTEUR_FORMULAIRE_FACTURATION, B as ATTRIBUT_CLE_PANIER, D as SELECTEUR_BOUTON_SOUSTRACTION_QUANTITE, E as SELECTEUR_CHAMP_QUANTITE_LIGNE_PANIER, F as SELECTEUR_BOUTON_ADDITION_QUANTITE, G as SELECTEUR_BOUTON_SUPPRESSION_PANIER, A as ATTRIBUT_CONTIENT_ARTICLES, H as SELECTEUR_PRIX_LIGNE_PANIER, s as ATTRIBUT_HIDDEN, q as ATTRIBUT_DESACTIVE } from "./dom.js";
|
||||
import { N as NOM_CANAL_BOUTON_PANIER, a as NOM_CANAL_CONTENU_PANIER } from "./messages3.js";
|
||||
import { a as recupereElementsAvecSelecteur, b as recupereElementAvecSelecteur, r as recupereElementOuLeve } from "./dom2.js";
|
||||
import { l as leveServerError, r as reporteErreur } from "./erreurs2.js";
|
||||
import { e as estReponse500, a as estError } from "./gardes.js";
|
||||
import { e as emetMessageMajBoutonPanier, a as emetMessageMajContenuPanier, v as valideMessageMajBoutonPanier, b as valideMessageMajContenuPanier } from "./messages.js";
|
||||
import { d as diviseParCent, f as formateEnEuros, i as inverseNombre, a as arrondisAZeroOuDeuxDecimales } from "./nombres.js";
|
||||
import { d as diviseParCent, f as formateEnEuros, i as inverseNombre, a as arrondisADeuxDecimales } from "./nombres.js";
|
||||
import { p as postBackend, t as traiteReponseBackendWCSelonCodesHTTP } from "./reseau.js";
|
||||
import { W as WCStoreCartRemoveItemArgsSchema } from "./cart-remove-item.js";
|
||||
import { W as WCStoreCartUpdateItemArgsSchema } from "./cart-update-item.js";
|
||||
|
|
@ -15,7 +15,7 @@ import { c as recupereElementsDocumentEither, a as recupereElementDansDocumentOu
|
|||
import { i as initialiseBoutonSoumissionAdresses } from "./scripts-page-panier-adresses.js";
|
||||
import { i as initialiseElementsCodePromo } from "./scripts-page-panier-code-promo.js";
|
||||
import { p as pipe } from "./pipe.XPB0wEfw.js";
|
||||
import { l } from "./index-0eef19ec.DoJSf22Z.js";
|
||||
import { l } from "./index-0eef19ec.DKzz249a.js";
|
||||
import { M as Maybe, E as Either } from "./Either.wHNxn7Os.js";
|
||||
import "./exports.B84S-6H1.js";
|
||||
import "./erreurs3.js";
|
||||
|
|
@ -29,14 +29,14 @@ import "./couts-livraison.js";
|
|||
import "./messages-utilisateur.js";
|
||||
import "./animations.js";
|
||||
import "./cart-update-customer.js";
|
||||
import "./orders.js";
|
||||
import "./orders2.js";
|
||||
import "./orders3.js";
|
||||
import "./MaybeAsync.AE1jnxuc.js";
|
||||
import "./erreurs.js";
|
||||
import "./codes-promo.js";
|
||||
import "./cart-apply-coupon.js";
|
||||
import "./cart-remove-coupon.js";
|
||||
import "./belt_Option-91f3b350.cBye8bLJ.js";
|
||||
import "./belt_Option-91f3b350.1ugmHD3b.js";
|
||||
const ETATS_PAGE = _etats;
|
||||
const ENTREES_PANIER_EITHER = recupereElementsDocumentEither(
|
||||
SELECTEUR_ENTREES_PANIER
|
||||
|
|
@ -239,10 +239,10 @@ const initialiseMajContenuPanier = () => {
|
|||
SOUS_TOTAL_PRODUITS.textContent = formateEnEuros(donnees.sousTotalProduits);
|
||||
SOUS_TOTAL_REDUCTION.textContent = pipe(
|
||||
inverseNombre(donnees.sousTotalReduction),
|
||||
arrondisAZeroOuDeuxDecimales,
|
||||
arrondisADeuxDecimales,
|
||||
formateEnEuros
|
||||
);
|
||||
TOTAL_PANIER.textContent = pipe(arrondisAZeroOuDeuxDecimales(donnees.totalPanier), formateEnEuros);
|
||||
TOTAL_PANIER.textContent = pipe(arrondisADeuxDecimales(donnees.totalPanier), formateEnEuros);
|
||||
});
|
||||
});
|
||||
}).ifLeft((erreur) => {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
|||
import { z } from "./index.CeK6pfoJ.js";
|
||||
import { g as ROUTE_API_AJOUTE_ARTICLE_PANIER, E as ENTETE_WC_NONCE } from "./api.js";
|
||||
import { N as SELECTEUR_BOUTON_AJOUT_PANIER, O as SELECTEUR_SELECTEUR_QUANTITE, P as SELECTEUR_LIENS_ONGLETS, Q as SELECTEUR_SECTIONS_CONTENUS, R as SELECTEUR_PRIX_PRODUIT, T as SELECTEUR_CONTENEUR_FLECHES_DEFILEMENT, U as SELECTEUR_FLECHE_DEFILEMENT_GAUCHE, V as SELECTEUR_FLECHE_DEFILEMENT_DROITE, W as SELECTEUR_PHOTOS_PRODUIT, X as SELECTEUR_IMAGE_COLONNE_GAUCHE, Y as SELECTEUR_IMAGES_COLONNE_DROITE, Z as ATTRIBUT_INDEX_IMAGE_ACTIVE, _ as ATTRIBUT_ARIA_SELECTED, m as ATTRIBUT_HIDDEN, k as ATTRIBUT_DESACTIVE, $ as ATTRIBUT_PRIX } from "./dom.js";
|
||||
import { V as SELECTEUR_BOUTON_AJOUT_PANIER, W as SELECTEUR_SELECTEUR_QUANTITE, X as SELECTEUR_LIENS_ONGLETS, Y as SELECTEUR_SECTIONS_CONTENUS, Z as SELECTEUR_PRIX_PRODUIT, _ as SELECTEUR_CONTENEUR_FLECHES_DEFILEMENT, $ as SELECTEUR_FLECHE_DEFILEMENT_GAUCHE, a0 as SELECTEUR_FLECHE_DEFILEMENT_DROITE, a1 as SELECTEUR_PHOTOS_PRODUIT, a2 as SELECTEUR_IMAGE_COLONNE_GAUCHE, a3 as SELECTEUR_IMAGES_COLONNE_DROITE, a4 as ATTRIBUT_INDEX_IMAGE_ACTIVE, a5 as ATTRIBUT_ARIA_SELECTED, s as ATTRIBUT_HIDDEN, q as ATTRIBUT_DESACTIVE, a6 as ATTRIBUT_PRIX } from "./dom.js";
|
||||
import { r as recupereElementOuLeve, f as recupereElementsOuLeve, R as Ra } from "./dom2.js";
|
||||
import { l as leveServerError, r as reporteErreur } from "./erreurs2.js";
|
||||
import { b as estHTMLSelectElement, e as estReponse500, a as estError } from "./gardes.js";
|
||||
|
|
@ -11,7 +11,7 @@ import { W as WCStoreCartSchema } from "./cart.js";
|
|||
import { r as recupereElementDocumentEither, a as recupereElementDansDocumentOuLeve, c as recupereElementsDocumentEither, b as recupereElementsDansDocumentOuLeve, y } from "./utils.js";
|
||||
import { e as eitherParse } from "./validation.js";
|
||||
import { p as pipe } from "./pipe.XPB0wEfw.js";
|
||||
import { l } from "./index-0eef19ec.DoJSf22Z.js";
|
||||
import { l } from "./index-0eef19ec.DKzz249a.js";
|
||||
import { M as Maybe } from "./Either.wHNxn7Os.js";
|
||||
import "./exports.B84S-6H1.js";
|
||||
import "./index.BAmxwLeJ.js";
|
||||
|
|
@ -22,7 +22,7 @@ import "./cart2.js";
|
|||
import "./adresses.js";
|
||||
import "./cart-coupons.js";
|
||||
import "./couts-livraison.js";
|
||||
import "./belt_Option-91f3b350.cBye8bLJ.js";
|
||||
import "./belt_Option-91f3b350.1ugmHD3b.js";
|
||||
const ETATS_PAGE = _etats;
|
||||
const deplieToutesSections = (ensembleLiensContenus) => {
|
||||
ensembleLiensContenus.forEach((ensemble) => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { l as values, m as fromArray, g as equal, n as get$1, u as unsafeDeleteKey, o as forEachU, p as mapU, q as reduceU, t as append, a as recupereElementsAvecSelecteur, b as recupereElementAvecSelecteur, r as recupereElementOuLeve, f as recupereElementsOuLeve } from "./dom2.js";
|
||||
import { o as values, p as fromArray, j as equal, q as get$1, u as unsafeDeleteKey, t as forEachU, w as mapU, g as reduceU, x as append, a as recupereElementsAvecSelecteur, b as recupereElementAvecSelecteur, r as recupereElementOuLeve, f as recupereElementsOuLeve } from "./dom2.js";
|
||||
import { C as CleNonTrouveError } from "./erreurs2.js";
|
||||
import { p as pipe } from "./pipe.XPB0wEfw.js";
|
||||
import { M as Maybe } from "./Either.wHNxn7Os.js";
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ $modeles = ["contact.twig"];
|
|||
function charge_scripts_styles_page_contact(): void {
|
||||
wp_enqueue_style(
|
||||
handle: "haiku-atelier-2024-styles-page-contact",
|
||||
src: get_template_directory_uri() . "/assets/css/pages/page-contact.css",
|
||||
src: get_template_directory_uri() . "/assets/css/pages/page-modele-simple.css",
|
||||
deps: [],
|
||||
ver: filemtime(get_template_directory() . "/assets/css/pages/page-contact.css"),
|
||||
ver: filemtime(get_template_directory() . "/assets/css/pages/page-modele-simple.css"),
|
||||
media: "all",
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,3 +4,24 @@
|
|||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Timber\Timber;
|
||||
|
||||
// Contexte et modèles
|
||||
$contexte = Timber::context();
|
||||
$modeles = ["echec-commande.twig"];
|
||||
|
||||
// Charge les scripts et styles de la page
|
||||
function charge_scripts_styles_page_echec_commande(): void {
|
||||
wp_enqueue_style(
|
||||
handle: "haiku-atelier-2024-styles-page-a-propos",
|
||||
src: get_template_directory_uri() . "/assets/css/pages/page-modele-simple.css",
|
||||
deps: [],
|
||||
ver: filemtime(get_template_directory() . "/assets/css/pages/page-modele-simple.css"),
|
||||
media: "all",
|
||||
);
|
||||
}
|
||||
add_action("wp_enqueue_scripts", "charge_scripts_styles_page_echec_commande");
|
||||
|
||||
// Rendu
|
||||
Timber::render(filenames: $modeles, data: $contexte);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ use Roots\WPConfig\Config;
|
|||
use Stripe\Checkout\Session;
|
||||
use Stripe\StripeClient;
|
||||
use Timber\Timber;
|
||||
use Illuminate\Support\Arr;
|
||||
use function Crell\fp\pipe;
|
||||
|
||||
require_once __DIR__ . "/src/inc/TraitementInformations.php";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
* Le modèle de la Page « Terms & Conditions ».
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Timber\Timber;
|
||||
|
||||
// Contexte et modèles
|
||||
$contexte = Timber::context();
|
||||
$modeles = ["cgv.twig"];
|
||||
|
||||
// Charge les scripts et styles de la page
|
||||
function charge_scripts_styles_page_cgv(): void {
|
||||
wp_enqueue_style(
|
||||
handle: "haiku-atelier-2024-styles-page-cgv",
|
||||
src: get_template_directory_uri() . "/assets/css/pages/page-modele-simple.css",
|
||||
deps: [],
|
||||
ver: filemtime(get_template_directory() . "/assets/css/pages/page-modele-simple.css"),
|
||||
media: "all",
|
||||
);
|
||||
}
|
||||
add_action("wp_enqueue_scripts", "charge_scripts_styles_page_cgv");
|
||||
|
||||
// Rendu
|
||||
Timber::render(filenames: $modeles, data: $contexte);
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
/* Dimensions */
|
||||
--en-tete-hauteur: 61px;
|
||||
--menu-categories-produits-hauteur: 54.39px;
|
||||
--pied-de-page-hauteur: calc(var(--espace-m) * 2 + 3lh);
|
||||
--pied-de-page-hauteur: 90.55px;
|
||||
--contenu-page-hauteur-minimale-sans-categories: calc(
|
||||
100svh - var(--en-tete-hauteur) - var(--pied-de-page-hauteur)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,12 @@
|
|||
background: transparent;
|
||||
}
|
||||
|
||||
img {
|
||||
image-rendering: crisp-edges;
|
||||
shape-rendering: geometricPrecision;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
button {
|
||||
display: block;
|
||||
align-content: center;
|
||||
|
|
@ -82,14 +88,14 @@
|
|||
}
|
||||
|
||||
&--courante {
|
||||
background: url("/app/themes/haiku-atelier-2024/assets/img/icons/cloud.svg") center/auto 90%
|
||||
no-repeat;
|
||||
background: url("/app/themes/haiku-atelier-2024/assets/img/icons/cloud-penche.svg")
|
||||
center/auto 90% no-repeat;
|
||||
}
|
||||
|
||||
@media (hover: hover) {
|
||||
&:hover {
|
||||
background: url("/app/themes/haiku-atelier-2024/assets/img/icons/cloud.svg") center/auto
|
||||
90% no-repeat;
|
||||
background: url("/app/themes/haiku-atelier-2024/assets/img/icons/cloud-penche.svg")
|
||||
center/auto 90% no-repeat;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ body:has(#menu-mobile:not([aria-hidden="true"])) {
|
|||
}
|
||||
}
|
||||
|
||||
@media (width >= 1000px) {
|
||||
@media (width > 1000px) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,18 +2,15 @@
|
|||
|
||||
// Le pied de page du site
|
||||
#pied-de-page {
|
||||
/* Marges */
|
||||
--pied-de-page-marges-internes-bloc: var(--espace-m);
|
||||
--pied-de-page-marges-internes-ligne: var(--espace-xl);
|
||||
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
place-items: center;
|
||||
max-width: 100vw;
|
||||
height: var(--pied-de-page-hauteur);
|
||||
padding: var(--pied-de-page-marges-internes-bloc) var(--pied-de-page-marges-internes-ligne);
|
||||
padding: var(--espace-m);
|
||||
background: var(--couleur-jaune);
|
||||
border-top: 1px solid var(--couleur-noir);
|
||||
font-size: 0.8rem;
|
||||
|
||||
// Liens vers les pages du site
|
||||
.zone-menu-navigation-secondaire {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@
|
|||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
row-gap: var(--espace-xl);
|
||||
padding: var(--espace-m);
|
||||
|
||||
a {
|
||||
position: relative;
|
||||
|
|
@ -95,6 +94,7 @@
|
|||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
margin-bottom: var(--espace-xl);
|
||||
padding: 0 var(--espace-m);
|
||||
|
||||
h3 {
|
||||
font-style: italic;
|
||||
|
|
|
|||
|
|
@ -58,9 +58,9 @@
|
|||
img {
|
||||
pointer-events: none;
|
||||
display: block;
|
||||
width: 1.5rem;
|
||||
filter: drop-shadow(1px 1px 3px var(--couleur-gris-fonce));
|
||||
transition: 0.2s filter;
|
||||
width: 1.75rem;
|
||||
/* filter: drop-shadow(1px 1px 3px var(--couleur-gris-fonce)); */
|
||||
/* transition: 0.2s filter; */
|
||||
}
|
||||
|
||||
&[data-id-ensemble-epingle-boite="1"] {
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
|
||||
&[data-ensemble-epingle-boite-actif] {
|
||||
img {
|
||||
filter: drop-shadow(1px 1px 5px var(--couleur-gris-fonce));
|
||||
/* filter: drop-shadow(1px 1px 5px var(--couleur-gris-fonce)); */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Styles pour la Page Contact
|
||||
// Styles pour le modèle de Page simple (Contact, 404, CGV...)
|
||||
|
||||
#page-contact {
|
||||
.page-modele-simple {
|
||||
// Dimensions
|
||||
--page-hauteur-minimale: calc(
|
||||
100svh - var(--en-tete-hauteur) - var(--pied-de-page-hauteur) - var(--espace-xl) - 1px
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
width: min(50rem, 100%);
|
||||
min-height: var(--page-hauteur-minimale);
|
||||
margin: auto;
|
||||
font-weight: 500;
|
||||
font-weight: 400;
|
||||
font-style: italic;
|
||||
border: 1px solid var(--couleur-noir);
|
||||
border-bottom: initial;
|
||||
|
|
@ -63,4 +63,61 @@
|
|||
border-left: initial;
|
||||
}
|
||||
}
|
||||
|
||||
&#page-cgv {
|
||||
.contenu {
|
||||
font-style: normal;
|
||||
|
||||
header {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
&__textuel {
|
||||
padding: 0;
|
||||
max-width: initial;
|
||||
|
||||
&__section {
|
||||
width: 100%;
|
||||
|
||||
&:first-of-type {
|
||||
header {
|
||||
border-top: initial;
|
||||
}
|
||||
}
|
||||
|
||||
header {
|
||||
width: 100%;
|
||||
padding: var(--espace-m) var(--espace-xl);
|
||||
border-top: 1px solid var(--couleur-noir);
|
||||
border-bottom: 1px solid var(--couleur-noir);
|
||||
margin-bottom: var(--espace-l);
|
||||
|
||||
h3 {
|
||||
width: fit-content;
|
||||
margin: auto;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: var(--espacement-inter-lettres-etendu-l);
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
margin-bottom: 1lh;
|
||||
list-style: square;
|
||||
list-style-position: inside;
|
||||
padding: 0 var(--espace-xl);
|
||||
|
||||
li {}
|
||||
}
|
||||
|
||||
p {
|
||||
padding: 0 var(--espace-xl);
|
||||
|
||||
&:last-of-type {
|
||||
margin-bottom: var(--espace-xl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
/** Fonctions pour la création de simples animations JavaScript. */
|
||||
|
||||
import { ATTRIBUT_CHARGEMENT } from "../constantes/dom";
|
||||
|
||||
// Types
|
||||
interface AnimationCycleTexte {
|
||||
callback: () => void;
|
||||
|
|
@ -42,3 +44,18 @@ export const lanceAnimationCycleTexte = (args: ParametresAnimationCycleTexte): A
|
|||
|
||||
return animation;
|
||||
};
|
||||
|
||||
export const lanceAnimationCycleLoading = (element: HTMLElement, delai: number): void => {
|
||||
const animation = lanceAnimationCycleTexte({
|
||||
attribut: ATTRIBUT_CHARGEMENT,
|
||||
element: element,
|
||||
etapes: [
|
||||
"Loading",
|
||||
"Loading.",
|
||||
"Loading..",
|
||||
"Loading...",
|
||||
],
|
||||
});
|
||||
animation.callback();
|
||||
animation.interval = setInterval(animation.callback, delai);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,14 +3,16 @@ import { N, pipe } from "@mobily/ts-belt";
|
|||
export const estEntreDeuxNombres = (nombre: number, min: number, max: number): boolean =>
|
||||
N.gte(nombre, min) && N.lt(nombre, max);
|
||||
|
||||
export const diviseParCent = (n: number | string): number => Number(n) / 100;
|
||||
export const diviseParCent = (nombre: number | string): number => Number(nombre) / 100;
|
||||
|
||||
export const arrondisAZeroOuDeuxDecimales = (n: number | string): string =>
|
||||
(Number(n) / Math.round(Number(n))) === 1 ? Number(n).toFixed(0) : Number(n).toFixed(2);
|
||||
export const arrondisADeuxDecimales = (nombre: number | string) => pipe(Number(nombre), n => n.toFixed(2));
|
||||
|
||||
export const inverseNombre = (n: number | string): number => Number(n) * -1;
|
||||
export const arrondisAZeroOuDeuxDecimales = (nombre: number | string): string =>
|
||||
pipe(Number(nombre), n => (n / Math.round(n)) === 1 ? n.toFixed(0) : n.toFixed(2));
|
||||
|
||||
export const formateEnEuros = (n: number | string): string => `${String(n)}€`;
|
||||
export const inverseNombre = (nombre: number | string): number => Number(nombre) * -1;
|
||||
|
||||
export const formateEnEuros = (nombre: number | string): string => `${String(nombre)}€`;
|
||||
|
||||
export const diviseParCentEtArrondis = (nombre: number | string): string =>
|
||||
pipe(Number(nombre), diviseParCent, arrondisAZeroOuDeuxDecimales);
|
||||
pipe(Number(nombre), diviseParCent, arrondisADeuxDecimales);
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ import {
|
|||
type UnknownError,
|
||||
} from "./erreurs.ts";
|
||||
import { estWCError } from "./schemas/api/erreurs.ts";
|
||||
import type { ReponseSimplifiee } from "./types/reseau";
|
||||
|
||||
// Types
|
||||
|
||||
type ArgumentsDeleteBackendWC = {
|
||||
authString?: string;
|
||||
|
|
@ -45,6 +48,8 @@ type ArgumentsPostBackendWC = {
|
|||
route: string;
|
||||
};
|
||||
|
||||
// fetch
|
||||
|
||||
export const getBackend = (args: ArgumentsGetBackendWC) =>
|
||||
fetch(
|
||||
args.route,
|
||||
|
|
@ -159,3 +164,11 @@ export const eitherTraiteReponseBackend = <R, S extends GenericSchema<R>>(
|
|||
// Réponses inconnues
|
||||
.otherwise(e => pipe(e, ErreurInconnue, leveErreur<UnknownError>))
|
||||
);
|
||||
|
||||
// Réponses Simplifiées
|
||||
export const creeReponseSimplifiee = async (reponse: Response): Promise<ReponseSimplifiee> => {
|
||||
return {
|
||||
body: await reponse.json(),
|
||||
status: reponse.status,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,25 +2,53 @@
|
|||
* Scripts pour l'usage du menu mobile.
|
||||
*/
|
||||
|
||||
import { A, O, pipe } from "@mobily/ts-belt";
|
||||
import A11yDialog from "a11y-dialog";
|
||||
|
||||
import { ATTRIBUT_MENU_MOBILE_ACTIVE, SELECTEUR_BOUTON_MENU_MOBILE, SELECTEUR_MENU_MOBILE } from "./constantes/dom.ts";
|
||||
import { recupereElementDansDocumentOuLeve } from "./lib/utils.ts";
|
||||
|
||||
// Éléments d'intérêt
|
||||
const BOUTON_MENU_MOBILE: HTMLButtonElement = recupereElementDansDocumentOuLeve(SELECTEUR_BOUTON_MENU_MOBILE);
|
||||
const MENU_MOBILE: HTMLDivElement = recupereElementDansDocumentOuLeve(SELECTEUR_MENU_MOBILE);
|
||||
const E = {
|
||||
BOUTON_MENU_MOBILE: recupereElementDansDocumentOuLeve<HTMLButtonElement>(SELECTEUR_BOUTON_MENU_MOBILE),
|
||||
CORPS_HTML: recupereElementDansDocumentOuLeve<HTMLBodyElement>("body"),
|
||||
MENU_MOBILE: recupereElementDansDocumentOuLeve<HTMLDivElement>(SELECTEUR_MENU_MOBILE),
|
||||
};
|
||||
|
||||
const initialiseBoutonMenuMobile = (): void => {
|
||||
const menuMobile = new A11yDialog(MENU_MOBILE);
|
||||
const menuMobile = new A11yDialog(E.MENU_MOBILE);
|
||||
|
||||
BOUTON_MENU_MOBILE.addEventListener("click", (): void => {
|
||||
BOUTON_MENU_MOBILE.toggleAttribute(ATTRIBUT_MENU_MOBILE_ACTIVE);
|
||||
new ResizeObserver(entrees =>
|
||||
// Cache le Menu mobile pour les grandes tailles d'écrans
|
||||
pipe(
|
||||
A.head(entrees),
|
||||
O.filter((entree: ResizeObserverEntry) => entree.borderBoxSize[0]!.inlineSize > 1000),
|
||||
O.tap(_ => menuMobile.hide()),
|
||||
)
|
||||
).observe(E.CORPS_HTML);
|
||||
|
||||
E.BOUTON_MENU_MOBILE.addEventListener("click", (): void => {
|
||||
// Renvoie à la Page d'accueil pour les grandes tailles d'écrans
|
||||
if (window.innerWidth > 1000) {
|
||||
window.location.href = "/";
|
||||
return;
|
||||
}
|
||||
// Cache le Menu mobile s'il est actif
|
||||
if (E.BOUTON_MENU_MOBILE.hasAttribute(ATTRIBUT_MENU_MOBILE_ACTIVE)) {
|
||||
menuMobile.hide();
|
||||
return;
|
||||
}
|
||||
|
||||
// Active le Menu mobile
|
||||
menuMobile.show();
|
||||
});
|
||||
|
||||
// Active/Désactive l'Attribut indiquant l'ouverture du Menu mobile
|
||||
menuMobile.on("show", (): void => {
|
||||
E.BOUTON_MENU_MOBILE.setAttribute(ATTRIBUT_MENU_MOBILE_ACTIVE, "");
|
||||
});
|
||||
menuMobile.on("hide", (): void => {
|
||||
BOUTON_MENU_MOBILE.toggleAttribute(ATTRIBUT_MENU_MOBILE_ACTIVE);
|
||||
E.BOUTON_MENU_MOBILE.removeAttribute(ATTRIBUT_MENU_MOBILE_ACTIVE);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ A.forEachWithIndex(EPINGLES, (index, epingle) => {
|
|||
|
||||
document.addEventListener("DOMContentLoaded", (): void => {
|
||||
CONTENEUR_STORYTELLING.addEventListener("click", (evenement): void => {
|
||||
console.time();
|
||||
// Délégation d'Évènements au clic sur un <button>
|
||||
const cible: HTMLElement = evenement.target as HTMLElement;
|
||||
|
||||
|
|
@ -85,6 +84,5 @@ document.addEventListener("DOMContentLoaded", (): void => {
|
|||
);
|
||||
}),
|
||||
);
|
||||
console.timeEnd();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import { ValiError } from "valibot";
|
|||
|
||||
import type { APIFetchErrors } from "./lib/types/api/erreurs";
|
||||
import type { WCV3Products, WCV3ProductsArgs } from "./lib/types/api/v3/products.ts";
|
||||
import type { ReponseSimplifiee } from "./lib/types/reseau";
|
||||
|
||||
import { ROUTE_API_NOUVELLE_PRODUCTS } from "./constantes/api.ts";
|
||||
import {
|
||||
|
|
@ -22,10 +21,10 @@ import {
|
|||
SELECTEUR_BOUTON_PLUS_PRODUITS,
|
||||
SELECTEUR_GRILLE_PRODUITS,
|
||||
} from "./constantes/dom.ts";
|
||||
import { lanceAnimationCycleTexte } from "./lib/animations.ts";
|
||||
import { lanceAnimationCycleLoading } from "./lib/animations.ts";
|
||||
import { html } from "./lib/dom.ts";
|
||||
import { BadRequestError, ServerError } from "./lib/erreurs.ts";
|
||||
import { getBackendAvecParametresUrl } from "./lib/reseau.ts";
|
||||
import { creeReponseSimplifiee, getBackendAvecParametresUrl } from "./lib/reseau.ts";
|
||||
import { WCV3ProductsArgsSchema, WCV3ProductsSchema } from "./lib/schemas/api/v3/products.ts";
|
||||
import { recupereElementDansDocumentOuLeve } from "./lib/utils.ts";
|
||||
import { eitherParse } from "./lib/validation.ts";
|
||||
|
|
@ -68,28 +67,20 @@ const initialisePageBoutique = (): void => {
|
|||
| ValiError<typeof WCV3ProductsSchema>;
|
||||
|
||||
void EitherAsync
|
||||
// 1. Valide les Arguments de la Requête
|
||||
.liftEither(eitherParse(args, WCV3ProductsArgsSchema))
|
||||
// 2. Exécute un Effet pour empêcher les requêtes concurrentes et lancer une animation de chargement
|
||||
.ifRight(() => {
|
||||
// Désactive le Bouton pour empêcher des requêtes concurrentes
|
||||
E.BOUTON_PLUS_DE_PRODUITS.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
E.BOUTON_PLUS_DE_PRODUITS.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
|
||||
// Lance un cycle d'animation sur le texte de chargement
|
||||
const animation = lanceAnimationCycleTexte({
|
||||
attribut: ATTRIBUT_CHARGEMENT,
|
||||
element: E.BOUTON_PLUS_DE_PRODUITS,
|
||||
etapes: [
|
||||
"Loading",
|
||||
"Loading.",
|
||||
"Loading..",
|
||||
"Loading...",
|
||||
],
|
||||
});
|
||||
animation.callback();
|
||||
animation.interval = setInterval(animation.callback, 500);
|
||||
lanceAnimationCycleLoading(E.BOUTON_PLUS_DE_PRODUITS, 500);
|
||||
})
|
||||
// 3. Exécute la requête via fetch sous forme d'EitherAsync
|
||||
.chain((args: WCV3ProductsArgs) =>
|
||||
EitherAsync<Error, Response>(() =>
|
||||
EitherAsync<DOMException | Error, Response>(() =>
|
||||
getBackendAvecParametresUrl({
|
||||
authString: ETATS_PAGE.authString,
|
||||
nonce: ETATS_PAGE.nonce,
|
||||
|
|
@ -98,21 +89,19 @@ const initialisePageBoutique = (): void => {
|
|||
})
|
||||
)
|
||||
)
|
||||
// 4. Traite les cas d'Erreurs et récupère le Corps de la Réponse
|
||||
.chain((reponse: Response) =>
|
||||
EitherAsync<APIFetchErrors, unknown>(async ({ throwE }) => {
|
||||
const reponseSimplifiee: ReponseSimplifiee = {
|
||||
body: await reponse.json(),
|
||||
status: reponse.status,
|
||||
};
|
||||
|
||||
return match(reponseSimplifiee)
|
||||
return match(await creeReponseSimplifiee(reponse))
|
||||
.with({ status: 500 }, () => throwE(new ServerError("500 Server Error")))
|
||||
.with({ status: 400 }, () => throwE(new BadRequestError("400 Server Error")))
|
||||
.with({ status: 200 }, () => reponseSimplifiee.body)
|
||||
.with({ status: 200 }, r => r.body)
|
||||
.run();
|
||||
})
|
||||
)
|
||||
// 5. Vérifie le Schéma de la Réponse
|
||||
.chain((corpsReponse: unknown) => EitherAsync.liftEither(eitherParse(corpsReponse, WCV3ProductsSchema)))
|
||||
// 6. Exécute un Effet pour la mise à jour du DOM avec les Résultats
|
||||
.ifRight((donnees: WCV3Products) => {
|
||||
// Cache le bouton s'il y a moins de 12 Produits disponibles (que l'on est à la dernière page)
|
||||
if (donnees.length < 12) {
|
||||
|
|
@ -159,14 +148,15 @@ const initialisePageBoutique = (): void => {
|
|||
|
||||
E.BOUTON_PLUS_DE_PRODUITS.textContent = "Show more";
|
||||
})
|
||||
// 7. Traite les Erreurs et affiche un Message à l'Utilisateur
|
||||
.ifLeft((erreur: APIProductsErrors) => {
|
||||
// Traite les Erreurs et affiche un Message à l'Utilisateur
|
||||
match(erreur)
|
||||
.with(P.instanceOf(ValiError), e => console.error("ValiError", e.issues))
|
||||
.otherwise(e => console.error("Erreur", e));
|
||||
|
||||
E.BOUTON_PLUS_DE_PRODUITS.textContent = "Error, try again?";
|
||||
})
|
||||
// 8. Quel que soit le résultat, réactiver le Bouton et arrêter l'animation
|
||||
.finally(() => {
|
||||
// Désactive l'animation de chargement et rend le Bouton de nouveau cliquable
|
||||
E.BOUTON_PLUS_DE_PRODUITS.removeAttribute(ATTRIBUT_CHARGEMENT);
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import { ValiError } from "valibot";
|
|||
|
||||
import type { WCStoreCart, WCStoreShippingRateShippingRate } from "./lib/types/api/cart";
|
||||
import type { WCStoreCartUpdateCustomerArgs } from "./lib/types/api/cart-update-customer";
|
||||
import type { APIFetchErrors } from "./lib/types/api/erreurs";
|
||||
import type { WCV3Order, WCV3OrdersArgs } from "./lib/types/api/v3/orders";
|
||||
import type { ReponseSimplifiee } from "./lib/types/reseau";
|
||||
|
||||
import { ROUTE_API_MAJ_CLIENT, ROUTE_API_NOUVELLE_COMMANDES } from "./constantes/api";
|
||||
import {
|
||||
|
|
@ -21,11 +21,11 @@ import {
|
|||
SELECTEUR_SOUS_TOTAL_LIVRAISON_PRESTATAIRE,
|
||||
} from "./constantes/dom";
|
||||
import { ERREUR_GENERIQUE_SOUMISSION_ADRESSES } from "./constantes/messages-utilisateur";
|
||||
import { lanceAnimationCycleTexte } from "./lib/animations";
|
||||
import { lanceAnimationCycleLoading } from "./lib/animations";
|
||||
import { eitherJsonParse, eitherSessionStorageGet } from "./lib/dom";
|
||||
import { BadRequestError, leveErreur, leveServerError, ServerError } from "./lib/erreurs";
|
||||
import { estReponse500 } from "./lib/gardes";
|
||||
import { postBackend } from "./lib/reseau";
|
||||
import { creeReponseSimplifiee, postBackend } from "./lib/reseau";
|
||||
import { WCStoreCartSchema } from "./lib/schemas/api/cart";
|
||||
import { WCStoreCartUpdateCustomerArgsSchema } from "./lib/schemas/api/cart-update-customer";
|
||||
import { WCStoreShippingRateShippingRateSchema } from "./lib/schemas/api/couts-livraison";
|
||||
|
|
@ -43,7 +43,7 @@ type EtatsPage = {
|
|||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- États injectés par le modèle PHP
|
||||
const ETATS_PAGE: EtatsPage = _etats;
|
||||
|
||||
const ELEMENTS = {
|
||||
const E = {
|
||||
BOUTON_ACTIONS_FORMULAIRE: recupereElementDansDocumentOuLeve<HTMLButtonElement>(SELECTEUR_BOUTON_ACTIONS_FORMULAIRE),
|
||||
ENTREES_PANIER_EITHER: recupereElementsDocumentEither<HTMLElement>(SELECTEUR_ENTREES_PANIER),
|
||||
FORMULAIRE_PANIER: recupereElementDansDocumentOuLeve<HTMLFormElement>(SELECTEUR_FORMULAIRE_PANIER),
|
||||
|
|
@ -59,36 +59,15 @@ const ELEMENTS = {
|
|||
|
||||
export const initialiseBoutonSoumissionAdresses = (): void => {
|
||||
// Déclenche la requête pour la soumission des adresses
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.addEventListener("click", evenement => {
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.addEventListener("click", evenement => {
|
||||
Maybe
|
||||
// Ne fais rien si le Formulaire n'est pas valide
|
||||
.fromFalsy(ELEMENTS.FORMULAIRE_PANIER.checkValidity())
|
||||
.fromFalsy(E.FORMULAIRE_PANIER.checkValidity())
|
||||
.ifJust(() => {
|
||||
evenement.preventDefault();
|
||||
|
||||
// Désactive le Bouton pour empêcher des requêtes concurrentes
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
|
||||
// Lance un cycle d'animation sur le texte de chargement
|
||||
const animation = lanceAnimationCycleTexte({
|
||||
attribut: ATTRIBUT_CHARGEMENT,
|
||||
element: ELEMENTS.BOUTON_ACTIONS_FORMULAIRE,
|
||||
etapes: [
|
||||
"Loading",
|
||||
"Loading.",
|
||||
"Loading..",
|
||||
"Loading...",
|
||||
],
|
||||
});
|
||||
animation.callback();
|
||||
animation.interval = setInterval(animation.callback, 500);
|
||||
|
||||
// Récupère les données du Formulaire
|
||||
const donneesFormulaire = Object.fromEntries(new FormData(ELEMENTS.FORMULAIRE_PANIER)) as Record<
|
||||
string,
|
||||
string
|
||||
>;
|
||||
const donneesFormulaire = Object.fromEntries(new FormData(E.FORMULAIRE_PANIER)) as Record<string, string>;
|
||||
|
||||
// Transforme les données brutes en arguments de requête auprès du backend
|
||||
const argumentsFormulaire: WCStoreCartUpdateCustomerArgs = {
|
||||
|
|
@ -121,43 +100,49 @@ export const initialiseBoutonSoumissionAdresses = (): void => {
|
|||
|
||||
// Réalise la requête et traite sa réponse
|
||||
void EitherAsync
|
||||
// Vérifie le Schéma des Arguments
|
||||
// 1. Valide les Arguments de la Requête
|
||||
.liftEither(eitherParse(argumentsFormulaire, WCStoreCartUpdateCustomerArgsSchema))
|
||||
.map((args: WCStoreCartUpdateCustomerArgs) =>
|
||||
postBackend({
|
||||
corps: JSON.stringify(args),
|
||||
nonce: ETATS_PAGE.nonce,
|
||||
route: ROUTE_API_MAJ_CLIENT,
|
||||
})
|
||||
)
|
||||
// Traite les cas d'Erreur et récupère la réponse du backend
|
||||
.chain((reponse: Response) =>
|
||||
EitherAsync<ServerError, unknown>(async ({ throwE }) => {
|
||||
const reponseSimplifiee: ReponseSimplifiee = {
|
||||
body: await reponse.json(),
|
||||
status: reponse.status,
|
||||
};
|
||||
// 2. Exécute un Effet pour empêcher les requêtes concurrentes et lancer une animation de chargement
|
||||
.ifRight(() => {
|
||||
// Désactive le Bouton pour empêcher des requêtes concurrentes
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
|
||||
return match(reponseSimplifiee)
|
||||
// Lance un cycle d'animation sur le texte de chargement
|
||||
lanceAnimationCycleLoading(E.BOUTON_ACTIONS_FORMULAIRE, 500);
|
||||
})
|
||||
// 3. Exécute la requête via fetch sous forme d'EitherAsync
|
||||
.chain((args: WCStoreCartUpdateCustomerArgs) =>
|
||||
EitherAsync<DOMException | Error, Response>(() =>
|
||||
postBackend({
|
||||
corps: JSON.stringify(args),
|
||||
nonce: ETATS_PAGE.nonce,
|
||||
route: ROUTE_API_MAJ_CLIENT,
|
||||
})
|
||||
)
|
||||
)
|
||||
// 4. Traite les cas d'Erreurs et récupère le Corps de la Réponse
|
||||
.chain((reponse: Response) =>
|
||||
EitherAsync<APIFetchErrors, unknown>(async ({ throwE }) => {
|
||||
return match(await creeReponseSimplifiee(reponse))
|
||||
.with({ status: 500 }, () => throwE(new ServerError("500 Server Error")))
|
||||
.with({ status: 400 }, () => throwE(new BadRequestError("400 Bad Request Error")))
|
||||
.with({ status: 200 }, () => reponseSimplifiee.body)
|
||||
.with({ status: 400 }, () => throwE(new BadRequestError("400 Server Error")))
|
||||
.with({ status: 200 }, r => r.body)
|
||||
.run();
|
||||
})
|
||||
)
|
||||
// Vérifie le Schéma de la réponse du backend
|
||||
.chain((corsReponse: unknown) => EitherAsync.liftEither(eitherParse(corsReponse, WCStoreCartSchema)))
|
||||
// 5. Vérifie le Schéma de la Réponse
|
||||
.chain((corpsReponse: unknown) => EitherAsync.liftEither(eitherParse(corpsReponse, WCStoreCartSchema)))
|
||||
// 6. Exécute un Effet pour la mise à jour du DOM avec les Résultats
|
||||
.ifRight((panier: WCStoreCart) => {
|
||||
console.debug(panier.shipping_rates);
|
||||
|
||||
const sousTotalLivraison = panier.totals.total_shipping === "0"
|
||||
? "Free"
|
||||
: `${String(Number(panier.totals.total_shipping) / 100)}€`;
|
||||
const prestataireLivraison = panier.shipping_rates[0]?.shipping_rates[0]?.name ?? "";
|
||||
|
||||
// Met à jour les informations de Livraison affichés à l'Utilisateur
|
||||
ELEMENTS.TOTAL_LIVRAISON_COUT.textContent = sousTotalLivraison;
|
||||
ELEMENTS.TOTAL_LIVRAISON_PRESTATAIRE.textContent = prestataireLivraison;
|
||||
E.TOTAL_LIVRAISON_COUT.textContent = sousTotalLivraison;
|
||||
E.TOTAL_LIVRAISON_PRESTATAIRE.textContent = prestataireLivraison;
|
||||
|
||||
// Sauvegarde la Méthode de Livraison dans le Stockage de Session
|
||||
sessionStorage.setItem(
|
||||
|
|
@ -165,8 +150,6 @@ export const initialiseBoutonSoumissionAdresses = (): void => {
|
|||
JSON.stringify(panier.shipping_rates[0]?.shipping_rates[0] ?? ""),
|
||||
);
|
||||
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.textContent = "Check-out";
|
||||
|
||||
// Active le Bouton pour la création de la Commande
|
||||
initialiseBoutonCreationCommande();
|
||||
})
|
||||
|
|
@ -179,18 +162,18 @@ export const initialiseBoutonSoumissionAdresses = (): void => {
|
|||
match(erreur)
|
||||
.with(P.instanceOf(ValiError), e => {
|
||||
console.error(e.issues);
|
||||
ELEMENTS.MESSAGE_FORMULAIRE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||
E.MESSAGE_FORMULAIRE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||
})
|
||||
.with(P.instanceOf(ServerError), e => {
|
||||
console.error(e);
|
||||
ELEMENTS.MESSAGE_FORMULAIRE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||
E.MESSAGE_FORMULAIRE_ADRESSES.textContent = ERREUR_GENERIQUE_SOUMISSION_ADRESSES;
|
||||
})
|
||||
.exhaustive()
|
||||
)
|
||||
.finally(() => {
|
||||
// Désactive l'animation de chargement et rend le Bouton de nouveau cliquable
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.removeAttribute(ATTRIBUT_CHARGEMENT);
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.removeAttribute(ATTRIBUT_DESACTIVE);
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.removeAttribute(ATTRIBUT_CHARGEMENT);
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.removeAttribute(ATTRIBUT_DESACTIVE);
|
||||
})
|
||||
.run();
|
||||
});
|
||||
|
|
@ -199,41 +182,31 @@ export const initialiseBoutonSoumissionAdresses = (): void => {
|
|||
|
||||
export const initialiseBoutonCreationCommande = (): void => {
|
||||
// Permet de supprimer tout Écouteur d'Évènement assigné au Bouton
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.outerHTML = ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.outerHTML;
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.outerHTML = E.BOUTON_ACTIONS_FORMULAIRE.outerHTML;
|
||||
// Réassigne le Bouton
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE = recupereElementDansDocumentOuLeve<HTMLButtonElement>(
|
||||
E.BOUTON_ACTIONS_FORMULAIRE = recupereElementDansDocumentOuLeve<HTMLButtonElement>(
|
||||
SELECTEUR_BOUTON_ACTIONS_FORMULAIRE,
|
||||
);
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.textContent = "Check-out";
|
||||
|
||||
// Créé la Commande au clic sur le Bouton
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.addEventListener("click", (evenement: Event) => {
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.addEventListener("click", (evenement: Event) => {
|
||||
Maybe
|
||||
// Ne fais rien si le Formulaire n'est pas valide
|
||||
.fromFalsy(ELEMENTS.FORMULAIRE_PANIER.checkValidity())
|
||||
.fromFalsy(E.FORMULAIRE_PANIER.checkValidity())
|
||||
// Active l'état de chargement
|
||||
.ifJust(() => {
|
||||
evenement.preventDefault();
|
||||
//
|
||||
// Désactive le Bouton pour empêcher des requêtes concurrentes
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
|
||||
// Lance un cycle d'animation sur le texte de chargement
|
||||
const animation = lanceAnimationCycleTexte({
|
||||
attribut: ATTRIBUT_CHARGEMENT,
|
||||
element: ELEMENTS.BOUTON_ACTIONS_FORMULAIRE,
|
||||
etapes: [
|
||||
"Loading",
|
||||
"Loading.",
|
||||
"Loading..",
|
||||
"Loading...",
|
||||
],
|
||||
});
|
||||
animation.callback();
|
||||
animation.interval = setInterval(animation.callback, 500);
|
||||
lanceAnimationCycleLoading(E.BOUTON_ACTIONS_FORMULAIRE, 500);
|
||||
|
||||
// Récupère les données du Formulaire sous forme d'Objet
|
||||
const donneesFormulaire = Object.fromEntries(new FormData(ELEMENTS.FORMULAIRE_PANIER)) as Record<
|
||||
const donneesFormulaire = Object.fromEntries(new FormData(E.FORMULAIRE_PANIER)) as Record<
|
||||
string,
|
||||
string
|
||||
>;
|
||||
|
|
@ -251,12 +224,12 @@ export const initialiseBoutonCreationCommande = (): void => {
|
|||
.ifLeft(e => {
|
||||
if (e instanceof ValiError) console.error(e.issues);
|
||||
console.error("methodeLivraison", e);
|
||||
ELEMENTS.BOUTON_ACTIONS_FORMULAIRE.textContent = "Check-out";
|
||||
E.BOUTON_ACTIONS_FORMULAIRE.textContent = "Check-out";
|
||||
leveErreur(e);
|
||||
})
|
||||
.unsafeCoerce();
|
||||
|
||||
const articlesPanier = ELEMENTS.ENTREES_PANIER_EITHER
|
||||
const articlesPanier = E.ENTREES_PANIER_EITHER
|
||||
.orDefault([])
|
||||
.map((entree: HTMLElement) => ({
|
||||
product_id: Number(entree.getAttribute("data-id-produit")),
|
||||
|
|
@ -281,7 +254,7 @@ export const initialiseBoutonCreationCommande = (): void => {
|
|||
state: donneesFormulaire["facturation-region-etat"] ?? donneesFormulaire["livraison-region-etat"] ?? "",
|
||||
},
|
||||
currency: methodeLivraison.currency_code,
|
||||
customer_note: ELEMENTS.INSTRUCTIONS_CLIENT.value,
|
||||
customer_note: E.INSTRUCTIONS_CLIENT.value,
|
||||
line_items: articlesPanier,
|
||||
shipping: {
|
||||
address_1: donneesFormulaire["livraison-adresse"] ?? "",
|
||||
|
|
|
|||
|
|
@ -27,12 +27,13 @@ import {
|
|||
SELECTEUR_TOTAL_REDUCTION_VALEUR,
|
||||
} from "./constantes/dom";
|
||||
import { ERREUR_CODE_PROMO_INVALIDE } from "./constantes/erreurs";
|
||||
import { lanceAnimationCycleTexte } from "./lib/animations";
|
||||
import { lanceAnimationCycleLoading } from "./lib/animations";
|
||||
import { accorderCibleASelecteur } from "./lib/dom";
|
||||
import { ServerError } from "./lib/erreurs";
|
||||
import { ErreurCodePromoInvalide } from "./lib/erreurs/codes-promo";
|
||||
import { estReponse500 } from "./lib/gardes";
|
||||
import { reponseEstCodeErreurWC } from "./lib/messages";
|
||||
import { arrondisADeuxDecimales, diviseParCent, formateEnEuros, inverseNombre } from "./lib/nombres";
|
||||
import { postBackend } from "./lib/reseau";
|
||||
import { WCStoreCartSchema } from "./lib/schemas/api/cart";
|
||||
import { WCStoreCartApplyCouponArgsSchema } from "./lib/schemas/api/cart-apply-coupon";
|
||||
|
|
@ -50,7 +51,7 @@ type EtatsPage = {
|
|||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- États injectés par le modèle PHP
|
||||
const ETATS_PAGE: EtatsPage = _etats;
|
||||
|
||||
const ELEMENTS = {
|
||||
const E = {
|
||||
BOUTON_CODE_PROMO: recupereElementDansDocumentOuLeve<HTMLButtonElement>(SELECTEUR_BOUTON_CODE_PROMO),
|
||||
CHAMP_CODE_PROMO: recupereElementDansDocumentOuLeve<HTMLInputElement>(SELECTEUR_CHAMP_CODE_PROMO),
|
||||
ENSEMBLE_CODE_PROMO: recupereElementDansDocumentOuLeve<HTMLFormElement>(SELECTEUR_ENSEMBLE_CODE_PROMO),
|
||||
|
|
@ -62,12 +63,11 @@ const ELEMENTS = {
|
|||
|
||||
export const initialiseElementsCodePromo = (): void => {
|
||||
const recupereValeurCodePromo = (): null | string =>
|
||||
Maybe.fromFalsy(ELEMENTS.CHAMP_CODE_PROMO.value.trim()).extractNullable();
|
||||
const recuperePresenceCodePromo = (): boolean =>
|
||||
ELEMENTS.ENSEMBLE_CODE_PROMO.hasAttribute(ATTRIBUT_CODE_PROMO_PRESENT);
|
||||
Maybe.fromFalsy(E.CHAMP_CODE_PROMO.value.trim()).extractNullable();
|
||||
const recuperePresenceCodePromo = (): boolean => E.ENSEMBLE_CODE_PROMO.hasAttribute(ATTRIBUT_CODE_PROMO_PRESENT);
|
||||
|
||||
// Créé la délégation d'Événements
|
||||
ELEMENTS.ENSEMBLE_CODE_PROMO.addEventListener("click", (evenement: Event) =>
|
||||
E.ENSEMBLE_CODE_PROMO.addEventListener("click", (evenement: Event) =>
|
||||
match({
|
||||
cible: evenement.target,
|
||||
codePromoPresent: recuperePresenceCodePromo(),
|
||||
|
|
@ -89,24 +89,13 @@ export const initialiseElementsCodePromo = (): void => {
|
|||
.liftEither(eitherParse({ code: valeurCodePromo }, WCStoreCartApplyCouponArgsSchema))
|
||||
.ifRight(() => {
|
||||
// Désactive le Bouton pour empêcher des requêtes concurrentes
|
||||
ELEMENTS.BOUTON_CODE_PROMO.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
ELEMENTS.BOUTON_CODE_PROMO.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
E.BOUTON_CODE_PROMO.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
E.BOUTON_CODE_PROMO.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
// Réinitialise le Message à l'Utilisateur
|
||||
ELEMENTS.MESSAGE_CODE_PROMO.textContent = "";
|
||||
E.MESSAGE_CODE_PROMO.textContent = "";
|
||||
|
||||
// Lance un cycle d'animation sur le texte de chargement
|
||||
const animation = lanceAnimationCycleTexte({
|
||||
attribut: ATTRIBUT_CHARGEMENT,
|
||||
element: ELEMENTS.BOUTON_CODE_PROMO,
|
||||
etapes: [
|
||||
"Loading",
|
||||
"Loading.",
|
||||
"Loading..",
|
||||
"Loading...",
|
||||
],
|
||||
});
|
||||
animation.callback();
|
||||
animation.interval = setInterval(animation.callback, 500);
|
||||
lanceAnimationCycleLoading(E.BOUTON_CODE_PROMO, 500);
|
||||
})
|
||||
// Réalise la requête auprès du backend
|
||||
.map((args: WCStoreCartApplyCouponArgs) =>
|
||||
|
|
@ -138,36 +127,42 @@ export const initialiseElementsCodePromo = (): void => {
|
|||
.chain((corpsReponse: unknown) => EitherAsync.liftEither(eitherParse(corpsReponse, WCStoreCartSchema)))
|
||||
// Déclenche les mises à jour du DOM avec les données du nouveau Panier
|
||||
.ifRight((panier: WCStoreCart) => {
|
||||
const totalReduction = pipe(Number(panier.totals.total_discount) / 100, String, v => `-${v}€`);
|
||||
const totalPanier = pipe(Number(panier.totals.total_price) / 100, String, v => `${v}€`);
|
||||
E.ENSEMBLE_CODE_PROMO.toggleAttribute(ATTRIBUT_CODE_PROMO_PRESENT);
|
||||
E.CHAMP_CODE_PROMO.toggleAttribute(ATTRIBUT_DESACTIVE);
|
||||
E.CHAMP_CODE_PROMO.value = panier.coupons[0]?.code ?? "";
|
||||
E.BOUTON_CODE_PROMO.textContent = "Remove";
|
||||
|
||||
ELEMENTS.ENSEMBLE_CODE_PROMO.toggleAttribute(ATTRIBUT_CODE_PROMO_PRESENT);
|
||||
ELEMENTS.CHAMP_CODE_PROMO.toggleAttribute(ATTRIBUT_DESACTIVE);
|
||||
ELEMENTS.CHAMP_CODE_PROMO.value = panier.coupons[0]?.code ?? "";
|
||||
ELEMENTS.BOUTON_CODE_PROMO.textContent = "Remove";
|
||||
|
||||
ELEMENTS.TOTAL_PANIER.textContent = totalPanier;
|
||||
ELEMENTS.TOTAL_REDUCTION_LIGNE.toggleAttribute(ATTRIBUT_HIDDEN);
|
||||
ELEMENTS.TOTAL_REDUCTION_VALEUR.textContent = totalReduction;
|
||||
E.TOTAL_PANIER.textContent = pipe(
|
||||
diviseParCent(panier.totals.total_price),
|
||||
arrondisADeuxDecimales,
|
||||
formateEnEuros,
|
||||
);
|
||||
E.TOTAL_REDUCTION_LIGNE.toggleAttribute(ATTRIBUT_HIDDEN);
|
||||
E.TOTAL_REDUCTION_VALEUR.textContent = pipe(
|
||||
diviseParCent(panier.totals.total_discount),
|
||||
inverseNombre,
|
||||
arrondisADeuxDecimales,
|
||||
formateEnEuros,
|
||||
);
|
||||
})
|
||||
.ifLeft(erreur => {
|
||||
// Rétablis le texte d'origine
|
||||
ELEMENTS.BOUTON_CODE_PROMO.textContent = "Apply";
|
||||
E.BOUTON_CODE_PROMO.textContent = "Apply";
|
||||
|
||||
// Traite les Erreurs et affiche un Message à l'Utilisateur
|
||||
match(erreur)
|
||||
.with(P.instanceOf(ValiError), e => console.error("ValiError", e.issues))
|
||||
.with(P.instanceOf(ErreurCodePromoInvalide), e => {
|
||||
ELEMENTS.MESSAGE_CODE_PROMO.textContent = "This promo code does not exist.";
|
||||
E.MESSAGE_CODE_PROMO.textContent = "This promo code does not exist.";
|
||||
console.error(e);
|
||||
})
|
||||
.with(P.instanceOf(ServerError), e => {
|
||||
ELEMENTS.MESSAGE_CODE_PROMO.textContent =
|
||||
E.MESSAGE_CODE_PROMO.textContent =
|
||||
"Sorry, something went wrong! Please refresh the page and try again.";
|
||||
console.error(e);
|
||||
})
|
||||
.with(P.instanceOf(TypeError), e => {
|
||||
ELEMENTS.MESSAGE_CODE_PROMO.textContent =
|
||||
E.MESSAGE_CODE_PROMO.textContent =
|
||||
"Sorry, something went wrong! Please refresh the page and try again.";
|
||||
console.error(e);
|
||||
})
|
||||
|
|
@ -175,8 +170,8 @@ export const initialiseElementsCodePromo = (): void => {
|
|||
})
|
||||
.finally(() => {
|
||||
// Désactive l'animation de chargement et rend le Bouton de nouveau cliquable
|
||||
ELEMENTS.BOUTON_CODE_PROMO.removeAttribute(ATTRIBUT_CHARGEMENT);
|
||||
ELEMENTS.BOUTON_CODE_PROMO.removeAttribute(ATTRIBUT_DESACTIVE);
|
||||
E.BOUTON_CODE_PROMO.removeAttribute(ATTRIBUT_CHARGEMENT);
|
||||
E.BOUTON_CODE_PROMO.removeAttribute(ATTRIBUT_DESACTIVE);
|
||||
})
|
||||
.run(),
|
||||
)
|
||||
|
|
@ -192,31 +187,10 @@ export const initialiseElementsCodePromo = (): void => {
|
|||
void EitherAsync
|
||||
.liftEither(eitherParse({ code: valeurCodePromo }, WCStoreCartRemoveCouponArgsSchema))
|
||||
.ifRight(() => {
|
||||
ELEMENTS.BOUTON_CODE_PROMO.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
ELEMENTS.BOUTON_CODE_PROMO.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
E.BOUTON_CODE_PROMO.setAttribute(ATTRIBUT_DESACTIVE, "");
|
||||
E.BOUTON_CODE_PROMO.setAttribute(ATTRIBUT_CHARGEMENT, "");
|
||||
|
||||
const animation = {
|
||||
callback: () => {
|
||||
if (!ELEMENTS.BOUTON_CODE_PROMO.hasAttribute(ATTRIBUT_CHARGEMENT)) {
|
||||
clearInterval(animation.interval);
|
||||
return;
|
||||
}
|
||||
|
||||
ELEMENTS.BOUTON_CODE_PROMO.textContent = animation.etapes.at(animation.index)
|
||||
?? "Loading...";
|
||||
animation.index = animation.index + 1 > animation.etapes.length - 1 ? 0 : animation.index + 1;
|
||||
},
|
||||
etapes: [
|
||||
"Loading",
|
||||
"Loading.",
|
||||
"Loading..",
|
||||
"Loading...",
|
||||
],
|
||||
index: 0,
|
||||
interval: 0,
|
||||
};
|
||||
animation.callback();
|
||||
animation.interval = setInterval(animation.callback, 500);
|
||||
lanceAnimationCycleLoading(E.BOUTON_CODE_PROMO, 500);
|
||||
})
|
||||
.map((args: WCStoreCartRemoveCouponArgs) =>
|
||||
postBackend({
|
||||
|
|
@ -233,17 +207,19 @@ export const initialiseElementsCodePromo = (): void => {
|
|||
)
|
||||
.chain((corpsReponse: unknown) => EitherAsync.liftEither(eitherParse(corpsReponse, WCStoreCartSchema)))
|
||||
.ifRight((panier: WCStoreCart) => {
|
||||
const totalPanier = pipe(Number(panier.totals.total_price) / 100, String, v => `${v}€`);
|
||||
E.ENSEMBLE_CODE_PROMO.toggleAttribute(ATTRIBUT_CODE_PROMO_PRESENT);
|
||||
E.ENSEMBLE_CODE_PROMO.reset();
|
||||
E.CHAMP_CODE_PROMO.toggleAttribute(ATTRIBUT_DESACTIVE);
|
||||
E.CHAMP_CODE_PROMO.textContent = "";
|
||||
E.BOUTON_CODE_PROMO.textContent = "Apply";
|
||||
|
||||
ELEMENTS.ENSEMBLE_CODE_PROMO.toggleAttribute(ATTRIBUT_CODE_PROMO_PRESENT);
|
||||
ELEMENTS.ENSEMBLE_CODE_PROMO.reset();
|
||||
ELEMENTS.CHAMP_CODE_PROMO.toggleAttribute(ATTRIBUT_DESACTIVE);
|
||||
ELEMENTS.CHAMP_CODE_PROMO.textContent = "";
|
||||
ELEMENTS.BOUTON_CODE_PROMO.textContent = "Apply";
|
||||
|
||||
ELEMENTS.TOTAL_PANIER.textContent = totalPanier;
|
||||
ELEMENTS.TOTAL_REDUCTION_LIGNE.toggleAttribute(ATTRIBUT_HIDDEN);
|
||||
ELEMENTS.TOTAL_REDUCTION_VALEUR.textContent = "-0€";
|
||||
E.TOTAL_PANIER.textContent = pipe(
|
||||
diviseParCent(panier.totals.total_price),
|
||||
arrondisADeuxDecimales,
|
||||
formateEnEuros,
|
||||
);
|
||||
E.TOTAL_REDUCTION_LIGNE.toggleAttribute(ATTRIBUT_HIDDEN);
|
||||
E.TOTAL_REDUCTION_VALEUR.textContent = "-0€";
|
||||
})
|
||||
.ifLeft(erreur =>
|
||||
match(erreur)
|
||||
|
|
@ -253,8 +229,8 @@ export const initialiseElementsCodePromo = (): void => {
|
|||
.exhaustive()
|
||||
)
|
||||
.finally(() => {
|
||||
ELEMENTS.BOUTON_CODE_PROMO.removeAttribute(ATTRIBUT_CHARGEMENT);
|
||||
ELEMENTS.BOUTON_CODE_PROMO.removeAttribute(ATTRIBUT_DESACTIVE);
|
||||
E.BOUTON_CODE_PROMO.removeAttribute(ATTRIBUT_CHARGEMENT);
|
||||
E.BOUTON_CODE_PROMO.removeAttribute(ATTRIBUT_DESACTIVE);
|
||||
})
|
||||
.run(),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ import {
|
|||
valideMessageMajBoutonPanier,
|
||||
valideMessageMajContenuPanier,
|
||||
} from "./lib/messages.ts";
|
||||
import { arrondisAZeroOuDeuxDecimales, diviseParCent, formateEnEuros, inverseNombre } from "./lib/nombres.ts";
|
||||
import { arrondisADeuxDecimales, diviseParCent, formateEnEuros, inverseNombre } from "./lib/nombres.ts";
|
||||
import { postBackend, traiteReponseBackendWCSelonCodesHTTP } from "./lib/reseau.ts";
|
||||
import { WCStoreCartRemoveItemArgsSchema } from "./lib/schemas/api/cart-remove-item.ts";
|
||||
import { WCStoreCartUpdateItemArgsSchema } from "./lib/schemas/api/cart-update-item.ts";
|
||||
|
|
@ -368,10 +368,10 @@ const initialiseMajContenuPanier = (): void => {
|
|||
SOUS_TOTAL_PRODUITS.textContent = formateEnEuros(donnees.sousTotalProduits);
|
||||
SOUS_TOTAL_REDUCTION.textContent = pipe(
|
||||
inverseNombre(donnees.sousTotalReduction),
|
||||
arrondisAZeroOuDeuxDecimales,
|
||||
arrondisADeuxDecimales,
|
||||
formateEnEuros,
|
||||
);
|
||||
TOTAL_PANIER.textContent = pipe(arrondisAZeroOuDeuxDecimales(donnees.totalPanier), formateEnEuros);
|
||||
TOTAL_PANIER.textContent = pipe(arrondisADeuxDecimales(donnees.totalPanier), formateEnEuros);
|
||||
});
|
||||
});
|
||||
})
|
||||
|
|
|
|||
23
web/app/themes/haiku-atelier-2024/views/404.twig
Normal file
23
web/app/themes/haiku-atelier-2024/views/404.twig
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{% extends "base.twig" %}
|
||||
|
||||
{% block contenu %}
|
||||
<main class="page-modele-simple" id="page-404">
|
||||
<div class="contenu">
|
||||
<header class="contenu__en-tete">
|
||||
<h2>Sorry!</h2>
|
||||
</header>
|
||||
|
||||
<div class="contenu__textuel">
|
||||
<p>
|
||||
The page you asked for does not exist. Please verify the address and try again.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a class="lien-lien" href="/shop">
|
||||
Go back to the Shop
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{% endblock contenu %}
|
||||
|
|
@ -12,103 +12,71 @@
|
|||
|
||||
{# Épingles #}
|
||||
<button
|
||||
aria-label="First pin"
|
||||
class="epingle"
|
||||
data-id-ensemble-epingle-boite="1"
|
||||
type="button"
|
||||
aria-label="First pin" class="epingle"
|
||||
data-id-ensemble-epingle-boite="1" type="button"
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
height="56"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cloud-rouge.svg"
|
||||
width="82"
|
||||
alt="" height="56"
|
||||
src="{{ site.theme.link }}/assets/img/icons/aboutlclick-black.svg" width="82"
|
||||
/>
|
||||
</button>
|
||||
|
||||
<button
|
||||
aria-label="Second pin"
|
||||
class="epingle"
|
||||
data-id-ensemble-epingle-boite="2"
|
||||
type="button"
|
||||
aria-label="Second pin" class="epingle"
|
||||
data-id-ensemble-epingle-boite="2" type="button"
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
height="56"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cloud-rouge.svg"
|
||||
width="82"
|
||||
alt="" height="56"
|
||||
src="{{ site.theme.link }}/assets/img/icons/aboutlclick-black.svg" width="82"
|
||||
/>
|
||||
</button>
|
||||
|
||||
<button
|
||||
aria-label="Third pin"
|
||||
class="epingle"
|
||||
data-id-ensemble-epingle-boite="3"
|
||||
type="button"
|
||||
aria-label="Third pin" class="epingle"
|
||||
data-id-ensemble-epingle-boite="3" type="button"
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
height="56"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cloud-rouge.svg"
|
||||
width="82"
|
||||
alt="" height="56"
|
||||
src="{{ site.theme.link }}/assets/img/icons/aboutlclick-black.svg" width="82"
|
||||
/>
|
||||
</button>
|
||||
|
||||
<button
|
||||
aria-label="Fourth pin"
|
||||
class="epingle"
|
||||
data-id-ensemble-epingle-boite="4"
|
||||
type="button"
|
||||
aria-label="Fourth pin" class="epingle"
|
||||
data-id-ensemble-epingle-boite="4" type="button"
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
height="56"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cloud-rouge.svg"
|
||||
width="82"
|
||||
alt="" height="56"
|
||||
src="{{ site.theme.link }}/assets/img/icons/aboutlclick-black.svg" width="82"
|
||||
/>
|
||||
</button>
|
||||
|
||||
<button
|
||||
aria-label="Fifth pin"
|
||||
class="epingle"
|
||||
data-id-ensemble-epingle-boite="5"
|
||||
type="button"
|
||||
aria-label="Fifth pin" class="epingle"
|
||||
data-id-ensemble-epingle-boite="5" type="button"
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
height="56"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cloud-rouge.svg"
|
||||
width="82"
|
||||
alt="" height="56"
|
||||
src="{{ site.theme.link }}/assets/img/icons/aboutlclick-black.svg" width="82"
|
||||
/>
|
||||
</button>
|
||||
|
||||
<button
|
||||
aria-label="Sixth pin"
|
||||
class="epingle"
|
||||
data-id-ensemble-epingle-boite="6"
|
||||
type="button"
|
||||
aria-label="Sixth pin" class="epingle"
|
||||
data-id-ensemble-epingle-boite="6" type="button"
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
height="56"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cloud-rouge.svg"
|
||||
width="82"
|
||||
alt="" height="56"
|
||||
src="{{ site.theme.link }}/assets/img/icons/aboutlclick-black.svg" width="82"
|
||||
/>
|
||||
</button>
|
||||
|
||||
{# Boîtes de texte #}
|
||||
<div
|
||||
class="boite-texte"
|
||||
data-id-ensemble-epingle-boite="1"
|
||||
>
|
||||
<button
|
||||
class="boite-texte__bouton-fermeture"
|
||||
type="button"
|
||||
>
|
||||
<div class="boite-texte" data-id-ensemble-epingle-boite="1">
|
||||
<button class="boite-texte__bouton-fermeture" type="button">
|
||||
<img
|
||||
alt="An icon in form of a cross"
|
||||
height="20"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cross.svg"
|
||||
width="20"
|
||||
alt="An icon in form of a cross" height="20"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cross.svg" width="20"
|
||||
/>
|
||||
</button>
|
||||
|
||||
|
|
@ -120,19 +88,11 @@
|
|||
<p>More than poetry, it’s a philosophy.</p>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="boite-texte"
|
||||
data-id-ensemble-epingle-boite="2"
|
||||
>
|
||||
<button
|
||||
class="boite-texte__bouton-fermeture"
|
||||
type="button"
|
||||
>
|
||||
<div class="boite-texte" data-id-ensemble-epingle-boite="2">
|
||||
<button class="boite-texte__bouton-fermeture" type="button">
|
||||
<img
|
||||
alt="An icon in form of a cross"
|
||||
height="20"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cross.svg"
|
||||
width="20"
|
||||
alt="An icon in form of a cross" height="20"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cross.svg" width="20"
|
||||
/>
|
||||
</button>
|
||||
|
||||
|
|
@ -146,19 +106,11 @@
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="boite-texte"
|
||||
data-id-ensemble-epingle-boite="3"
|
||||
>
|
||||
<button
|
||||
class="boite-texte__bouton-fermeture"
|
||||
type="button"
|
||||
>
|
||||
<div class="boite-texte" data-id-ensemble-epingle-boite="3">
|
||||
<button class="boite-texte__bouton-fermeture" type="button">
|
||||
<img
|
||||
alt="An icon in form of a cross"
|
||||
height="20"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cross.svg"
|
||||
width="20"
|
||||
alt="An icon in form of a cross" height="20"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cross.svg" width="20"
|
||||
/>
|
||||
</button>
|
||||
|
||||
|
|
@ -173,19 +125,11 @@
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="boite-texte"
|
||||
data-id-ensemble-epingle-boite="4"
|
||||
>
|
||||
<button
|
||||
class="boite-texte__bouton-fermeture"
|
||||
type="button"
|
||||
>
|
||||
<div class="boite-texte" data-id-ensemble-epingle-boite="4">
|
||||
<button class="boite-texte__bouton-fermeture" type="button">
|
||||
<img
|
||||
alt="An icon in form of a cross"
|
||||
height="20"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cross.svg"
|
||||
width="20"
|
||||
alt="An icon in form of a cross" height="20"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cross.svg" width="20"
|
||||
/>
|
||||
</button>
|
||||
|
||||
|
|
@ -199,19 +143,11 @@
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="boite-texte"
|
||||
data-id-ensemble-epingle-boite="5"
|
||||
>
|
||||
<button
|
||||
class="boite-texte__bouton-fermeture"
|
||||
type="button"
|
||||
>
|
||||
<div class="boite-texte" data-id-ensemble-epingle-boite="5">
|
||||
<button class="boite-texte__bouton-fermeture" type="button">
|
||||
<img
|
||||
alt="An icon in form of a cross"
|
||||
height="20"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cross.svg"
|
||||
width="20"
|
||||
alt="An icon in form of a cross" height="20"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cross.svg" width="20"
|
||||
/>
|
||||
</button>
|
||||
|
||||
|
|
@ -229,19 +165,11 @@
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="boite-texte"
|
||||
data-id-ensemble-epingle-boite="6"
|
||||
>
|
||||
<button
|
||||
class="boite-texte__bouton-fermeture"
|
||||
type="button"
|
||||
>
|
||||
<div class="boite-texte" data-id-ensemble-epingle-boite="6">
|
||||
<button class="boite-texte__bouton-fermeture" type="button">
|
||||
<img
|
||||
alt="An icon in form of a cross"
|
||||
height="20"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cross.svg"
|
||||
width="20"
|
||||
alt="An icon in form of a cross" height="20"
|
||||
src="{{ site.theme.link }}/assets/img/icons/cross.svg" width="20"
|
||||
/>
|
||||
</button>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,29 +5,21 @@
|
|||
<main id="page-accueil">
|
||||
<div class="storytelling">
|
||||
<div class="storytelling__conteneur">
|
||||
<div
|
||||
class="storytelling__image"
|
||||
data-index="0"
|
||||
>
|
||||
<div class="storytelling__image" data-index="0">
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll0", "", 903, 1080)
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="storytelling__image"
|
||||
data-index="1"
|
||||
>
|
||||
<div class="storytelling__image" data-index="1">
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll1", "", 903, 1080)
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div
|
||||
aria-hidden
|
||||
class="storytelling__image"
|
||||
data-cache
|
||||
data-index="2"
|
||||
aria-hidden class="storytelling__image"
|
||||
data-cache data-index="2"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll2", "", 903, 1080)
|
||||
|
|
@ -35,10 +27,8 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
aria-hidden
|
||||
class="storytelling__image"
|
||||
data-cache
|
||||
data-index="3"
|
||||
aria-hidden class="storytelling__image"
|
||||
data-cache data-index="3"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll3", "", 903, 1080)
|
||||
|
|
@ -46,10 +36,8 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
aria-hidden
|
||||
class="storytelling__image"
|
||||
data-cache
|
||||
data-index="4"
|
||||
aria-hidden class="storytelling__image"
|
||||
data-cache data-index="4"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll4", "", 903, 1080)
|
||||
|
|
@ -57,10 +45,8 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
aria-hidden
|
||||
class="storytelling__image"
|
||||
data-cache
|
||||
data-index="5"
|
||||
aria-hidden class="storytelling__image"
|
||||
data-cache data-index="5"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll5", "", 903, 1080)
|
||||
|
|
@ -68,10 +54,8 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
aria-hidden
|
||||
class="storytelling__image"
|
||||
data-cache
|
||||
data-index="6"
|
||||
aria-hidden class="storytelling__image"
|
||||
data-cache data-index="6"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll6", "", 903, 1080)
|
||||
|
|
@ -79,10 +63,8 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
aria-hidden
|
||||
class="storytelling__image"
|
||||
data-cache
|
||||
data-index="7"
|
||||
aria-hidden class="storytelling__image"
|
||||
data-cache data-index="7"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll7", "", 903, 1080)
|
||||
|
|
@ -90,10 +72,8 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
aria-hidden
|
||||
class="storytelling__image"
|
||||
data-cache
|
||||
data-index="8"
|
||||
aria-hidden class="storytelling__image"
|
||||
data-cache data-index="8"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll8", "", 903, 1080)
|
||||
|
|
@ -101,10 +81,8 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
aria-hidden
|
||||
class="storytelling__image"
|
||||
data-cache
|
||||
data-index="9"
|
||||
aria-hidden class="storytelling__image"
|
||||
data-cache data-index="9"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll9", "", 903, 1080)
|
||||
|
|
@ -112,10 +90,8 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
aria-hidden
|
||||
class="storytelling__image"
|
||||
data-cache
|
||||
data-index="10"
|
||||
aria-hidden class="storytelling__image"
|
||||
data-cache data-index="10"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll10", "", 903, 1080)
|
||||
|
|
@ -123,10 +99,8 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
aria-hidden
|
||||
class="storytelling__image"
|
||||
data-cache
|
||||
data-index="11"
|
||||
aria-hidden class="storytelling__image"
|
||||
data-cache data-index="11"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll11", "", 903, 1080)
|
||||
|
|
@ -134,10 +108,8 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
aria-hidden
|
||||
class="storytelling__image"
|
||||
data-cache
|
||||
data-index="12"
|
||||
aria-hidden class="storytelling__image"
|
||||
data-cache data-index="12"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll12", "", 903, 1080)
|
||||
|
|
@ -145,10 +117,8 @@
|
|||
</div>
|
||||
|
||||
<div
|
||||
aria-hidden
|
||||
class="storytelling__image"
|
||||
data-cache
|
||||
data-index="13"
|
||||
aria-hidden class="storytelling__image"
|
||||
data-cache data-index="13"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll13", "", 903, 1080)
|
||||
|
|
|
|||
|
|
@ -6,10 +6,7 @@
|
|||
{% endblock head %}
|
||||
{% endblock conteneur_html_head %}
|
||||
|
||||
<body
|
||||
class="{{ body_class }}"
|
||||
data-langue="{{ langue_courante }}"
|
||||
>
|
||||
<body class="{{ body_class }}" data-langue="{{ langue_courante }}">
|
||||
{# En-tête #}
|
||||
{% include "parts/en-tete.twig" %}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,10 +20,8 @@
|
|||
|
||||
<div class="actions">
|
||||
<button
|
||||
{{produits|length == 12 ? "" : "hidden"}}
|
||||
class="bouton-case-pleine bouton-blanc-sur-noir"
|
||||
id="bouton-plus-de-produits"
|
||||
type="button"
|
||||
{{produits|length == 12 ? "" : "hidden"}} class="bouton-case-pleine bouton-blanc-sur-noir"
|
||||
id="bouton-plus-de-produits" type="button"
|
||||
>
|
||||
Show more products
|
||||
</button>
|
||||
|
|
|
|||
185
web/app/themes/haiku-atelier-2024/views/cgv.twig
Normal file
185
web/app/themes/haiku-atelier-2024/views/cgv.twig
Normal file
|
|
@ -0,0 +1,185 @@
|
|||
{% extends "base.twig" %}
|
||||
|
||||
{% block contenu %}
|
||||
<main class="page-modele-simple" id="page-cgv">
|
||||
<div class="contenu">
|
||||
<header class="contenu__en-tete">
|
||||
<h2>Terms & Conditions</h2>
|
||||
</header>
|
||||
|
||||
<div class="contenu__textuel">
|
||||
<section class="contenu__textuel__section">
|
||||
<header class="contenu__textuel__section__en-tete">
|
||||
<h3>Production & Delivery Time</h3>
|
||||
</header>
|
||||
|
||||
<p>
|
||||
Each piece, made in sterling silver and 18k gold plated silver, is made to order. As soon as we receive your
|
||||
order, depending on its complexity, production in our workshop will take between 2 to 7 working days. It
|
||||
will then be send to you, at the latest, within 14 days of your order.
|
||||
</p>
|
||||
<p>
|
||||
The products are delivered by Mondial Relay or UPS. Products are delivered in France, Europe, and any
|
||||
country included by those two delivery companies.</p>
|
||||
<p>
|
||||
The details of delivery costs and times are specified in during the payment process. The delivery times are
|
||||
mentioned for information only. When the order is sent, the customers will receive an e-mail from the
|
||||
carrier allowing them to track their package.
|
||||
</p>
|
||||
<p>
|
||||
Haiku Atelier cannot be held responsible for delays in delivery due to errors or disruptions attributable to
|
||||
carriers (including in the event of a total or partial strike in particular of the postal services and means
|
||||
of transport and/or communications).
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="contenu__textuel__section">
|
||||
<header class="contenu__textuel__section__en-tete">
|
||||
<h3>Returns & Exchange</h3>
|
||||
</header>
|
||||
|
||||
<p>
|
||||
If for any reason you are not satisfied with your purchase, we will refund or exchange it within 14 days of
|
||||
receipt. If more than 30 days have past since your purchase, unfortunately, we cannot offer a refund or an
|
||||
exchange.
|
||||
</p>
|
||||
<p>
|
||||
To be eligible for a return or an exchange, your item must be in the same condition as received, unworn and
|
||||
unused, in its original packaging. You will also need the receipt or proof of purchase.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To start a return you can contact us at <a class="lien-lien" href="mailto:haiku.atelier@gmail.com"
|
||||
>haiku.atelier@gmail.com</a>. Please note that returns and exchange will need to be send back our workshop
|
||||
in Brussels.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Products returned without prior notification and original packaging will not be accepted.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The site does not provide any return labels. Return costs are the responsibility of the customer. Taxes or
|
||||
duties on international deliveries are non-refundable. Haiku Atelier undertakes to reimburse the price of
|
||||
the product and the initial shipping costs, upon receipt of the product.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Once the returned product has been quality checked and approved, the refund will be made via the original
|
||||
method of payment used for the returned order and a confirmation email will be sent to the customer. Haiku
|
||||
Atelier is not responsible for items purchased from other retailers.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="contenu__textuel__section">
|
||||
<header class="contenu__textuel__section__en-tete">
|
||||
<h3>Damages & Issues</h3>
|
||||
</header>
|
||||
|
||||
<p>
|
||||
Please inspect your order upon receipt and contact us immediately if the item is defective, damaged, or if
|
||||
you received the wrong item. Make written observations at the latest within three (3) days following the
|
||||
delivery, to Haiku Atelier, by sending a photograph of the product. Unfortunately we cannot accept returns
|
||||
on sale items and gift cards.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Haiku Atelier jewelry are guarantee for a year. If your piece unexpectedly broke or loses its gold color
|
||||
within a year, you can send it back to us and we will repair it for free, you will just have to organize
|
||||
your own shipping label (our workshop is located in Brussels).<br /> We still provide after sale services
|
||||
past the guarantee year, the price of those services will be determined depending on each case.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="contenu__textuel__section">
|
||||
<header class="contenu__textuel__section__en-tete">
|
||||
<h3>Terms Of Service</h3>
|
||||
</header>
|
||||
|
||||
<p>
|
||||
This website is operated by Manon Designere - créatrice de bijoux, whose registered office is located at 45
|
||||
rue de Franceville, 93220 Gagny, France. These general terms and conditions of use and sale (the "GTCU")
|
||||
govern the use of the site by any user wishing to access the site and make a purchase on the site (the
|
||||
"User" or the "Customer").
|
||||
</p>
|
||||
|
||||
<p>
|
||||
By accessing the site, the user acknowledges having read and fully and unreservedly accepts the GTCU. Haiku
|
||||
Atelier reserves the right to modify the GTCU at any time. The change will take effect immediately upon
|
||||
posting the GTCU.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The products governed by these GTCUs are those which appear on the site (the “Products”). The products are
|
||||
offered for sale within the limits of available stocks. The site does not guarantee that the products will
|
||||
be in stock. The site reserves the right to remove a product at any time for any reason.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The colors, features, specifications, and details of the products are described and presented with the
|
||||
greatest possible accuracy. However, the site does not warrant that the colors, features, specifications,
|
||||
and details of the products will be accurate, complete, reliable, current, or free from other errors, and
|
||||
users' digital display may not accurately reflect the actual colors and details of the products.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The prices of the products are indicated in Euros all taxes included, including the applicable French VAT
|
||||
(20%). The prices of the products are exclusive of delivery costs (shipping, packaging, and making up the
|
||||
package according to the applicable amounts). The amount of the delivery costs will be specified before the
|
||||
validation of the order. The prices of the products may be modified at any time. However, a price cannot be
|
||||
modified once the purchase order has been validated.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The site uses the 3D Secure payment system to prevent fraud.<br />
|
||||
Customers can pay for their purchase order:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>by credit card (via Stripe): Visa, Mastercard, etc.</li>
|
||||
{# <li>with a PayPal account.</li> #}
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Haiku Atelier will not be held responsible for the failure to deliver a package due to an incorrect or
|
||||
incomplete delivery address. Once the undelivered products have been collected by Haiku Atelier, a new
|
||||
delivery will be possible and incur a reshipping fee invoiced to the customer.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
International deliveries are subject to import charges, duties, taxes, or fees of the destination country.
|
||||
These funds are set by the government of that country, in accordance with import/export regulations, and
|
||||
billed by the courier. Haiku Atelier is not responsible for these duties, taxes, or other charges.<br /> If
|
||||
a package is returned because a customer has refused to pay any import taxes or customs duties owed, the
|
||||
package refund will not include shipping and return costs.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Haiku Atelier is the exclusive owner of all intellectual property rights or holds the rights of use relating
|
||||
to both the structure and the content of the site. The GTCU are subject to French law, regardless of the
|
||||
country of residence of the user and the place of placing the purchase order.<br />In the absence of an
|
||||
amicable agreement, any dispute will be submitted to the competent French courts.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="contenu__textuel__section">
|
||||
<header class="contenu__textuel__section__en-tete">
|
||||
<h3>Contact Information</h3>
|
||||
</header>
|
||||
|
||||
<p>
|
||||
<strong>Contact:</strong><br />
|
||||
For inquiries and customer service, please refer to <a class="lien-lien" href="/contact"
|
||||
>our Contact page</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Credits:</strong><br />
|
||||
Webdesign by Manon Designere.<br />
|
||||
Development by Gauthier Colin--Haag.
|
||||
</p>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{% endblock contenu %}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
{% extends "base.twig" %}
|
||||
|
||||
{% block contenu %}
|
||||
<main id="page-contact">
|
||||
<main class="page-modele-simple" id="page-contact">
|
||||
<div class="contenu">
|
||||
<header class="contenu__en-tete">
|
||||
<h2>Say hi!</h2>
|
||||
|
|
@ -10,15 +10,9 @@
|
|||
<div class="contenu__textuel">
|
||||
<p>
|
||||
For any inquiries, from simple information questions to problems with your products, or just to say hi, don't
|
||||
hesitate to contact us at <a
|
||||
class="lien-lien"
|
||||
href="mailto:haikuatelier@gmail.com"
|
||||
>
|
||||
hesitate to contact us at <a class="lien-lien" href="mailto:haikuatelier@gmail.com">
|
||||
haikuatelier@gmail.com
|
||||
</a> or on Instagram at <a
|
||||
class="lien-lien"
|
||||
href="https://www.instagram.com/haiku.atelier"
|
||||
>
|
||||
</a> or on Instagram at <a class="lien-lien" href="https://www.instagram.com/haiku.atelier">
|
||||
haiku.atelier
|
||||
</a>.
|
||||
</p>
|
||||
|
|
|
|||
19
web/app/themes/haiku-atelier-2024/views/echec-commande.twig
Normal file
19
web/app/themes/haiku-atelier-2024/views/echec-commande.twig
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{% extends "base.twig" %}
|
||||
|
||||
{% block contenu %}
|
||||
<main class="page-modele-simple" id="page-succes-commande">
|
||||
<div class="contenu">
|
||||
<header class="contenu__en-tete">
|
||||
<h2>Failed order!</h2>
|
||||
</header>
|
||||
|
||||
<div class="contenu__textuel">
|
||||
<p>Sadly, something went wrong during your order, or you chose to cancel it. You can try again if you want: your
|
||||
cart is still there.</p>
|
||||
<p>If an error persists and you don't know what's going on, please don't hesitate to <a
|
||||
class="lien-lien" href="/contact"
|
||||
>contact us</a>!</p>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{% endblock contenu %}
|
||||
|
|
@ -1,31 +1,22 @@
|
|||
{% macro genere_source_img_multi_formats(rel_url, alt="", width, height, id="") %}
|
||||
<picture id="{{ id }}">
|
||||
<source
|
||||
height="{{ height }}"
|
||||
srcset="{{ rel_url }}.jxl"
|
||||
type="image/jxl"
|
||||
width="{{ width }}"
|
||||
height="{{ height }}" srcset="{{ rel_url }}.jxl"
|
||||
type="image/jxl" width="{{ width }}"
|
||||
/>
|
||||
<source
|
||||
height="{{ height }}"
|
||||
srcset="{{ rel_url }}.avif"
|
||||
type="image/avif"
|
||||
width="{{ width }}"
|
||||
height="{{ height }}" srcset="{{ rel_url }}.avif"
|
||||
type="image/avif" width="{{ width }}"
|
||||
/>
|
||||
<source
|
||||
height="{{ height }}"
|
||||
srcset="{{ rel_url }}.webp"
|
||||
type="image/webp"
|
||||
width="{{ width }}"
|
||||
height="{{ height }}" srcset="{{ rel_url }}.webp"
|
||||
type="image/webp" width="{{ width }}"
|
||||
/>
|
||||
|
||||
<img
|
||||
alt="{{ alt }}"
|
||||
decoding="sync"
|
||||
height="{{ height }}"
|
||||
loading="eager"
|
||||
src="{{ rel_url }}.jpg"
|
||||
width="{{ width }}"
|
||||
alt="{{ alt }}" decoding="sync"
|
||||
height="{{ height }}" loading="eager"
|
||||
src="{{ rel_url }}.jpg" width="{{ width }}"
|
||||
onload="this.style.opacity=1"
|
||||
/>
|
||||
</picture>
|
||||
|
|
|
|||
|
|
@ -12,10 +12,7 @@
|
|||
{% endblock head %}
|
||||
|
||||
{% block contenu %}
|
||||
<main
|
||||
id="page-panier"
|
||||
data-contient-articles="{{ articles_presents }}"
|
||||
>
|
||||
<main id="page-panier" data-contient-articles="{{ articles_presents }}">
|
||||
{# « Your Cart » #}
|
||||
{% include "parts/pages/panier/panneau-panier.twig" %}
|
||||
{# Your Info #}
|
||||
|
|
@ -23,10 +20,7 @@
|
|||
|
||||
<div class="panier-vide">
|
||||
<p>Sorry! Your cart is empty.</p>
|
||||
<a
|
||||
class="lien-bouton"
|
||||
href="{{ pages.shop.lien }}"
|
||||
>
|
||||
<a class="lien-bouton" href="{{ pages.shop.lien }}">
|
||||
Go back to the Shop
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,13 @@
|
|||
<header id="en-tete">
|
||||
{# Bouton (dés)activant le menu mobile #}
|
||||
<section class="logo">
|
||||
<button
|
||||
id="bouton-menu-mobile"
|
||||
type="button"
|
||||
>
|
||||
<button id="bouton-menu-mobile" type="button">
|
||||
<figure>
|
||||
<picture>
|
||||
<img
|
||||
alt="Haiku Atelier's Logo"
|
||||
decoding="async"
|
||||
height="25.6"
|
||||
loading="eager"
|
||||
src="{{ site.theme.link }}/assets/img/logos/logo-lines.svg"
|
||||
width="80"
|
||||
alt="Haiku Atelier's Logo" decoding="async"
|
||||
height="25.6" loading="eager"
|
||||
src="{{ site.theme.link }}/assets/img/logos/logo-lines.svg" width="80"
|
||||
/>
|
||||
</picture>
|
||||
</figure>
|
||||
|
|
@ -22,56 +16,41 @@
|
|||
|
||||
{# TODO: Utiliser un Menu WordPress #}
|
||||
{# TODO: Utiliser des <span> À L'INTÉRIEUR de <li> #}
|
||||
<nav
|
||||
class="menu-navigation"
|
||||
id="menu-navigation-en-tete"
|
||||
>
|
||||
<nav class="menu-navigation" id="menu-navigation-en-tete">
|
||||
<ul>
|
||||
<li
|
||||
class="{{ page_courante == pages.home.lien ? 'menu-navigation__entree menu-navigation__entree--courante' : "menu-navigation__entree" }}"
|
||||
>
|
||||
<span>
|
||||
<a
|
||||
class="lien-menu"
|
||||
href="{{ pages.home.lien }}"
|
||||
>
|
||||
<a class="lien-menu" href="{{ pages.home.lien }}">
|
||||
{{ pages.home.nom }}
|
||||
</a>
|
||||
</span>
|
||||
</li>
|
||||
<li
|
||||
class="{{ est_page_boutique ? 'menu-navigation__entree menu-navigation__entree--courante' : "menu-navigation__entree" }}"
|
||||
>
|
||||
<span>
|
||||
<a class="lien-menu" href="{{ pages.shop.lien }}">
|
||||
{{ pages.shop.nom }}
|
||||
</a>
|
||||
</span>
|
||||
</li>
|
||||
<li
|
||||
class="{{ page_courante == pages.about.lien ? 'menu-navigation__entree menu-navigation__entree--courante' : "menu-navigation__entree" }}"
|
||||
>
|
||||
<span>
|
||||
<a
|
||||
class="lien-menu"
|
||||
href="{{ pages.about.lien }}"
|
||||
>
|
||||
<a class="lien-menu" href="{{ pages.about.lien }}">
|
||||
{{ pages.about.nom }}
|
||||
</a>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<li
|
||||
class="{{ est_page_boutique ? 'menu-navigation__entree menu-navigation__entree--courante' : "menu-navigation__entree" }}"
|
||||
>
|
||||
<span>
|
||||
<a
|
||||
class="lien-menu"
|
||||
href="{{ pages.shop.lien }}"
|
||||
>
|
||||
{{ pages.shop.nom }}
|
||||
</a>
|
||||
</span>
|
||||
</li>
|
||||
<li
|
||||
class="{{ page_courante == pages.contact.lien ? 'menu-navigation__entree menu-navigation__entree--courante' : "menu-navigation__entree" }}"
|
||||
>
|
||||
<span>
|
||||
<a
|
||||
class="lien-menu"
|
||||
href="{{ pages.contact.lien }}"
|
||||
>
|
||||
<a class="lien-menu" href="{{ pages.contact.lien }}">
|
||||
{{ pages.contact.nom }}
|
||||
</a>
|
||||
</span>
|
||||
|
|
@ -80,15 +59,10 @@
|
|||
</nav>
|
||||
|
||||
{# Bouton « Panier » avec l'indicateur de quantité de Produits #}
|
||||
<section
|
||||
class="compte-panier"
|
||||
hidden
|
||||
>
|
||||
<section class="compte-panier">
|
||||
<a
|
||||
class="lien-bouton"
|
||||
data-contient-articles="{{ articles_presents }}"
|
||||
href="{{ pages.cart.lien }}"
|
||||
rel="cart"
|
||||
class="lien-bouton" data-contient-articles="{{ articles_presents }}"
|
||||
href="{{ pages.cart.lien }}" rel="cart"
|
||||
>
|
||||
cart ({{ quantite_articles }})
|
||||
</a>
|
||||
|
|
@ -96,69 +70,49 @@
|
|||
|
||||
{# Menu mobile #}
|
||||
<div
|
||||
aria-hidden="true"
|
||||
aria-labelledby="menu-mobile"
|
||||
class="menu-modale"
|
||||
id="menu-mobile"
|
||||
aria-hidden="true" aria-labelledby="menu-mobile"
|
||||
class="menu-modale" id="menu-mobile"
|
||||
>
|
||||
<div
|
||||
class="menu-modale__fond"
|
||||
data-a11y-dialog-hide
|
||||
></div>
|
||||
<div class="menu-modale__fond" data-a11y-dialog-hide></div>
|
||||
|
||||
<div class="menu-modale__conteneur">
|
||||
<nav
|
||||
class="menu-navigation"
|
||||
id="menu-navigation-mobile"
|
||||
>
|
||||
<nav class="menu-navigation" id="menu-navigation-mobile">
|
||||
<ul>
|
||||
<li
|
||||
class="{{ page_courante == pages.home.lien ? 'menu-navigation__entree menu-navigation__entree--courante' : "menu-navigation__entree" }}"
|
||||
>
|
||||
<span>
|
||||
<a
|
||||
class="lien-menu"
|
||||
href="{{ pages.home.lien }}"
|
||||
>
|
||||
<a class="lien-menu" href="{{ pages.home.lien }}">
|
||||
{{ pages.home.nom }}
|
||||
</a>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<li
|
||||
class="{{ page_courante == pages.about.lien ? 'menu-navigation__entree menu-navigation__entree--courante' : "menu-navigation__entree" }}"
|
||||
>
|
||||
<span>
|
||||
<a
|
||||
class="lien-menu"
|
||||
href="{{ pages.about.lien }}"
|
||||
>
|
||||
{{ pages.about.nom }}
|
||||
</a>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<li
|
||||
class="{{ est_page_boutique ? 'menu-navigation__entree menu-navigation__entree--courante' : "menu-navigation__entree" }}"
|
||||
>
|
||||
<span>
|
||||
<a
|
||||
class="lien-menu"
|
||||
href="{{ pages.shop.lien }}"
|
||||
>
|
||||
<a class="lien-menu" href="{{ pages.shop.lien }}">
|
||||
{{ pages.shop.nom }}
|
||||
</a>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<li
|
||||
class="{{ page_courante == pages.about.lien ? 'menu-navigation__entree menu-navigation__entree--courante' : "menu-navigation__entree" }}"
|
||||
>
|
||||
<span>
|
||||
<a class="lien-menu" href="{{ pages.about.lien }}">
|
||||
{{ pages.about.nom }}
|
||||
</a>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<li
|
||||
class="{{ page_courante == pages.contact.lien ? 'menu-navigation__entree menu-navigation__entree--courante' : "menu-navigation__entree" }}"
|
||||
>
|
||||
<span>
|
||||
<a
|
||||
class="lien-menu"
|
||||
href="{{ pages.contact.lien }}"
|
||||
>
|
||||
<a class="lien-menu" href="{{ pages.contact.lien }}">
|
||||
{{ pages.contact.nom }}
|
||||
</a>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -58,5 +58,8 @@
|
|||
type="font/woff2"
|
||||
/>
|
||||
|
||||
{# Plausible #}
|
||||
<script defer data-domain="haikuatelier.com" src="https://greyhound.haikuatelier.com/js/script.js"></script>
|
||||
|
||||
{{ function("wp_head") }}
|
||||
</head>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,11 @@
|
|||
<nav
|
||||
id="menu-categories-produits"
|
||||
class="menu-categories-produits"
|
||||
id="menu-categories-produits" class="menu-categories-produits"
|
||||
data-entrees-presentes-fin
|
||||
>
|
||||
<svg
|
||||
id="fleche-defilement-categories-produits-gauche"
|
||||
height="15"
|
||||
transform="scale(-1 1)"
|
||||
viewBox="0 0 15 15"
|
||||
width="15"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
id="fleche-defilement-categories-produits-gauche" height="15"
|
||||
transform="scale(-1 1)" viewBox="0 0 15 15"
|
||||
width="15" xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M8.293 2.293a1 1 0 0 1 1.414 0l4.5 4.5a1 1 0 0 1 0 1.414l-4.5 4.5a1 1 0 0 1-1.414-1.414L11 8.5H1.5a1 1 0 0 1 0-2H11L8.293 3.707a1 1 0 0 1 0-1.414"
|
||||
|
|
@ -20,19 +16,14 @@
|
|||
<li {{ est_page_tous_produits ? "class='categorie-courante'" : '' }}><a href="{{ pages.shop.lien }}">All</a></li>
|
||||
{% for categorie in categories_produits %}
|
||||
{# TODO: Factoriser l'injection de classe d'une manière plus propre #}
|
||||
<li
|
||||
{{ categorie.courante ? "class='categorie-courante'" : '' }}
|
||||
id="categorie-{{ categorie.slug|e }}"
|
||||
>
|
||||
<li {{ categorie.courante ? "class='categorie-courante'" : '' }} id="categorie-{{ categorie.slug|e }}">
|
||||
<a href="/{{ base_categorie_produit }}/{{ categorie.slug|e }}">{{ categorie.nom|e }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<svg
|
||||
id="fleche-defilement-categories-produits-droite"
|
||||
height="15"
|
||||
viewBox="0 0 15 15"
|
||||
width="15"
|
||||
id="fleche-defilement-categories-produits-droite" height="15"
|
||||
viewBox="0 0 15 15" width="15"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
|
|
|
|||
|
|
@ -1,42 +1,33 @@
|
|||
<section
|
||||
class="panneau"
|
||||
id="panneau-informations-client"
|
||||
>
|
||||
<section class="panneau" id="panneau-informations-client">
|
||||
<header class="panneau__en-tete">
|
||||
<h2>Your info</h2>
|
||||
</header>
|
||||
|
||||
{# « PayPal Express Checkout » #}
|
||||
<div class="panneau__paypal-express">
|
||||
<div class="panneau__paypal-express" hidden>
|
||||
<p>Express Check-out</p>
|
||||
|
||||
{# Bouton PayPal #}
|
||||
<button type="button">
|
||||
<img
|
||||
alt="PayPal's Logo"
|
||||
height="18"
|
||||
src="{{ site.theme.link }}/assets/img/paypal/logo-paypal.svg"
|
||||
width="13.48"
|
||||
alt="PayPal's Logo" height="18"
|
||||
src="{{ site.theme.link }}/assets/img/paypal/logo-paypal.svg" width="13.48"
|
||||
/>
|
||||
<img
|
||||
alt="PayPal"
|
||||
height="18"
|
||||
src="{{ site.theme.link }}/assets/img/paypal/titre-paypal.svg"
|
||||
width="67.69"
|
||||
alt="PayPal" height="18"
|
||||
src="{{ site.theme.link }}/assets/img/paypal/titre-paypal.svg" width="67.69"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form
|
||||
class="panneau__formulaires"
|
||||
id="formulaire-commande"
|
||||
class="panneau__formulaires" id="formulaire-commande"
|
||||
method="post"
|
||||
>
|
||||
{# Formulaires pour la livraison et facturation #}
|
||||
<div class="panneau__formulaires__separation-adresses">
|
||||
<input
|
||||
id="separation-adresses"
|
||||
name="separation-adresses"
|
||||
id="separation-adresses" name="separation-adresses"
|
||||
type="checkbox"
|
||||
/>
|
||||
<label for="separation-adresses">Use a separate billing address</label>
|
||||
|
|
@ -49,12 +40,9 @@
|
|||
<div class="formulaire__champs__champ">
|
||||
<label for="livraison-prenom">First name</label>
|
||||
<input
|
||||
autocomplete="given-name"
|
||||
id="livraison-prenom"
|
||||
minlength="2"
|
||||
name="livraison-prenom"
|
||||
required
|
||||
type="text"
|
||||
autocomplete="given-name" id="livraison-prenom"
|
||||
minlength="2" name="livraison-prenom"
|
||||
required type="text"
|
||||
value="{{ adresse_livraison.first_name }}"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -62,12 +50,9 @@
|
|||
<div class="formulaire__champs__champ">
|
||||
<label for="livraison-nom">Last name</label>
|
||||
<input
|
||||
autocomplete="family-name"
|
||||
id="livraison-nom"
|
||||
name="livraison-nom"
|
||||
minlength="2"
|
||||
required
|
||||
type="text"
|
||||
autocomplete="family-name" id="livraison-nom"
|
||||
name="livraison-nom" minlength="2"
|
||||
required type="text"
|
||||
value="{{ adresse_livraison.last_name }}"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -75,64 +60,48 @@
|
|||
<div class="formulaire__champs__champ">
|
||||
<label for="livraison-adresse">Address</label>
|
||||
<input
|
||||
autocomplete="street-address"
|
||||
id="livraison-adresse"
|
||||
name="livraison-adresse"
|
||||
required
|
||||
type="text"
|
||||
value="{{ adresse_livraison.address_1 }}"
|
||||
autocomplete="street-address" id="livraison-adresse"
|
||||
name="livraison-adresse" required
|
||||
type="text" value="{{ adresse_livraison.address_1 }}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="livraison-code-postal">Postcode</label>
|
||||
<input
|
||||
id="livraison-code-postal"
|
||||
minlength="3"
|
||||
name="livraison-code-postal"
|
||||
required
|
||||
type="text"
|
||||
value="{{ adresse_livraison.postcode }}"
|
||||
id="livraison-code-postal" minlength="3"
|
||||
name="livraison-code-postal" required
|
||||
type="text" value="{{ adresse_livraison.postcode }}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="livraison-ville">City</label>
|
||||
<input
|
||||
autocomplete="address-level2"
|
||||
id="livraison-ville"
|
||||
minlength="2"
|
||||
name="livraison-ville"
|
||||
required
|
||||
type="text"
|
||||
autocomplete="address-level2" id="livraison-ville"
|
||||
minlength="2" name="livraison-ville"
|
||||
required type="text"
|
||||
value="{{ adresse_livraison.city }}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<div class="formulaire__champs__champ" hidden>
|
||||
<label for="livraison-region-etat">Region/State</label>
|
||||
<input
|
||||
autocomplete="address-level1"
|
||||
id="livraison-region-etat"
|
||||
name="livraison-region-etat"
|
||||
placeholder="If applicable"
|
||||
type="text"
|
||||
value="{{ adresse_livraison.state }}"
|
||||
autocomplete="address-level1" id="livraison-region-etat"
|
||||
name="livraison-region-etat" placeholder="If applicable"
|
||||
type="text" value="{{ adresse_livraison.state }}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="livraison-pays">Country</label>
|
||||
<select
|
||||
id="livraison-pays"
|
||||
name="livraison-pays"
|
||||
id="livraison-pays" name="livraison-pays"
|
||||
required
|
||||
>
|
||||
{% for cle, pays in pays_livraison %}
|
||||
<option
|
||||
{{cle == adresse_livraison.country ? "selected" : ""}}
|
||||
value="{{cle}}"
|
||||
>
|
||||
<option {{cle == adresse_livraison.country ? "selected" : ""}} value="{{cle}}">
|
||||
{{ pays }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
|
|
@ -142,13 +111,9 @@
|
|||
<div class="formulaire__champs__champ">
|
||||
<label for="livraison-telephone">Phone</label>
|
||||
<input
|
||||
autocomplete="tel"
|
||||
id="livraison-telephone"
|
||||
minlength="6"
|
||||
name="livraison-telephone"
|
||||
placeholder="+33 6 03 03 03 03"
|
||||
required
|
||||
type="tel"
|
||||
autocomplete="tel" id="livraison-telephone"
|
||||
minlength="6" name="livraison-telephone"
|
||||
required type="tel"
|
||||
value="{{ adresse_livraison.phone }}"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -156,63 +121,45 @@
|
|||
<div class="formulaire__champs__champ">
|
||||
<label for="livraison-email">Email Address</label>
|
||||
<input
|
||||
autocomplete="email"
|
||||
id="livraison-email"
|
||||
minlength="4"
|
||||
name="livraison-email"
|
||||
placeholder="moshimoshi@email.com"
|
||||
required
|
||||
type="email"
|
||||
autocomplete="email" id="livraison-email"
|
||||
minlength="4" name="livraison-email"
|
||||
required type="email"
|
||||
value="{{ email }}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="panneau__formulaires__facturation formulaire"
|
||||
hidden
|
||||
>
|
||||
<div class="panneau__formulaires__facturation formulaire" hidden>
|
||||
<h3 class="formulaire__titre">Billing:</h3>
|
||||
|
||||
<div class="formulaire__champs">
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="facturation-prenom">First name</label>
|
||||
<input
|
||||
autocomplete="given-name"
|
||||
disabled
|
||||
id="facturation-prenom"
|
||||
name="facturation-prenom"
|
||||
minlength="2"
|
||||
required
|
||||
type="text"
|
||||
value="{{ adresse_facturation.first_name }}"
|
||||
autocomplete="given-name" disabled
|
||||
id="facturation-prenom" name="facturation-prenom"
|
||||
minlength="2" required
|
||||
type="text" value="{{ adresse_facturation.first_name }}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="facturation-nom">Last name</label>
|
||||
<input
|
||||
autocomplete="family-name"
|
||||
disabled
|
||||
id="facturation-nom"
|
||||
name="facturation-nom"
|
||||
minlength="2"
|
||||
required
|
||||
type="text"
|
||||
value="{{ adresse_facturation.last_name }}"
|
||||
autocomplete="family-name" disabled
|
||||
id="facturation-nom" name="facturation-nom"
|
||||
minlength="2" required
|
||||
type="text" value="{{ adresse_facturation.last_name }}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="facturation-adresse">Address</label>
|
||||
<input
|
||||
autocomplete="street-address"
|
||||
disabled
|
||||
id="facturation-adresse"
|
||||
name="facturation-adresse"
|
||||
required
|
||||
type="text"
|
||||
autocomplete="street-address" disabled
|
||||
id="facturation-adresse" name="facturation-adresse"
|
||||
required type="text"
|
||||
value="{{ adresse_facturation.address_1 }}"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -220,12 +167,9 @@
|
|||
<div class="formulaire__champs__champ">
|
||||
<label for="facturation-code-postal">Postcode</label>
|
||||
<input
|
||||
disabled
|
||||
id="facturation-code-postal"
|
||||
minlength="3"
|
||||
name="facturation-code-postal"
|
||||
required
|
||||
type="text"
|
||||
disabled id="facturation-code-postal"
|
||||
minlength="3" name="facturation-code-postal"
|
||||
required type="text"
|
||||
value="{{ adresse_facturation.postcode }}"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -233,76 +177,63 @@
|
|||
<div class="formulaire__champs__champ">
|
||||
<label for="facturation-ville">City</label>
|
||||
<input
|
||||
autocomplete="address-level2"
|
||||
disabled
|
||||
id="facturation-ville"
|
||||
minlength="2"
|
||||
name="facturation-ville"
|
||||
required
|
||||
type="text"
|
||||
value="{{ adresse_facturation.city }}"
|
||||
autocomplete="address-level2" disabled
|
||||
id="facturation-ville" minlength="2"
|
||||
name="facturation-ville" required
|
||||
type="text" value="{{ adresse_facturation.city }}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<div class="formulaire__champs__champ" hidden>
|
||||
<label for="facturation-region-etat">Region/State</label>
|
||||
<input
|
||||
autocomplete="address-level1"
|
||||
disabled
|
||||
id="facturation-region-etat"
|
||||
name="facturation-region-etat"
|
||||
placeholder="If applicable"
|
||||
type="text"
|
||||
autocomplete="address-level1" disabled
|
||||
id="facturation-region-etat" name="facturation-region-etat"
|
||||
placeholder="If applicable" type="text"
|
||||
value="{{ adresse_facturation.state }}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
contact@gcch.fr
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="facturation-pays">Country</label>
|
||||
<label for="livraison-pays">Country</label>
|
||||
<select
|
||||
id="facturation-pays"
|
||||
disabled
|
||||
name="facturation-pays"
|
||||
></select>
|
||||
id="facturation-pays" name="facturation-pays"
|
||||
required
|
||||
>
|
||||
{% for cle, pays in pays_livraison %}
|
||||
<option {{cle == adresse_livraison.country ? "selected" : ""}} value="{{cle}}">
|
||||
{{ pays }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="facturation-telephone">Phone</label>
|
||||
<input
|
||||
autocomplete="tel"
|
||||
disabled
|
||||
id="facturation-telephone"
|
||||
minlength="6"
|
||||
name="facturation-telephone"
|
||||
placeholder="+33 6 03 43 60 16"
|
||||
required
|
||||
type="tel"
|
||||
value="{{ adresse_facturation.phone }}"
|
||||
autocomplete="tel" disabled
|
||||
id="facturation-telephone" minlength="6"
|
||||
name="facturation-telephone" required
|
||||
type="tel" value="{{ adresse_facturation.phone }}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="formulaire__champs__champ">
|
||||
<label for="facturation-email">Email Address</label>
|
||||
<input
|
||||
autocomplete="email"
|
||||
disabled
|
||||
id="facturation-email"
|
||||
minlength="4"
|
||||
name="facturation-email"
|
||||
placeholder="moshimoshi@email.com"
|
||||
required
|
||||
type="email"
|
||||
value="{{ email }} "
|
||||
autocomplete="email" disabled
|
||||
id="facturation-email" minlength="4"
|
||||
name="facturation-email" required
|
||||
type="email" value="{{ email }} "
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panneau__formulaires__message">
|
||||
<p
|
||||
class="message"
|
||||
id="message-formulaire-adresses"
|
||||
>
|
||||
<p class="message" id="message-formulaire-adresses">
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -320,14 +251,10 @@
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="formulaire__paiement__choix"
|
||||
hidden
|
||||
>
|
||||
<div class="formulaire__paiement__choix" hidden>
|
||||
<label for="paiement-stripe">Credit card</label>
|
||||
<input
|
||||
id="paiement-stripe"
|
||||
name="type-paiement"
|
||||
id="paiement-stripe" name="type-paiement"
|
||||
type="radio"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -336,10 +263,7 @@
|
|||
</form>
|
||||
|
||||
<footer class="panneau__pied-de-page">
|
||||
<button
|
||||
form="formulaire-commande"
|
||||
type="submit"
|
||||
>
|
||||
<button form="formulaire-commande" type="submit">
|
||||
Submit the addresses
|
||||
</button>
|
||||
</footer>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
<section
|
||||
class="panneau"
|
||||
id="panneau-panier"
|
||||
>
|
||||
<section class="panneau" id="panneau-panier">
|
||||
<header class="panneau__en-tete">
|
||||
<h2>Your cart</h2>
|
||||
</header>
|
||||
|
|
@ -9,10 +6,8 @@
|
|||
<div class="panneau__grille-produits">
|
||||
{% for produit in produits_panier %}
|
||||
<article
|
||||
class="panneau__grille-produits__produit"
|
||||
data-cle-panier="{{ produit.cle }}"
|
||||
data-id-produit="{{ produit.id_produit }}"
|
||||
data-id-variation="{{ produit.id_variation }}"
|
||||
class="panneau__grille-produits__produit" data-cle-panier="{{ produit.cle }}"
|
||||
data-id-produit="{{ produit.id_produit }}" data-id-variation="{{ produit.id_variation }}"
|
||||
data-quantite="{{ produit.quantite }}"
|
||||
>
|
||||
<div class="panneau__grille-produits__produit__illustratif">
|
||||
|
|
@ -39,28 +34,20 @@
|
|||
|
||||
<div class="detail-produit__actions">
|
||||
<button
|
||||
class="detail-produit__actions__soustraction"
|
||||
{{ produit.quantite > 1 ? "" : "disabled" }}
|
||||
class="detail-produit__actions__soustraction" {{ produit.quantite > 1 ? "" : "disabled" }}
|
||||
type="button"
|
||||
>
|
||||
-
|
||||
</button>
|
||||
<input
|
||||
min="1"
|
||||
type="number"
|
||||
min="1" type="number"
|
||||
value="{{ produit.quantite }}"
|
||||
/>
|
||||
<button
|
||||
class="detail-produit__actions__addition"
|
||||
type="button"
|
||||
>
|
||||
<button class="detail-produit__actions__addition" type="button">
|
||||
+
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="detail-produit__actions__suppression"
|
||||
type="button"
|
||||
>
|
||||
<button class="detail-produit__actions__suppression" type="button">
|
||||
Remove
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -71,38 +58,27 @@
|
|||
|
||||
<div class="panneau__instructions-code-promo">
|
||||
<textarea
|
||||
class="panneau__instructions-code-promo__instructions"
|
||||
id="instructions-client"
|
||||
maxlength="2000"
|
||||
minlength="10"
|
||||
class="panneau__instructions-code-promo__instructions" id="instructions-client"
|
||||
maxlength="2000" minlength="10"
|
||||
name="instructions"
|
||||
placeholder="Add special instructions for your order: specify the products you want wrapped and how (i.e. all in one bag or separated), a gift message, etc."
|
||||
resizable="false"
|
||||
rows="3"
|
||||
resizable="false" rows="3"
|
||||
spellcheck="true"
|
||||
></textarea>
|
||||
|
||||
<form
|
||||
action=""
|
||||
class="panneau__instructions-code-promo__code-promo"
|
||||
{{ code_promo ? "data-code-promo-present" : "" }}
|
||||
id="ensemble-code-promo"
|
||||
action="" class="panneau__instructions-code-promo__code-promo"
|
||||
{{ code_promo ? "data-code-promo-present" : "" }} id="ensemble-code-promo"
|
||||
>
|
||||
<input
|
||||
{{ code_promo ? "disabled" : "" }}
|
||||
id="champ-code-promo"
|
||||
maxlength="20"
|
||||
minlength="3"
|
||||
name="code-promo"
|
||||
placeholder="Discount code or gift card"
|
||||
type="text"
|
||||
value='{{ code_promo ? code_promo : ""}}'
|
||||
{{ code_promo ? "disabled" : "" }} id="champ-code-promo"
|
||||
maxlength="20" minlength="3"
|
||||
name="code-promo" placeholder="Discount code or gift card"
|
||||
type="text" value='{{ code_promo ? code_promo : ""}}'
|
||||
/>
|
||||
<button
|
||||
class="bouton-blanc-sur-noir"
|
||||
for="code-promo"
|
||||
id="bouton-code-promo"
|
||||
type="button"
|
||||
class="bouton-blanc-sur-noir" for="code-promo"
|
||||
id="bouton-code-promo" type="button"
|
||||
>
|
||||
{{ code_promo ? "Remove" : "Apply" }}
|
||||
</button>
|
||||
|
|
@ -112,27 +88,20 @@
|
|||
</div>
|
||||
|
||||
<div class="panneau__sous-totaux">
|
||||
<div
|
||||
class="panneau__sous-totaux__ligne"
|
||||
id="sous-total-produits"
|
||||
>
|
||||
<div class="panneau__sous-totaux__ligne" id="sous-total-produits">
|
||||
<p>Subtotal:</p>
|
||||
<p><strong>{{ sous_total_panier }}€</strong></p>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="panneau__sous-totaux__ligne"
|
||||
id="sous-total-reduction"
|
||||
class="panneau__sous-totaux__ligne" id="sous-total-reduction"
|
||||
{{ code_promo ? "" : "hidden"}}
|
||||
>
|
||||
<p>Discount:</p>
|
||||
<p><strong>-{{ sous_total_reduction }}€</strong></p>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="panneau__sous-totaux__ligne"
|
||||
id="sous-total-livraison"
|
||||
>
|
||||
<div class="panneau__sous-totaux__ligne" id="sous-total-livraison">
|
||||
<p>Shipping:</p>
|
||||
{% if sous_total_livraison == 0 %}
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -2,36 +2,27 @@
|
|||
Boîte flottante contenant les informations sur le Produit, en détails, et le sélecteur de quantité/taille pour l'ajout au Panier
|
||||
#}
|
||||
|
||||
<aside
|
||||
aria-label="Product's details and variation selection"
|
||||
class="informations-produit"
|
||||
>
|
||||
<aside aria-label="Product's details and variation selection" class="informations-produit">
|
||||
<div class="informations-produit__conteneur">
|
||||
<section class="onglets-details-produit">
|
||||
{# Contenus #}
|
||||
<section
|
||||
aria-labelledby="label-details-produit"
|
||||
hidden
|
||||
id="details-produit"
|
||||
role="tabpanel"
|
||||
aria-labelledby="label-details-produit" hidden
|
||||
id="details-produit" role="tabpanel"
|
||||
>
|
||||
{{ produit.details }}
|
||||
</section>
|
||||
|
||||
<section
|
||||
aria-labelledby="label-conditions-livraison"
|
||||
hidden
|
||||
id="conditions-livraison"
|
||||
role="tabpanel"
|
||||
aria-labelledby="label-conditions-livraison" hidden
|
||||
id="conditions-livraison" role="tabpanel"
|
||||
>
|
||||
{{ descriptions_produits.texte_conditions_livraison }}
|
||||
</section>
|
||||
|
||||
<section
|
||||
aria-labelledby="label-entretien-produit"
|
||||
hidden
|
||||
id="entretien-produit"
|
||||
role="tabpanel"
|
||||
aria-labelledby="label-entretien-produit" hidden
|
||||
id="entretien-produit" role="tabpanel"
|
||||
>
|
||||
{{ descriptions_produits.texte_entretien_produit }}
|
||||
</section>
|
||||
|
|
@ -40,10 +31,8 @@
|
|||
<ul role="tablist">
|
||||
<li role="presentation">
|
||||
<a
|
||||
aria-selected="false"
|
||||
href="#details-produit"
|
||||
id="label-details-produit"
|
||||
role="tab"
|
||||
aria-selected="false" href="#details-produit"
|
||||
id="label-details-produit" role="tab"
|
||||
>
|
||||
Details
|
||||
</a>
|
||||
|
|
@ -51,10 +40,8 @@
|
|||
|
||||
<li role="presentation">
|
||||
<a
|
||||
aria-selected="false"
|
||||
href="#conditions-livraison"
|
||||
id="label-conditions-livraison"
|
||||
role="tab"
|
||||
aria-selected="false" href="#conditions-livraison"
|
||||
id="label-conditions-livraison" role="tab"
|
||||
>
|
||||
Shipping
|
||||
</a>
|
||||
|
|
@ -62,10 +49,8 @@
|
|||
|
||||
<li role="presentation">
|
||||
<a
|
||||
aria-selected="false"
|
||||
href="#entretien-produit"
|
||||
id="label-entretien-produit"
|
||||
role="tab"
|
||||
aria-selected="false" href="#entretien-produit"
|
||||
id="label-entretien-produit" role="tab"
|
||||
>
|
||||
Care
|
||||
</a>
|
||||
|
|
@ -78,32 +63,23 @@
|
|||
|
||||
{% if variations_produit|length > 1 %}
|
||||
<div class="selecteur-produit__selection-variation">
|
||||
<label
|
||||
for="selecteur-variation"
|
||||
id="label-selecteur-variation"
|
||||
>
|
||||
<label for="selecteur-variation" id="label-selecteur-variation">
|
||||
Variation:
|
||||
</label>
|
||||
|
||||
<div class="selecteur-produit__selection-variation__selecteurs">
|
||||
<select
|
||||
aria-labelledby="label-selecteur-variation"
|
||||
class="selecteur-natif"
|
||||
id="selecteur-variation"
|
||||
name="variations"
|
||||
aria-labelledby="label-selecteur-variation" class="selecteur-natif"
|
||||
id="selecteur-variation" name="variations"
|
||||
>
|
||||
<option
|
||||
disabled
|
||||
selected
|
||||
disabled selected
|
||||
value=""
|
||||
>
|
||||
--
|
||||
</option>
|
||||
{% for variation in variations_produit %}
|
||||
<option
|
||||
data-prix="{{ variation.prix }}"
|
||||
value="{{ variation.id }}"
|
||||
>
|
||||
<option data-prix="{{ variation.prix }}" value="{{ variation.id }}">
|
||||
{{ variation.titre }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
|
|
@ -117,11 +93,8 @@
|
|||
|
||||
<section class="actions-produit">
|
||||
<button
|
||||
hidden
|
||||
class="bouton-case-pleine"
|
||||
{{ variations_produit|length > 1 ? "disabled" : "" }}
|
||||
id="bouton-ajout-panier"
|
||||
type="button"
|
||||
class="bouton-case-pleine" {{ variations_produit|length > 1 ? "disabled" : "" }}
|
||||
id="bouton-ajout-panier" type="button"
|
||||
>
|
||||
Add to cart
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
<div class="fleches-defilement">
|
||||
<button
|
||||
class="fleches-defilement__bouton bouton-fleche"
|
||||
type="button"
|
||||
>
|
||||
<button class="fleches-defilement__bouton bouton-fleche" type="button">
|
||||
{#
|
||||
<svg
|
||||
height="2rem"
|
||||
|
|
@ -18,10 +15,8 @@
|
|||
</svg>
|
||||
#}
|
||||
<svg
|
||||
height="1.5rem"
|
||||
transform="scale(-1 1)"
|
||||
viewBox="94.634 56.652 88.879 79.521"
|
||||
width="1.5rem"
|
||||
height="1.5rem" transform="scale(-1 1)"
|
||||
viewBox="94.634 56.652 88.879 79.521" width="1.5rem"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
|
|
@ -31,15 +26,10 @@
|
|||
</svg>
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="fleches-defilement__bouton bouton-fleche"
|
||||
type="button"
|
||||
>
|
||||
<button class="fleches-defilement__bouton bouton-fleche" type="button">
|
||||
<svg
|
||||
height="1.5rem"
|
||||
viewBox="94.634 56.652 88.879 79.521"
|
||||
width="1.5rem"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
height="1.5rem" viewBox="94.634 56.652 88.879 79.521"
|
||||
width="1.5rem" xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="m94.623 136.156 88.869-36.863-88.869-42.648s21.33 20.87 21.33 39.756c0 18.891-21.33 39.755-21.33 39.755"
|
||||
|
|
@ -50,10 +40,7 @@
|
|||
</div>
|
||||
|
||||
<main class="photos-produit">
|
||||
<div
|
||||
aria-label="Photo of the Product alone"
|
||||
class="colonne colonne-gauche"
|
||||
>
|
||||
<div aria-label="Photo of the Product alone" class="colonne colonne-gauche">
|
||||
{% for photo in produit.photos_colonne_gauche %}
|
||||
<figure data-index="0">
|
||||
<picture>
|
||||
|
|
@ -63,10 +50,7 @@
|
|||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div
|
||||
aria-label="Photos of the Product worn"
|
||||
class="colonne colonne-droite"
|
||||
>
|
||||
<div aria-label="Photos of the Product worn" class="colonne colonne-droite">
|
||||
{% for photo in produit.photos_colonne_droite %}
|
||||
<figure data-index="{{ loop.index }}">
|
||||
<picture>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
<section
|
||||
aria-label="Products in the same Collection"
|
||||
class="produits-similaires"
|
||||
>
|
||||
<section aria-label="Products in the same Collection" class="produits-similaires">
|
||||
<header><h2>From the same Collection</h2></header>
|
||||
|
||||
{% include "parts/pages/produit/grille-produits-similaires.twig" %}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<div
|
||||
class="grille-produits"
|
||||
data-page="1"
|
||||
class="grille-produits" data-page="1"
|
||||
{% if id_categorie_produits %}data-id-categorie-produits="{{ id_categorie_produits }}"{% endif %}
|
||||
>
|
||||
{% if produits|length > 0 %}
|
||||
|
|
|
|||
|
|
@ -1,26 +1,24 @@
|
|||
<footer id="pied-de-page">
|
||||
<section class="zone-menu-navigation-secondaire">
|
||||
<nav
|
||||
class="menu-navigation"
|
||||
id="menu-navigation-secondaire"
|
||||
>
|
||||
<nav class="menu-navigation" id="menu-navigation-secondaire">
|
||||
<ul>
|
||||
<li><a href="/contact">Contact</a></li>
|
||||
{# <li><a href="">Terms & Legals</a></li> #}
|
||||
<li><a href="/terms-and-conditions">Terms & Conditions</a></li>
|
||||
{# <li><a href="">Shipping & Returns</a></li> #}
|
||||
</ul>
|
||||
</nav>
|
||||
</section>
|
||||
|
||||
<section class="zone-liens-reseaux-sociaux">
|
||||
<nav
|
||||
class="menu-navigation"
|
||||
id="liens-reseaux-sociaux"
|
||||
>
|
||||
<nav class="menu-navigation" id="liens-reseaux-sociaux">
|
||||
<ul>
|
||||
{% for lien in liens_reseaux_sociaux %}
|
||||
{% if lien.url %}
|
||||
<li><a href="{{ lien.url }}">{{ lien.nom }}</a></li>
|
||||
<li>
|
||||
<a href="{{ lien.url }}" target="_blank">
|
||||
{{ lien.nom }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -17,10 +17,7 @@
|
|||
</p>
|
||||
|
||||
<p>
|
||||
If you have any questions, don't hesitate to <a
|
||||
class="lien-lien"
|
||||
href="/contact"
|
||||
>
|
||||
If you have any questions, don't hesitate to <a class="lien-lien" href="/contact">
|
||||
contact us
|
||||
</a>!
|
||||
</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue