un petit formulaire de recherche, à améliorer plus tard
This commit is contained in:
parent
6b7464a459
commit
6a977badbd
8 changed files with 84 additions and 14 deletions
6
content/recherche.html
Normal file
6
content/recherche.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
<section id="methode" class="container section-top section-bottom">
|
||||
<div class="cadre-blanc">
|
||||
<h1>Résultats : #ENV{recherche}</h1>
|
||||
<INCLURE{fond=inclure/a_la_une_contenu,env,ajax=a_la_une}>
|
||||
</div>
|
||||
</section>
|
|
@ -18,8 +18,11 @@
|
|||
</BOUCLE_presentation>
|
||||
</div>
|
||||
<div class="dernieres-nouvelles mt-3 p-3">
|
||||
<h2 class="a-la-une h3">Derniers articles</h2>
|
||||
<INCLURE{fond=inclure/a_la_une_contenu,env,ajax}>
|
||||
<div class="d-md-flex justify-content-between align-items-center">
|
||||
<h2 class="a-la-une h3">Derniers articles</h2>
|
||||
#FORMULAIRE_RECHERCHE
|
||||
</div>
|
||||
<INCLURE{fond=inclure/a_la_une_contenu,env}>
|
||||
</div>
|
||||
</div>
|
||||
<aside class="col-12 col-lg-4 col-xl-3">
|
||||
|
|
|
@ -153,6 +153,9 @@ body{
|
|||
font-size: 1.1rem;
|
||||
white-space: normal;
|
||||
}
|
||||
.dropdown i.fas{
|
||||
padding-bottom: 0.1rem;
|
||||
}
|
||||
.navbar-brand{
|
||||
width: 150px;
|
||||
transition: all 1s ease;
|
||||
|
@ -308,6 +311,13 @@ body{
|
|||
color: $bg-diapo-texte;
|
||||
}
|
||||
|
||||
#barre-recherche input{
|
||||
vertical-align: middle;
|
||||
padding: 0.375rem 0.75rem;
|
||||
border-radius: 0.2rem;
|
||||
border: solid 1px lightgrey;
|
||||
}
|
||||
|
||||
#agenda, .dernieres-nouvelles{
|
||||
background: $fond-transparent;
|
||||
border-radius: 0.2rem;
|
||||
|
|
|
@ -12068,6 +12068,10 @@ body {
|
|||
white-space: normal;
|
||||
}
|
||||
|
||||
#menu-principal .dropdown i.fas {
|
||||
padding-bottom: 0.1rem;
|
||||
}
|
||||
|
||||
#menu-principal .navbar-brand {
|
||||
width: 150px;
|
||||
-webkit-transition: all 1s ease;
|
||||
|
@ -12245,6 +12249,13 @@ body {
|
|||
color: #00ADCB;
|
||||
}
|
||||
|
||||
#barre-recherche input {
|
||||
vertical-align: middle;
|
||||
padding: 0.375rem 0.75rem;
|
||||
border-radius: 0.2rem;
|
||||
border: solid 1px lightgrey;
|
||||
}
|
||||
|
||||
#agenda, .dernieres-nouvelles {
|
||||
background: rgba(255, 255, 255, 0.92);
|
||||
border-radius: 0.2rem;
|
||||
|
|
14
formulaires/recherche.html
Normal file
14
formulaires/recherche.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<div class="formulaire_spip formulaire_recherche[ (#ENV{class})]" id="formulaire_recherche">
|
||||
<form id="barre-recherche" action="[(#ENV{action})]" method="get">
|
||||
[(#ENV{action}|form_hidden)]
|
||||
[(#RECHERCHE|oui)
|
||||
<button class="btn" id="btn_reinit_recherche"><i class="fa fa-times" aria-hidden="true"></i></button>
|
||||
]
|
||||
<input type="search" id="recherche" name="recherche" value=#RECHERCHE>
|
||||
<button type="submit" class="btn" id="btn_rechercher_doc"><i class="fa fa-search" aria-hidden="true"></i></button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,11 +1,16 @@
|
|||
<div class="row liste-articles">
|
||||
<B_a_la_une>
|
||||
<div class="row liste-articles">
|
||||
#ANCRE_PAGINATION
|
||||
<BOUCLE_a_la_une(ARTICLES){id_rubrique=#CONFIG{balint/id_rub_articles}}{!par date}{pagination 3}{!titre_mot in agenda, dossiers, agora}>
|
||||
<div class="col-12 col-sm-4 mt-4 mt-lg-0">
|
||||
<INCLURE{fond=inclure/bloc_article, env, id_article}/>
|
||||
</div>
|
||||
</BOUCLE_a_la_une>
|
||||
</div>
|
||||
#ANCRE_PAGINATION
|
||||
<BOUCLE_a_la_une(ARTICLES){id_rubrique=#CONFIG{balint/id_rub_articles}}{!par date}{pagination 3}{!titre_mot in agenda, dossiers, agora}{recherche?}>
|
||||
<div class="col-12 col-sm-4 mt-4 mt-lg-0">
|
||||
<INCLURE{fond=inclure/bloc_article, env, id_article}/>
|
||||
</div>
|
||||
</BOUCLE_a_la_une>
|
||||
|
||||
[<div class="pagination mt-3">(#PAGINATION{page_precedent_suivant})</div>]
|
||||
</B_a_la_une>
|
||||
<div class="col-12">
|
||||
Aucun résultat
|
||||
</div>
|
||||
<//B_a_la_une>
|
||||
</div>
|
|
@ -40,11 +40,11 @@
|
|||
<?php if (isset($GLOBALS['visiteur_session']['id_auteur'])) { ?>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="[(#URL_PAGE{agora})]" id="mediasDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-star"></i> <?php echo $GLOBALS['visiteur_session']['nom'] ?>
|
||||
<i class="fas fa-user"></i> <?php echo $GLOBALS['visiteur_session']['nom'] ?>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="mediasDropdown">
|
||||
<a class="dropdown-item" href="[(#URL_PAGE{modifier_auteur}|parametre_url{retour,#SELF})]">
|
||||
<i class="fas fa-user"></i> Mon profil
|
||||
<i class="fas fa-user-circle-o"></i> Mon profil
|
||||
</a>
|
||||
<?php if (isset($GLOBALS['visiteur_session']['statut']) AND in_array($GLOBALS['visiteur_session']['statut'],array("0minirezo","1comite"))) { ?>
|
||||
<a class="dropdown-item" href="[(#URL_PAGE{editer_article})]">
|
||||
|
|
|
@ -90,5 +90,26 @@ jQuery(function($) {
|
|||
// On lie l'événement resize à la fonction
|
||||
window.addEventListener('resize', redimensionnement, false);
|
||||
|
||||
/*
|
||||
// Formulaire de recherche perso
|
||||
$('body').on('submit', '#barre-recherche', function(event){
|
||||
event.preventDefault();
|
||||
var mot = $("#recherche").val();
|
||||
console.log(mot);
|
||||
ajaxReload('a_la_une', {
|
||||
args: {
|
||||
recherche: mot
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("body").on("click","#btn_reinit_recherche",function(){
|
||||
ajaxReload('a_la_une', {
|
||||
args: {
|
||||
recherche: ''
|
||||
}
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue