recherche full texte

This commit is contained in:
2026-12-01 21:11:30 +01:00
parent d021058b11
commit 1ea6326bf4
16 changed files with 833 additions and 15 deletions
@@ -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; }
}
}
}