baz_april v2.0 rebasé sur zboot en entier
44
baz_april_administrations.php
Executable file → Normal file
@ -1,10 +1,29 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined("_ECRIRE_INC_VERSION")) return;
|
/**
|
||||||
|
* Fichier gérant l'installation et désinstallation du plugin baz_april
|
||||||
|
*
|
||||||
|
* @plugin baz_april
|
||||||
|
* @copyright 2019
|
||||||
|
* @author Nicolas Dorigny
|
||||||
|
* @licence GNU/GPL
|
||||||
|
* @package SPIP\baz_april\Installation
|
||||||
|
*/
|
||||||
|
|
||||||
include_spip('inc/meta');
|
if (!defined('_ECRIRE_INC_VERSION')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Installation et mise à jour sur modele sjcycle
|
/**
|
||||||
function baz_april_upgrade($nom_meta_version_base, $version_cible) {
|
* Fonction d'installation et de mise à jour du plugin baz_april.
|
||||||
|
*
|
||||||
|
* @param string $nom_meta_base_version
|
||||||
|
* Nom de la meta informant de la version du schéma de données du plugin installé dans SPIP
|
||||||
|
* @param string $version_cible
|
||||||
|
* Version du schéma de données dans ce plugin (déclaré dans paquet.xml)
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
function baz_april_upgrade($nom_meta_base_version, $version_cible) {
|
||||||
|
|
||||||
// Création du tableau des mises à jour.
|
// Création du tableau des mises à jour.
|
||||||
$maj = array();
|
$maj = array();
|
||||||
@ -20,9 +39,6 @@ function baz_april_upgrade($nom_meta_version_base, $version_cible) {
|
|||||||
$config_compositions = array(
|
$config_compositions = array(
|
||||||
'masquer_formulaire' => 'oui'
|
'masquer_formulaire' => 'oui'
|
||||||
);
|
);
|
||||||
$config_baz_april = array(
|
|
||||||
'afficherauteurs' => 'non'
|
|
||||||
);
|
|
||||||
// Tableau de la configuration par défaut
|
// Tableau de la configuration par défaut
|
||||||
$maj['create'] = array(
|
$maj['create'] = array(
|
||||||
array('ecrire_config', 'feuillederoute', $config_fdr),
|
array('ecrire_config', 'feuillederoute', $config_fdr),
|
||||||
@ -37,8 +53,14 @@ function baz_april_upgrade($nom_meta_version_base, $version_cible) {
|
|||||||
maj_plugin($nom_meta_version_base, $version_cible, $maj);
|
maj_plugin($nom_meta_version_base, $version_cible, $maj);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Désinstallation
|
/**
|
||||||
function baz_april_vider_tables($nom_meta_version_base) {
|
* Fonction de désinstallation du plugin baz_april.
|
||||||
effacer_meta('baz');
|
*
|
||||||
effacer_meta($nom_meta_version_base);
|
* @param string $nom_meta_base_version
|
||||||
|
* Nom de la meta informant de la version du schéma de données du plugin installé dans SPIP
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
**/
|
||||||
|
function baz_april_vider_tables($nom_meta_base_version) {
|
||||||
|
effacer_meta($nom_meta_base_version);
|
||||||
}
|
}
|
||||||
|
22
baz_april_autorisations.php
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Définit les autorisations du plugin baz_april
|
||||||
|
*
|
||||||
|
* @plugin baz_april
|
||||||
|
* @copyright 2019
|
||||||
|
* @author Nicolas Dorigny
|
||||||
|
* @licence GNU/GPL
|
||||||
|
* @package SPIP\baz_april\Autorisations
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!defined('_ECRIRE_INC_VERSION')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fonction d'appel pour le pipeline
|
||||||
|
*
|
||||||
|
* @pipeline autoriser
|
||||||
|
*/
|
||||||
|
function baz_april_autoriser() {
|
||||||
|
}
|
44
baz_april_fonctions.php
Executable file → Normal file
@ -1,40 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined("_ECRIRE_INC_VERSION")) return;
|
|
||||||
|
|
||||||
/* reprise d'une fonction du plugin Agenda
|
|
||||||
* renommee pour eviter plantage
|
|
||||||
https://zone.spip.org/trac/spip-zone/browser/_plugins_/agenda/trunk/agenda_fonctions.php#L32
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* decale les mois de la date.
|
* Fonctions utiles au plugin baz_april
|
||||||
* cette fonction peut raboter le jour si le nouveau mois ne les contient pas
|
|
||||||
* exemple 31/01/2007 + 1 mois => 28/02/2007
|
|
||||||
*
|
*
|
||||||
* @param string $date
|
* @plugin baz_april
|
||||||
* @param int $decalage
|
* @copyright 2019
|
||||||
* @param string $format
|
* @author Nicolas Dorigny
|
||||||
* @return string
|
* @licence GNU/GPL
|
||||||
|
* @package SPIP\baz_april\Fonctions
|
||||||
*/
|
*/
|
||||||
function baz_moisdecal($date, $decalage, $format = 'Y-m-d H:i:s') {
|
|
||||||
include_spip('inc/filtres');
|
if (!defined('_ECRIRE_INC_VERSION')) {
|
||||||
$date_array = recup_date($date);
|
return;
|
||||||
if ($date_array) {
|
|
||||||
list($annee, $mois, $jour) = $date_array;
|
|
||||||
}
|
|
||||||
if (!$jour) {
|
|
||||||
$jour = 1;
|
|
||||||
}
|
|
||||||
if (!$mois) {
|
|
||||||
$mois = 1;
|
|
||||||
}
|
|
||||||
$mois2 = $mois + $decalage;
|
|
||||||
$date2 = mktime(1, 1, 1, $mois2, $jour, $annee);
|
|
||||||
// mois normalement attendu
|
|
||||||
$mois3 = date('m', mktime(1, 1, 1, $mois2, 1, $annee));
|
|
||||||
// et si le mois de la nouvelle date a moins de jours...
|
|
||||||
$mois2 = date('m', $date2);
|
|
||||||
if ($mois2 - $mois3) {
|
|
||||||
$date2 = mktime(1, 1, 1, $mois2, 0, $annee);
|
|
||||||
}
|
|
||||||
return date($format, $date2);
|
|
||||||
}
|
}
|
||||||
|
58
baz_april_options.php
Executable file → Normal file
@ -1,44 +1,24 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined("_ECRIRE_INC_VERSION")) return;
|
|
||||||
|
|
||||||
// les blocs de baz
|
if (!defined('_ECRIRE_INC_VERSION')) {
|
||||||
if (!isset($GLOBALS['z_blocs'])) {
|
return;
|
||||||
$GLOBALS['z_blocs'] = array('content','aside','extra','connex','head','head_js','header','footer','breadcrumb');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// les images de plus de 2000*1000 pixels de haut seront réduites en 2000x1000 maximum
|
// corriger les intertitres de SPIP
|
||||||
// define('_IMG_MAX_WIDTH', 2000);
|
$GLOBALS['debut_intertitre'] = "\n<h2>";
|
||||||
// define('_IMG_MAX_HEIGHT', 1000);
|
|
||||||
|
|
||||||
// surligner le terme de recherche
|
|
||||||
define('_SURLIGNE_RECHERCHE_REFERERS',true);
|
|
||||||
if (isset($_REQUEST['recherche'])) {
|
|
||||||
$_GET['var_recherche'] = $_REQUEST['recherche'];
|
|
||||||
}
|
|
||||||
|
|
||||||
// les images de plus de 2000*1000 pixels de haut seront réduites en 2000x1000 maximum
|
|
||||||
// define('_IMG_MAX_WIDTH', 2000);
|
|
||||||
// define('_IMG_MAX_HEIGHT', 1600);
|
|
||||||
|
|
||||||
|
|
||||||
// $GLOBALS['quota_cache'] = 200;
|
|
||||||
define('_DUREE_CACHE_DEFAUT', 24*3600*90);
|
|
||||||
|
|
||||||
// pour sauter une ligne en rédaction
|
|
||||||
// $GLOBALS['ligne_horizontale'] = '<br class="clear" />';
|
|
||||||
|
|
||||||
// afficher les erreurs
|
|
||||||
// define('_NO_CACHE', -1);
|
|
||||||
// define('_INTERDIRE_COMPACTE_HEAD_ECRIRE', true);
|
|
||||||
// error_reporting(E_ALL^E_NOTICE);
|
|
||||||
// ini_set ("display_errors", "On");
|
|
||||||
// define('SPIP_ERREUR_REPORT',E_ALL);
|
|
||||||
// $GLOBALS['taille_des_logs'] = 500;
|
|
||||||
// define('_MAX_LOG', 500000);
|
|
||||||
// define('_LOG_FILELINE',true);
|
|
||||||
// define('_LOG_FILTRE_GRAVITE',8);
|
|
||||||
// define('_DEBUG_SLOW_QUERIES', true);
|
|
||||||
// define('_BOUCLE_PROFILER', 5000);
|
|
||||||
|
|
||||||
$GLOBALS['debut_intertitre'] = "\n<h2 class=\"spip\">\n";
|
|
||||||
$GLOBALS['fin_intertitre'] = "</h2>\n";
|
$GLOBALS['fin_intertitre'] = "</h2>\n";
|
||||||
|
|
||||||
|
// Blocs Zcore
|
||||||
|
$GLOBALS['z_blocs'] = array(
|
||||||
|
'content',
|
||||||
|
'head',
|
||||||
|
'header',
|
||||||
|
'breadcrumb',
|
||||||
|
'extra',
|
||||||
|
'aside',
|
||||||
|
'connex',
|
||||||
|
'footer',
|
||||||
|
);
|
||||||
|
|
||||||
|
define('_CONTENT_WIDTH', 650);
|
||||||
|
define('_IMAGE_RATIO', '1.5:1');
|
||||||
|
21
baz_april_pipelines.php
Executable file → Normal file
@ -1,3 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined("_ECRIRE_INC_VERSION")) return;
|
/**
|
||||||
|
* Utilisations de pipelines par baz_april
|
||||||
|
*
|
||||||
|
* @plugin baz_april
|
||||||
|
* @copyright 2019
|
||||||
|
* @author Nicolas Dorigny
|
||||||
|
* @licence GNU/GPL
|
||||||
|
* @package SPIP\baz_april\Pipelines
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!defined('_ECRIRE_INC_VERSION')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function baz_april_pre_typo($texte) {
|
||||||
|
// belles puces
|
||||||
|
$texte = preg_replace('/^-\s?(?!\*|#|-)/m', '-* ', $texte);
|
||||||
|
|
||||||
|
return $texte;
|
||||||
|
}
|
||||||
|
1
courtcircuit_selection_article.html
Executable file
@ -0,0 +1 @@
|
|||||||
|
<BOUCLE_premier_article(ARTICLES){id_rubrique} {tri_rubrique} {0,1}>#ID_ARTICLE</BOUCLE_premier_article>
|
13
formulaires/configurer_baz_april.html
Executable file → Normal file
@ -1,11 +1,12 @@
|
|||||||
<div class="formulaire_spip formulaire_configurer formulaire_#FORM">
|
<div class="formulaire_spip formulaire_configurer formulaire_#FORM">
|
||||||
|
|
||||||
<h3 class="titrem"><:baz_april:configuration_baz_april:></h3>
|
<h3 class="titrem"><:baz_april:titre_page_configurer_baz_april:/></h3>
|
||||||
|
|
||||||
[<p class="reponse_formulaire reponse_formulaire_ok">(#ENV*{message_ok})</p>]
|
[<p class="reponse_formulaire reponse_formulaire_ok">(#ENV*{message_ok})</p>]
|
||||||
[<p class="reponse_formulaire reponse_formulaire_erreur">(#ENV*{message_erreur})</p>]
|
[<p class="reponse_formulaire reponse_formulaire_erreur">(#ENV*{message_erreur})</p>]
|
||||||
|
|
||||||
<form method="post" action="#ENV{action}"><div>
|
<form method="post" action="#ENV{action}">
|
||||||
|
<div>
|
||||||
#ACTION_FORMULAIRE{#ENV{action}}
|
#ACTION_FORMULAIRE{#ENV{action}}
|
||||||
<ul class="editer-groupe">
|
<ul class="editer-groupe">
|
||||||
[(#SAISIE{case,afficherauteurs,
|
[(#SAISIE{case,afficherauteurs,
|
||||||
@ -13,9 +14,7 @@
|
|||||||
explication=<:baz_april:afficherauteurs_explications:>,
|
explication=<:baz_april:afficherauteurs_explications:>,
|
||||||
defaut=non})]
|
defaut=non})]
|
||||||
</ul>
|
</ul>
|
||||||
<p class="boutons">
|
<p class="boutons"><span class="image_loading"> </span><input type="submit" class="submit" value="<:bouton_enregistrer:/>" /></p>
|
||||||
<input type="submit" class="submit" value="<:bouton_valider:>" />
|
</div>
|
||||||
</p>
|
</form>
|
||||||
</div></form>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,57 +0,0 @@
|
|||||||
#HTTP_HEADER{"Cache-Control: no-store, no-cache, must-revalidate"}
|
|
||||||
#HTTP_HEADER{"Pragma: no-cache"}
|
|
||||||
|
|
||||||
<div class='formulaire_spip formulaire_login'>
|
|
||||||
[<p class="reponse_formulaire reponse_formulaire_ok">(#ENV*{_deja_loge})</p>]
|
|
||||||
[<p class="reponse_formulaire reponse_formulaire_ok">(#ENV*{message_ok})</p>]
|
|
||||||
[<p class='reponse_formulaire reponse_formulaire_erreur'>(#ENV*{message_erreur})</p>]
|
|
||||||
|
|
||||||
[(#ENV{echec_cookie})
|
|
||||||
<fieldset class='reponse_formulaire reponse_formulaire_erreur'>
|
|
||||||
<h2><:avis_erreur_cookie:></h2>
|
|
||||||
<p class="erreur_message"><:login_cookie_oblige:><br /><:login_cookie_accepte:></p>
|
|
||||||
</fieldset>]
|
|
||||||
|
|
||||||
[(#ENV{editable})
|
|
||||||
<form id='formulaire_login' method='post' action='#ENV{action}'>
|
|
||||||
[(#REM) declarer les hidden qui declencheront le service du formulaire parametre : url d'action ]
|
|
||||||
#ACTION_FORMULAIRE
|
|
||||||
<fieldset>
|
|
||||||
<legend><:form_forum_identifiants:></legend>
|
|
||||||
<div class="form-group editer-groupe">
|
|
||||||
<div class="editer editer_login obligatoire[(#ENV**{erreurs}|table_valeur{var_login}|oui)erreur]">
|
|
||||||
<label for="var_login"><:login_login2:></label>[
|
|
||||||
<span class="erreur_message">(#ENV**{erreurs}|table_valeur{var_login})</span>
|
|
||||||
]<input type='text' class='form-control text [(#ENV*{_logo}|oui)avec_spip_logo_auteur]' name='var_login' id='var_login' value="[(#ENV**{var_login})]" size='40'[(#HTML5) required='required' autofocus='autofocus'] autocapitalize="off" autocorrect="off" />[
|
|
||||||
<span id="spip_logo_auteur">(#ENV*{_logo,''})</span>]
|
|
||||||
</div>
|
|
||||||
<div class="editer editer_password obligatoire[(#ENV**{erreurs}|table_valeur{password}|oui)erreur]">
|
|
||||||
<label for="password"><:login_pass2:></label>[
|
|
||||||
<span class="erreur_message">(#ENV**{erreurs}|table_valeur{password})</span>
|
|
||||||
]<input type='password' class='form-control text password' name='password' id='password' value="" size='40' autocapitalize="off" autocorrect="off" />
|
|
||||||
<p class='details'><a href="[(#URL_PAGE{spip_pass}|parametre_url{lang,#LANG})]" id='spip_pass'><:login_motpasseoublie:></a></p>
|
|
||||||
</div>
|
|
||||||
[(#ENV{rester_connecte})
|
|
||||||
<div class="editer editer_session"><div class='choix'>
|
|
||||||
<input type="checkbox" class="form-control checkbox" name="session_remember" id="session_remember" value="oui" [(#ENV**{cnx}|?{' '})checked="checked"] onchange="jQuery(this).addClass('modifie');" />
|
|
||||||
<label class='nofx' for="session_remember"><:login_rester_identifie:></label>
|
|
||||||
</div></div>]
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
<p class="boutons"><input type="submit" class="submit" value="<:bouton_valider|attribut_html:>" /></p>
|
|
||||||
</form>
|
|
||||||
]
|
|
||||||
[(#REM) en cas d'absence de cookie, on represente le formulaire alternatif ]
|
|
||||||
[<form action="(#ENV{auth_http})" method="get">[
|
|
||||||
(#ENV{auth_http}|form_hidden)
|
|
||||||
]
|
|
||||||
<fieldset>
|
|
||||||
<legend><:login_sans_cookie:></legend>
|
|
||||||
<:login_preferez_refuser:>
|
|
||||||
<input type="hidden" name="essai_auth_http" value="oui"/>
|
|
||||||
[<input type="hidden" name="url" value="(#ENV{url})"/>]
|
|
||||||
<p class="boutons"><input type="submit" class="submit" value="<:login_sans_cookie|attribut_html:>"/></p>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
]
|
|
||||||
</div>
|
|
@ -1,333 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/***************************************************************************\
|
|
||||||
* SPIP, Systeme de publication pour l'internet *
|
|
||||||
* *
|
|
||||||
* Copyright (c) 2001-2019 *
|
|
||||||
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
|
|
||||||
* *
|
|
||||||
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
|
|
||||||
* Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
|
|
||||||
\***************************************************************************/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gestion du formulaire d'identification / de connexion à SPIP
|
|
||||||
*
|
|
||||||
* @package SPIP\Core\Formulaires
|
|
||||||
**/
|
|
||||||
|
|
||||||
if (!defined('_ECRIRE_INC_VERSION')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
include_spip('base/abstract_sql');
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Teste si une URL est une URL de l'espace privé (administration de SPIP)
|
|
||||||
* ou de l'espace public
|
|
||||||
*
|
|
||||||
* @param string $cible URL
|
|
||||||
* @return bool
|
|
||||||
* true si espace privé, false sinon.
|
|
||||||
**/
|
|
||||||
function is_url_prive($cible) {
|
|
||||||
include_spip('inc/filtres_mini');
|
|
||||||
$path = parse_url(tester_url_absolue($cible) ? $cible : url_absolue($cible));
|
|
||||||
$path = (isset($path['path']) ? $path['path'] : '');
|
|
||||||
|
|
||||||
return strncmp(substr($path, -strlen(_DIR_RESTREINT_ABS)), _DIR_RESTREINT_ABS, strlen(_DIR_RESTREINT_ABS)) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Chargement du formulaire de login
|
|
||||||
*
|
|
||||||
* Si on est déjà connecté, on redirige directement sur l'URL cible !
|
|
||||||
*
|
|
||||||
* @uses auth_informer_login()
|
|
||||||
* @uses is_url_prive()
|
|
||||||
* @uses login_auth_http()
|
|
||||||
*
|
|
||||||
* @param string $cible
|
|
||||||
* URL de destination après identification.
|
|
||||||
* Cas spécifique : la valeur `@page_auteur` permet d'être redirigé
|
|
||||||
* après connexion sur le squelette public de l'auteur qui se connecte.
|
|
||||||
* @param string $login
|
|
||||||
* Login de la personne à identifier (si connu)
|
|
||||||
* @param null|bool $prive
|
|
||||||
* Identifier pour l'espace privé (true), public (false)
|
|
||||||
* ou automatiquement (null) en fonction de la destination de l'URL cible.
|
|
||||||
* @return array
|
|
||||||
* Environnement du formulaire
|
|
||||||
**/
|
|
||||||
function formulaires_login_charger_dist($cible = '', $login = '', $prive = null) {
|
|
||||||
$erreur = _request('var_erreur');
|
|
||||||
|
|
||||||
if (!$login) {
|
|
||||||
$login = strval(_request('var_login'));
|
|
||||||
}
|
|
||||||
// si on est deja identifie
|
|
||||||
if (!$login and isset($GLOBALS['visiteur_session']['login'])) {
|
|
||||||
$login = $GLOBALS['visiteur_session']['login'];
|
|
||||||
}
|
|
||||||
// ou si on a un cookie admin
|
|
||||||
// if (!$login) {
|
|
||||||
// if (isset($_COOKIE['spip_admin'])
|
|
||||||
// and preg_match(',^@(.*)$,', $_COOKIE['spip_admin'], $regs)
|
|
||||||
// ) {
|
|
||||||
// $login = $regs[1];
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
include_spip('inc/auth');
|
|
||||||
$row = auth_informer_login($login);
|
|
||||||
|
|
||||||
// Construire l'environnement du squelette
|
|
||||||
// Ne pas proposer de "rester connecte quelques jours"
|
|
||||||
// si la duree de l'alea est inferieure a 12 h (valeur par defaut)
|
|
||||||
|
|
||||||
$valeurs = array(
|
|
||||||
'var_login' => $login,
|
|
||||||
'editable' => !$row,
|
|
||||||
'cnx' => isset($row['cnx']) ? $row['cnx'] : '0',
|
|
||||||
'auth_http' => login_auth_http(),
|
|
||||||
'rester_connecte' => ((_RENOUVELLE_ALEA < 12 * 3600) ? '' : ' '),
|
|
||||||
'_logo' => isset($row['logo']) ? $row['logo'] : '',
|
|
||||||
'_alea_actuel' => isset($row['alea_actuel']) ? $row['alea_actuel'] : '',
|
|
||||||
'_alea_futur' => isset($row['alea_futur']) ? $row['alea_futur'] : '',
|
|
||||||
'_pipeline' => 'affiche_formulaire_login', // faire passer le formulaire dans un pipe dedie pour les methodes auth
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($erreur or !isset($GLOBALS['visiteur_session']['id_auteur']) or !$GLOBALS['visiteur_session']['id_auteur']) {
|
|
||||||
$valeurs['editable'] = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (is_null($prive) ? is_url_prive($cible) : $prive) {
|
|
||||||
include_spip('inc/autoriser');
|
|
||||||
$loge = autoriser('ecrire');
|
|
||||||
} else {
|
|
||||||
$loge = (isset($GLOBALS['visiteur_session']['auth']) and $GLOBALS['visiteur_session']['auth'] != '');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Si on est connecte, appeler traiter()
|
|
||||||
// et lancer la redirection si besoin
|
|
||||||
if (!$valeurs['editable'] and $loge and _request('formulaire_action')!=='login') {
|
|
||||||
$traiter = charger_fonction('traiter', 'formulaires/login');
|
|
||||||
$res = $traiter($cible, $login, $prive);
|
|
||||||
$valeurs = array_merge($valeurs, $res);
|
|
||||||
|
|
||||||
if (isset($res['redirect']) and $res['redirect']) {
|
|
||||||
include_spip('inc/headers');
|
|
||||||
# preparer un lien pour quand redirige_formulaire ne fonctionne pas
|
|
||||||
$m = redirige_formulaire($res['redirect'], '', 'ajaxform');
|
|
||||||
$valeurs['_deja_loge'] = inserer_attribut(
|
|
||||||
'<a>' . _T('login_par_ici') . "</a>$m",
|
|
||||||
'href',
|
|
||||||
$res['redirect']
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// en cas d'echec de cookie, inc_auth a renvoye vers le script de
|
|
||||||
// pose de cookie ; s'il n'est pas la, c'est echec cookie
|
|
||||||
// s'il est la, c'est probablement un bookmark sur bonjour=oui,
|
|
||||||
// et pas un echec cookie.
|
|
||||||
if ($erreur == 'cookie') {
|
|
||||||
$valeurs['echec_cookie'] = ' ';
|
|
||||||
} elseif ($erreur) {
|
|
||||||
// une erreur d'un SSO indique dans la redirection vers ici
|
|
||||||
// mais il faut se proteger de toute tentative d'injection malveilante
|
|
||||||
include_spip('inc/texte');
|
|
||||||
$valeurs['message_erreur'] = safehtml($erreur);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $valeurs;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Identification via HTTP (si pas de cookie)
|
|
||||||
*
|
|
||||||
* Gére le cas où un utilisateur ne souhaite pas de cookie :
|
|
||||||
* on propose alors un formulaire pour s'authentifier via http
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
* - Si connection possible en HTTP : URL pour réaliser cette identification,
|
|
||||||
* - chaîne vide sinon.
|
|
||||||
**/
|
|
||||||
function login_auth_http() {
|
|
||||||
if (!$GLOBALS['ignore_auth_http']
|
|
||||||
and _request('var_erreur') == 'cookie'
|
|
||||||
and (!isset($_COOKIE['spip_session']) or $_COOKIE['spip_session'] != 'test_echec_cookie')
|
|
||||||
and (($GLOBALS['flag_sapi_name'] and preg_match(',apache,i', @php_sapi_name()))
|
|
||||||
or preg_match(',^Apache.* PHP,', $_SERVER['SERVER_SOFTWARE']))
|
|
||||||
// Attention dans le cas 'intranet' la proposition de se loger
|
|
||||||
// par auth_http peut conduire a l'echec.
|
|
||||||
and !(isset($_SERVER['PHP_AUTH_USER']) and isset($_SERVER['PHP_AUTH_PW']))
|
|
||||||
) {
|
|
||||||
return generer_url_action('cookie', '', false, true);
|
|
||||||
} else {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Vérifications du formulaire de login
|
|
||||||
*
|
|
||||||
* Connecte la personne si l'identification réussie.
|
|
||||||
*
|
|
||||||
* @uses auth_identifier_login()
|
|
||||||
* @uses auth_loger()
|
|
||||||
* @uses login_autoriser()
|
|
||||||
*
|
|
||||||
* @param string $cible
|
|
||||||
* URL de destination après identification.
|
|
||||||
* Cas spécifique : la valeur `@page_auteur` permet d'être redirigé
|
|
||||||
* après connexion sur le squelette public de l'auteur qui se connecte.
|
|
||||||
* @param string $login
|
|
||||||
* Login de la personne à identifier (si connu)
|
|
||||||
* @param null|bool $prive
|
|
||||||
* Identifier pour l'espace privé (true), public (false)
|
|
||||||
* ou automatiquement (null) en fonction de la destination de l'URL cible.
|
|
||||||
* @return array
|
|
||||||
* Erreurs du formulaire
|
|
||||||
**/
|
|
||||||
function formulaires_login_verifier_dist($cible = '', $login = '', $prive = null) {
|
|
||||||
|
|
||||||
$session_login = _request('var_login');
|
|
||||||
$session_password = _request('password');
|
|
||||||
$session_remember = _request('session_remember');
|
|
||||||
|
|
||||||
if (!$session_login) {
|
|
||||||
# pas de login saisi !
|
|
||||||
return array('var_login' => _T('info_obligatoire'));
|
|
||||||
}
|
|
||||||
|
|
||||||
// appeler auth_identifier_login qui va :
|
|
||||||
// - renvoyer un string si echec (message d'erreur)
|
|
||||||
// - un array decrivant l'auteur identifie si possible
|
|
||||||
// - rediriger vers un SSO qui renverra in fine sur action/auth qui finira l'authentification
|
|
||||||
include_spip('inc/auth');
|
|
||||||
$auteur = auth_identifier_login($session_login, $session_password);
|
|
||||||
// on arrive ici si on ne s'est pas identifie avec un SSO
|
|
||||||
if (!is_array($auteur)) {
|
|
||||||
$erreurs = array();
|
|
||||||
if (is_string($auteur) and strlen($auteur)) {
|
|
||||||
$erreurs['var_login'] = $auteur;
|
|
||||||
}
|
|
||||||
include_spip('inc/cookie');
|
|
||||||
spip_setcookie('spip_admin', '', time() - 3600);
|
|
||||||
if (strlen($session_password)) {
|
|
||||||
$erreurs['password'] = _T('login_erreur_pass');
|
|
||||||
} else {
|
|
||||||
// sinon c'est un login en deux passe old style (ou js en panne)
|
|
||||||
// pas de message d'erreur
|
|
||||||
$erreurs['password'] = ' ';
|
|
||||||
}
|
|
||||||
|
|
||||||
return
|
|
||||||
$erreurs;
|
|
||||||
}
|
|
||||||
// on a ete authentifie, construire la session
|
|
||||||
// en gerant la duree demandee pour son cookie
|
|
||||||
if ($session_remember !== null) {
|
|
||||||
$auteur['cookie'] = $session_remember;
|
|
||||||
}
|
|
||||||
// si la connexion est refusee on renvoi un message erreur de mot de passe
|
|
||||||
// car en donnant plus de detail on renseignerait un assaillant sur l'existence d'un compte
|
|
||||||
if (auth_loger($auteur) === false) {
|
|
||||||
$erreurs['message_erreur'] = _T('login_erreur_pass');
|
|
||||||
return $erreurs;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (is_null($prive) ? is_url_prive($cible) : $prive)
|
|
||||||
? login_autoriser() : array();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Teste l'autorisation d'accéder à l'espace privé une fois une connexion
|
|
||||||
* réussie, si la cible est une URL privée.
|
|
||||||
*
|
|
||||||
* Dans le cas contraire, un message d'erreur est retourné avec un lien
|
|
||||||
* pour se déconnecter.
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
* - Erreur si un connecté n'a pas le droit d'acceder à l'espace privé
|
|
||||||
* - tableau vide sinon.
|
|
||||||
**/
|
|
||||||
function login_autoriser() {
|
|
||||||
include_spip('inc/autoriser');
|
|
||||||
if (!autoriser('ecrire')) {
|
|
||||||
$h = generer_url_action('logout', 'logout=prive&url=' . urlencode(self()));
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'message_erreur' => '<h1>'
|
|
||||||
. _T('avis_erreur_visiteur')
|
|
||||||
. '</h1><p>'
|
|
||||||
. _T('texte_erreur_visiteur')
|
|
||||||
. "</p><p class='retour'>[<a href='$h'>"
|
|
||||||
. _T('icone_deconnecter') . '</a>]</p>'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return array();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Traitements du formulaire de login
|
|
||||||
*
|
|
||||||
* On arrive ici une fois connecté.
|
|
||||||
* On redirige simplement sur l'URL cible désignée.
|
|
||||||
*
|
|
||||||
* @param string $cible
|
|
||||||
* URL de destination après identification.
|
|
||||||
* Cas spécifique : la valeur `@page_auteur` permet d'être redirigé
|
|
||||||
* après connexion sur le squelette public de l'auteur qui se connecte.
|
|
||||||
* @param string $login
|
|
||||||
* Login de la personne à identifier (si connu)
|
|
||||||
* @param null|bool $prive
|
|
||||||
* Identifier pour l'espace privé (true), public (false)
|
|
||||||
* ou automatiquement (null) en fonction de la destination de l'URL cible.
|
|
||||||
* @return array
|
|
||||||
* Retours du traitement
|
|
||||||
**/
|
|
||||||
function formulaires_login_traiter_dist($cible = '', $login = '', $prive = null) {
|
|
||||||
$res = array();
|
|
||||||
// Si on se connecte dans l'espace prive,
|
|
||||||
// ajouter "bonjour" (repere a peu pres les cookies desactives)
|
|
||||||
if (is_null($prive) ? is_url_prive($cible) : $prive) {
|
|
||||||
$cible = parametre_url($cible, 'bonjour', 'oui', '&');
|
|
||||||
}
|
|
||||||
if ($cible == '@page_auteur') {
|
|
||||||
$cible = generer_url_entite($GLOBALS['auteur_session']['id_auteur'], 'auteur');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($cible) {
|
|
||||||
$cible = parametre_url($cible, 'var_login', '', '&');
|
|
||||||
|
|
||||||
// transformer la cible absolue en cible relative
|
|
||||||
// pour pas echouer quand la meta adresse_site est foireuse
|
|
||||||
if (strncmp($cible, $u = url_de_base(), strlen($u)) == 0) {
|
|
||||||
$cible = './' . substr($cible, strlen($u));
|
|
||||||
} elseif (tester_url_absolue($cible) and !defined('_AUTORISER_LOGIN_ABS_REDIRECT')) {
|
|
||||||
// si c'est une url absolue, refuser la redirection
|
|
||||||
// sauf si cette securite est levee volontairement par le webmestre
|
|
||||||
$cible = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Si on est connecte, envoyer vers la destination
|
|
||||||
if ($cible and ($cible != self('&')) and ($cible != self())) {
|
|
||||||
$res['redirect'] = $cible;
|
|
||||||
$res['message_ok'] = inserer_attribut(
|
|
||||||
'<a>' . _T('login_par_ici') . '</a>',
|
|
||||||
'href',
|
|
||||||
$cible
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// avant de rediriger il faut mettre a jour les sessions sur le disque si on a charge une session
|
|
||||||
if (function_exists('terminer_actualiser_sessions')) {
|
|
||||||
terminer_actualiser_sessions();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $res;
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
<div class="recherche"><form action="[(#ENV{action})]" method="get">
|
|
||||||
<div class="input-group flex">
|
|
||||||
[(#ENV{action}|form_hidden)]
|
|
||||||
[<input type="hidden" name="lang" value="(#ENV{lang})" />]
|
|
||||||
<div class="input-group-prepend">
|
|
||||||
<input class="form-control" type="search" placeholder="Rechercher" aria-label="Rechercher" name="recherche"[ value="(#ENV{recherche})"] />
|
|
||||||
</div>
|
|
||||||
<div class="input-group-append">
|
|
||||||
<button type="submit" class="input-group-text">ok</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form></div>
|
|
14
lang/baz_april_fr.php
Executable file → Normal file
@ -1,9 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
// Ceci est un fichier langue de SPIP -- This is a SPIP language file
|
// This is a SPIP language file -- Ceci est un fichier langue de SPIP
|
||||||
|
|
||||||
if (!defined('_ECRIRE_INC_VERSION')) return;
|
if (!defined('_ECRIRE_INC_VERSION')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$GLOBALS[$GLOBALS['idx_lang']] = array(
|
$GLOBALS[ $GLOBALS['idx_lang'] ] = array(
|
||||||
|
|
||||||
|
// C
|
||||||
|
'baz_april_titre' => 'baz april',
|
||||||
|
|
||||||
|
// T
|
||||||
|
'titre_page_configurer_baz_april' => 'Configuration',
|
||||||
|
|
||||||
'cfg_baz_april' => 'Configuration du jeu de squelettes<br />
|
'cfg_baz_april' => 'Configuration du jeu de squelettes<br />
|
||||||
APRIL - base',
|
APRIL - base',
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// This is a SPIP language file -- Ceci est un fichier langue de SPIP
|
||||||
|
|
||||||
// Ceci est un fichier langue de SPIP -- This is a SPIP language file
|
if (!defined('_ECRIRE_INC_VERSION')) {
|
||||||
//
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!defined('_ECRIRE_INC_VERSION')) return;
|
$GLOBALS[ $GLOBALS['idx_lang'] ] = array(
|
||||||
|
|
||||||
$GLOBALS[$GLOBALS['idx_lang']] = array(
|
// C
|
||||||
|
'baz_april_description' => '',
|
||||||
'baz_april_description' => 'squelettes HTML5 avec scss et Tiny Typo',
|
'baz_april_nom' => 'baz april',
|
||||||
'baz_april_slogan' => 'squelettes de base pour les sites APRIL',
|
'baz_april_slogan' => 'Squelette de base Zcore + SCSS',
|
||||||
);
|
);
|
||||||
|
102
mes_options.php
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_ECRIRE_INC_VERSION')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (substr(_request('recherche'), 0, 4) == 'http') {
|
||||||
|
$ecran_securite_raison = 'Recherche mal formee';
|
||||||
|
if ($GLOBALS['ip'] AND date('s') == 0) {
|
||||||
|
touch(_DIR_TMP . 'flood/' . $GLOBALS['ip']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isset($ecran_securite_raison)) {
|
||||||
|
header("HTTP/1.0 403 Forbidden");
|
||||||
|
header("Expires: Wed, 11 Jan 1984 05:00:00 GMT");
|
||||||
|
header("Cache-Control: no-cache, must-revalidate");
|
||||||
|
header("Pragma: no-cache");
|
||||||
|
header("Content-Type: text/html");
|
||||||
|
die("<html><title>Error 403: Forbidden</title><body><h1>Error 403</h1><p>You are not authorized to view this page ($ecran_securite_raison)</p></body></html>");
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------
|
||||||
|
// Définition de l'environnement : DEV / PREPROD / PROD
|
||||||
|
// ------------------------------------------------------------
|
||||||
|
|
||||||
|
if (in_array($_SERVER["SERVER_ADDR"], array(
|
||||||
|
"::1",
|
||||||
|
"127.0.0.1",
|
||||||
|
))) {
|
||||||
|
define('_SERVEUR_MODE', 'DEV');
|
||||||
|
} else {
|
||||||
|
if ($_SERVER["SERVER_NAME"] == 'dev.domain.tld') {
|
||||||
|
define('_SERVEUR_MODE', 'PREPROD');
|
||||||
|
} else {
|
||||||
|
define('_SERVEUR_MODE', 'PROD');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------
|
||||||
|
// Config selon l'environnement
|
||||||
|
// ------------------------------------------------------------
|
||||||
|
|
||||||
|
switch (_SERVEUR_MODE) {
|
||||||
|
case 'DEV':
|
||||||
|
case 'PREPROD':
|
||||||
|
define('SPIP_ERREUR_REPORT', E_ALL & ~E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT);
|
||||||
|
error_reporting(SPIP_ERREUR_REPORT);
|
||||||
|
ini_set('display_errors', 1);
|
||||||
|
define('_DEBUG_AUTORISER', true);
|
||||||
|
define('_LOG_FILTRE_GRAVITE', 8);
|
||||||
|
define('_TEST_EMAIL_DEST', 'nd@dataetic.fr');
|
||||||
|
define('_SCSS_SOURCE_MAP', true);
|
||||||
|
break;
|
||||||
|
case 'PROD':
|
||||||
|
ini_set('display_errors', 0);
|
||||||
|
define('_LOG_FILTRE_GRAVITE', 8);
|
||||||
|
define('_SPIP_CHMOD', 0777);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ini_set('memory_limit', '384M');
|
||||||
|
|
||||||
|
// ------------------------------------------------------------
|
||||||
|
// Débug et logs
|
||||||
|
// ------------------------------------------------------------
|
||||||
|
|
||||||
|
define('_LOG_FILELINE', true);
|
||||||
|
define('_DEBUG_SLOW_QUERIES', true);
|
||||||
|
define('_BOUCLE_PROFILER', 1000);
|
||||||
|
|
||||||
|
// Ne pas remlacer < par < dans les logs
|
||||||
|
define('_LOG_BRUT', true);
|
||||||
|
|
||||||
|
ini_set("log_errors", 1);
|
||||||
|
ini_set("error_log", $_SERVER['DOCUMENT_ROOT'] . '/tmp/log/php.log');
|
||||||
|
|
||||||
|
$nombre_de_logs = 6;
|
||||||
|
$taille_des_logs = 1024; // 1Mo avant rotation
|
||||||
|
|
||||||
|
// ------------------------------------------------------------
|
||||||
|
// Configs spécifiques
|
||||||
|
// ------------------------------------------------------------
|
||||||
|
|
||||||
|
// crypter les noms des inputs dans les formulaires protégés par nospam
|
||||||
|
define('_SPAM_ENCRYPT_NAME', true);
|
||||||
|
|
||||||
|
define('_STATUT_AUTEUR_CREATION', '6forum');
|
||||||
|
|
||||||
|
define ('_SAISIES_AFFICHER_SI_JS_SHOW', 'slideDown(300)');
|
||||||
|
define ('_SAISIES_AFFICHER_SI_JS_HIDE', 'slideUp(300)');
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
// Taille et poids maxi des images et logos
|
||||||
|
|
||||||
|
define('_IMG_MAX_WIDTH', 3000);
|
||||||
|
define('_IMG_MAX_HEIGHT', 3000);
|
||||||
|
define('_IMG_MAX_SIZE', 1024*4); # poids en ko
|
||||||
|
|
||||||
|
define('_LOGO_MAX_WIDTH', 3000);
|
||||||
|
define('_LOGO_MAX_HEIGHT', 3000);
|
||||||
|
define('_LOGO_MAX_SIZE', 1024*4); # poids en ko
|
||||||
|
|
||||||
|
define('_FILE_MAX_SIZE', 1024*12); # poids en ko
|
48
paquet.xml
@ -1,47 +1,45 @@
|
|||||||
<paquet
|
<paquet
|
||||||
prefix="baz_april"
|
prefix="baz_april"
|
||||||
categorie="squelette"
|
categorie="squelette"
|
||||||
version="0.2.0"
|
version="2.0.0"
|
||||||
schema="0.0.1"
|
|
||||||
etat="dev"
|
etat="dev"
|
||||||
compatibilite="[3.2.7;3.3.*]"
|
compatibilite="[3.2.0;3.3.*]"
|
||||||
|
logo="prive/themes/spip/images/baz_april-64.png"
|
||||||
|
documentation=""
|
||||||
|
schema="1.0.0"
|
||||||
>
|
>
|
||||||
<nom>APRIL - base</nom>
|
|
||||||
<!-- Base de développement sur Z-core + SCSSPHP (SASS) + Tiny Typo + FontAwesome v5 -->
|
|
||||||
|
|
||||||
<auteur>collectif APRIL</auteur>
|
<nom>baz_april</nom>
|
||||||
<credit>nicod_ (astuces scss dans galactic)</credit>
|
<auteur>chankalan</auteur>
|
||||||
<credit lien="https://sasscss.org/#license-faqs">Sass CSS</credit>
|
<auteur>Nicolas Dorigny</auteur>
|
||||||
<credit lien="https://fontawesome.io/license/">Font Awesome</credit>
|
<licence>GNU/GPL</licence>
|
||||||
|
|
||||||
<licence lien="https://www.gnu.org/licenses/gpl-3.0.html">GPL 3 pour le squelette SPIP</licence>
|
<necessite nom="bigup"/>
|
||||||
<licence lien="http://scripts.sil.org">SIL pour les typographies</licence>
|
<necessite nom="crayons"/>
|
||||||
|
<necessite nom="rang"/>
|
||||||
|
<necessite nom="tri_par_rubrique"/>
|
||||||
|
<necessite nom="scssphp"/>
|
||||||
|
<necessite nom="zcore"/>
|
||||||
|
|
||||||
<necessite nom="Zcore" />
|
|
||||||
<necessite nom="scssphp" />
|
|
||||||
<necessite nom="noizetier" />
|
|
||||||
<necessite nom="pages" />
|
<necessite nom="pages" />
|
||||||
<necessite nom="crayons" />
|
|
||||||
<necessite nom="porte_plume_intertitres" />
|
<necessite nom="porte_plume_intertitres" />
|
||||||
<necessite nom="compositions" />
|
<necessite nom="compositions" />
|
||||||
<necessite nom="mailcrypt" />
|
<necessite nom="mailcrypt" />
|
||||||
<necessite nom="bellespuces" />
|
|
||||||
<necessite nom="facteur" />
|
<necessite nom="facteur" />
|
||||||
<necessite nom="ppp" />
|
<necessite nom="ppp" />
|
||||||
<necessite nom="roles_documents" />
|
<necessite nom="roles_documents" />
|
||||||
<necessite nom="feuillederoute" />
|
<necessite nom="feuillederoute" />
|
||||||
<necessite nom="tri_par_rubrique" />
|
|
||||||
<necessite nom="basicone" />
|
<necessite nom="basicone" />
|
||||||
<necessite nom="menus" />
|
<necessite nom="menus" />
|
||||||
<necessite nom="prive_fluide_remix" />
|
|
||||||
<!-- <necessite nom="rang" /> -->
|
|
||||||
|
|
||||||
<utilise nom="compositions" />
|
<utilise nom="prive_fluide_remix"/>
|
||||||
<utilise nom="photoswipe" />
|
<utilise nom="courtcircuit"/>
|
||||||
<utilise nom="sociaux" />
|
|
||||||
|
|
||||||
<chemin path="squelettes" />
|
<pipeline nom="autoriser" inclure="baz_april_autorisations.php"/>
|
||||||
<chemin path="squelettes/scss" />
|
<pipeline nom="pre_typo" inclure="baz_april_pipelines.php"/>
|
||||||
<chemin path="" />
|
|
||||||
|
<chemin path="squelettes"/>
|
||||||
|
<chemin path="squelettes/scss"/>
|
||||||
|
<chemin path=""/>
|
||||||
|
|
||||||
</paquet>
|
</paquet>
|
||||||
|
11
prive/squelettes/contenu/configurer_baz_april.html
Executable file → Normal file
@ -1,6 +1,7 @@
|
|||||||
[(#AUTORISER{configurer, baz_april}|sinon_interdire_acces)]
|
[(#AUTORISER{configurer,_baz_april}|sinon_interdire_acces)]
|
||||||
<h1 class="grostitre"><:baz_april:cfg_baz_april:></h1>
|
|
||||||
|
|
||||||
[<div class="ajax">
|
<h1 class="grostitre"><:baz_april:titre_page_configurer_baz_april:/></h1>
|
||||||
(#FORMULAIRE_CONFIGURER_BAZ_APRIL)
|
|
||||||
</div>]
|
<div class="ajax">
|
||||||
|
#FORMULAIRE_CONFIGURER_BAZ_APRIL
|
||||||
|
</div>
|
||||||
|
7
prive/themes/spip/images/baz_april-xx.svg
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<svg enable-background="new 0 0 79.6 94.7" viewBox="0 0 79.6 94.7" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="m79.6 40.9c0-23.7-16.7-40.9-39.8-40.9s-39.8 17.2-39.8 40.9c0 10.3 3.1 19.4 8.9 26.7-.1.3-.1.7-.1 1 0 3.2 2.6 5.9 5.9 5.9h.5c1.1 11.8 11.1 20.1 24.6 20.1s23.5-8.3 24.6-20.1h.6c3.2 0 5.9-2.6 5.9-5.9 0-.4 0-.7-.1-1.1 5.8-7.2 8.8-16.3 8.8-26.6z" fill="#fff"/>
|
||||||
|
<path d="m79.6 40.9c0-23.7-16.7-40.9-39.8-40.9s-39.8 17.2-39.8 40.9c0 10.3 3.1 19.4 8.9 26.7-.1.3-.1.7-.1 1 0 3.2 2.6 5.9 5.9 5.9h.5c1.1 11.8 11.1 20.1 24.6 20.1s23.5-8.3 24.6-20.1h.6c3.2 0 5.9-2.6 5.9-5.9 0-.4 0-.7-.1-1.1 5.8-7.2 8.8-16.3 8.8-26.6zm-39.8 49.6c-10.3 0-17.8-5.3-19.9-13.4 2 1.1 4 2 6.1 2.8v2.7c0 1.2.9 2.1 2.1 2.1s2.1-.9 2.1-2.1v-1.4c2.4.5 4.8.9 7.3 1v2.9c0 1.2.9 2.1 2.1 2.1s2.1-.9 2.1-2.1v-2.9c2.3-.1 4.6-.4 6.8-.9v1.3c0 1.2.9 2.1 2.1 2.1s2.1-.9 2.1-2.1v-2.5c2.3-.8 4.6-1.8 6.7-3-1.7 8-9.3 13.4-19.6 13.4zm25.1-20.1h-2.5c-.8 0-1.4.4-1.8 1.1-2.3 1.7-4.9 3-7.5 4v-.5c0-1.2-.9-2.1-2.1-2.1s-2.1.9-2.1 2.1v1.8c-2.2.5-4.5.9-6.8 1v-2.8c0-1.2-.9-2.1-2.1-2.1s-2.1.9-2.1 2.1v2.8c-2.5-.1-4.9-.5-7.3-1.1v-1.7c0-1.2-.9-2.1-2.1-2.1s-2.2.9-2.2 2.1v.3c-2.5-1-4.8-2.3-7-3.8-.4-.7-1-1.1-1.9-1.1h-2.5c-.9 0-1.6-.7-1.6-1.6s.7-1.6 1.6-1.6c1.2 0 2.1-.9 2.1-2.1s-.9-2.1-2.1-2.1-2.4.4-3.4 1.1c-4.7-6.3-7.1-14.3-7.1-22.9 0-21.3 15-36.7 35.6-36.7s35.7 15.3 35.7 36.5c0 8.6-2.4 16.6-7.1 22.9-.9-.6-2.1-1-3.3-1s-2.1.9-2.1 2.1.9 2.1 2.1 2.1c.9 0 1.6.7 1.6 1.6-.4.8-1.1 1.7-2 1.7z"/>
|
||||||
|
<path d="m24.7 40.2c-5.3 0-9.6 4.3-9.6 9.6s4.3 9.6 9.6 9.6 9.6-4.3 9.6-9.6c.1-5.3-4.2-9.6-9.6-9.6z"/>
|
||||||
|
<path d="m54.9 40.2c-5.3 0-9.6 4.3-9.6 9.6s4.3 9.6 9.6 9.6 9.6-4.3 9.6-9.6-4.3-9.6-9.6-9.6z"/>
|
||||||
|
<path d="m39.8 58.8c-.8 0-1.5.5-1.9 1.2l-3.2 6.5 2.1 1c.4-1.3 1.6-2.2 3.1-2.2 1.4 0 2.6.9 3.1 2.2l2.1-1-3.2-6.5c-.5-.7-1.3-1.2-2.1-1.2z"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
@ -41,5 +41,3 @@ git clone https://github.com/nd-/tri_par_rubrique.git
|
|||||||
git clone https://git.spip.net/spip-contrib-extensions/role_documents.git
|
git clone https://git.spip.net/spip-contrib-extensions/role_documents.git
|
||||||
|
|
||||||
git clone https://git.spip.net/spip-contrib-extensions/menus.git
|
git clone https://git.spip.net/spip-contrib-extensions/menus.git
|
||||||
|
|
||||||
git clone https://git.spip.net/spip-contrib-extensions/prive_fluide_remix.git
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
.spip-admin-float { z-index: 100; position: fixed; right: 20%; top: auto; bottom:0; white-space: nowrap; }
|
|
@ -1,4 +0,0 @@
|
|||||||
#HTTP_HEADER{#VAL{"HTTP/1.0 "}|concat{#ENV{code,"401 Not Found"}}}
|
|
||||||
#HTTP_HEADER{"Cache-Control: no-store, no-cache, must-revalidate"}
|
|
||||||
#HTTP_HEADER{Pragma: no-cache}
|
|
||||||
<INCLURE{fond=structure,env,type-page=#ENV{status,401}} />
|
|
2
squelettes/article.html
Executable file → Normal file
@ -1,3 +1,3 @@
|
|||||||
<BOUCLE_principale_article(ARTICLES){id_article}>
|
<BOUCLE_principale_article(ARTICLES){id_article}>
|
||||||
<INCLURE{fond=structure,env,id_rubrique=#ENV{id_rubrique,#ID_RUBRIQUE},id_secteur=#ID_SECTEUR,type-page=article,composition=#COMPOSITION} />
|
<INCLURE{fond=structure,env,id_rubrique,id_secteur,type-page=article,composition=#COMPOSITION} />
|
||||||
</BOUCLE_principale_article>
|
</BOUCLE_principale_article>
|
||||||
|
13
squelettes/aside/dist.html
Executable file → Normal file
@ -1,2 +1,11 @@
|
|||||||
[(#REM) Menu de navigation par rubriques ]
|
|
||||||
<INCLURE{fond=inclure/rubriques,env,type-page,composition} />
|
[(#REM) Articles dans la meme rubrique ]
|
||||||
|
<B_articles_rubrique>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<BOUCLE_articles_rubrique(ARTICLES) {id_rubrique} {tri_rubrique} {0,10}>
|
||||||
|
<li><a href="#URL_ARTICLE"[ class="(#EXPOSE)"]>#TITRE</a></li>
|
||||||
|
</BOUCLE_articles_rubrique>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</B_articles_rubrique>
|
||||||
|
0
squelettes/head_js/dist.html → squelettes/aside/sommaire.html
Executable file → Normal file
@ -1,10 +0,0 @@
|
|||||||
[(#REM)
|
|
||||||
|
|
||||||
Squelette Big_Pipe
|
|
||||||
http://www.facebook.com/notes/facebook-engineering/bigpipe-pipelining-web-pages-for-high-performance/389414033919
|
|
||||||
|
|
||||||
(c) 2010 Cedric Morin
|
|
||||||
Distribue sous licence GPL
|
|
||||||
|
|
||||||
]#CACHE{0}
|
|
||||||
#INCLURE{fond=inclure/ajax_parallel_load,bloc=#SQUELETTE}
|
|
@ -1,40 +1,39 @@
|
|||||||
<body class="body[--(#ENV{type-page})][ body--(#COMPOSITION)]">
|
<body class="body[__(#ENV{type-page})][--(#COMPOSITION)][ body--(#COMPOSITION)][ body--(#SITE_COURANT)]">
|
||||||
<ul class="accesrapide accesrapide--main">
|
<div class="page_wrapper">
|
||||||
<li class="accesrapide"><a class="accesrapide__lien visuallyhidden focusable" href="#contenu"><:baz_april:evitement_contenu:></a></li>
|
|
||||||
<li class="accesrapide"><a class="accesrapide__lien visuallyhidden focusable" href="#navigation"><:baz_april:evitement_navigation:></a></li>
|
|
||||||
</ul>
|
|
||||||
<div class="page__wrapper">
|
|
||||||
|
|
||||||
<header class="page__header">
|
<header class="page_header">
|
||||||
<div class="page--container">
|
<div class="page_container page_header_container">
|
||||||
<INCLURE{fond=header/#ENV{type-page},env} />
|
<INCLURE{fond=header/#ENV{type-page},env}>
|
||||||
<INCLURE{fond=inclure/nav-secteurs,env} />
|
</div>
|
||||||
|
<INCLURE{fond=inclure/boussole} />
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="page_main">
|
||||||
|
<div class="page_container page_main__container">
|
||||||
|
<div class="page_main_content">
|
||||||
|
<div class="page_content">
|
||||||
|
<INCLURE{fond=breadcrumb/#ENV{type-page},env}>
|
||||||
|
<INCLURE{fond=content/#ENV{type-page},env}>
|
||||||
|
<div class="page_extra">
|
||||||
|
<INCLURE{fond=extra/#ENV{type-page},env}>
|
||||||
|
</div>
|
||||||
|
</div>[(#COMPOSITION|=={dossier}|et{#ENV{type-page}|=={article}}|non)
|
||||||
|
<aside class="page_aside">
|
||||||
|
<INCLURE{fond=aside/#ENV{type-page},env} />
|
||||||
|
</aside><!--.aside-->]
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
[<div class="header__boussole" data-page="(#URL_PAGE{boussole}|parametre_url{var_zajax,content})"></div>]
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div class="page__content page--container">
|
<aside class="connex">
|
||||||
<main class="contentMain">
|
<INCLURE{fond=connex/#ENV{type-page},env} />
|
||||||
<INCLURE{fond=content/#ENV{type-page},env,composition} />
|
</aside>
|
||||||
<aside class="contentMain__extra">
|
|
||||||
<INCLURE{fond=extra/#ENV{type-page},env} />
|
<footer class="page_footer">
|
||||||
</aside>
|
<div class="page_container page_footer__container">
|
||||||
</main><!--.main-->
|
<INCLURE{fond=footer/#ENV{type-page},env}>
|
||||||
[(#COMPOSITION|=={dossier}|et{#ENV{type-page}|=={article}}|non)
|
</div>
|
||||||
<aside class="contentAside">
|
</footer>
|
||||||
<INCLURE{fond=aside/#ENV{type-page},env} />
|
|
||||||
</aside><!--.aside-->]
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<aside class="connex">
|
|
||||||
<INCLURE{fond=connex/#ENV{type-page},env} />
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
<footer class="page__footer">
|
|
||||||
<div class="page--container">
|
|
||||||
<INCLURE{fond=footer/#ENV{type-page},env} />
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
</div><!--.container-->
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
[(#REM) Fil d'Ariane ]
|
|
||||||
<nav class="arbo" aria-label="Fil d'Ariane">
|
|
||||||
<a href="#URL_SITE_SPIP/"><:accueil_site:></a> <span class="divider"> > </span>
|
|
||||||
<span class="active"><:pass_erreur:>[ (#ENV{status})]</span>
|
|
||||||
</nav>
|
|
@ -1,5 +0,0 @@
|
|||||||
[(#REM) Fil d'Ariane ]
|
|
||||||
<nav class="arbo" aria-label="Fil d'Ariane">
|
|
||||||
<a href="#URL_SITE_SPIP/"><:accueil_site:></a> <span class="divider"> > </span>
|
|
||||||
<span class="active"><:pass_erreur:> 404</span>
|
|
||||||
</nav>
|
|
13
squelettes/breadcrumb/article.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<B_breadcrumb>
|
||||||
|
<nav aria-label="breadcrumb" class="arbo">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="#URL_SITE_SPIP"><:accueil_site:/></a></li>
|
||||||
|
<BOUCLE_breadcrumb(ARTICLES){id_article}>
|
||||||
|
<BOUCLE_ariane(HIERARCHIE){id_article}>
|
||||||
|
<li class="breadcrumb-item"><a href="#URL_RUBRIQUE">[(#TITRE|couper{60})]</a></li>
|
||||||
|
</BOUCLE_ariane>
|
||||||
|
<li class="breadcrumb-item">[(#TITRE|couper{60})]</li>
|
||||||
|
</BOUCLE_breadcrumb>
|
||||||
|
</ol>
|
||||||
|
</nav>
|
||||||
|
</B_breadcrumb>
|
18
squelettes/breadcrumb/auteur.html
Executable file → Normal file
@ -1,8 +1,10 @@
|
|||||||
<BOUCLE_content(AUTEURS){id_auteur}>
|
<B_breadcrumb>
|
||||||
[(#REM) Fil d'Ariane ]
|
<nav aria-label="breadcrumb" class="arbo">
|
||||||
<nav class="arbo" aria-label="Fil d'Ariane">
|
<ol class="breadcrumb">
|
||||||
<a href="#URL_SITE_SPIP/"><:accueil_site:></a><span class="divider"> > </span>
|
<li class="breadcrumb-item"><a href="#URL_SITE_SPIP"><:accueil_site:/></a></li>
|
||||||
<:info_auteurs:><span class="divider"> > </span>
|
<BOUCLE_breadcrumb(AUTEURS){id_auteur}{tout}>
|
||||||
[<span class="active">(#NOM|couper{80})</span>]
|
<li class="breadcrumb-item">[(#NOM|couper{60})]</li>
|
||||||
</nav>
|
</BOUCLE_breadcrumb>
|
||||||
</BOUCLE_content>
|
</ol>
|
||||||
|
</nav>
|
||||||
|
</B_breadcrumb>
|
||||||
|
18
squelettes/breadcrumb/dist.html
Executable file → Normal file
@ -1,15 +1,5 @@
|
|||||||
<nav class="arbo" aria-label="Fil d'Ariane">
|
<nav aria-label="breadcrumb" class="arbo">
|
||||||
#SET{objet,''}#SET{id_objet,''}
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="#URL_SITE_SPIP"><:accueil_site:/></a></li>
|
||||||
[(#ENV{id_rubrique}|oui)#SET{objet,rubrique}#SET{id_objet,#ENV{id_rubrique}}]
|
</ol>
|
||||||
[(#ENV{id_syndic}|oui)#SET{objet,site}#SET{id_objet,#ENV{id_syndic}}]
|
|
||||||
[(#ENV{id_breve}|oui)#SET{objet,breve}#SET{id_objet,#ENV{id_breve}}]
|
|
||||||
[(#ENV{id_article}|oui)#SET{objet,article}#SET{id_objet,#ENV{id_article}}]
|
|
||||||
[(#ENV{id_objet}|oui)#SET{objet,#ENV{objet}}#SET{id_objet,#ENV{id_objet}}]
|
|
||||||
|
|
||||||
[(#GET{objet}|oui)
|
|
||||||
#INCLURE{fond=breadcrumb/inc-objet,id_objet=#GET{id_objet},objet=#GET{objet}}
|
|
||||||
][(#GET{objet}|non)
|
|
||||||
<a href="#URL_SITE_SPIP/"><:accueil_site:></a>
|
|
||||||
]
|
|
||||||
</nav>
|
</nav>
|
@ -1,7 +0,0 @@
|
|||||||
<a href="#URL_SITE_SPIP/"><:accueil_site:></a><span class="divider"> > </span>
|
|
||||||
<BOUCLE_contexte_rubrique(RUBRIQUES) {id_rubrique=(#OBJET|=={rubrique}|?{#INFO_ID_PARENT{#OBJET,#ID_OBJET},#INFO_ID_RUBRIQUE{#OBJET,#ID_OBJET}})}>
|
|
||||||
<BOUCLE_ariane_hier(HIERARCHIE) {id_rubrique}{tout}>
|
|
||||||
<a href="#URL_RUBRIQUE">[(#TITRE|couper{80})]</a><span class="divider"> > </span>
|
|
||||||
</BOUCLE_ariane_hier>
|
|
||||||
</BOUCLE_contexte_rubrique>
|
|
||||||
<span[(#ENV{expose,' '}|oui)class="active"]>[(#ID_OBJET|generer_url_entite{#OBJET}|lien_ou_expose{#INFO_TITRE{#OBJET,#ID_OBJET}|sinon{?}|couper{80},#ENV{expose,' '}|?{span}})]</span>[<span class="divider">(#ENV{expose,' '}|non)> </span>]
|
|
@ -1,10 +0,0 @@
|
|||||||
[(#REM)
|
|
||||||
Est-ce qu'on se connecte a l'espace prive ou pas ?
|
|
||||||
]#SET{prive,''}
|
|
||||||
[(#ENV{url}|=={''}|?{#SET{prive,' '}})]
|
|
||||||
[(#ENV{url}|match{^#EVAL{_DIR_RESTREINT_ABS}}|?{#SET{prive,' '}})]
|
|
||||||
|
|
||||||
[(#REM) Fil d'Ariane ]
|
|
||||||
<nav class="arbo" aria-label="Fil d'Ariane"><a href="#URL_SITE_SPIP/"><:accueil_site:></a>
|
|
||||||
[<span class="divider"> > </span><strong class="on">(#GET{prive}|?{<:login_acces_prive:>,<:lien_connecter:>})</strong>]
|
|
||||||
</nav>
|
|
16
squelettes/breadcrumb/mot.html
Executable file → Normal file
@ -1,8 +1,10 @@
|
|||||||
<BOUCLE_content(MOTS) {id_mot} {doublons}>
|
<B_breadcrumb>
|
||||||
<nav class="arbo" aria-label="Fil d'Ariane">
|
<nav aria-label="breadcrumb" class="arbo">
|
||||||
<a href="#URL_SITE_SPIP/"><:accueil_site:></a><span class="divider"> > </span>
|
<ol class="breadcrumb">
|
||||||
<span><:mots_clefs:></span><span class="divider"> > </span>
|
<BOUCLE_breadcrumb(MOTS){id_mot}>
|
||||||
<BOUCLE_ariane(GROUPES_MOTS){id_groupe}><span>[(#TITRE|couper{80})]</span><span class="divider"> > </span></BOUCLE_ariane>
|
<li><a href="#URL_SITE_SPIP"><:accueil_site:/></a></li>
|
||||||
<span class="active">[(#TITRE|couper{80})]</span>
|
[<li>(#TITRE|couper{60})</li>]
|
||||||
|
</BOUCLE_breadcrumb>
|
||||||
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
</BOUCLE_content>
|
</B_breadcrumb>
|
||||||
|
8
squelettes/breadcrumb/plan.html
Executable file → Normal file
@ -1,4 +1,6 @@
|
|||||||
<nav class="arbo" aria-label="Fil d'Ariane">
|
<nav aria-label="breadcrumb" class="arbo">
|
||||||
<a href="#URL_SITE_SPIP/"><:accueil_site:></a><span class="divider"> > </span>
|
<ol class="breadcrumb">
|
||||||
<span class="active"><:plan_site:></span>
|
<li class="breadcrumb-item"><a href="#URL_SITE_SPIP"><:accueil_site:/></a></li>
|
||||||
|
<li class="breadcrumb-item"><:plan_site:/></li>
|
||||||
|
</ol>
|
||||||
</nav>
|
</nav>
|
8
squelettes/breadcrumb/recherche.html
Executable file → Normal file
@ -1,4 +1,6 @@
|
|||||||
<nav class="arbo" aria-label="Fil d'Ariane">
|
<nav aria-label="breadcrumb" class="arbo">
|
||||||
<a href="#URL_SITE_SPIP/"><:accueil_site:></a><span class="divider"> > </span>
|
<ol class="breadcrumb">
|
||||||
<span class="active"><:info_rechercher:> [« <strong class="on">(#RECHERCHE)</strong> »]</span>
|
<li class="breadcrumb-item"><a href="#URL_SITE_SPIP"><:accueil_site:/></a></li>
|
||||||
|
<li class="breadcrumb-item"><:resultats_recherche:/></li>
|
||||||
|
</ol>
|
||||||
</nav>
|
</nav>
|
13
squelettes/breadcrumb/rubrique.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<B_breadcrumb>
|
||||||
|
<nav aria-label="breadcrumb" class="arbo">
|
||||||
|
<ol class="breadcrumb">
|
||||||
|
<li class="breadcrumb-item"><a href="#URL_SITE_SPIP"><:accueil_site:/></a></li>
|
||||||
|
<BOUCLE_breadcrumb(RUBRIQUES){id_rubrique}>
|
||||||
|
<BOUCLE_ariane(HIERARCHIE){id_rubrique}>
|
||||||
|
<li class="breadcrumb-item"><a href="#URL_RUBRIQUE">[(#TITRE|couper{60})]</a></li>
|
||||||
|
</BOUCLE_ariane>
|
||||||
|
<li class="breadcrumb-item">[(#TITRE|couper{60})]</li>
|
||||||
|
</BOUCLE_breadcrumb>
|
||||||
|
</ol>
|
||||||
|
</nav>
|
||||||
|
</B_breadcrumb>
|
0
squelettes/breadcrumb/sommaire.html
Normal file
@ -1,10 +0,0 @@
|
|||||||
[(#REM) Fil d'Ariane ]
|
|
||||||
<section class="content">
|
|
||||||
<header class="cartouche">
|
|
||||||
<h1><:pass_erreur:>[ (#ENV{status})]</h1>
|
|
||||||
<INCLURE{fond=breadcrumb/#ENV{type-page},env} />
|
|
||||||
</header>
|
|
||||||
<div class="main">
|
|
||||||
[<div class="chapo">(#ENV{erreur})</div>]
|
|
||||||
</div>
|
|
||||||
</section>
|
|
11
squelettes/content/404.html
Executable file → Normal file
@ -1,10 +1 @@
|
|||||||
[(#REM) Fil d'Ariane ]
|
<h1><:pass_erreur:/> 404</h1>
|
||||||
<section class="content">
|
|
||||||
<header class="cartouche">
|
|
||||||
<h1><:pass_erreur:> 404</h1>
|
|
||||||
<INCLURE{fond=breadcrumb/#ENV{type-page},env} />
|
|
||||||
</header>
|
|
||||||
<div class="main">
|
|
||||||
[<div class="chapo">(#ENV{erreur})</div>]
|
|
||||||
</div>
|
|
||||||
</section>
|
|
45
squelettes/content/article.html
Executable file → Normal file
@ -1,16 +1,19 @@
|
|||||||
<BOUCLE_content(ARTICLES){id_article}>
|
<BOUCLE_principale(ARTICLES){id_article}>
|
||||||
<article class="content" id="content">
|
|
||||||
|
<article>
|
||||||
|
|
||||||
<header class="cartouche">
|
<header class="cartouche">
|
||||||
|
|
||||||
[<p class="#EDIT{surtitre} surtitre">(#SURTITRE)</p>]
|
[<p class="#EDIT{surtitre} surtitre">(#SURTITRE)</p>]
|
||||||
<h1><span class="#EDIT{titre}">#TITRE</span>[
|
<h1><span class="#EDIT{titre} article__titre">#TITRE</span>[
|
||||||
<small class="#EDIT{soustitre} soustitre">(#SOUSTITRE)</small>
|
<small class="#EDIT{soustitre} soustitre">(#SOUSTITRE)</small>
|
||||||
]</h1>
|
]</h1>
|
||||||
[(#ENV{composition}|=={blog}|oui)<INCLURE{fond=breadcrumb/rubrique-blog,env} />]
|
|
||||||
[(#ENV{composition}|=={blog}|non)<INCLURE{fond=breadcrumb/article,env} />]
|
|
||||||
|
|
||||||
[<p class="publication"><time datetime="[(#DATE|date_iso)]"><i class="icon-calendar"></i> (#DATE|affdate)</time></p>][(#CONFIG{baz_april/afficherauteurs}|=={on}|oui)[<p class="auteurs"><:par_auteur:> (#LESAUTEURS)</p>]]
|
<p class="article__infos">
|
||||||
|
[<span class="article__date">Publié le (#DATE|nom_jour) [(#DATE|affdate)] #SET{heure,#DATE|heures_minutes} [à (#GET{heure}|=={00h00min}|non)#GET{heure}]</span>]
|
||||||
|
[(#CONFIG{baz_april/afficherauteurs}|=={on}|oui)[<span class="article__auteurs"><:par_auteur:> (#LESAUTEURS)</span>]]
|
||||||
|
</p>
|
||||||
|
|
||||||
[(#REM) Inclure le modele des liens de traductions ]
|
|
||||||
<div class="postmeta">
|
<div class="postmeta">
|
||||||
#MODELE{article_traductions}
|
#MODELE{article_traductions}
|
||||||
<B_tags>
|
<B_tags>
|
||||||
@ -28,21 +31,29 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="main">
|
<div class="main">
|
||||||
[<div class="#EDIT{chapo} chapo surlignable">(#CHAPO|image_reduire{700,*})</div>]
|
|
||||||
[<div class="#EDIT{texte} texte surlignable">(#TEXTE|image_reduire{700,*})</div>]
|
|
||||||
|
|
||||||
[<p class="#EDIT{hyperlien} hyperlien"><:voir_en_ligne:> : <a href="(#URL_SITE)" class="spip_out">[(#NOM_SITE|sinon{[(#URL_SITE|couper{80})]})]</a></p>]
|
[<div class="#EDIT{chapo} article__chapo">(#CHAPO)</div>]
|
||||||
|
|
||||||
|
[<div class="#EDIT{texte} article__texte">(#TEXTE|image_reduire{#CONST{_CONTENT_WIDTH},0})</div>]
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<aside>
|
[<aside>
|
||||||
[(#REM) Gestion du portfolio et des documents ]
|
(#INCLURE{fond=inclure/documents,id_article})
|
||||||
[(#INCLURE{fond=inclure/documents,id_article})]
|
</aside>]
|
||||||
</aside>
|
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
[<div class="#EDIT{ps} ps surlignable"><h2><:info_ps:></h2>(#PS|image_reduire{700,*})</div>]
|
|
||||||
[<div class="notes"><h2><:info_notes:></h2>(#NOTES)</div>]
|
[<p class="#EDIT{hyperlien} article__hyperlien"><:voir_en_ligne:/> : <a href="(#URL_SITE)" class="spip_out">[(#NOM_SITE|sinon{[(#URL_SITE|couper{80})]})]</a></p>]
|
||||||
|
|
||||||
|
[<div class="ps">
|
||||||
|
<div class="#EDIT{ps} article__ps">(#PS|image_reduire{#CONST{_CONTENT_WIDTH},0})</div>
|
||||||
|
</div>]
|
||||||
|
|
||||||
|
[<div class="article__notes">(#NOTES)</div>]
|
||||||
|
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
</BOUCLE_content>
|
|
||||||
|
</BOUCLE_principale>
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
<BOUCLE_content(AUTEURS){id_auteur}>
|
|
||||||
<section class="content vcard" id="content" itemscope itemtype="http://schema.org/Person"> [(#REM) microformat vcard]
|
|
||||||
<header class="cartouche">
|
|
||||||
<h1 class="#EDIT{qui} fn" itemprop="name">[(#LOGO_AUTEUR|image_reduire|inserer_attribut{itemprop,image})]#NOM</h1>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div class="main">
|
|
||||||
[<div class="#EDIT{bio} texte bio">(#BIO|image_reduire{700,*})</div>]
|
|
||||||
[<p class="#EDIT{hyperlien} hyperlien"><:voir_en_ligne:> : <a href="(#URL_SITE)" class="url spip_out" itemprop="url">[(#NOM_SITE|sinon{[(#URL_SITE|couper{80})]})]</a></p>]
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<aside>
|
|
||||||
<INCLURE{fond=liste/articles-auteur,id_auteur,env,ajax} />
|
|
||||||
|
|
||||||
#FORMULAIRE_ECRIRE_AUTEUR
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
[<div class="notes"><h2><:info_notes:></h2>(#NOTES)</div>]
|
|
||||||
</footer>
|
|
||||||
</section>
|
|
||||||
</BOUCLE_content>
|
|
@ -1,18 +0,0 @@
|
|||||||
<div class="page--container">
|
|
||||||
<span class="initiatives"><:baz_april:des_initiatives_april:></span>
|
|
||||||
<button type="button" class="btn-boussole"><:baz_april:site_april:></button>
|
|
||||||
<nav class="nav"><BOUCLE_csv(DATA){source csv, #CHEMIN{csv/boussole.csv}}>
|
|
||||||
<a href="#VALEUR{1}">#VALEUR{0}</a></BOUCLE_csv>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
<script type="text/javascript">
|
|
||||||
jQuery(function($){
|
|
||||||
|
|
||||||
// afficher/masquer la boussole < medium
|
|
||||||
$('.btn-boussole').on('click', function(){
|
|
||||||
$(this).toggleClass('actif').siblings('.nav').toggleClass('ouvert');
|
|
||||||
$('.principale .btn-nav').removeClass('actif').siblings('.nav-list').removeClass('ouvert');
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
|
0
squelettes/content/dist.html
Normal file
@ -1,17 +0,0 @@
|
|||||||
[(#REM)
|
|
||||||
Est-ce qu'on se connecte a l'espace prive ou pas ?
|
|
||||||
]#SET{prive,''}
|
|
||||||
[(#ENV{url}|=={''}|?{#SET{prive,' '}})]
|
|
||||||
[(#ENV{url}|match{^#EVAL{_DIR_RESTREINT_ABS}}|?{#SET{prive,' '}})]
|
|
||||||
<section class="content" id="content">
|
|
||||||
<header class="cartouche">
|
|
||||||
[<h1>(#GET{prive}|?{<:login_acces_prive:>,<:lien_connecter:>})
|
|
||||||
<small>#NOM_SITE_SPIP</small>
|
|
||||||
</h1>]
|
|
||||||
<INCLURE{fond=breadcrumb/#ENV{type-page},env} />
|
|
||||||
</header >
|
|
||||||
|
|
||||||
<div class="main">
|
|
||||||
[(#FORMULAIRE_LOGIN{#ENV{url}|sinon{#URL_ECRIRE{accueil}}})]
|
|
||||||
</div>
|
|
||||||
</section>
|
|
49
squelettes/content/mot.html
Executable file → Normal file
@ -1,49 +0,0 @@
|
|||||||
<BOUCLE_content(MOTS) {id_mot} {doublons}>
|
|
||||||
<section class="content" id="content">
|
|
||||||
|
|
||||||
<header class="cartouche">
|
|
||||||
<h1 class="#EDIT{titre}">[(#LOGO_MOT|image_reduire)]#TITRE</h1>
|
|
||||||
<INCLURE{fond=breadcrumb/#ENV{type-page},env} />
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div class="main">
|
|
||||||
[<div class="#EDIT{texte} chapo">(#TEXTE|image_reduire{700,*})</div>]
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<aside>
|
|
||||||
[(#REM) Articles lies au mot-cle ]
|
|
||||||
<div class="liste articles">
|
|
||||||
<INCLURE{fond=liste/articles-resume,env,ajax,id_mot,titre=<:baz_april:articles_lies:>} />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
[(#REM) Rubriques liees au mot-cle ]
|
|
||||||
<B_rubriques>
|
|
||||||
<div class="liste rubriques">
|
|
||||||
<h2 class="h2"><:rubriques:></h2>
|
|
||||||
<ul class="liste-items">
|
|
||||||
<BOUCLE_rubriques(RUBRIQUES) {id_mot} {par titre} {pagination 50}>
|
|
||||||
<li class="item"><a href="#URL_RUBRIQUE">#TITRE</a></li>
|
|
||||||
</BOUCLE_rubriques>
|
|
||||||
</ul>
|
|
||||||
[<div class="pagination">(#PAGINATION)</div>]
|
|
||||||
</div>
|
|
||||||
</B_rubriques>
|
|
||||||
|
|
||||||
[(#REM) Sites web lies au mot-cle ]
|
|
||||||
<B_sites>
|
|
||||||
<div class="liste sites">
|
|
||||||
<h2 class="h2"><:sites_web:></h2>
|
|
||||||
<ul class="liste-items">
|
|
||||||
<BOUCLE_sites(SITES) {id_mot} {par nom_site} {pagination 50}>
|
|
||||||
<li class="item"><a href="[(#ID_SYNDIC|generer_url_entite{site,'','',#CONNECT})]">#NOM_SITE</a></li>
|
|
||||||
</BOUCLE_sites>
|
|
||||||
</ul>
|
|
||||||
[<div class="pagination">(#PAGINATION)</div>]
|
|
||||||
</div>
|
|
||||||
</B_sites>
|
|
||||||
</aside>
|
|
||||||
[<footer>
|
|
||||||
<div class="notes"><hr />(#NOTES)</div>
|
|
||||||
</footer>]
|
|
||||||
</section>
|
|
||||||
</BOUCLE_content>
|
|
@ -1,60 +1,38 @@
|
|||||||
<section class="content" id="content">
|
<h1><:plan_site:/></h1>
|
||||||
<header class="cartouche">
|
|
||||||
<h1><:plan_site:></h1>
|
|
||||||
<INCLURE{fond=breadcrumb/#ENV{type-page},env} />
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div class="main">
|
[(#REM)
|
||||||
|
Le plan de site ci-dessous est a adapter selon les besoins.
|
||||||
|
En particulier, on n'aura pas necessairement besoin de tous les elements (sous-rubriques, articles, breves et sites)
|
||||||
|
]
|
||||||
|
<BOUCLE_secteurs(RUBRIQUES) {racine} {par num titre}{!par date}>
|
||||||
|
|
||||||
[(#REM) Articles et sous-rubriques ]
|
<h2>#TITRE</h2>
|
||||||
<B_articles_pages>
|
|
||||||
<ul class="plan">
|
|
||||||
<BOUCLE_articles_pages(ARTICLES) {id_rubrique=-1} {page !IN accueil, mentions} {par titre}>
|
|
||||||
<li><a href="#URL_ARTICLE">#TITRE</a></li>
|
|
||||||
</BOUCLE_articles_pages>
|
|
||||||
</ul>
|
|
||||||
</B_articles_pages>
|
|
||||||
|
|
||||||
<BOUCLE_secteurs(RUBRIQUES) {racine} {par num titre, titre}>
|
[(#REM) Articles et sous-rubriques ]
|
||||||
|
<B_articles_racine>
|
||||||
|
<ul>
|
||||||
|
<BOUCLE_articles_racine(ARTICLES) {id_rubrique} {tri_rubrique}>
|
||||||
|
<li><a href="#URL_ARTICLE">#TITRE</a></li>
|
||||||
|
</BOUCLE_articles_racine>
|
||||||
|
</ul>
|
||||||
|
</B_articles_racine>
|
||||||
|
|
||||||
<h2 class="h2"><a href="#URL_RUBRIQUE">#TITRE</a></h2>
|
<B_rubriques>
|
||||||
|
<ul>
|
||||||
|
<BOUCLE_rubriques(RUBRIQUES) {id_parent} {par num titre}{!par date}>
|
||||||
|
<li>
|
||||||
|
<strong><a href="#URL_RUBRIQUE">#TITRE</a></strong>
|
||||||
|
<B_articles>
|
||||||
|
<ul>
|
||||||
|
<BOUCLE_articles(ARTICLES) {id_rubrique} {tri_rubrique}>
|
||||||
|
<li><a href="#URL_ARTICLE">#TITRE</a></li>
|
||||||
|
</BOUCLE_articles>
|
||||||
|
</ul>
|
||||||
|
</B_articles>
|
||||||
|
<BOUCLE_sous_rubriques(BOUCLE_rubriques)></BOUCLE_sous_rubriques>
|
||||||
|
</li>
|
||||||
|
</BOUCLE_rubriques>
|
||||||
|
</ul>
|
||||||
|
</B_rubriques>
|
||||||
|
|
||||||
[(#REM) Articles et sous-rubriques ]
|
</BOUCLE_secteurs>
|
||||||
<BOUCLE_test_article_r1(ARTICLES){id_rubrique}{1,2}>
|
|
||||||
</BOUCLE_test_article_r1>
|
|
||||||
<B_articles_racine>
|
|
||||||
<ul class="plan">
|
|
||||||
<BOUCLE_articles_racine(ARTICLES) {id_rubrique} {par titre}>
|
|
||||||
<li><a href="#URL_ARTICLE">#TITRE</a></li>
|
|
||||||
</BOUCLE_articles_racine>
|
|
||||||
</ul>
|
|
||||||
</B_articles_racine>
|
|
||||||
</B_test_article_r1>
|
|
||||||
|
|
||||||
<B_rubriques>
|
|
||||||
<ul class="plan">
|
|
||||||
<BOUCLE_rubriques(RUBRIQUES) {id_parent} {par titre}>
|
|
||||||
<li>
|
|
||||||
<strong><a href="#URL_RUBRIQUE">#TITRE</a></strong>
|
|
||||||
|
|
||||||
<BOUCLE_test_article_r2(ARTICLES){id_rubrique}{1,2}>
|
|
||||||
</BOUCLE_test_article_r2>
|
|
||||||
<B_articles>
|
|
||||||
<ul>
|
|
||||||
<BOUCLE_articles(ARTICLES) {id_rubrique} {par titre}>
|
|
||||||
[(#TOTAL_BOUCLE|>{1}|oui)<li><a href="#URL_ARTICLE">#TITRE</a></li>]
|
|
||||||
</BOUCLE_articles>
|
|
||||||
</ul>
|
|
||||||
</B_articles>
|
|
||||||
</B_test_article_r2>
|
|
||||||
|
|
||||||
<BOUCLE_sous_rubriques(BOUCLE_rubriques)></BOUCLE_sous_rubriques>
|
|
||||||
</li>
|
|
||||||
</BOUCLE_rubriques>
|
|
||||||
</ul>
|
|
||||||
</B_rubriques>
|
|
||||||
|
|
||||||
</BOUCLE_secteurs>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
16
squelettes/content/recherche.html
Executable file → Normal file
@ -1,14 +1,4 @@
|
|||||||
<section class="content" id="content">
|
<h1><:resultats_recherche:/></h1>
|
||||||
[<header class="cartouche">
|
[<p class="soustitre">« (#RECHERCHE) »</p>]
|
||||||
<h1><:resultats_recherche:>
|
|
||||||
<small>« (#RECHERCHE) »</small>
|
|
||||||
</h1>
|
|
||||||
<INCLURE{fond=breadcrumb/#ENV{type-page},env} />
|
|
||||||
</header>]
|
|
||||||
|
|
||||||
<div class="main">
|
<INCLURE{fond=inclure/recherche/articles, env, ajax} />
|
||||||
<INCLURE{fond=liste/articles-recherche,env,ajax} />
|
|
||||||
<INCLURE{fond=liste/rubriques-recherche,env,ajax} />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</section>
|
|
||||||
|
70
squelettes/content/rubrique.html
Executable file → Normal file
@ -1,54 +1,30 @@
|
|||||||
<BOUCLE_content(RUBRIQUES){id_rubrique}>
|
<BOUCLE_principale(RUBRIQUES){id_rubrique}>
|
||||||
<section class="content" id="content">
|
|
||||||
|
|
||||||
<header class="cartouche">
|
<h1 class="#EDIT{titre} page_titre">#TITRE</h1>
|
||||||
<h1 class="#EDIT{titre}">#TITRE</h1>
|
|
||||||
[<p class="publication"><time datetime="[(#DATE|date_iso)]"><:dernier_ajout:> : (#DATE|affdate_jourcourt).</time></p>]
|
|
||||||
<INCLURE{fond=breadcrumb/rubrique,env} />
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div class="main">
|
<div class="page_content">
|
||||||
[<div class="#EDIT{texte} texte">(#TEXTE|image_reduire{700,*})</div>]
|
|
||||||
|
|
||||||
<div class="liste articles">
|
[<div class="#EDIT{texte} texte surlignable">(#TEXTE|image_reduire{#CONST{_CONTENT_WIDTH},0})</div>]
|
||||||
<INCLURE{fond=liste/articles-resume,env,ajax,titre=<:articles_rubrique:>} />
|
|
||||||
</div>
|
|
||||||
[(#REM) Si aucun article, affiche un plan de la rubrique : en fait non, on a la liste en aside, on la garde là-bas et on se sert du texte si on veut en mettre en avant au cas par cas
|
|
||||||
ou éventuellement avec un modèle <rubriqueX|articles>
|
|
||||||
+ activer le plugin court-circuit pour aller directement dans larticle si un seul présent
|
|
||||||
]
|
|
||||||
|
|
||||||
|
<B_articles>
|
||||||
|
<div class="liste_articles">
|
||||||
|
#ANCRE_PAGINATION
|
||||||
|
<BOUCLE_articles(ARTICLES){id_rubrique} {tri_rubrique} {pagination 10}>
|
||||||
|
#INCLURE{fond=inclure/article-resume, id_article}
|
||||||
|
</BOUCLE_articles>
|
||||||
|
[<p class="pagination">(#PAGINATION{page_precedent_suivant})</p>]
|
||||||
</div>
|
</div>
|
||||||
|
</B_articles>
|
||||||
|
|
||||||
<footer>
|
<BOUCLE_rubriques(RUBRIQUES) {id_parent} {par num titre, titre}>
|
||||||
[(#REM) Gestion du portfolio et des documents ]
|
<h2><a href="#URL_RUBRIQUE">#TITRE</a></h2>
|
||||||
[(#INCLURE{fond=inclure/documents,id_rubrique})]
|
<div class="liste_articles">
|
||||||
|
<BOUCLE_articles_rub(ARTICLES){id_rubrique} {tri_rubrique} {0,3}>
|
||||||
|
#INCLURE{fond=inclure/article-resume, id_article}
|
||||||
|
</BOUCLE_articles_rub>
|
||||||
|
</div>
|
||||||
|
<p class="liste_articles__suite"><a href="#URL_RUBRIQUE">Tous les articles « #TITRE »</a></p>
|
||||||
|
</BOUCLE_rubriques>
|
||||||
|
|
||||||
[<div class="notes"><h2><:info_notes:></h2>(#NOTES)</div>]
|
</div>
|
||||||
</footer>
|
</BOUCLE_principale>
|
||||||
|
|
||||||
<aside>
|
|
||||||
[(#REM) Sites de la rubrique ]
|
|
||||||
<B_sites>
|
|
||||||
<div class="liste sites">
|
|
||||||
<h2 class="h2"><:sur_web:></h2>
|
|
||||||
<ul class="liste-items">
|
|
||||||
<BOUCLE_sites(SITES) {id_rubrique} {par nom_site}>
|
|
||||||
<li class="item short">#INCLURE{fond=inclure/resume/site,id_syndic}
|
|
||||||
<B_syndic>
|
|
||||||
<ul class="spip">
|
|
||||||
<BOUCLE_syndic(SYNDIC_ARTICLES) {id_syndic} {age<180} {par date}{inverse} {0,3}>
|
|
||||||
<li class="short with-publication-inline">#INCLURE{fond=inclure/resume/syndic_article,id_syndic_article}</li>
|
|
||||||
</BOUCLE_syndic>
|
|
||||||
</ul>
|
|
||||||
</B_syndic>
|
|
||||||
</li>
|
|
||||||
</BOUCLE_sites>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</B_sites>
|
|
||||||
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
</section>
|
|
||||||
</BOUCLE_content>
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<aside>
|
<aside>
|
||||||
<INCLURE{fond=liste/syndicarticles,id_syndic,env,ajax} />
|
<INCLURE{fond=inclure/liste/syndicarticles,id_syndic,env,ajax} />
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
|
41
squelettes/content/sommaire.html
Executable file → Normal file
@ -1,33 +1,10 @@
|
|||||||
<section class="content" id="content">
|
<div class="liste_articles">
|
||||||
<header class="cartouche visuallyhidden">
|
<B_articles>
|
||||||
<h1>#NOM_SITE_SPIP</h1>
|
#ANCRE_PAGINATION
|
||||||
</header>
|
<BOUCLE_articles(ARTICLES){!par date} {pagination 5}>
|
||||||
|
#INCLURE{fond=inclure/article-resume, id_article, longueur=480}
|
||||||
|
</BOUCLE_articles>
|
||||||
|
[<p class="pagination">(#PAGINATION{page_precedent_suivant})</p>]
|
||||||
|
</B_articles>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="main">
|
|
||||||
<B_accueil>
|
|
||||||
<article class="texte_accueil">
|
|
||||||
<BOUCLE_accueil(ARTICLES){page=accueil}>
|
|
||||||
[<h2 class="h2 visuallyhidden">(#TITRE|sinon{<:accueil:>})</h2>]
|
|
||||||
<div class="main">
|
|
||||||
[<div class="#EDIT{chapo} chapo surlignable">(#CHAPO|image_reduire{700,*})</div>]
|
|
||||||
[<div class="#EDIT{texte} texte surlignable">(#TEXTE|image_reduire{700,*})</div>]
|
|
||||||
|
|
||||||
[<p class="#EDIT{hyperlien} hyperlien"><:voir_en_ligne:> : <a href="(#URL_SITE)" class="spip_out">[(#NOM_SITE|sinon{[(#URL_SITE|couper{80})]})]</a></p>]
|
|
||||||
</div>
|
|
||||||
<footer>
|
|
||||||
[<div class="#EDIT{ps} ps surlignable"><h2><:info_ps:></h2>(#PS|image_reduire{700,*})</div>]
|
|
||||||
[<div class="notes"><h2><:info_notes:></h2>(#NOTES)</div>]
|
|
||||||
</footer>
|
|
||||||
</BOUCLE_accueil>
|
|
||||||
</article>
|
|
||||||
</B_accueil>
|
|
||||||
[<div id="descriptif_site_spip" class="#EDIT{meta-descriptif_site} texte_accueil">(#DESCRIPTIF_SITE_SPIP)</div>]
|
|
||||||
<//B_accueil>
|
|
||||||
|
|
||||||
<div class="liste long articles">
|
|
||||||
<INCLURE{fond=liste/articles-resume,env,ajax} />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</section>
|
|
||||||
|
13
squelettes/favicon.ico.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#HTTP_HEADER{Content-Type: image/x-icon}
|
||||||
|
#HTTP_HEADER{Content-Transfer-Encoding: binary}
|
||||||
|
<?php
|
||||||
|
$file="[(#CHEMIN{favicon.ico}|sinon{[(#CHEMIN{favicon.png}
|
||||||
|
|image_passe_partout{32,32}
|
||||||
|
|image_recadre{32,32,center}
|
||||||
|
|image_format{ico}|extraire_attribut{src}
|
||||||
|
)]}|sinon{#CHEMIN{spip.ico}})]";
|
||||||
|
if ($cl = filesize($file=preg_replace(',[?].*$,','',$file)))
|
||||||
|
header("Content-Length: ". $cl);
|
||||||
|
|
||||||
|
readfile($file);
|
||||||
|
?>
|
BIN
squelettes/favicon.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
13
squelettes/footer/dist.html
Executable file → Normal file
@ -1,6 +1,17 @@
|
|||||||
|
|
||||||
|
<div class="menus_footer">
|
||||||
|
#INCLURE{fond=inclure/menu, env, identifiant=pied1}
|
||||||
|
#INCLURE{fond=inclure/menu, env, identifiant=pied2}
|
||||||
|
#INCLURE{fond=inclure/menu, env, identifiant=pied3}
|
||||||
|
#INCLURE{fond=inclure/menu, env, identifiant=pied4}
|
||||||
|
#INCLURE{fond=inclure/menu, env, identifiant=pied5}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
#FORMULAIRE_RECHERCHE
|
||||||
|
|
||||||
<p class="colophon">
|
<p class="colophon">
|
||||||
|
|
||||||
<span class="april"><img src="#CHEMIN{scss/img/logo_april_b.png}" /></span>
|
<span class="april"><img src="#CHEMIN{images/logo_april_b.png}" /></span>
|
||||||
|
|
||||||
<BOUCLE_contact(ARTICLES){page=contact}>
|
<BOUCLE_contact(ARTICLES){page=contact}>
|
||||||
<a href="#URL_ARTICLE">#TITRE</a>
|
<a href="#URL_ARTICLE">#TITRE</a>
|
||||||
|
9
squelettes/formulaires/recherche.html
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
<div class="formulaire_spip formulaire_recherche[ (#ENV{class})]">
|
||||||
|
<form action="[(#ENV{action})]" method="get" role="search" aria-label="site">
|
||||||
|
[(#ENV{action}|form_hidden)]
|
||||||
|
[<input type="hidden" name="lang" value="(#ENV{lang})" />]
|
||||||
|
<label for="#ENV{_id_champ}"><:info_rechercher_02:/></label>
|
||||||
|
<input type="[(#HTML5|?{search,text})]" class="search text" size="10" name="recherche" placeholder="Rechercher" id="#ENV{_id_champ}"[ value="(#ENV{recherche})"] accesskey="4" autocapitalize="off" autocorrect="off"/>
|
||||||
|
<button type="submit" class="submit"><:info_rechercher:/></button>
|
||||||
|
</form>
|
||||||
|
</div>
|
43
squelettes/formulaires/recherche.php
Executable file
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/***************************************************************************\
|
||||||
|
* SPIP, Systeme de publication pour l'internet *
|
||||||
|
* *
|
||||||
|
* Copyright (c) 2001-2019 *
|
||||||
|
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
|
||||||
|
* *
|
||||||
|
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
|
||||||
|
* Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
|
||||||
|
* \***************************************************************************/
|
||||||
|
|
||||||
|
if (!defined('_ECRIRE_INC_VERSION')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* chargement des valeurs par defaut des champs du #FORMULAIRE_RECHERCHE
|
||||||
|
* on peut lui passer l'url de destination en premier argument
|
||||||
|
* on peut passer une deuxième chaine qui va différencier le formulaire pour pouvoir en utiliser plusieurs sur une même page
|
||||||
|
*
|
||||||
|
* @param string $lien URL où amène le formulaire validé
|
||||||
|
* @param string $class Une class différenciant le formulaire
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
function formulaires_recherche_charger_dist($lien = '', $class = '') {
|
||||||
|
if ($GLOBALS['spip_lang'] != $GLOBALS['meta']['langue_site']) {
|
||||||
|
$lang = $GLOBALS['spip_lang'];
|
||||||
|
} else {
|
||||||
|
$lang = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
$action = ($lien ? $lien : generer_url_public('recherche')); # action specifique, ne passe pas par Verifier, ni Traiter
|
||||||
|
return
|
||||||
|
array(
|
||||||
|
'action' => $action,
|
||||||
|
'recherche' => _request('recherche'),
|
||||||
|
'lang' => $lang,
|
||||||
|
'class' => $class,
|
||||||
|
'_id_champ' => $class ? substr(md5($action . $class), 0, 4) : 'recherche',
|
||||||
|
);
|
||||||
|
}
|
2
squelettes/head/401.html
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<title>Accès réservé - [(#NOM_SITE_SPIP|textebrut)]</title>
|
||||||
|
<meta name="robots" content="noindex">
|
4
squelettes/head/404.html
Executable file → Normal file
@ -1,2 +1,2 @@
|
|||||||
<title><:pass_erreur:> 404 - [(#NOM_SITE_SPIP|textebrut)]</title>
|
<title><:pass_erreur:/> 404 - [(#NOM_SITE_SPIP|textebrut)]</title>
|
||||||
<meta name="robots" content="none" />
|
<meta name="robots" content="noindex">
|
4
squelettes/head/article.html
Executable file → Normal file
@ -1,5 +1,5 @@
|
|||||||
<BOUCLE_article_head(ARTICLES) {id_article}>
|
<BOUCLE_article_head(ARTICLES) {id_article}>
|
||||||
<title>[(#TITRE|textebrut) - ][(#NOM_SITE_SPIP|textebrut)]</title>
|
<title>[(#TITRE|textebrut)][ - (#NOM_SITE_SPIP|textebrut)]</title>
|
||||||
[<meta name="description" content="(#INTRODUCTION{150}|attribut_html)" />]
|
[<meta name="description" content="(#INTRODUCTION|couper{150}|textebrut)" />]
|
||||||
[<link rel="canonical" href="(#URL_ARTICLE|url_absolue)" />]
|
[<link rel="canonical" href="(#URL_ARTICLE|url_absolue)" />]
|
||||||
</BOUCLE_article_head>
|
</BOUCLE_article_head>
|
@ -1,11 +0,0 @@
|
|||||||
<BOUCLE_auteur_head(AUTEURS) {id_auteur}>
|
|
||||||
<title>[(#NOM|textebrut) - ][(#NOM_SITE_SPIP|textebrut)]</title>
|
|
||||||
[<meta name="description" content="(#BIO|couper{150}|attribut_html)" />]
|
|
||||||
[<link rel="canonical" href="(#URL_AUTEUR|url_absolue)" />]
|
|
||||||
|
|
||||||
[(#REM) Favicon personnalisee a partir du logo (si filtres d'image) ]
|
|
||||||
[(#MODELE{favicon}{favicon=#LOGO_AUTEUR})]
|
|
||||||
|
|
||||||
[(#REM) Lien vers le flux RSS des articles de l'auteur ]
|
|
||||||
<link rel="alternate" type="application/rss+xml" title="[(#NOM|textebrut)]" href="[(#URL_PAGE{backend}|parametre_url{id_auteur,#ID_AUTEUR})]" />
|
|
||||||
</BOUCLE_auteur_head>
|
|
24
squelettes/head/dist.html
Executable file → Normal file
@ -1,26 +1,2 @@
|
|||||||
[(#REM)
|
|
||||||
Cette inclusion est celle utilisee par defaut lorsqu'un head/xxx demande
|
|
||||||
n'existe pas
|
|
||||||
|
|
||||||
Ces deux balises #NOM_SITE_SPIP et #DESCRIPTIF_SITE_SPIP
|
|
||||||
permettent de récupérer des informations de configuration de SPIP
|
|
||||||
que l'on renseigne dans l'espace privé.
|
|
||||||
|
|
||||||
Ces enregistrements sont stockés en base de donnée dans une
|
|
||||||
table appelée "spip_meta". Les champs de la table peuvent aussi
|
|
||||||
être récupérés en utilisant la balise #CONFIG{nom de la configuration}
|
|
||||||
ce qui donnerait ici : #CONFIG{nom_site_spip}
|
|
||||||
|
|
||||||
Les |mot suivants les #BALISE indique qu'on applique certains traitements
|
|
||||||
au texte retourné par la balise.
|
|
||||||
|
|
||||||
|textebrut supprime toute balise HTML, |couper{150} coupe le texte
|
|
||||||
retourné à 150 caractères. Ces "filtres" peuvent se chaîner
|
|
||||||
|filtreA|filtreB ...
|
|
||||||
|
|
||||||
Ces deux lignes permettent au bout du compte de renseigner le titre
|
|
||||||
de la page affiché tout en haut du navigateur ainsi que la description du site
|
|
||||||
(utile aux moteurs de recherche)
|
|
||||||
]
|
|
||||||
<title>[(#NOM_SITE_SPIP|textebrut)]</title>
|
<title>[(#NOM_SITE_SPIP|textebrut)]</title>
|
||||||
[<meta name="description" content="(#DESCRIPTIF_SITE_SPIP|couper{150}|textebrut)" />]
|
[<meta name="description" content="(#DESCRIPTIF_SITE_SPIP|couper{150}|textebrut)" />]
|
11
squelettes/head/mot.html
Executable file → Normal file
@ -1,6 +1,5 @@
|
|||||||
<BOUCLE_principale(MOTS) {id_mot} >
|
<BOUCLE_mot_head(MOTS) {id_mot}>
|
||||||
<title>[(#TITRE|textebrut) - ][(#NOM_SITE_SPIP|textebrut)]</title>
|
<title>[(#TITRE|textebrut)][ - (#NOM_SITE_SPIP|textebrut)]</title>
|
||||||
[<meta name="description" content="(#DESCRIPTIF|couper{150}|attribut_html)" />]
|
[<meta name="description" content="(#DESCRIPTIF|couper{150}|textebrut)" />]
|
||||||
[(#REM) Lien vers le flux RSS des articles du mot cle ]
|
[<link rel="canonical" href="(#URL_MOT|url_absolue)" />]
|
||||||
<link rel="alternate" type="application/rss+xml"[ title="(#TITRE|attribut_html)"] href="[(#URL_PAGE{backend}|parametre_url{id_mot,#ID_MOT})]" />
|
</BOUCLE_article_head>
|
||||||
</BOUCLE_principale>
|
|
@ -1,3 +0,0 @@
|
|||||||
<title><:plan_site:> - [(#NOM_SITE_SPIP|textebrut)]</title>
|
|
||||||
[<meta name="description" content="(#DESCRIPTIF_SITE_SPIP|couper{150}|attribut_html)" />]
|
|
||||||
<meta name="robots" content="none" />
|
|
2
squelettes/head/recherche.html
Executable file → Normal file
@ -1,2 +1,2 @@
|
|||||||
<title><:resultats_recherche:> - [(#NOM_SITE_SPIP|textebrut)]</title>
|
<title><:resultats_recherche:/>[ - (#NOM_SITE_SPIP|textebrut)]</title>
|
||||||
<meta name="robots" content="none" />
|
<meta name="robots" content="none" />
|
6
squelettes/head/rubrique.html
Executable file → Normal file
@ -1,7 +1,5 @@
|
|||||||
<BOUCLE_rubrique_head(RUBRIQUES){id_rubrique}>
|
<BOUCLE_rubrique_head(RUBRIQUES) {id_rubrique}>
|
||||||
[<title>(#TITREWEB|sinon{#TITRE}|textebrut)</title>]
|
<title>[(#TITRE|textebrut) - ][(#NOM_SITE_SPIP|textebrut)]</title>
|
||||||
[<meta name="description" content="(#INTRODUCTION{150}|textebrut)" />]
|
[<meta name="description" content="(#INTRODUCTION{150}|textebrut)" />]
|
||||||
[<link rel="canonical" href="(#URL_RUBRIQUE|url_absolue)" />]
|
[<link rel="canonical" href="(#URL_RUBRIQUE|url_absolue)" />]
|
||||||
[(#REM) Lien vers le flux RSS de la rubrique ]
|
|
||||||
<link rel="alternate" type="application/rss+xml" title="<:syndiquer_rubrique:>" href="[(#URL_PAGE{backend}|parametre_url{id_rubrique,#ID_RUBRIQUE})]" />
|
|
||||||
</BOUCLE_rubrique_head>
|
</BOUCLE_rubrique_head>
|
@ -1,5 +0,0 @@
|
|||||||
<BOUCLE_site(SITES){id_syndic}>
|
|
||||||
<title>[(#NOM_SITE|textebrut) - ][(#NOM_SITE_SPIP|textebrut)]</title>
|
|
||||||
[<meta name="description" content="(#DESCRIPTIF|couper{150}|textebrut)" />]
|
|
||||||
<meta name="robots" content="none" />
|
|
||||||
</BOUCLE_site>
|
|
@ -1,23 +0,0 @@
|
|||||||
[(#REM)
|
|
||||||
Ces deux balises #NOM_SITE_SPIP et #DESCRIPTIF_SITE_SPIP
|
|
||||||
permettent de récupérer des informations de configuration de SPIP
|
|
||||||
que l'on renseigne dans l'espace privé.
|
|
||||||
|
|
||||||
Ces enregistrements sont stockés en base de donnée dans une
|
|
||||||
table appelée "spip_meta". Les champs de la table peuvent aussi
|
|
||||||
être récupérés en utilisant la balise #CONFIG{nom de la configuration}
|
|
||||||
ce qui donnerait ici : #CONFIG{nom_site_spip}
|
|
||||||
|
|
||||||
Les |mot suivants les #BALISE indique qu'on applique certains traitements
|
|
||||||
au texte retourné par la balise.
|
|
||||||
|
|
||||||
|textebrut supprime toute balise HTML, |couper{150} coupe le texte
|
|
||||||
retourné à 150 caractères. Ces "filtres" peuvent se chaîner
|
|
||||||
|filtreA|filtreB ...
|
|
||||||
|
|
||||||
Ces deux lignes permettent au bout du compte de renseigner le titre
|
|
||||||
de la page affiché tout en haut du navigateur ainsi que la description du site
|
|
||||||
(utile aux moteurs de recherche)
|
|
||||||
]
|
|
||||||
<title>[(#NOM_SITE_SPIP|typo|textebrut)][ - (#SLOGAN_SITE_SPIP|typo|textebrut)]</title>
|
|
||||||
[<meta name="description" content="(#DESCRIPTIF_SITE_SPIP|textebrut)" />]
|
|
13
squelettes/header/dist.html
Executable file → Normal file
@ -1,6 +1,17 @@
|
|||||||
<div class="accueil">
|
|
||||||
|
<div class="header_title print">
|
||||||
<h1 id="logo_site_spip"[ class="(#EDIT{meta-nom_site})"]>[(#SI_PAGE{sommaire}|non)<a rel="start home" href="#URL_SITE_SPIP/" title="<:accueil_site:>">]
|
<h1 id="logo_site_spip"[ class="(#EDIT{meta-nom_site})"]>[(#SI_PAGE{sommaire}|non)<a rel="start home" href="#URL_SITE_SPIP/" title="<:accueil_site:>">]
|
||||||
[(#LOGO_SITE_SPIP|image_reduire{400,60}) ]<span class="nom_site_spip">#NOM_SITE_SPIP</span>
|
[(#LOGO_SITE_SPIP|image_reduire{400,60}) ]<span class="nom_site_spip">#NOM_SITE_SPIP</span>
|
||||||
[<small class="slogan_site_spip[ (#EDIT{meta-slogan_site})]">(#SLOGAN_SITE_SPIP)</small>]
|
[<small class="slogan_site_spip[ (#EDIT{meta-slogan_site})]">(#SLOGAN_SITE_SPIP)</small>]
|
||||||
[(#SI_PAGE{sommaire}|non)</a>]</h1>
|
[(#SI_PAGE{sommaire}|non)</a>]</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<B_nav>
|
||||||
|
<nav class="nav principale" aria-label="Menu principal">
|
||||||
|
<ul class="nav-list">
|
||||||
|
<BOUCLE_nav(RUBRIQUES) {racine} {par num titre, titre}>
|
||||||
|
<li class="nav-item[ (#EXPOSE)][ (#COMPTEUR_BOUCLE|=={1}|oui)first][ (#COMPTEUR_BOUCLE|=={#TOTAL_BOUCLE}|oui)last]"><a href="#URL_RUBRIQUE"[ class="(#EXPOSE)"]>#TITRE</a></li>
|
||||||
|
</BOUCLE_nav>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</B_nav>
|
||||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
@ -1,9 +0,0 @@
|
|||||||
<div class="liste articles archives">
|
|
||||||
<h2 class="h2"><:baz_april:archives:></h2>
|
|
||||||
<ul class="liste-items inline">
|
|
||||||
<BOUCLE_hero(ARTICLES){id_rubrique}{fusion YEAR(date)}{fusion MONTH(date)}{!par date}>
|
|
||||||
[<li class="item annees">(#DATE|affdate{Y}|unique)</li>]
|
|
||||||
[<li class="item"><a[ href="(#URL_RUBRIQUE|parametre_url{date,#DATE|affdate{Y-m}})"]>(#DATE|affdate{nom_mois})</a></li>]
|
|
||||||
</BOUCLE_hero>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
@ -1,10 +0,0 @@
|
|||||||
<BOUCLE_hero(ARTICLES){id_article}>
|
|
||||||
<div class="hero-unit item hentry">
|
|
||||||
<h1 class="entry-title"><a href="#URL_ARTICLE" rel="bookmark">#TITRE[(#LOGO_ARTICLE_RUBRIQUE|image_reduire{500,100}|responsive_logo)]</a></h1>
|
|
||||||
<p class="publication">[<time pubdate="pubdate" datetime="[(#DATE|date_iso)]">(#DATE|affdate)</time>]</p>
|
|
||||||
[<div class="#EDIT{intro} introduction entry-content">(#INTRODUCTION)</div>]
|
|
||||||
<p class="postmeta">
|
|
||||||
<a class="btn btn-primary btn-large lire-la-suite" href="#URL_ARTICLE" title="<:zcore:lire_la_suite|attribut_html:> <:zcore:lire_la_suite_de|attribut_html:> [(#TITRE|attribut_html)]"><:zcore:lire_la_suite:></a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</BOUCLE_hero>
|
|
20
squelettes/inclure/article-resume.html
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<BOUCLE_articles(ARTICLES) {id_article}>
|
||||||
|
<article class="article-resume[ article-resume--(#ENV{class})] block-link-parent">
|
||||||
|
<div class="article-resume__logo">
|
||||||
|
[(#LOGO_ARTICLE_NORMAL|sinon{#CHEMIN{images/nologo.png}}|image_recadre{#CONST{_IMAGE_RATIO},-}|image_reduire{#CONST{_CONTENT_WIDTH}|div{2}} )]
|
||||||
|
</div>
|
||||||
|
<div class="article-resume__texte">
|
||||||
|
<h2 class="article-resume__titre"><a href="#URL_ARTICLE" class="block-link[ (#ENV{class_link})]">#TITRE</a></h2>
|
||||||
|
<div class="article-resume__infos">
|
||||||
|
[<span class="article-resume__rubrique">(#INFO_TITRE{rubrique,#ID_RUBRIQUE})</span>]
|
||||||
|
#SET{heure,#DATE|heures|concat{h}}
|
||||||
|
#SET{minutes,#DATE|minutes}
|
||||||
|
[(#GET{minutes}|=={00}|non)#SET{heure,#GET{heure}|concat{#GET{minutes}}}]
|
||||||
|
[<span class="article-resume__date">(#DATE|nom_jour|ucfirst) [(#DATE|affdate)] [(#ENV{class}|=={vertical}|non)à #GET{heure}]</span>]
|
||||||
|
</div>
|
||||||
|
<div class="article-resume__intro">
|
||||||
|
[(#INTRODUCTION{#ENV{longueur,180}}|PtoBR)]
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
</BOUCLE_articles>
|
@ -1,10 +0,0 @@
|
|||||||
<B_articles>
|
|
||||||
#ANCRE_PAGINATION
|
|
||||||
<h2 class="h2">[(#ENV{titre,<:derniers_articles:>})]</h2>
|
|
||||||
<ul class="liste-items">
|
|
||||||
<BOUCLE_articles(ARTICLES){id_rubrique!=-1}{id_rubrique?} {lang} {par num titre} {!par date} {pagination #ENV{nb,10}}>
|
|
||||||
<li class="item clearfix">#INCLURE{fond=inclure/resume/article,id_article,env}</li>
|
|
||||||
</BOUCLE_articles>
|
|
||||||
</ul>
|
|
||||||
[<div class="pagination">(#PAGINATION)</div>]
|
|
||||||
</B_articles>
|
|
@ -1,16 +0,0 @@
|
|||||||
[(#REM) on affiche tous les articles, on garde le paramètre url des paginations article et rubrique ]
|
|
||||||
<BOUCLE_env(ARTICLES){id_article}>
|
|
||||||
<BOUCLE_trad(ARTICLES){origine_traduction}{traduction}>[(#SET{trad#ID_ARTICLE,on})]</BOUCLE_trad>
|
|
||||||
</BOUCLE_env>
|
|
||||||
<B_articles_rubrique>#ANCRE_PAGINATION
|
|
||||||
<ul[(#COMPOSITION|=={blog}|oui) class="blog"]>
|
|
||||||
<BOUCLE_articles_rubrique(ARTICLES) {id_rubrique} {lang} {par num titre} {!par date} {pagination #ENV{nb,10}}>
|
|
||||||
<li>
|
|
||||||
<a[ href="(#URL_ARTICLE|parametre_url{debut_articles_rubrique,@#ID_ARTICLE})"] class="article[(#LOGO_ARTICLE|oui)logo clearfix][ (#EXPOSE)][ (#GET{trad#ID_ARTICLE})]">[(#COMPOSITION|=={blog}|oui)[<p class="date">(#DATE|affdate)</p>]]
|
|
||||||
[(#LOGO_ARTICLE|image_reduire{60,*})] #TITRE [(#COMPOSITION|=={blog}|oui)[<p class="soustitre">(#SOUSTITRE)</p>][<p class="introduction">(#INTRODUCTION|couper{120})</p>]]
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</BOUCLE_articles_rubrique>
|
|
||||||
</ul>
|
|
||||||
[<p class="pagination">(#PAGINATION{page})</p>]
|
|
||||||
</B_articles_rubrique>
|
|
@ -1,5 +1,7 @@
|
|||||||
<div class="header__boussole">
|
<div class="header_boussole">
|
||||||
<div class="page--container">
|
<div class="page_container">
|
||||||
|
<span class="initiatives"><:baz_april:des_initiatives_april:></span>
|
||||||
|
<button type="button" class="btn-boussole"><:baz_april:site_april:></button>
|
||||||
<nav class="nav"><BOUCLE_csv(DATA){source csv, #CHEMIN{csv/boussole.csv}}>
|
<nav class="nav"><BOUCLE_csv(DATA){source csv, #CHEMIN{csv/boussole.csv}}>
|
||||||
<a href="#VALEUR{1}">#VALEUR{0}</a></BOUCLE_csv>
|
<a href="#VALEUR{1}">#VALEUR{0}</a></BOUCLE_csv>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -1,42 +1,24 @@
|
|||||||
[(#REM)
|
[(#REM)
|
||||||
Head standard de toutes les pages ;
|
Head standard de toutes les pages ; les elements specifiques
|
||||||
les elements specifiques (title, description) figurent dans chaque squelette
|
(title, description) figurent dans le squelette article.html
|
||||||
|
|
||||||
]
|
]
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
|
|
||||||
[(#REM) Lien vers le flux RSS du site ]
|
<meta name="generator" content="SPIP[ (#SPIP_VERSION)]" />
|
||||||
[<link rel="alternate" type="application/rss+xml" title="<:syndiquer_site:>" href="(#URL_PAGE{backend})" />]
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
[(#REM) baz scss ]
|
|
||||||
[<link rel="stylesheet" href="(#CSS{scss/baz.css})" type="text/css" />]
|
|
||||||
[(#REM) surcharge facile pur css ]
|
|
||||||
[<link rel="stylesheet" href="(#CSS{css/perso.css})" type="text/css" />]
|
|
||||||
|
|
||||||
#INSERT_HEAD_CSS
|
#INSERT_HEAD_CSS
|
||||||
|
|
||||||
[(#REM)
|
|
||||||
Balise permettant aux plugins d'inserer des appels javascript ;
|
|
||||||
4. C'est ici que SPIP va inserer l'appel de la librairie jQuery
|
|
||||||
5. Et appeler a la fin compacte_head pour agreger et compacter tout le head dans des fichiers statiques si l'option est cochee dans Configuration
|
|
||||||
]
|
|
||||||
#INSERT_HEAD
|
#INSERT_HEAD
|
||||||
|
|
||||||
[<script src="(#CHEMIN{js/baz_script.js})" type="text/javascript"></script>]
|
[<link rel="stylesheet" href="(#CSS{css/spip.css})" type="text/css" />]
|
||||||
[(#REM) 6. Vos scripts ]
|
[<link rel="stylesheet" href="(#CSS{css/media.css})" type="text/css" />]
|
||||||
[<script src="(#CHEMIN{js/script.js})" type="text/javascript"></script>]
|
|
||||||
|
|
||||||
[(#REM) Fierement fabrique avec SPIP ]
|
[(#REM) Thème SCSS du plugin ]
|
||||||
<meta name="generator" content="SPIP[ (#SPIP_VERSION)]" />
|
[<link rel="stylesheet" href="(#CSS{scss/theme.css})" type="text/css" />]
|
||||||
|
|
||||||
[(#REM) Favicon + activer le plugin Favicon ]
|
[(#REM) scripts génériques ]
|
||||||
[<link rel="shortcut icon" href="(#ENV*{favicon}
|
[<script type="text/javascript" src="(#CHEMIN{javascript/sidr/jquery.sidr.min.js})"></script>]
|
||||||
|sinon{#CHEMIN{favicon.ico}}
|
[<script type="text/javascript" src="(#CHEMIN{javascript/script.js}|timestamp)"></script>]
|
||||||
|sinon{#CHEMIN{favicon.png}}
|
|
||||||
|sinon{#LOGO_SITE_SPIP}
|
|
||||||
|image_passe_partout{16,16}
|
|
||||||
|image_recadre{16,16,center}
|
|
||||||
|image_format{ico}|extraire_attribut{src})" type="image/x-icon" />]
|
|
||||||
|
|
||||||
[(#REM) meta robots ]
|
[(#REM) flux RSS ]
|
||||||
[<meta name="robots" content="(#ENV{robots})" />]
|
[<link rel="alternate" type="application/rss+xml" title="<:syndiquer_site:/>" href="(#URL_PAGE{backend}|url_absolue)" />]
|
||||||
|
BIN
squelettes/inclure/images/icone-dropdown-over.png
Normal file
After Width: | Height: | Size: 311 B |
BIN
squelettes/inclure/images/icone-dropdown.png
Normal file
After Width: | Height: | Size: 300 B |
BIN
squelettes/inclure/images/logo_april_b.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
squelettes/inclure/images/nologo.png
Normal file
After Width: | Height: | Size: 173 B |
@ -1,10 +0,0 @@
|
|||||||
<B_articles>
|
|
||||||
#ANCRE_PAGINATION
|
|
||||||
<h2 class="h2">[(#ENV{titre,<:derniers_articles:>})]</h2>
|
|
||||||
<ul class="liste-items">
|
|
||||||
<BOUCLE_articles(ARTICLES){id_rubrique!=-1}{id_rubrique?} {lang} {par num titre} {!par date} {pagination #ENV{nb,10}}>
|
|
||||||
<li class="item clearfix">#INCLURE{fond=inclure/resume/article,id_article,env}</li>
|
|
||||||
</BOUCLE_articles>
|
|
||||||
</ul>
|
|
||||||
[<div class="pagination">(#PAGINATION)</div>]
|
|
||||||
</B_articles>
|
|
@ -1,25 +0,0 @@
|
|||||||
#SET{sens_tri_map, #ARRAY{direct,0, inverse,-1}}
|
|
||||||
#SET{sens_tri, #GET{sens_tri_map/#ENV{sens}}}
|
|
||||||
#SET{par_map, #ARRAY{
|
|
||||||
num_titre, 'num titre'
|
|
||||||
}}
|
|
||||||
#SET{defaut_tri, #ARRAY{
|
|
||||||
titre, #GET{sens_tri,0},
|
|
||||||
num titre, #GET{sens_tri,0},
|
|
||||||
date, #GET{sens_tri,-1},
|
|
||||||
date_modif, #GET{sens_tri,-1}
|
|
||||||
}}
|
|
||||||
#SET{par, #ENV{par}|in_array{#GET{par_map}|array_keys}|?{#GET{par_map/#ENV{par}},#ENV{par}}}
|
|
||||||
#SET{tri, #GET{par,titre}}
|
|
||||||
<BOUCLE_rubrique(RUBRIQUES){id_rubrique}>
|
|
||||||
<B_rubriques_rubrique>
|
|
||||||
#ANCRE_PAGINATION
|
|
||||||
[<h2 class="h2">(#ENV{titre,<:rubriques:>})</h2>]
|
|
||||||
<ul class="liste-items">
|
|
||||||
<BOUCLE_rubriques_rubrique(RUBRIQUES) {id_parent} {tri #GET{tri}, #GET{defaut_tri}} {pagination #ENV{parpage,10}}>
|
|
||||||
<li class="item clearfix">#INCLURE{fond=inclure/resume/rubrique,id_rubrique,env,largeur_logo=#ENV{largeur_logo},coupe=#ENV{coupe}}</li>
|
|
||||||
</BOUCLE_rubriques_rubrique>
|
|
||||||
</ul>
|
|
||||||
[<div class="pagination">(#PAGINATION)</div>]
|
|
||||||
</B_rubriques_rubrique>
|
|
||||||
</BOUCLE_rubrique>
|
|
0
squelettes/inclure/nav-secteurs.html
Executable file → Normal file
@ -1,45 +0,0 @@
|
|||||||
[(#REM) Signer la petition ]
|
|
||||||
#FORMULAIRE_SIGNATURE
|
|
||||||
|
|
||||||
[(#REM) Signatures de la petition ]
|
|
||||||
<B_signatures>
|
|
||||||
<div id="signatures">
|
|
||||||
[<div class="pagination">(#PAGINATION)</div>]
|
|
||||||
<table class="spip">
|
|
||||||
<caption><h2 class="h2">#GRAND_TOTAL <:signatures_petition:></h2></caption>
|
|
||||||
<thead>
|
|
||||||
<tr class="row_first">
|
|
||||||
<th class="signature-date"><a href='[(#SELF|parametre_url{tri,date_time}|parametre_url{tri_inverse,''})]#signatures' title="<:lien_trier_date:>"><:date:></a></th>
|
|
||||||
<th class="signature-nom"><a href='[(#SELF|parametre_url{tri,nom_email}|parametre_url{tri_inverse,''})]#signatures' title="<:lien_trier_nom:>"><:nom:></a></th>
|
|
||||||
[(#REM) Afficher la colonne des messages si autorises ]
|
|
||||||
<BOUCLE_signature-message-th(PETITIONS){id_article}{message=oui}>
|
|
||||||
<th class="signature-message"><:message:></th>
|
|
||||||
</BOUCLE_signature-message-th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<BOUCLE_signatures(SIGNATURES) {id_article} {pagination #ENV{pagination, 15} } {recherche ?#ENV{recherche_signatures}} {!par #ENV{tri}}{par #ENV{tri_inverse}} {!par #ENV{tri,#ENV{tri_inverse}}|?{'',date_time}}>
|
|
||||||
<tr [class="(#COMPTEUR_BOUCLE|alterner{row_odd,row_even})" ]id='id_signature#ID_SIGNATURE'>
|
|
||||||
<td class="signature-date">[(#DATE|affdate_jourcourt)]</td>
|
|
||||||
<td class="signature-nom"><strong class="#EDIT{qui}">#NOM</strong>[ <div class="small #EDIT{hyperlien}"><a href="(#URL_SITE)"[ title="(#NOM_SITE|attribut_html|couper{80})"] class="spip_out"><:site_web:></a></div>]</td>
|
|
||||||
[(#REM) Afficher la colonne des messages si autorises ]
|
|
||||||
<BOUCLE_signature-message-td(PETITIONS){id_article}{message=oui}> </BOUCLE_signature-message-td>
|
|
||||||
<td class="signature-message #EDIT{message}">[(#MESSAGE|PtoBR)]</td>
|
|
||||||
</B_signature-message-td>
|
|
||||||
</tr>
|
|
||||||
</BOUCLE_signatures>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
[<div class="pagination">(#PAGINATION)</div>]
|
|
||||||
|
|
||||||
[(#REM) Afficher un moteur de recherche si plus de 30 signatures
|
|
||||||
ou s'il etait deja present au coup d'avant]
|
|
||||||
[(#ENV{recherche_signatures}|?{31,#_signatures:GRAND_TOTAL}|>{3}|oui)
|
|
||||||
<div class="formulaire_spip formulaire_recherche formulaire_recherche_signatures" id="formulaire_recherche_signatures">
|
|
||||||
<form method='get' action='#SELF'><div>[(#SELF|form_hidden)]
|
|
||||||
<label for="recherche_signatures"><:info_rechercher:></label> <input type="text" class="text" size="10" name="recherche_signatures" id="recherche_signatures" style='font-style: italic;' value=" <:entree_signature:>"/> <input type="submit" class="submit" value="<:info_rechercher:>" />
|
|
||||||
</div></form>
|
|
||||||
</div>
|
|
||||||
]
|
|
||||||
</div><!--#signatures-->
|
|
||||||
</B_signatures>
|
|
14
squelettes/inclure/recherche/articles.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[(#REM) Articles trouves ]
|
||||||
|
<B_articles>
|
||||||
|
#ANCRE_PAGINATION
|
||||||
|
<h2><:articles:/> (#GRAND_TOTAL)</h2>
|
||||||
|
<ul>
|
||||||
|
<BOUCLE_articles(ARTICLES) {recherche} {lang} {!par points} {pagination 5}>
|
||||||
|
<li class="block-link-parent">
|
||||||
|
<strong><a class="block-link" href="#URL_ARTICLE"[ hreflang="(#LANG)"]>#TITRE</a></strong>
|
||||||
|
[(#INTRODUCTION{150})]
|
||||||
|
</li>
|
||||||
|
</BOUCLE_articles>
|
||||||
|
</ul>
|
||||||
|
[<p class="pagination">(#PAGINATION)</p>]
|
||||||
|
</B_articles>
|
@ -1,13 +0,0 @@
|
|||||||
[(#REM)
|
|
||||||
|
|
||||||
Squelette Presentation resumee d'un article dans une liste
|
|
||||||
Distribue sous licence GPL
|
|
||||||
|
|
||||||
]
|
|
||||||
<BOUCLE_articles(ARTICLES) {id_article} {statut?}>
|
|
||||||
<article class="entry article hentry[(#COMPOSITION|=={blog}|oui) blog]">
|
|
||||||
<p class="publication">[<time datetime="[(#DATE|date_iso)]">(#DATE|affdate)</time>]</p>
|
|
||||||
<h3 class="h3 entry-title"><a href="[(#URL_ARTICLE|parametre_url{debut_articles_rubrique,@#ID_ARTICLE}|parametre_url{recherche,#ENV{recherche}})]" rel="bookmark">[(#ENV{logo_rubrique,' '}|?{#LOGO_ARTICLE_RUBRIQUE,#LOGO_ARTICLE}|image_reduire{#ENV{largeur_logo,-1},#ENV{hauteur_logo,-1}}|responsive_logo)]<span>#TITRE</span></a></h3>
|
|
||||||
[<div class="#EDIT{intro} introduction entry-content">(#INTRODUCTION{#ENV{coupe,300}})</div>]
|
|
||||||
</article>
|
|
||||||
</BOUCLE_articles>
|
|
@ -1,13 +0,0 @@
|
|||||||
[(#REM)
|
|
||||||
|
|
||||||
Squelette Presentation resumee d'un article dans une liste
|
|
||||||
Distribue sous licence GPL
|
|
||||||
|
|
||||||
]
|
|
||||||
<BOUCLE_articles(RUBRIQUES) {id_rubrique} {statut?}>
|
|
||||||
<article class="entry rubrique hentry">
|
|
||||||
<p class="publication[(#COMPOSITION|=={blog}|oui) blog]">[<time datetime="[(#DATE|date_iso)]">(#DATE|affdate)</time>]</p>
|
|
||||||
<h3 class="h3 entry-title"><a href="[(#URL_RUBRIQUE|parametre_url{recherche,#ENV{recherche}})]" rel="bookmark">[(#LOGO_RUBRIQUE|image_reduire{#ENV{largeur_logo,-1},#ENV{hauteur_logo,-1}}|responsive_logo)]<span>#TITRE</span></a></h3>
|
|
||||||
[<div class="#EDIT{introduction} introduction entry-content">(#INTRODUCTION{#ENV{coupe,300}})</div>]
|
|
||||||
</article>
|
|
||||||
</BOUCLE_articles>
|
|
@ -1,12 +0,0 @@
|
|||||||
[(#REM)
|
|
||||||
|
|
||||||
Squelette Presentation resumee d'un syndic dans une liste
|
|
||||||
Distribue sous licence GPL
|
|
||||||
|
|
||||||
]
|
|
||||||
<BOUCLE_resume_syndic(SYNDIC) {id_syndic} {statut?}>
|
|
||||||
<article class="entry site">
|
|
||||||
<h3 class="h3 entry-title"><a href="#ENV{url,#URL_SITE}" rel="bookmark" class="spip_out">[(#LOGO_SYNDIC_RUBRIQUE|image_reduire{#ENV{largeur_logo,-1},#ENV{hauteur_logo,-1}}|responsive_logo)]#NOM_SITE</a></h3>
|
|
||||||
[<div class="#EDIT{intro} introduction entry-content">(#DESCRIPTIF|couper{#ENV{coupe,300}})</div>]
|
|
||||||
</article>
|
|
||||||
</BOUCLE_resume_syndic>
|
|
@ -1,9 +0,0 @@
|
|||||||
<BOUCLE_resume_article_syndique(SYNDIC_ARTICLES){id_syndic_article}>
|
|
||||||
<article class="entry article syndic_article">
|
|
||||||
<h4 class="h4 entry-title">[<a href="#URL_SITE" rel="bookmark" class="spip_out">(#LOGO_SITE|image_reduire{#ENV{largeur_logo,25},#ENV{hauteur_logo,50}}|inserer_attribut{alt,#NOM_SITE}|responsive_logo)</a>]
|
|
||||||
[<a href="#URL_ARTICLE" rel="bookmark" class="spip_out">(#TITRE*)<span
|
|
||||||
class="read-more hide"><i class="icon-chevron-right" title="<:zcore:lire_la_suite|attribut_html:><:zcore:lire_la_suite_de|attribut_html:>«[(#TITRE*|attribut_html)]»"></i></span></a>]</h4>
|
|
||||||
<p class="publication">[<time datetime="[(#DATE|date_iso)]"><i class="icon-calendar"></i> (#DATE|affdate)</time>]</p>
|
|
||||||
[<div class="#EDIT{intro} introduction entry-content">(#DESCRIPTIF|couper{#ENV{coupe,300}})</div>]
|
|
||||||
</article>
|
|
||||||
</BOUCLE_resume_article_syndique>
|
|
@ -1,56 +0,0 @@
|
|||||||
[(#REM)
|
|
||||||
Barre de navigation, ouverte sur la hierarchie courante
|
|
||||||
|
|
||||||
On fait un plan, et, quand on avance vers une rubrique,
|
|
||||||
on l'affiche si son parent est expose ou est la racine du site. ]
|
|
||||||
<B_rubriques>
|
|
||||||
<nav class="nav">
|
|
||||||
<BOUCLE_rubriques(RUBRIQUES) {racine} {id_secteur}>
|
|
||||||
|
|
||||||
[(#REM) si plus d'un article, la liste des articles ]
|
|
||||||
<BOUCLE_test_article_r1(ARTICLES){id_rubrique}>
|
|
||||||
</BOUCLE_test_article_r1>
|
|
||||||
[(#SI_PAGE{rubrique}|non)[(#TOTAL_BOUCLE|>={10}|oui)
|
|
||||||
#SET{nb,10}[(#COMPOSITION|=={blog}|oui)#SET{nb,5}]
|
|
||||||
<INCLURE{fond=inclure/articles,env,ajax,id_rubrique=#ID_SECTEUR,id_article,debut_articles_rubrique,composition,nb=#GET{nb}} />
|
|
||||||
]]
|
|
||||||
[(#SI_PAGE{rubrique}|non)
|
|
||||||
[(#TOTAL_BOUCLE|>={10}|non)
|
|
||||||
[(#TOTAL_BOUCLE|>={2}|oui)
|
|
||||||
[(#COMPOSITION|=={blog}|oui)#SET{nb,5}<INCLURE{fond=inclure/articles,env,ajax,id_rubrique,id_article,composition,nb=#GET{nb}} />]
|
|
||||||
[(#COMPOSITION|=={blog}|non)
|
|
||||||
[(#COMPOSITION|=={accueil}|non)<INCLURE{fond=inclure/articles,id_rubrique,id_article,composition,nb=#GET{nb}} />]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]]
|
|
||||||
</B_test_article_r1>
|
|
||||||
|
|
||||||
[(#REM) quoi qu'il en soit, la liste des rubriques ]
|
|
||||||
<B_rubriques_rubrique>
|
|
||||||
<ul class="nav-list">
|
|
||||||
<BOUCLE_rubriques_rubrique(RUBRIQUES) {id_parent} {par num titre, titre}>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="#URL_RUBRIQUE"[ class="(#EXPOSE)"]>[(#TITRE)]</a>
|
|
||||||
|
|
||||||
<BOUCLE_test_expose_r2(RUBRIQUES) {id_rubrique}>#EXPOSE{' '}</BOUCLE_test_expose_r2>
|
|
||||||
<BOUCLE_test_article_r2(ARTICLES){id_rubrique}>
|
|
||||||
</BOUCLE_test_article_r2>
|
|
||||||
[(#TOTAL_BOUCLE|>={10}|oui)
|
|
||||||
<INCLURE{fond=inclure/articles,env,ajax,id_rubrique,id_article,debut_articles_rubrique} />
|
|
||||||
]
|
|
||||||
[(#TOTAL_BOUCLE|>={10}|non)
|
|
||||||
[(#TOTAL_BOUCLE|>={2}|oui)
|
|
||||||
<INCLURE{fond=inclure/articles,id_rubrique,id_article,composition} />
|
|
||||||
]
|
|
||||||
]
|
|
||||||
</B_test_article_r2>
|
|
||||||
<BOUCLE_re_rubriques_rubrique(BOUCLE_rubriques_rubrique)></BOUCLE_re_rubriques_rubrique>
|
|
||||||
</B_test_expose_r2>
|
|
||||||
</li>
|
|
||||||
</BOUCLE_rubriques_rubrique>
|
|
||||||
</ul>
|
|
||||||
</B_rubriques_rubrique>
|
|
||||||
|
|
||||||
</BOUCLE_rubriques>
|
|
||||||
</nav>
|
|
||||||
</B_rubriques>
|
|
74
squelettes/javascript/script.js
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
$(function() {
|
||||||
|
|
||||||
|
|
||||||
|
// masquer les mois des annees precedentes, les afficher au clic sur l'annee
|
||||||
|
// $.each( ['.annees.archive'], function(i,hi){
|
||||||
|
// $( ".periode div" ).find(hi).each(function(index) {
|
||||||
|
// // Creer un div apres et y placer tout ce qui se trouve apres et jusqu'au hi suivant
|
||||||
|
// $(this).after("<span class=\"mois_archives\"></span>").next().append($(this).next().nextUntil(hi));
|
||||||
|
// // plier/deplier le contenu
|
||||||
|
// // $(this).next().hide();
|
||||||
|
// $(this).click(function(){
|
||||||
|
// $(this).next().toggleClass('ouvert');
|
||||||
|
// $(this).toggleClass('ouvert');
|
||||||
|
// return false;
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
// afficher/masquer la boussole < medium
|
||||||
|
$('.btn-boussole').on('click', function(){
|
||||||
|
$(this).toggleClass('actif').siblings('.nav').toggleClass('ouvert');
|
||||||
|
$('.principale .btn-nav').removeClass('actif').siblings('.nav-list').removeClass('ouvert');
|
||||||
|
});
|
||||||
|
|
||||||
|
// placer le html du bouton du menu, visible < medium
|
||||||
|
$('.nav.principale').prepend('<button type="button" class="btn-nav"><span class="ham"></span>MENU</button>');
|
||||||
|
// afficher/masquer le menu
|
||||||
|
$('.principale .btn-nav').on('click', function(){
|
||||||
|
$(this).toggleClass('actif').siblings('ul').toggleClass('ouvert');
|
||||||
|
$('.btn-boussole').removeClass('actif');
|
||||||
|
$('.header_boussole .nav').removeClass('ouvert');
|
||||||
|
});
|
||||||
|
|
||||||
|
/// styler les boutons radios et checkboxes
|
||||||
|
$('.formulaire_spip .choix label').each(function() {
|
||||||
|
$(this).prepend('<span><span></span></span>').parent().addClass('custom-radios');
|
||||||
|
});
|
||||||
|
|
||||||
|
// liens sortant et PDF en target _blank + ajout d'une mention dans le title ou alt des images
|
||||||
|
$('a.spip_out, a.spip_url, a.spip_glossaire, a.external, a[href$=".pdf"], a[href$=".doc"]').each(function() {
|
||||||
|
$(this).attr('target', '_blank').attr('rel', 'noreferrer noopener');
|
||||||
|
if($(this).attr('title') && $(this).attr('title').length) {
|
||||||
|
$(this).attr('title', $(this).attr('title') + ' - Nouvelle fenêtre');
|
||||||
|
} else if($(this).text().trim().length) {
|
||||||
|
$(this).attr('title', $(this).text().trim() + ' - Nouvelle fenêtre');
|
||||||
|
} else {
|
||||||
|
$(this).children('img').each(function() {
|
||||||
|
$(this).attr('alt', $(this).attr('alt') + ' - Nouvelle fenêtre');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// smooth scroll
|
||||||
|
$('a[href^="#"], .js-scrollTo').on('click', function(e) {
|
||||||
|
if($(this).hasClass('js-noscroll')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var hash = this.hash;
|
||||||
|
var $target = $(hash);
|
||||||
|
var offset = $target.offset();
|
||||||
|
if(!offset) {
|
||||||
|
$target = $('a[name='+hash.replace(/#/,'')+']');
|
||||||
|
offset = $target.offset();
|
||||||
|
}
|
||||||
|
if(offset) {
|
||||||
|
e.preventDefault();
|
||||||
|
var newPos = offset.top - 10;
|
||||||
|
$('html, body').stop().animate(
|
||||||
|
{'scrollTop': newPos}, 750, 'swing', function() {
|
||||||
|
window.location.hash = hash;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
579
squelettes/javascript/sidr/jquery.sidr.js
Executable file
@ -0,0 +1,579 @@
|
|||||||
|
/*! sidr - v2.2.1 - 2016-02-17
|
||||||
|
* http://www.berriart.com/sidr/
|
||||||
|
* Copyright (c) 2013-2016 Alberto Varela; Licensed MIT */
|
||||||
|
|
||||||
|
(function () {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var babelHelpers = {};
|
||||||
|
|
||||||
|
babelHelpers.classCallCheck = function (instance, Constructor) {
|
||||||
|
if (!(instance instanceof Constructor)) {
|
||||||
|
throw new TypeError("Cannot call a class as a function");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
babelHelpers.createClass = function () {
|
||||||
|
function defineProperties(target, props) {
|
||||||
|
for (var i = 0; i < props.length; i++) {
|
||||||
|
var descriptor = props[i];
|
||||||
|
descriptor.enumerable = descriptor.enumerable || false;
|
||||||
|
descriptor.configurable = true;
|
||||||
|
if ("value" in descriptor) descriptor.writable = true;
|
||||||
|
Object.defineProperty(target, descriptor.key, descriptor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return function (Constructor, protoProps, staticProps) {
|
||||||
|
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
||||||
|
if (staticProps) defineProperties(Constructor, staticProps);
|
||||||
|
return Constructor;
|
||||||
|
};
|
||||||
|
}();
|
||||||
|
|
||||||
|
babelHelpers;
|
||||||
|
|
||||||
|
var sidrStatus = {
|
||||||
|
moving: false,
|
||||||
|
opened: false
|
||||||
|
};
|
||||||
|
|
||||||
|
var helper = {
|
||||||
|
// Check for valids urls
|
||||||
|
// From : http://stackoverflow.com/questions/5717093/check-if-a-javascript-string-is-an-url
|
||||||
|
|
||||||
|
isUrl: function isUrl(str) {
|
||||||
|
var pattern = new RegExp('^(https?:\\/\\/)?' + // protocol
|
||||||
|
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|' + // domain name
|
||||||
|
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
|
||||||
|
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
|
||||||
|
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
|
||||||
|
'(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator
|
||||||
|
|
||||||
|
if (pattern.test(str)) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// Add sidr prefixes
|
||||||
|
addPrefixes: function addPrefixes($element) {
|
||||||
|
this.addPrefix($element, 'id');
|
||||||
|
this.addPrefix($element, 'class');
|
||||||
|
$element.removeAttr('style');
|
||||||
|
},
|
||||||
|
addPrefix: function addPrefix($element, attribute) {
|
||||||
|
var toReplace = $element.attr(attribute);
|
||||||
|
|
||||||
|
if (typeof toReplace === 'string' && toReplace !== '' && toReplace !== 'sidr-inner') {
|
||||||
|
$element.attr(attribute, toReplace.replace(/([A-Za-z0-9_.\-]+)/g, 'sidr-' + attribute + '-$1'));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// Check if transitions is supported
|
||||||
|
transitions: function () {
|
||||||
|
var body = document.body || document.documentElement,
|
||||||
|
style = body.style,
|
||||||
|
supported = false,
|
||||||
|
property = 'transition';
|
||||||
|
|
||||||
|
if (property in style) {
|
||||||
|
supported = true;
|
||||||
|
} else {
|
||||||
|
(function () {
|
||||||
|
var prefixes = ['moz', 'webkit', 'o', 'ms'],
|
||||||
|
prefix = undefined,
|
||||||
|
i = undefined;
|
||||||
|
|
||||||
|
property = property.charAt(0).toUpperCase() + property.substr(1);
|
||||||
|
supported = function () {
|
||||||
|
for (i = 0; i < prefixes.length; i++) {
|
||||||
|
prefix = prefixes[i];
|
||||||
|
if (prefix + property in style) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}();
|
||||||
|
property = supported ? '-' + prefix.toLowerCase() + '-' + property.toLowerCase() : null;
|
||||||
|
})();
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
supported: supported,
|
||||||
|
property: property
|
||||||
|
};
|
||||||
|
}()
|
||||||
|
};
|
||||||
|
|
||||||
|
var $$2 = jQuery;
|
||||||
|
|
||||||
|
var bodyAnimationClass = 'sidr-animating';
|
||||||
|
var openAction = 'open';
|
||||||
|
var closeAction = 'close';
|
||||||
|
var transitionEndEvent = 'webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend';
|
||||||
|
var Menu = function () {
|
||||||
|
function Menu(name) {
|
||||||
|
babelHelpers.classCallCheck(this, Menu);
|
||||||
|
|
||||||
|
this.name = name;
|
||||||
|
this.item = $$2('#' + name);
|
||||||
|
this.openClass = name === 'sidr' ? 'sidr-open' : 'sidr-open ' + name + '-open';
|
||||||
|
this.menuWidth = this.item.outerWidth(true);
|
||||||
|
this.speed = this.item.data('speed');
|
||||||
|
this.side = this.item.data('side');
|
||||||
|
this.displace = this.item.data('displace');
|
||||||
|
this.timing = this.item.data('timing');
|
||||||
|
this.method = this.item.data('method');
|
||||||
|
this.onOpenCallback = this.item.data('onOpen');
|
||||||
|
this.onCloseCallback = this.item.data('onClose');
|
||||||
|
this.onOpenEndCallback = this.item.data('onOpenEnd');
|
||||||
|
this.onCloseEndCallback = this.item.data('onCloseEnd');
|
||||||
|
this.body = $$2(this.item.data('body'));
|
||||||
|
}
|
||||||
|
|
||||||
|
babelHelpers.createClass(Menu, [{
|
||||||
|
key: 'getAnimation',
|
||||||
|
value: function getAnimation(action, element) {
|
||||||
|
var animation = {},
|
||||||
|
prop = this.side;
|
||||||
|
|
||||||
|
if (action === 'open' && element === 'body') {
|
||||||
|
animation[prop] = this.menuWidth + 'px';
|
||||||
|
} else if (action === 'close' && element === 'menu') {
|
||||||
|
animation[prop] = '-' + this.menuWidth + 'px';
|
||||||
|
} else {
|
||||||
|
animation[prop] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return animation;
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: 'prepareBody',
|
||||||
|
value: function prepareBody(action) {
|
||||||
|
var prop = action === 'open' ? 'hidden' : '';
|
||||||
|
|
||||||
|
// Prepare page if container is body
|
||||||
|
if (this.body.is('body')) {
|
||||||
|
var $html = $$2('html'),
|
||||||
|
scrollTop = $html.scrollTop();
|
||||||
|
|
||||||
|
$html.css('overflow-x', prop).scrollTop(scrollTop);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: 'openBody',
|
||||||
|
value: function openBody() {
|
||||||
|
if (this.displace) {
|
||||||
|
var transitions = helper.transitions,
|
||||||
|
$body = this.body;
|
||||||
|
|
||||||
|
if (transitions.supported) {
|
||||||
|
$body.css(transitions.property, this.side + ' ' + this.speed / 1000 + 's ' + this.timing).css(this.side, 0).css({
|
||||||
|
width: $body.width(),
|
||||||
|
position: 'absolute'
|
||||||
|
});
|
||||||
|
$body.css(this.side, this.menuWidth + 'px');
|
||||||
|
} else {
|
||||||
|
var bodyAnimation = this.getAnimation(openAction, 'body');
|
||||||
|
|
||||||
|
$body.css({
|
||||||
|
width: $body.width(),
|
||||||
|
position: 'absolute'
|
||||||
|
}).animate(bodyAnimation, {
|
||||||
|
queue: false,
|
||||||
|
duration: this.speed
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: 'onCloseBody',
|
||||||
|
value: function onCloseBody() {
|
||||||
|
var transitions = helper.transitions,
|
||||||
|
resetStyles = {
|
||||||
|
width: '',
|
||||||
|
position: '',
|
||||||
|
right: '',
|
||||||
|
left: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
if (transitions.supported) {
|
||||||
|
resetStyles[transitions.property] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
this.body.css(resetStyles).unbind(transitionEndEvent);
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: 'closeBody',
|
||||||
|
value: function closeBody() {
|
||||||
|
var _this = this;
|
||||||
|
|
||||||
|
if (this.displace) {
|
||||||
|
if (helper.transitions.supported) {
|
||||||
|
this.body.css(this.side, 0).one(transitionEndEvent, function () {
|
||||||
|
_this.onCloseBody();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
var bodyAnimation = this.getAnimation(closeAction, 'body');
|
||||||
|
|
||||||
|
this.body.animate(bodyAnimation, {
|
||||||
|
queue: false,
|
||||||
|
duration: this.speed,
|
||||||
|
complete: function complete() {
|
||||||
|
_this.onCloseBody();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: 'moveBody',
|
||||||
|
value: function moveBody(action) {
|
||||||
|
if (action === openAction) {
|
||||||
|
this.openBody();
|
||||||
|
} else {
|
||||||
|
this.closeBody();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: 'onOpenMenu',
|
||||||
|
value: function onOpenMenu(callback) {
|
||||||
|
var name = this.name;
|
||||||
|
|
||||||
|
sidrStatus.moving = false;
|
||||||
|
sidrStatus.opened = name;
|
||||||
|
|
||||||
|
this.item.unbind(transitionEndEvent);
|
||||||
|
|
||||||
|
this.body.removeClass(bodyAnimationClass).addClass(this.openClass);
|
||||||
|
|
||||||
|
this.onOpenEndCallback();
|
||||||
|
|
||||||
|
if (typeof callback === 'function') {
|
||||||
|
callback(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: 'openMenu',
|
||||||
|
value: function openMenu(callback) {
|
||||||
|
var _this2 = this;
|
||||||
|
|
||||||
|
var $item = this.item;
|
||||||
|
|
||||||
|
if (helper.transitions.supported) {
|
||||||
|
$item.css(this.side, 0).one(transitionEndEvent, function () {
|
||||||
|
_this2.onOpenMenu(callback);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
var menuAnimation = this.getAnimation(openAction, 'menu');
|
||||||
|
|
||||||
|
$item.css('display', 'block').animate(menuAnimation, {
|
||||||
|
queue: false,
|
||||||
|
duration: this.speed,
|
||||||
|
complete: function complete() {
|
||||||
|
_this2.onOpenMenu(callback);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: 'onCloseMenu',
|
||||||
|
value: function onCloseMenu(callback) {
|
||||||
|
this.item.css({
|
||||||
|
left: '',
|
||||||
|
right: ''
|
||||||
|
}).unbind(transitionEndEvent);
|
||||||
|
$$2('html').css('overflow-x', '');
|
||||||
|
|
||||||
|
sidrStatus.moving = false;
|
||||||
|
sidrStatus.opened = false;
|
||||||
|
|
||||||
|
this.body.removeClass(bodyAnimationClass).removeClass(this.openClass);
|
||||||
|
|
||||||
|
this.onCloseEndCallback();
|
||||||
|
|
||||||
|
// Callback
|
||||||
|
if (typeof callback === 'function') {
|
||||||
|
callback(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: 'closeMenu',
|
||||||
|
value: function closeMenu(callback) {
|
||||||
|
var _this3 = this;
|
||||||
|
|
||||||
|
var item = this.item;
|
||||||
|
|
||||||
|
if (helper.transitions.supported) {
|
||||||
|
item.css(this.side, '').one(transitionEndEvent, function () {
|
||||||
|
_this3.onCloseMenu(callback);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
var menuAnimation = this.getAnimation(closeAction, 'menu');
|
||||||
|
|
||||||
|
item.animate(menuAnimation, {
|
||||||
|
queue: false,
|
||||||
|
duration: this.speed,
|
||||||
|
complete: function complete() {
|
||||||
|
_this3.onCloseMenu();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: 'moveMenu',
|
||||||
|
value: function moveMenu(action, callback) {
|
||||||
|
this.body.addClass(bodyAnimationClass);
|
||||||
|
|
||||||
|
if (action === openAction) {
|
||||||
|
this.openMenu(callback);
|
||||||
|
} else {
|
||||||
|
this.closeMenu(callback);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: 'move',
|
||||||
|
value: function move(action, callback) {
|
||||||
|
// Lock sidr
|
||||||
|
sidrStatus.moving = true;
|
||||||
|
|
||||||
|
this.prepareBody(action);
|
||||||
|
this.moveBody(action);
|
||||||
|
this.moveMenu(action, callback);
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: 'open',
|
||||||
|
value: function open(callback) {
|
||||||
|
var _this4 = this;
|
||||||
|
|
||||||
|
// Check if is already opened or moving
|
||||||
|
if (sidrStatus.opened === this.name || sidrStatus.moving) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If another menu opened close first
|
||||||
|
if (sidrStatus.opened !== false) {
|
||||||
|
var alreadyOpenedMenu = new Menu(sidrStatus.opened);
|
||||||
|
|
||||||
|
alreadyOpenedMenu.close(function () {
|
||||||
|
_this4.open(callback);
|
||||||
|
});
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.move('open', callback);
|
||||||
|
|
||||||
|
// onOpen callback
|
||||||
|
this.onOpenCallback();
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: 'close',
|
||||||
|
value: function close(callback) {
|
||||||
|
// Check if is already closed or moving
|
||||||
|
if (sidrStatus.opened !== this.name || sidrStatus.moving) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.move('close', callback);
|
||||||
|
|
||||||
|
// onClose callback
|
||||||
|
this.onCloseCallback();
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
key: 'toggle',
|
||||||
|
value: function toggle(callback) {
|
||||||
|
if (sidrStatus.opened === this.name) {
|
||||||
|
this.close(callback);
|
||||||
|
} else {
|
||||||
|
this.open(callback);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}]);
|
||||||
|
return Menu;
|
||||||
|
}();
|
||||||
|
|
||||||
|
var $$1 = jQuery;
|
||||||
|
|
||||||
|
function execute(action, name, callback) {
|
||||||
|
var sidr = new Menu(name);
|
||||||
|
|
||||||
|
switch (action) {
|
||||||
|
case 'open':
|
||||||
|
sidr.open(callback);
|
||||||
|
break;
|
||||||
|
case 'close':
|
||||||
|
sidr.close(callback);
|
||||||
|
break;
|
||||||
|
case 'toggle':
|
||||||
|
sidr.toggle(callback);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$$1.error('Method ' + action + ' does not exist on jQuery.sidr');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var i;
|
||||||
|
var $ = jQuery;
|
||||||
|
var publicMethods = ['open', 'close', 'toggle'];
|
||||||
|
var methodName;
|
||||||
|
var methods = {};
|
||||||
|
var getMethod = function getMethod(methodName) {
|
||||||
|
return function (name, callback) {
|
||||||
|
// Check arguments
|
||||||
|
if (typeof name === 'function') {
|
||||||
|
callback = name;
|
||||||
|
name = 'sidr';
|
||||||
|
} else if (!name) {
|
||||||
|
name = 'sidr';
|
||||||
|
}
|
||||||
|
|
||||||
|
execute(methodName, name, callback);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
for (i = 0; i < publicMethods.length; i++) {
|
||||||
|
methodName = publicMethods[i];
|
||||||
|
methods[methodName] = getMethod(methodName);
|
||||||
|
}
|
||||||
|
|
||||||
|
function sidr(method) {
|
||||||
|
if (method === 'status') {
|
||||||
|
return sidrStatus;
|
||||||
|
} else if (methods[method]) {
|
||||||
|
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
||||||
|
} else if (typeof method === 'function' || typeof method === 'string' || !method) {
|
||||||
|
return methods.toggle.apply(this, arguments);
|
||||||
|
} else {
|
||||||
|
$.error('Method ' + method + ' does not exist on jQuery.sidr');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var $$3 = jQuery;
|
||||||
|
|
||||||
|
function fillContent($sideMenu, settings) {
|
||||||
|
// The menu content
|
||||||
|
if (typeof settings.source === 'function') {
|
||||||
|
var newContent = settings.source(name);
|
||||||
|
|
||||||
|
$sideMenu.html(newContent);
|
||||||
|
} else if (typeof settings.source === 'string' && helper.isUrl(settings.source)) {
|
||||||
|
$$3.get(settings.source, function (data) {
|
||||||
|
$sideMenu.html(data);
|
||||||
|
});
|
||||||
|
} else if (typeof settings.source === 'string') {
|
||||||
|
var htmlContent = '',
|
||||||
|
selectors = settings.source.split(',');
|
||||||
|
|
||||||
|
$$3.each(selectors, function (index, element) {
|
||||||
|
htmlContent += '<div class="sidr-inner">' + $$3(element).html() + '</div>';
|
||||||
|
});
|
||||||
|
|
||||||
|
// Renaming ids and classes
|
||||||
|
if (settings.renaming) {
|
||||||
|
var $htmlContent = $$3('<div />').html(htmlContent);
|
||||||
|
|
||||||
|
$htmlContent.find('*').each(function (index, element) {
|
||||||
|
var $element = $$3(element);
|
||||||
|
|
||||||
|
helper.addPrefixes($element);
|
||||||
|
});
|
||||||
|
htmlContent = $htmlContent.html();
|
||||||
|
}
|
||||||
|
|
||||||
|
$sideMenu.html(htmlContent);
|
||||||
|
} else if (settings.source !== null) {
|
||||||
|
$$3.error('Invalid Sidr Source');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $sideMenu;
|
||||||
|
}
|
||||||
|
|
||||||
|
function fnSidr(options) {
|
||||||
|
var transitions = helper.transitions,
|
||||||
|
settings = $$3.extend({
|
||||||
|
name: 'sidr', // Name for the 'sidr'
|
||||||
|
speed: 200, // Accepts standard jQuery effects speeds (i.e. fast, normal or milliseconds)
|
||||||
|
side: 'left', // Accepts 'left' or 'right'
|
||||||
|
source: null, // Override the source of the content.
|
||||||
|
renaming: true, // The ids and classes will be prepended with a prefix when loading existent content
|
||||||
|
body: 'body', // Page container selector,
|
||||||
|
displace: true, // Displace the body content or not
|
||||||
|
timing: 'ease', // Timing function for CSS transitions
|
||||||
|
method: 'toggle', // The method to call when element is clicked
|
||||||
|
bind: 'touchstart click', // The event(s) to trigger the menu
|
||||||
|
onOpen: function onOpen() {},
|
||||||
|
// Callback when sidr start opening
|
||||||
|
onClose: function onClose() {},
|
||||||
|
// Callback when sidr start closing
|
||||||
|
onOpenEnd: function onOpenEnd() {},
|
||||||
|
// Callback when sidr end opening
|
||||||
|
onCloseEnd: function onCloseEnd() {} // Callback when sidr end closing
|
||||||
|
|
||||||
|
}, options),
|
||||||
|
name = settings.name,
|
||||||
|
$sideMenu = $$3('#' + name);
|
||||||
|
|
||||||
|
// If the side menu do not exist create it
|
||||||
|
if ($sideMenu.length === 0) {
|
||||||
|
$sideMenu = $$3('<div />').attr('id', name).appendTo($$3('body'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add transition to menu if are supported
|
||||||
|
if (transitions.supported) {
|
||||||
|
$sideMenu.css(transitions.property, settings.side + ' ' + settings.speed / 1000 + 's ' + settings.timing);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adding styles and options
|
||||||
|
$sideMenu.addClass('sidr').addClass(settings.side).data({
|
||||||
|
speed: settings.speed,
|
||||||
|
side: settings.side,
|
||||||
|
body: settings.body,
|
||||||
|
displace: settings.displace,
|
||||||
|
timing: settings.timing,
|
||||||
|
method: settings.method,
|
||||||
|
onOpen: settings.onOpen,
|
||||||
|
onClose: settings.onClose,
|
||||||
|
onOpenEnd: settings.onOpenEnd,
|
||||||
|
onCloseEnd: settings.onCloseEnd
|
||||||
|
});
|
||||||
|
|
||||||
|
$sideMenu = fillContent($sideMenu, settings);
|
||||||
|
|
||||||
|
return this.each(function () {
|
||||||
|
var $this = $$3(this),
|
||||||
|
data = $this.data('sidr'),
|
||||||
|
flag = false;
|
||||||
|
|
||||||
|
// If the plugin hasn't been initialized yet
|
||||||
|
if (!data) {
|
||||||
|
sidrStatus.moving = false;
|
||||||
|
sidrStatus.opened = false;
|
||||||
|
|
||||||
|
$this.data('sidr', name);
|
||||||
|
|
||||||
|
$this.bind(settings.bind, function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
if (!flag) {
|
||||||
|
flag = true;
|
||||||
|
sidr(settings.method, name);
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
flag = false;
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
jQuery.sidr = sidr;
|
||||||
|
jQuery.fn.sidr = fnSidr;
|
||||||
|
|
||||||
|
}());
|
4
squelettes/javascript/sidr/jquery.sidr.min.js
vendored
Executable file
5
squelettes/javascript/sidr/stylesheets/jquery.sidr.bare.css
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
.sidr {display: block;position: fixed;top: 0;height: 100%;z-index: 999999;width: 260px;overflow-x: hidden;overflow-y: auto}
|
||||||
|
|
||||||
|
.sidr.right {left: auto;right: -260px}
|
||||||
|
|
||||||
|
.sidr.left {left: -260px;right: auto}
|
164
squelettes/javascript/sidr/stylesheets/jquery.sidr.dark.css
Executable file
@ -0,0 +1,164 @@
|
|||||||
|
.sidr {
|
||||||
|
display: block;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
|
z-index: 999999;
|
||||||
|
width: 260px;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
font-family: "lucida grande", tahoma, verdana, arial, sans-serif;
|
||||||
|
font-size: 15px;
|
||||||
|
background: #333;
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: 0 0 5px 5px #222 inset;
|
||||||
|
}
|
||||||
|
.sidr .sidr-inner {
|
||||||
|
padding: 0 0 15px;
|
||||||
|
}
|
||||||
|
.sidr .sidr-inner > p {
|
||||||
|
margin-left: 15px;
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
.sidr.right {
|
||||||
|
left: auto;
|
||||||
|
right: -260px;
|
||||||
|
}
|
||||||
|
.sidr.left {
|
||||||
|
left: -260px;
|
||||||
|
right: auto;
|
||||||
|
}
|
||||||
|
.sidr h1,
|
||||||
|
.sidr h2,
|
||||||
|
.sidr h3,
|
||||||
|
.sidr h4,
|
||||||
|
.sidr h5,
|
||||||
|
.sidr h6 {
|
||||||
|
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzRkNGQ0ZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzFhMWExYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
|
||||||
|
background-size: 100%;
|
||||||
|
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d), color-stop(100%, #1a1a1a));
|
||||||
|
background-image: -moz-linear-gradient(#4d4d4d, #1a1a1a);
|
||||||
|
background-image: -webkit-linear-gradient(#4d4d4d, #1a1a1a);
|
||||||
|
background-image: linear-gradient(#4d4d4d, #1a1a1a);
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: normal;
|
||||||
|
padding: 0 15px;
|
||||||
|
margin: 0 0 5px;
|
||||||
|
color: #fff;
|
||||||
|
line-height: 24px;
|
||||||
|
box-shadow: 0 5px 5px 3px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
.sidr p {
|
||||||
|
font-size: 13px;
|
||||||
|
margin: 0 0 12px;
|
||||||
|
}
|
||||||
|
.sidr p a {
|
||||||
|
color: rgba(255, 255, 255, 0.9);
|
||||||
|
}
|
||||||
|
.sidr > p {
|
||||||
|
margin-left: 15px;
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
.sidr ul {
|
||||||
|
display: block;
|
||||||
|
margin: 0 0 15px;
|
||||||
|
padding: 0;
|
||||||
|
border-top: 1px solid #1a1a1a;
|
||||||
|
border-bottom: 1px solid #4d4d4d;
|
||||||
|
}
|
||||||
|
.sidr ul li {
|
||||||
|
display: block;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 48px;
|
||||||
|
border-top: 1px solid #4d4d4d;
|
||||||
|
border-bottom: 1px solid #1a1a1a;
|
||||||
|
}
|
||||||
|
.sidr ul li:hover, .sidr ul li.active, .sidr ul li.sidr-class-active {
|
||||||
|
border-top: 0;
|
||||||
|
line-height: 49px;
|
||||||
|
}
|
||||||
|
.sidr ul li:hover > a,
|
||||||
|
.sidr ul li:hover > span, .sidr ul li.active > a,
|
||||||
|
.sidr ul li.active > span, .sidr ul li.sidr-class-active > a,
|
||||||
|
.sidr ul li.sidr-class-active > span {
|
||||||
|
box-shadow: 0 0 15px 3px #222 inset;
|
||||||
|
}
|
||||||
|
.sidr ul li a,
|
||||||
|
.sidr ul li span {
|
||||||
|
padding: 0 15px;
|
||||||
|
display: block;
|
||||||
|
text-decoration: none;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.sidr ul li ul {
|
||||||
|
border-bottom: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.sidr ul li ul li {
|
||||||
|
line-height: 40px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
.sidr ul li ul li:last-child {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
.sidr ul li ul li:hover, .sidr ul li ul li.active, .sidr ul li ul li.sidr-class-active {
|
||||||
|
border-top: 0;
|
||||||
|
line-height: 41px;
|
||||||
|
}
|
||||||
|
.sidr ul li ul li:hover > a,
|
||||||
|
.sidr ul li ul li:hover > span, .sidr ul li ul li.active > a,
|
||||||
|
.sidr ul li ul li.active > span, .sidr ul li ul li.sidr-class-active > a,
|
||||||
|
.sidr ul li ul li.sidr-class-active > span {
|
||||||
|
box-shadow: 0 0 15px 3px #222 inset;
|
||||||
|
}
|
||||||
|
.sidr ul li ul li a,
|
||||||
|
.sidr ul li ul li span {
|
||||||
|
color: rgba(255, 255, 255, 0.8);
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
.sidr form {
|
||||||
|
margin: 0 15px;
|
||||||
|
}
|
||||||
|
.sidr label {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
.sidr input[type="text"],
|
||||||
|
.sidr input[type="password"],
|
||||||
|
.sidr input[type="date"],
|
||||||
|
.sidr input[type="datetime"],
|
||||||
|
.sidr input[type="email"],
|
||||||
|
.sidr input[type="number"],
|
||||||
|
.sidr input[type="search"],
|
||||||
|
.sidr input[type="tel"],
|
||||||
|
.sidr input[type="time"],
|
||||||
|
.sidr input[type="url"],
|
||||||
|
.sidr textarea,
|
||||||
|
.sidr select {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 5px;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0 0 10px;
|
||||||
|
border-radius: 2px;
|
||||||
|
border: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.1);
|
||||||
|
color: rgba(255, 255, 255, 0.6);
|
||||||
|
display: block;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
.sidr input[type=checkbox] {
|
||||||
|
width: auto;
|
||||||
|
display: inline;
|
||||||
|
clear: none;
|
||||||
|
}
|
||||||
|
.sidr input[type=button],
|
||||||
|
.sidr input[type=submit] {
|
||||||
|
color: #333;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
.sidr input[type=button]:hover,
|
||||||
|
.sidr input[type=submit]:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.9);
|
||||||
|
}
|
1
squelettes/javascript/sidr/stylesheets/jquery.sidr.dark.min.css
vendored
Executable file
@ -0,0 +1 @@
|
|||||||
|
.sidr{display:block;position:fixed;top:0;height:100%;z-index:999999;width:260px;overflow-x:hidden;overflow-y:auto;font-family:"lucida grande",tahoma,verdana,arial,sans-serif;font-size:15px;background:#333;color:#fff;box-shadow:0 0 5px 5px #222 inset}.sidr .sidr-inner{padding:0 0 15px}.sidr .sidr-inner>p{margin-left:15px;margin-right:15px}.sidr.right{left:auto;right:-260px}.sidr.left{left:-260px;right:auto}.sidr h1,.sidr h2,.sidr h3,.sidr h4,.sidr h5,.sidr h6{background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzRkNGQ0ZCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzFhMWExYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');background-size:100%;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d),color-stop(100%, #1a1a1a));background-image:-moz-linear-gradient(#4d4d4d,#1a1a1a);background-image:-webkit-linear-gradient(#4d4d4d,#1a1a1a);background-image:linear-gradient(#4d4d4d,#1a1a1a);font-size:11px;font-weight:normal;padding:0 15px;margin:0 0 5px;color:#fff;line-height:24px;box-shadow:0 5px 5px 3px rgba(0,0,0,0.2)}.sidr p{font-size:13px;margin:0 0 12px}.sidr p a{color:rgba(255,255,255,0.9)}.sidr>p{margin-left:15px;margin-right:15px}.sidr ul{display:block;margin:0 0 15px;padding:0;border-top:1px solid #1a1a1a;border-bottom:1px solid #4d4d4d}.sidr ul li{display:block;margin:0;line-height:48px;border-top:1px solid #4d4d4d;border-bottom:1px solid #1a1a1a}.sidr ul li:hover,.sidr ul li.active,.sidr ul li.sidr-class-active{border-top:0;line-height:49px}.sidr ul li:hover>a,.sidr ul li:hover>span,.sidr ul li.active>a,.sidr ul li.active>span,.sidr ul li.sidr-class-active>a,.sidr ul li.sidr-class-active>span{box-shadow:0 0 15px 3px #222 inset}.sidr ul li a,.sidr ul li span{padding:0 15px;display:block;text-decoration:none;color:#fff}.sidr ul li ul{border-bottom:0;margin:0}.sidr ul li ul li{line-height:40px;font-size:13px}.sidr ul li ul li:last-child{border-bottom:0}.sidr ul li ul li:hover,.sidr ul li ul li.active,.sidr ul li ul li.sidr-class-active{border-top:0;line-height:41px}.sidr ul li ul li:hover>a,.sidr ul li ul li:hover>span,.sidr ul li ul li.active>a,.sidr ul li ul li.active>span,.sidr ul li ul li.sidr-class-active>a,.sidr ul li ul li.sidr-class-active>span{box-shadow:0 0 15px 3px #222 inset}.sidr ul li ul li a,.sidr ul li ul li span{color:rgba(255,255,255,0.8);padding-left:30px}.sidr form{margin:0 15px}.sidr label{font-size:13px}.sidr input[type="text"],.sidr input[type="password"],.sidr input[type="date"],.sidr input[type="datetime"],.sidr input[type="email"],.sidr input[type="number"],.sidr input[type="search"],.sidr input[type="tel"],.sidr input[type="time"],.sidr input[type="url"],.sidr textarea,.sidr select{width:100%;font-size:13px;padding:5px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px;border-radius:2px;border:0;background:rgba(0,0,0,0.1);color:rgba(255,255,255,0.6);display:block;clear:both}.sidr input[type=checkbox]{width:auto;display:inline;clear:none}.sidr input[type=button],.sidr input[type=submit]{color:#333;background:#fff}.sidr input[type=button]:hover,.sidr input[type=submit]:hover{background:rgba(255,255,255,0.9)}
|
164
squelettes/javascript/sidr/stylesheets/jquery.sidr.light.css
Executable file
@ -0,0 +1,164 @@
|
|||||||
|
.sidr {
|
||||||
|
display: block;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
height: 100%;
|
||||||
|
z-index: 999999;
|
||||||
|
width: 260px;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: auto;
|
||||||
|
font-family: "lucida grande", tahoma, verdana, arial, sans-serif;
|
||||||
|
font-size: 15px;
|
||||||
|
background: #f8f8f8;
|
||||||
|
color: #333;
|
||||||
|
box-shadow: 0 0 5px 5px #ebebeb inset;
|
||||||
|
}
|
||||||
|
.sidr .sidr-inner {
|
||||||
|
padding: 0 0 15px;
|
||||||
|
}
|
||||||
|
.sidr .sidr-inner > p {
|
||||||
|
margin-left: 15px;
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
.sidr.right {
|
||||||
|
left: auto;
|
||||||
|
right: -260px;
|
||||||
|
}
|
||||||
|
.sidr.left {
|
||||||
|
left: -260px;
|
||||||
|
right: auto;
|
||||||
|
}
|
||||||
|
.sidr h1,
|
||||||
|
.sidr h2,
|
||||||
|
.sidr h3,
|
||||||
|
.sidr h4,
|
||||||
|
.sidr h5,
|
||||||
|
.sidr h6 {
|
||||||
|
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2RmZGZkZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
|
||||||
|
background-size: 100%;
|
||||||
|
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #dfdfdf));
|
||||||
|
background-image: -moz-linear-gradient(#ffffff, #dfdfdf);
|
||||||
|
background-image: -webkit-linear-gradient(#ffffff, #dfdfdf);
|
||||||
|
background-image: linear-gradient(#ffffff, #dfdfdf);
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: normal;
|
||||||
|
padding: 0 15px;
|
||||||
|
margin: 0 0 5px;
|
||||||
|
color: #333;
|
||||||
|
line-height: 24px;
|
||||||
|
box-shadow: 0 5px 5px 3px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
.sidr p {
|
||||||
|
font-size: 13px;
|
||||||
|
margin: 0 0 12px;
|
||||||
|
}
|
||||||
|
.sidr p a {
|
||||||
|
color: rgba(51, 51, 51, 0.9);
|
||||||
|
}
|
||||||
|
.sidr > p {
|
||||||
|
margin-left: 15px;
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
.sidr ul {
|
||||||
|
display: block;
|
||||||
|
margin: 0 0 15px;
|
||||||
|
padding: 0;
|
||||||
|
border-top: 1px solid #dfdfdf;
|
||||||
|
border-bottom: 1px solid white;
|
||||||
|
}
|
||||||
|
.sidr ul li {
|
||||||
|
display: block;
|
||||||
|
margin: 0;
|
||||||
|
line-height: 48px;
|
||||||
|
border-top: 1px solid white;
|
||||||
|
border-bottom: 1px solid #dfdfdf;
|
||||||
|
}
|
||||||
|
.sidr ul li:hover, .sidr ul li.active, .sidr ul li.sidr-class-active {
|
||||||
|
border-top: 0;
|
||||||
|
line-height: 49px;
|
||||||
|
}
|
||||||
|
.sidr ul li:hover > a,
|
||||||
|
.sidr ul li:hover > span, .sidr ul li.active > a,
|
||||||
|
.sidr ul li.active > span, .sidr ul li.sidr-class-active > a,
|
||||||
|
.sidr ul li.sidr-class-active > span {
|
||||||
|
box-shadow: 0 0 15px 3px #ebebeb inset;
|
||||||
|
}
|
||||||
|
.sidr ul li a,
|
||||||
|
.sidr ul li span {
|
||||||
|
padding: 0 15px;
|
||||||
|
display: block;
|
||||||
|
text-decoration: none;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.sidr ul li ul {
|
||||||
|
border-bottom: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.sidr ul li ul li {
|
||||||
|
line-height: 40px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
.sidr ul li ul li:last-child {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
.sidr ul li ul li:hover, .sidr ul li ul li.active, .sidr ul li ul li.sidr-class-active {
|
||||||
|
border-top: 0;
|
||||||
|
line-height: 41px;
|
||||||
|
}
|
||||||
|
.sidr ul li ul li:hover > a,
|
||||||
|
.sidr ul li ul li:hover > span, .sidr ul li ul li.active > a,
|
||||||
|
.sidr ul li ul li.active > span, .sidr ul li ul li.sidr-class-active > a,
|
||||||
|
.sidr ul li ul li.sidr-class-active > span {
|
||||||
|
box-shadow: 0 0 15px 3px #ebebeb inset;
|
||||||
|
}
|
||||||
|
.sidr ul li ul li a,
|
||||||
|
.sidr ul li ul li span {
|
||||||
|
color: rgba(51, 51, 51, 0.8);
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
.sidr form {
|
||||||
|
margin: 0 15px;
|
||||||
|
}
|
||||||
|
.sidr label {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
.sidr input[type="text"],
|
||||||
|
.sidr input[type="password"],
|
||||||
|
.sidr input[type="date"],
|
||||||
|
.sidr input[type="datetime"],
|
||||||
|
.sidr input[type="email"],
|
||||||
|
.sidr input[type="number"],
|
||||||
|
.sidr input[type="search"],
|
||||||
|
.sidr input[type="tel"],
|
||||||
|
.sidr input[type="time"],
|
||||||
|
.sidr input[type="url"],
|
||||||
|
.sidr textarea,
|
||||||
|
.sidr select {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 5px;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0 0 10px;
|
||||||
|
border-radius: 2px;
|
||||||
|
border: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.1);
|
||||||
|
color: rgba(51, 51, 51, 0.6);
|
||||||
|
display: block;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
.sidr input[type=checkbox] {
|
||||||
|
width: auto;
|
||||||
|
display: inline;
|
||||||
|
clear: none;
|
||||||
|
}
|
||||||
|
.sidr input[type=button],
|
||||||
|
.sidr input[type=submit] {
|
||||||
|
color: #f8f8f8;
|
||||||
|
background: #333;
|
||||||
|
}
|
||||||
|
.sidr input[type=button]:hover,
|
||||||
|
.sidr input[type=submit]:hover {
|
||||||
|
background: rgba(51, 51, 51, 0.9);
|
||||||
|
}
|