libreavous/squelettes/content/scrutarijs.html

223 lines
9.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[===============================================================(#REM)
Configuration du client Scrutari
]
<script>
$(function () {
var scrutariApi = new Scrutari.Api(Scrutari.Lav.getApiSettings());
var initOptions = Object.assign(Scrutari.Lav.getInitOptions(), {
initialQuery: "[(#ENV*{q}|scrutari_escape_query)]",
initialQId: "[(#ENV*{qid}|scrutari_escape_query)]",
permalinkPattern: "https://www.libreavous.org/spip.php?page=scrutarijs&qid=$QID"
});
Scrutari.Client.init(scrutariApi, "scrutari_client", initOptions, null);
});
</script>
</script>
[===============================================================(#REM)
Déclaration du bloc destiné à recevoir le client
]
<article class="texte_content">
<BOUCLE_entete(ARTICLES){page=recherchescrutari}>
<header class="cartouche">
[<p class="#EDIT{surtitre} surtitre">#(#SURTITRE)</p>]
<h1><span class="#EDIT{titre} article__titre">#TITRE</span>[
<small class="#EDIT{soustitre} soustitre">(#SOUSTITRE)</small>
]</h1>
</header>
<div class="main">
[<div class="#EDIT{chapo} article__chapo">(#CHAPO|adaptive_images{#CONST{_CONTENT_WIDTH},0})</div>]
[<div class="#EDIT{texte} article__texte">(#TEXTE|adaptive_images{#CONST{_CONTENT_WIDTH},0})</div>]
</div>
</BOUCLE_entete>
[===============================================================(#REM)
Structure du client
]
<div id="scrutari_client">
<!-- main -->
<!-- main.main-form -->
<form data-scrutari-form="mainsearch" role="search">
<!-- main.main-form.area-input -->
<div data-scrutari-area="input" class="lav-input-Area">
<span class="lav-input-Block">
<i class="fas fa-search"></i>
<input type="search" class="lav-input-Field" size="30" name="q" value="" placeholder="Chercher un sujet, un-e intervenant-e…">
</span>
<button type="submit" class="btn lav-input-Submit">Rechercher</button>
</div>
<!-- /main.main-form.area-input -->
<!-- main.main-form.area-parameters -->
<details data-scrutari-area="parameters" class="lav-details-Container">
<summary class="lav-details-Summary">Option de recherche avancée</summary>
<div class="lav-details-Body">
<p>
<button data-scrutari-action="showModal" data-scrutari-target="help_relation" type="button" title="Aide sur les relations">
<i class="fas fa-question-circle"></i>
</button>
<span>Relations :</span>
<label><input type="radio" name="q-mode" value="intersection" checked> Et</label>
<label><input type="radio" name="q-mode" value="union"> Ou</label>
<label><input type="radio" name="q-mode" value="operation"> Avancée</label>
</p>
<p>
<button data-scrutari-action="showModal" data-scrutari-target="help_ponderation" type="button" title="Aide sur la priorité">
<i class="fas fa-question-circle"></i>
</button>
<span>Priorité :</span>
<label><input type="radio" name="ponderation" value="pertinence" checked> Pertinence</label>
<label><input type="radio" name="ponderation" value="date"> Date</label>
</p>
<p>
<button data-scrutari-action="showModal" data-scrutari-target="help_periode" type="button" title="Aide sur la période">
<i class="fas fa-question-circle"></i>
</button>
<span>Période :</span>
<input type="text" class="lav-details-Input" name="periode" value="">
</p>
<p>
<button data-scrutari-action="showModal" data-scrutari-target="help_elargir" type="button" title="Aide sur « élargir »">
<i class="fas fa-question-circle"></i>
</button>
<span>Élargir :</span>
<label><input type="radio" name="wildchar" value="end" checked> Oui*</label>
<label><input type="radio" name="wildchar" value="none"> Non</label>
</p>
</div>
</details>
<!-- /main.main-form.area-parameters -->
</form>
<!-- /main.main-form -->
<!-- main.area-result -->
<div data-scrutari-area="result" class="scrutari-area-Result">
<div class="scrutari-Hidden" data-scrutari-hidden="empty">
<h3>Votre recherche :</h3>
<p id="scrutari_lav_sequence" class="lav-Sequence"></p>
</div>
<div class="scrutari-Hidden lav-Filtre" data-scrutari-hidden="empty">
<p>Filtrer les résultats :
<label class="lav-FiltreLabel"><input type="radio" name="lav-site" value="tous" checked> Tous</label>
<span data-scrutari-count="total-tous" class="lav-Total">(<span data-scrutari-component="value"></span>)</span>
<label class="lav-FiltreLabel"><input type="radio" name="lav-site" value="libreavous" class="lav-Total"> Libre à vous !</label>
<span data-scrutari-count="total-libreavous" class="lav-Total">(<span data-scrutari-component="value"></span>)</span>
<label class="lav-FiltreLabel"><input type="radio" name="lav-site" value="librealire"> Libre à lire</label>
<span data-scrutari-count="total-librealire" class="lav-Total">(<span data-scrutari-component="value"></span>)</span>
</p>
</div>
<!-- main.area-result.result-history -->
<div class="scrutari-Hidden lav-history-Container" data-scrutari-hidden="start">
<span class="lav-history-Label">Votre historique :</span>
<div data-scrutari-block="historyList" class="lav-history-List">
</div>
<span class="lav-history-Clear">
<button data-scrutari-action="clearHistory" title="Vider lhistorique"><i class="fas fa-trash"></i></button>
</span>
</div>
<!-- /main.area-result.result-history -->
<!-- main.area-result.result-links -->
<div class="scrutari-Hidden" data-scrutari-hidden="empty">
<p>Partager votre recherche :
<a href="#" data-scrutari-link="permalink" data-scrutari-action="copyPermalink" target="_blank" class="btn taille80 blanc">Copier lURL</a>
<a href="#" data-scrutari-link="csv" target="_blank" class="btn taille80 blanc">Télécharger (CSV)</a>
<a href="#" data-scrutari-link="ods" target="_blank" class="btn taille80 blanc">Télécharger (ODS)</a>
<a href="#" data-scrutari-link="atom" target="_blank" class="btn taille80 blanc">Sabonner (Atom)</a>
</p>
</div>
<!-- /main.area-result.result-links -->
<div class="scrutari-Hidden lav-TitreResultats" data-scrutari-hidden="empty">
<h3>Vos résultats</h3>
</div>
<div data-scrutari-block="paginationBlock"></div>
</div>
<!-- /main.area-result -->
<!-- main.area-poweredby -->
<div class="scrutari-area-Poweredby scrutari-Hidden" data-scrutari-hidden="empty">
<p>
<a href="http://www.scrutari.net" target="_blank">
<span class="scrutari-icon-Logo"></span> Recherche effectuée par Scrutari
</a>
</p>
</div>
<!-- /main.area-poweredby -->
<!-- /main -->
</div>
</article>
[===============================================================(#REM)
Partie consacrée à la réécriture des gabarits
voir https://framagit.org/Scrutari/scrutarijs/-/wikis/adaptation#reformuler-un-%C3%A9lement-de-structure-et-de-gabarit
]
<script data-name="fiche_attribute" type="text/x-scrutari-template">
{{if type!=="block"}}
<li>
{{for valueArray ~len=valueArray.length}}
{{:~scrutari_mark(#data)}}{{if #index != (~len -1)}}, {{/if}}
{{/for}}
</li>
{{else}}
<li>
<p>
{{>title}}{{>~scrutari_loc("_ colon")}}
</p>
<div class="scrutari-fiche-AttributeValues">
{{for valueArray ~len=valueArray.length}}
<p class="scrutari-fiche-AttributeValue">
{{:~scrutari_mark(#data)}}
</p>
{{/for}}
</div>
</li>
{{/if}}
</script>
<script data-name="fiche_mtitre" type="text/x-scrutari-template">
<p class="scrutari-fiche-Titre surtitre">
{{if _numero}}
<span class="num_emission">{{: _numero}}</span>
{{/if}}
<a href="{{:href}}"
class="scrutari-fiche-Link"
data-scrutari-link="fiche_{{:codefiche}}"
{{if _target}} target="{{:_target}}"{{/if}}>
{{if mtitre}}
{{:~scrutari_mark(mtitre)}}
{{else}}
{{:href}}
{{/if}}
</a>
</p>
</script>
<script data-name="libreavous_end_ul" type="text/x-scrutari-template">
</ul>
</script>
<script data-name="libreavous_start_ul" type="text/x-scrutari-template">
<ul class="spip">
</script>
<script data-name="pagination_lav" type="text/x-scrutari-template">
{{for array}}
<div class="{{if !active}}scrutari-Hidden{{/if}}" data-scrutari-block="ficheGroup{{:suffix}}" data-scrutari-name="{{:name}}">
<div data-scrutari-block="ficheList{{:suffix}}"></div>
<div data-scrutari-block="bottomTabs{{:suffix}}"></div>
</div>
{{/for}}
</script>
[===============================================================(#REM)
Fenêtres
]
<BOUCLE_fenetres(ARTICLES){id_rubrique=12}>
<aside data-scrutari-modal="help_#SURTITRE" class="scrutari-Hidden" aria-hidden="true">
<header>
#TITRE
</header>
<div>
#TEXTE
</div>
</aside>
</BOUCLE_fenetres>