Add table of contents to the main page.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 25 Feb 2020 14:25:27 +0000 (15:25 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 11 Mar 2020 09:41:32 +0000 (10:41 +0100)
At least the netsurf browser completely ignores the hamburger icon,
so provide an alternative way to navigate the pages.

Introduction.m4
include/m4/aple.m4

index ce96e8e..66be111 100644 (file)
@@ -11,6 +11,9 @@ OVERVIEW(«
        corner to open the navigation menu.
 »)
 
+SECTION(«Table of Contents»)
+TABLE_OF_CONTENTS()
+
 SECTION(«About»)
 
 ifelse(PUBLIC(), «true», «dnl public version of the pages
index a612970..a995dfc 100644 (file)
@@ -75,6 +75,26 @@ define(«HEADER», «
 
 »)
 
+define(«TABLE_OF_CONTENTS», «
+       <ul id="chapter_list">
+               <li> TOC_ENTRY(«Introduction», «$2») </li>
+               <li> TOC_ENTRY(«Unix_Concepts», «$2») </li>
+               ifelse(PUBLIC(), «false», «
+                       <li> TOC_ENTRY(Command_Line_Utilities, «$2») </li>
+               »)
+               <li> TOC_ENTRY(Networking, «$2») </li>
+               <li> TOC_ENTRY(LVM, «$2») </li>
+               <li> TOC_ENTRY(«Filesystems», «$2») </li>
+               <li> TOC_ENTRY(OS-Level_Virtualization, «$2») </li>
+               ifelse(PUBLIC(), «false», «
+                       <li> TOC_ENTRY(Gridengine, «$2») </li>
+                       <li> TOC_ENTRY(Git, «$2») </li>
+                       <li> TOC_ENTRY(Bash, «$2») </li>
+                       <li> TOC_ENTRY(Debugging, «$2») </li>
+               »)
+       </ul>
+»)
+
 define(«TITLE», «
 HEADER(«$1», «$2», «$3»)
 <hr>
@@ -90,23 +110,7 @@ HEADER(«$1», «$2», «$3»)
 </svg>
        <div class="dropdown-content">
                <h3> Chapter </h3>
-               <ul id="chapter_list">
-                       <li> TOC_ENTRY(«Introduction», «$2») </li>
-                       <li> TOC_ENTRY(«Unix_Concepts», «$2») </li>
-                       ifelse(PUBLIC(), «false», «
-                               <li> TOC_ENTRY(Command_Line_Utilities, «$2») </li>
-                       »)
-                       <li> TOC_ENTRY(Networking, «$2») </li>
-                       <li> TOC_ENTRY(LVM, «$2») </li>
-                       <li> TOC_ENTRY(«Filesystems», «$2») </li>
-                       <li> TOC_ENTRY(OS-Level_Virtualization, «$2») </li>
-                       ifelse(PUBLIC(), «false», «
-                               <li> TOC_ENTRY(Gridengine, «$2») </li>
-                               <li> TOC_ENTRY(Git, «$2») </li>
-                               <li> TOC_ENTRY(Bash, «$2») </li>
-                               <li> TOC_ENTRY(Debugging, «$2») </li>
-                       »)
-               </ul>
+               TABLE_OF_CONTENTS()
                <h4> Section </h4>
                <ul>
 divert(«1»)