Added ToC link to bottom nav bar and chapter title
authorNigel Metheringham <nigel.metheringham@jrtheatre.co.uk>
Sat, 9 Jun 2012 19:44:22 +0000 (20:44 +0100)
committerNigel Metheringham <nigel.metheringham@jrtheatre.co.uk>
Sat, 9 Jun 2012 19:44:22 +0000 (20:44 +0100)
templates/doc/chapter.xsl
templates/web/doc/chapter.css

index f715219273dae196a8e826bbc053ce8021658a09..06e320d9ca415739549b15fe4eab43867f7a2d88 100644 (file)
@@ -41,8 +41,8 @@
 
          <!-- Navigation -->
          <a class="previous_page" href="{prev_url}"><![CDATA[<-previous]]></a>
-        <xsl:if test="next_url">
-            <a class="next_page" href="{next_url}"><![CDATA[next->]]></a>
+         <xsl:if test="next_url">
+            <a class="next_page"  href="{next_url}"><![CDATA[next->]]></a>
          </xsl:if>
 
          <!-- Chapter Wrapper -->
@@ -60,7 +60,9 @@
 
             <!-- Chapter Title -->
             <h2 id="{@id}" class="{@class}">
-               <xsl:value-of select="concat('Chapter ',chapter_id,' - ',title)"/>
+               <a href="{toc_url}">
+                  <xsl:value-of select="concat('Chapter ',chapter_id,' - ',title)"/>
+               </a>
             </h2>
 
             <!-- Chapter Info -->
 
          <!-- Navigation -->
             <a class="previous_page" href="{prev_url}"><![CDATA[<-previous]]></a>
-            <a class="next_page"     href="{next_url}"><![CDATA[next->]]></a>
+            <a class="toc_page"      href="{prev_url}"><![CDATA[Table of Contents]]></a>
+            <xsl:if test="next_url">
+               <a class="next_page"  href="{next_url}"><![CDATA[next->]]></a>
+            </xsl:if>
 
       </xsl:template>
 
       </xsl:template>
 
    <!-- Ignore -->
-      <xsl:template match="chapter_id|prev_url|next_url|canonical_url|current_url|old_versions"/>
+      <xsl:template match="chapter_id|prev_url|next_url|toc_url|canonical_url|current_url|old_versions"/>
 
 </xsl:stylesheet>
index 3eab804dda503772542bb668e13f1c336c9a0ff5..9f9b22e7ac79d15935b8f5aea63d9eab43c1d521 100644 (file)
@@ -33,7 +33,7 @@ body.no-js #old_version_warning span.closebar {
   display: none;
 }
 
-.previous_page, .next_page {
+.previous_page, .next_page, .toc_page {
   font-size:      1.2em;
 }
 
@@ -47,6 +47,13 @@ body.no-js #old_version_warning span.closebar {
   clear:        right;
 }
 
+.toc_page {
+  position:     absolute;
+  right:        13em;
+  left:         13em;
+  text-align:   center;
+}
+
 #chapter {
   line-height: 1.5;
 }