Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
logiciel:internet:dokuwiki:plugins:numberedheadings:start [2021/02/25 15:32] – [Numérotation des titres par CSS uniquement (remplace numberedheadings)] admin | logiciel:internet:dokuwiki:plugins:numberedheadings:start [2022/08/13 22:27] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 8: | Ligne 8: | ||
Placez-le dans l'un des CSS du répertoire user de votre thème (ainsi qu'à nouveau dans le print.css pour avoir la numérotation lors de l' | Placez-le dans l'un des CSS du répertoire user de votre thème (ainsi qu'à nouveau dans le print.css pour avoir la numérotation lors de l' | ||
+ | <code css [dokuwiki]/ | ||
+ | /* Numérotation automatique des titres via CSS | ||
+ | https:// | ||
- | Pour le modèle **default** :<code php [dokuwiki]/ | ||
- | .dokuwiki .page {counter-reset: | ||
- | .dokuwiki # | ||
- | .dokuwiki #dw__toc h3: | ||
- | |||
- | .dokuwiki .page h1, .dokuwiki ul.toc li.level1 {counter-reset: | ||
- | .dokuwiki .page h2, .dokuwiki ul.toc li.level2 {counter-reset: | ||
- | .dokuwiki .page h3, .dokuwiki ul.toc li.level3 {counter-reset: | ||
- | .dokuwiki .page h4, .dokuwiki ul.toc li.level4 {counter-reset: | ||
- | .dokuwiki .page h5, .dokuwiki ul.toc li.level5 {} | ||
- | |||
- | .dokuwiki .page h1:before, | ||
- | .dokuwiki ul.toc li.level1 a:before { | ||
- | content: counter(level1) " "; | ||
- | counter-increment: | ||
- | } | ||
- | .dokuwiki .page h2:before, | ||
- | .dokuwiki ul.toc li.level2 a:before { | ||
- | content: counter(level1) " | ||
- | counter-increment: | ||
- | } | ||
- | .dokuwiki .page h3:before, | ||
- | .dokuwiki ul.toc li.level3 a:before { | ||
- | content: counter(level1) " | ||
- | counter-increment: | ||
- | } | ||
- | .dokuwiki .page h4:before, | ||
- | .dokuwiki ul.toc li.level4 a:before { | ||
- | content: counter(level1) " | ||
- | counter-increment: | ||
- | } | ||
- | .dokuwiki .page h5:before, | ||
- | .dokuwiki ul.toc li.level5 a:before { | ||
- | content: counter(level1) " | ||
- | counter-increment: | ||
- | } | ||
- | </ | ||
- | |||
- | Pour les autres thèmes, il faut remplacer chaque occurrence de .page par la " | ||
- | |||
- | Par exemple pour le thème vector :<code php lib/ | ||
- | /* Automatically numbering Headings via CSS | ||
- | https:// | ||
body {counter-reset: | body {counter-reset: | ||
h2 {counter-reset: | h2 {counter-reset: | ||
Ligne 66: | Ligne 26: | ||
h2.nocount: | h2.nocount: | ||
- | /* Automatically numbering Table of Contents | + | /* Numérotation automatique de la table des matières |
https:// | https:// | ||
- | #dw__toc ul ul { | + | .dokuwiki |
list-style-type: | list-style-type: | ||
counter-reset: | counter-reset: | ||
} | } | ||
- | #dw__toc ul ul li div.li: | + | .dokuwiki |
counter-increment: | counter-increment: | ||
content: counters(css-counters, | content: counters(css-counters, | ||
} | } | ||
- | </ | ||
- | + | /* Styles | |
- | + | ||
- | + | ||
- | + | ||
- | <code - /doc/ | + | |
- | .dokuwiki #content {counter-reset: | + | |
- | .dokuwiki # | + | |
- | .dokuwiki #dw__toc h3: | + | |
- | + | ||
- | .dokuwiki #content h1, .dokuwiki ul.toc li.level1 {counter-reset: | + | |
- | .dokuwiki #content h2, .dokuwiki ul.toc li.level2 {counter-reset: | + | |
- | .dokuwiki #content h3, .dokuwiki ul.toc li.level3 {counter-reset: | + | |
- | .dokuwiki #content h4, .dokuwiki ul.toc li.level4 {counter-reset: | + | |
- | .dokuwiki #content h5, .dokuwiki ul.toc li.level5 {} | + | |
- | + | ||
- | .dokuwiki #content h1: | + | |
- | .dokuwiki ul.toc li.level1 a:before { | + | |
- | content: counter(level1) " "; | + | |
- | counter-increment: | + | |
- | } | + | |
- | .dokuwiki #content h2: | + | |
- | .dokuwiki ul.toc li.level2 a:before { | + | |
- | content: counter(level1) " | + | |
- | counter-increment: | + | |
- | } | + | |
- | .dokuwiki #content h3: | + | |
- | .dokuwiki ul.toc li.level3 a:before { | + | |
- | content: counter(level1) " | + | |
- | counter-increment: | + | |
- | } | + | |
- | .dokuwiki #content h4: | + | |
- | .dokuwiki ul.toc li.level4 a:before { | + | |
- | content: counter(level1) " | + | |
- | counter-increment: | + | |
- | } | + | |
- | .dokuwiki #content h5: | + | |
- | .dokuwiki ul.toc li.level5 a:before { | + | |
- | content: counter(level1) " | + | |
- | counter-increment: | + | |
- | } | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | ====== Pré-requis ====== | + | |
- | + | ||
- | ====== Installation ====== | + | |
- | + | ||
- | ===== Modification pour exclure de la numérotation le premier h1 (titre de la page) ===== | + | |
- | + | ||
- | <code - [dokuwiki]/ | + | |
- | .dokuwiki #content {counter-reset: | + | |
- | .dokuwiki # | + | |
- | .dokuwiki # | + | |
- | .dokuwiki #dw__toc h3: | + | |
- | + | ||
- | .dokuwiki #content h1, .dokuwiki ul.toc li.level1 {counter-reset: | + | |
- | .dokuwiki #content h2, .dokuwiki ul.toc li.level2 {counter-reset: | + | |
- | .dokuwiki #content h3, .dokuwiki ul.toc li.level3 {counter-reset: | + | |
- | .dokuwiki #content h4, .dokuwiki ul.toc li.level4 {counter-reset: | + | |
- | .dokuwiki #content h5, .dokuwiki ul.toc li.level5 {} | + | |
- | + | ||
- | .dokuwiki #content h1: | + | |
- | .dokuwiki ul.toc li.level1 a:before { | + | |
- | content: counter(level1) " "; | + | |
- | counter-increment: | + | |
- | } | + | |
- | .dokuwiki #content h1.sectionedit1: | + | |
- | .dokuwiki ul.toc li.level1: | + | |
- | content: none; | + | |
- | } | + | |
- | .dokuwiki #content h2: | + | |
- | .dokuwiki ul.toc li.level2 a:before { | + | |
- | content: counter(level1) " | + | |
- | counter-increment: | + | |
- | } | + | |
- | .dokuwiki #content h3: | + | |
- | .dokuwiki ul.toc li.level3 a:before { | + | |
- | content: counter(level1) " | + | |
- | counter-increment: | + | |
- | } | + | |
- | .dokuwiki #content h4: | + | |
- | .dokuwiki ul.toc li.level4 a:before { | + | |
- | content: counter(level1) " | + | |
- | counter-increment: | + | |
- | } | + | |
- | .dokuwiki #content h5: | + | |
- | .dokuwiki ul.toc li.level5 a:before { | + | |
- | content: counter(level1) " | + | |
- | counter-increment: | + | |
- | } | + | |
- | </ | + | |
- | + | ||
- | ==== Variante ==== | + | |
- | + | ||
- | Placez le fichier suivant dans l' | + | |
- | + | ||
- | Pour le thème monobook : | + | |
- | <code - / | + | |
- | /* | + | |
- | Place for user defined CSS rules (screen media) - this file can safely be | + | |
- | | + | |
- | + | ||
- | Note: All example files are delivered with the " | + | |
- | sure your changes do not get overwritten when updating the template. | + | |
- | Just remove the " | + | |
- | */ | + | |
- | + | ||
- | /* headlines | + | |
div#content .dokuwiki h1, | div#content .dokuwiki h1, | ||
div#content .dokuwiki h2 { | div#content .dokuwiki h2 { | ||
font-weight: | font-weight: | ||
} | } | ||
+ | |||
div#content .dokuwiki h3, | div#content .dokuwiki h3, | ||
div#content .dokuwiki h4, | div#content .dokuwiki h4, | ||
Ligne 198: | Ligne 51: | ||
} | } | ||
- | div#content .dokuwiki {counter-reset: | + | div#content .dokuwiki h1 { |
- | .dokuwiki # | + | font-size: 160%; |
- | .dokuwiki # | + | |
- | .dokuwiki #dw__toc h3: | + | |
- | + | ||
- | div#content .dokuwiki h1, .toc-body ul.toc li.level1 | + | |
- | div#content .dokuwiki h2, .toc-body ul.toc li.level2 {counter-reset: | + | |
- | div#content .dokuwiki h3, .toc-body ul.toc li.level3 {counter-reset: | + | |
- | div#content .dokuwiki h4, .toc-body ul.toc li.level4 {counter-reset: | + | |
- | div#content .dokuwiki h5, .toc-body ul.toc li.level5 {} | + | |
- | + | ||
- | div#content .dokuwiki h1: | + | |
- | .dokuwiki ul.toc li.level1 a:before { | + | |
- | content: counter(level1) ". "; | + | |
- | | + | |
} | } | ||
- | div#content .dokuwiki | + | |
- | .dokuwiki ul.toc li.level1 a: | + | div#content .dokuwiki |
- | | + | |
} | } | ||
- | div#content .dokuwiki | + | |
- | .dokuwiki ul.toc li.level2 a: | + | div#content .dokuwiki |
- | | + | font-size: 132%; |
- | counter-increment: level2; | + | |
} | } | ||
- | div#content .dokuwiki | + | |
- | .dokuwiki ul.toc li.level3 a: | + | div#content .dokuwiki |
- | | + | font-size: 116%; |
- | counter-increment: level3; | + | |
} | } | ||
- | div#content .dokuwiki | + | |
- | .dokuwiki ul.toc li.level4 a: | + | div#content .dokuwiki |
- | | + | font-size: 100%; |
- | counter-increment: level4; | + | |
} | } | ||
- | div#content .dokuwiki h5:before, | ||
- | .dokuwiki ul.toc li.level5 a:before { | ||
- | content: counter(level2) " | ||
- | counter-increment: | ||
- | } | ||
- | </ | ||
- | ====== Configuration ====== | + | div#content .dokuwiki h6 { |
+ | font-size: 80%; | ||
+ | }</ | ||
- | Ce CSS fonctionne avec monobook :<code - screen.css> | ||
- | div.dokuwiki {counter-reset: | ||
- | div.dokuwiki # | ||
- | div.dokuwiki # | ||
- | div.dokuwiki #dw__toc h3: | ||
- | |||
- | div.dokuwiki h1, .toc-body ul.toc li.level1 {counter-reset: | ||
- | div.dokuwiki h2, .toc-body ul.toc li.level2 {counter-reset: | ||
- | div.dokuwiki h3, .toc-body ul.toc li.level3 {counter-reset: | ||
- | div.dokuwiki h4, .toc-body ul.toc li.level4 {counter-reset: | ||
- | div.dokuwiki h5, .toc-body ul.toc li.level5 {} | ||
- | |||
- | div.dokuwiki h1:before, | ||
- | div.dokuwiki ul.toc li.level1 a:before { | ||
- | content: counter(level1) ". "; | ||
- | counter-increment: | ||
- | } | ||
- | div.dokuwiki h1.sectionedit1: | ||
- | div.dokuwiki ul.toc li.level1 a:before { | ||
- | content: none; | ||
- | } | ||
- | div.dokuwiki h2:before, | ||
- | div.dokuwiki ul.toc li.level2 a:before { | ||
- | content: counter(level1) " | ||
- | counter-increment: | ||
- | } | ||
- | div.dokuwiki h3:before, | ||
- | div.dokuwiki ul.toc li.level3 a:before { | ||
- | content: counter(level1) " | ||
- | counter-increment: | ||
- | } | ||
- | div.dokuwiki h4:before, | ||
- | div.dokuwiki ul.toc li.level4 a:before { | ||
- | content: counter(level1) " | ||
- | counter-increment: | ||
- | } | ||
- | div.dokuwiki h5:before, | ||
- | div.dokuwiki ul.toc li.level5 a:before { | ||
- | content: counter(level1) " | ||
- | counter-increment: | ||
- | } | ||
- | </ | ||
- | ====== | + | ===== Pré-requis |
+ | |||
+ | ===== Installation ===== | ||
+ | |||
+ | |||
+ | |||
+ | ===== Configuration ===== | ||
+ | |||
+ | ===== Utilisation | ||
- | ====== Désinstallation | + | ===== Désinstallation ===== |
- | ====== Voir aussi ====== | + | ===== Voir aussi ===== |
* **(en)** [[https:// | * **(en)** [[https:// |