recherche full texte
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+12
-12
File diff suppressed because one or more lines are too long
@@ -91,6 +91,9 @@ gsap.registerPlugin(ScrollTrigger);
|
||||
let header_right = document.getElementById('burger-btn');
|
||||
header_right.parentElement.addEventListener('click', function(e){
|
||||
// console.log('click header_right', this);
|
||||
// Le champ de recherche du burger vit dans ce conteneur : y cliquer
|
||||
// (pour saisir, ou sur la loupe) ne doit pas refermer le menu.
|
||||
if (e.target.closest('form')) return;
|
||||
this.firstElementChild.toggleAttribute('opened');
|
||||
this.firstElementChild.nextElementSibling.toggleAttribute('opened');
|
||||
})
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
@use "partials/global/base";
|
||||
@use "partials/global/layout";
|
||||
@use "partials/global/header";
|
||||
@use "partials/global/search-form";
|
||||
@use "partials/global/variable-titles";
|
||||
|
||||
// ── Pages (l'ordre ci-dessous EST la cascade) ──────────────────────────────
|
||||
@@ -15,3 +16,4 @@
|
||||
@use "partials/pages/evenement";
|
||||
@use "partials/pages/views-archives-projets";
|
||||
@use "partials/pages/views-archives-evenements";
|
||||
@use "partials/pages/recherche";
|
||||
|
||||
@@ -135,12 +135,22 @@ header[role="banner"]{
|
||||
grid-row: 1 / -1;
|
||||
}
|
||||
|
||||
// Recherche (templates/search-form.html.twig) : sous la langue.
|
||||
>form.search-pill{
|
||||
--search-pill-width: 22rem;
|
||||
margin-top: 1.5em;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
@media #{$mobile}{
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
grid-template-rows: none;
|
||||
>div#block-leshed-config-pages{
|
||||
grid-column: 1;
|
||||
grid-row: auto;
|
||||
// Après la recherche, qui suit la langue (maquette p. 24).
|
||||
order: 1;
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
// ____ _
|
||||
// / ___| ___ __ _ _ __ ___| |__
|
||||
// \___ \ / _ \/ _` | '__/ __| '_ \
|
||||
// ___) | __/ (_| | | | (__| | | |
|
||||
// |____/ \___|\__,_|_| \___|_| |_|
|
||||
//
|
||||
// Champ de recherche « pilule » (templates/search-form.html.twig) : burger
|
||||
// et page /recherche (maquette p. 3, 22, 24). Contour noir fin, loupe à
|
||||
// droite ; la largeur est donnée par le contexte (--search-pill-width).
|
||||
|
||||
form.search-pill{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
width: var(--search-pill-width, 16rem);
|
||||
max-width: 100%;
|
||||
height: 2.3em;
|
||||
padding: 0 0.35em 0 1em;
|
||||
border: 1px solid #000;
|
||||
border-radius: 999px;
|
||||
background-color: #fff;
|
||||
|
||||
input[type="search"]{
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
font: inherit;
|
||||
font-weight: 300;
|
||||
color: #000;
|
||||
outline: none;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
&::placeholder{
|
||||
color: #555;
|
||||
opacity: 1;
|
||||
}
|
||||
// Croix native d'effacement : pas dans la maquette.
|
||||
&::-webkit-search-cancel-button{
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
}
|
||||
|
||||
button{
|
||||
flex: 0 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 2em;
|
||||
height: 2em;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: #000;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
// Focus : le contour s'épaissit (pas d'anneau extérieur, absent de la
|
||||
// maquette, mais un repère visible au clavier).
|
||||
&:focus-within{
|
||||
box-shadow: 0 0 0 1px #000;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
// ____ _ _
|
||||
// | _ \ ___ ___| |__ ___ _ __ ___| |__ ___
|
||||
// | |_) / _ \/ __| '_ \ / _ \ '__/ __| '_ \ / _ \
|
||||
// | _ < __/ (__| | | | __/ | | (__| | | | __/
|
||||
// |_| \_\___|\___|_| |_|\___|_| \___|_| |_|\___|
|
||||
//
|
||||
// Page /recherche (vue recherche, page_1 — maquette p. 22) : en-tête
|
||||
// « Résultats pour la recherche "…" » + champ à droite, grille de teasers.
|
||||
|
||||
@use "../abstracts/variables" as *;
|
||||
@use "../abstracts/nodes-on-liste" as *;
|
||||
@use "../abstracts/breakpoints" as *;
|
||||
|
||||
@mixin carteRecherche{
|
||||
>header>h2{
|
||||
font-size: 3em;
|
||||
}
|
||||
.body,
|
||||
.field_infos_pratiques,
|
||||
.field_lieu{
|
||||
display: none;
|
||||
}
|
||||
.field_artiste_s_invite_s,
|
||||
.field_type_de_projet,
|
||||
.field_type_d_evenement{
|
||||
font-size: 0.9em;
|
||||
font-weight: 300;
|
||||
line-height: 1.3;
|
||||
}
|
||||
.field_artiste_s_invite_s{
|
||||
margin-top: 0.4em;
|
||||
}
|
||||
}
|
||||
|
||||
div.views-recherche{
|
||||
>header.recherche-header{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 1em $colsgap;
|
||||
padding: 1em 0 2.5em;
|
||||
|
||||
p.recherche-resume{
|
||||
margin: 0;
|
||||
em{
|
||||
font-style: italic;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
form.search-pill{
|
||||
--search-pill-width: 15rem;
|
||||
}
|
||||
}
|
||||
|
||||
// Même grille que les archives projets : 4 colonnes, 2 en mobile.
|
||||
div.view-content{
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
column-gap: $colsgap;
|
||||
row-gap: 0;
|
||||
align-items: start;
|
||||
>.views-row{
|
||||
margin-bottom: $colsgap;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
@media #{$mobile}{
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
// Maquette p. 22 : titre, image, artistes et type en petit, sans résumé.
|
||||
// Surcharges posées après les mixins, à la même spécificité.
|
||||
article.node-type-projet.view-mode-teaser{
|
||||
@include projetOnListe();
|
||||
@include carteRecherche();
|
||||
}
|
||||
article.node-type-evenement.view-mode-teaser{
|
||||
@include evenementOnListe();
|
||||
@include carteRecherche();
|
||||
}
|
||||
|
||||
div.view-empty{
|
||||
padding-bottom: 4em;
|
||||
}
|
||||
|
||||
nav.pager{
|
||||
ul{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 1em;
|
||||
padding: 0;
|
||||
li{ list-style: none; }
|
||||
li.is-active{ font-weight: 600; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user