[GRASS-dev] [GRASS GIS] #3321: Limit TOC depth on wiki

GRASS GIS trac at osgeo.org
Fri Mar 24 10:20:49 PDT 2017


#3321: Limit TOC depth on wiki
--------------------------+-------------------------
 Reporter:  wenzeslaus    |      Owner:  grass-dev@…
     Type:  enhancement   |     Status:  new
 Priority:  minor         |  Milestone:  Website
Component:  Website       |    Version:  unspecified
 Keywords:  wiki TOC CSS  |        CPU:  Unspecified
 Platform:  Unspecified   |
--------------------------+-------------------------
 I would like to be able limit TOC depth on the GRASS (user) wiki. The
 documentation says "To customize this for individual pages, the TOC can be
 enclosed in an element with class toclimit-<limit>, if the appropriate CSS
 rules are defined in the pages CSS." And suggests the following CSS which
 I don't see in

 https://grasswiki.osgeo.org/w/load.php?debug=false&lang=en&modules=mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.page.gallery.styles%7Cmediawiki.sectionAnchor%7Cmediawiki.skinning.interface%7Cskins.vector.styles&only=styles&skin=vector

 {{{
 #!css
 /*
  * Allow limiting of which header levels are shown in a TOC;
  * <div class="toclimit-3">, for instance, will limit to
  * showing ==headings== and ===headings=== but no further.
  * Used in [[Template:TOC]]
  */
 .toclimit-2 .toclevel-1 ul,
 .toclimit-3 .toclevel-2 ul,
 .toclimit-4 .toclevel-3 ul,
 .toclimit-5 .toclevel-4 ul,
 .toclimit-6 .toclevel-5 ul,
 .toclimit-7 .toclevel-6 ul {
         display: none;
 }
 }}}

 https://www.mediawiki.org/wiki/Manual:Table_of_contents

 https://www.mediawiki.org/wiki/MediaWiki:Gadget-site.css

 Wikipedia uses the following template:

 {{{
 <div class="toclimit-{{{1|{{{limit|3}}}}}}">__TOC__</div><noinclude>
 {{documentation}}
 </noinclude>
 }}}

 https://en.wikipedia.org/w/index.php?title=Template:TOC_limit&action=edit

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3321>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list