Intégration gestion et affichage des mots-clés

Ce patch ajoute un squelettes tags pour consulter l'ensemble des mots clés utilisés, il modifie aussi l'affichage des mots clefs dans chaque article.
This commit is contained in:
Plumf 2023-09-26 09:42:02 +02:00
parent e228d5a008
commit b49b8ef087
5 changed files with 77 additions and 3 deletions

View File

@ -140,4 +140,23 @@ nav li{
/* Conf pied de page */
.pied {
font-family: var(--policetitre );
}
}
.tags-articles li {
border: 2px solid var(--couleurprincipal);
border-radius: 3px;
padding: 4px;
text-decoration: none;
margin: 0 4px;
text-decoration: none;
}
.tags-articles a {
border-bottom: none;
}
ul.ligne li {
list-style: none;
display: inline-block;
}

View File

@ -2,8 +2,8 @@
<nav id="nav" role="navigation">
<ul>
<BOUCLE_nav(RUBRIQUES) {racine} {par num titre, titre}>
<li><a href="#URL_RUBRIQUE">#TITRE</a></li>
</BOUCLE_nav>
<li><a href="#URL_RUBRIQUE">#TITRE</a></li>
</BOUCLE_nav> | <li><a href="#URL_PAGE{tags}"><:archil:mots_cles:></a></li>
</ul>
</nav>
</B_nav>

View File

@ -20,9 +20,12 @@ $GLOBALS[$GLOBALS['idx_lang']] = array(
'habillage_par' => 'Déguisé avec ',
// L
'lire_la_suite' => 'Lire la suite →',
//M
'mots_cles' => 'Tags',
// P
'publie_le' => 'Publié le',
'propulse_par' => 'Catapulté par ',
// T
'titre_page_configurer_odaiba' => 'Archil',
'titre_tags' => 'Tags',
);

18
modeles/article_mots.html Normal file
View File

@ -0,0 +1,18 @@
[(#REM)
Liste des mots-cles d'un article
<template><article1|mots></template>
][(#REM)
Modele <article1|mots> : liste des mots-cles d'un article
#MODELE{article_mots}
Pour la notation rel="tag" voir
<http://microformats.org/wiki/rel-tag-fr>
]<B_mots>
<div class="tags-articles">
<ul class="ligne">
<BOUCLE_mots(MOTS?) {id_article} {par titre}>
<li>#FA_ICON{img/fa/solid/tags.svg,'',tags} <a href="#URL_MOT" rel="tag">#TITRE</a></li>
</BOUCLE_mots>
</ul>
</div>
</B_mots>

34
tags.html Normal file
View File

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html dir="#LANG_DIR" lang="#LANG" class="[(#LANG_DIR)][ (#LANG)] no-js">
<head>
<script type='text/javascript'>/*<![CDATA[*/(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement);/*]]>*/</script>
<title>[(#TITRE|couper{80}|textebrut) - ][(#NOM_SITE_SPIP|textebrut)]</title>
[<meta name="description" content="(#DESCRIPTIF|couper{150}|attribut_html)" />]
[<link rel="canonical" href="(#URL_MOT|url_absolue{#URL_SITE_SPIP})" />]
<INCLURE{fond=inclure/head} />
[(#REM) Lien vers le flux RSS des articles du mot cle ]
<link rel="alternate" type="application/rss+xml"[ title="(#TITRE|attribut_html)"] href="[(#URL_PAGE{backend}|parametre_url{id_mot,#ID_MOT})]" />
</head>
<body>
<INCLURE{fond=inclure/header} />
<main class="main" role="main">
[(#REM) Listes des mots clefs du site ]
<div class="cartouche">
<h1 class="#EDIT{titre} surlignable"><:archil:titre_tags:></h1>
</div>
<div class="listes-articles">
<ul>
<BOUCLE_mots_tous(MOTS){tout}{par titre}>
<li>#FA_ICON{img/fa/solid/tags.svg,'',tags} <a href="#URL_MOT" [title="(#TITRE|textebrut|entites_html)"] >#TITRE</a></li>
</BOUCLE_mots_tous>
</ul>
</div>
</main><!--.main-->
<INCLURE{fond=inclure/footer,self=#SELF} />
</body>
</html>