From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1142211-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 1B169138350
	for <garchives@archives.gentoo.org>; Mon,  3 Feb 2020 00:07:48 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 3C15BE08C0;
	Mon,  3 Feb 2020 00:07:47 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 0FDA3E08C0
	for <gentoo-commits@lists.gentoo.org>; Mon,  3 Feb 2020 00:07:47 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id A8FA734E4EA
	for <gentoo-commits@lists.gentoo.org>; Mon,  3 Feb 2020 00:07:44 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 4788C116
	for <gentoo-commits@lists.gentoo.org>; Mon,  3 Feb 2020 00:07:43 +0000 (UTC)
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" <ulm@gentoo.org>
Message-ID: <1580688080.0bbfa28025b1a89eb8cac3f96b7072c1de01b6ba.ulm@gentoo>
Subject: [gentoo-commits] proj/devmanual:master commit in: /
X-VCS-Repository: proj/devmanual
X-VCS-Files: devbook.xsl offline.css
X-VCS-Directories: /
X-VCS-Committer: ulm
X-VCS-Committer-Name: Ulrich Müller
X-VCS-Revision: 0bbfa28025b1a89eb8cac3f96b7072c1de01b6ba
X-VCS-Branch: master
Date: Mon,  3 Feb 2020 00:07:43 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 5f80d003-a50f-40ef-a884-bcc6c6c46227
X-Archives-Hash: f1550cdfe7f07f9110b417acf5275428

commit:     0bbfa28025b1a89eb8cac3f96b7072c1de01b6ba
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 29 11:15:38 2020 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Mon Feb  3 00:01:20 2020 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=0bbfa280

devbook.xsl: Add simple navigation in offline mode.

This consists of "previous" and "next" links.

Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 devbook.xsl | 198 +++++++++++++++++++++++++++++++-----------------------------
 offline.css |  26 ++++++++
 2 files changed, 130 insertions(+), 94 deletions(-)

diff --git a/devbook.xsl b/devbook.xsl
index faf9796..a61cae0 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -469,111 +469,121 @@
     </head>
     <body>
       <header>
-        <xsl:if test="not($offline)">
-        <div class="site-title">
-          <div class="container">
-            <div class="row">
-              <div class="site-title-buttons">
-                <div class="btn-group btn-group-sm">
-                  <a href="https://get.gentoo.org/" role="button" class="btn get-gentoo"><span class="fa fa-fw fa-download"></span> <strong> Get Gentoo!</strong></a>
-                  <div class="btn-group btn-group-sm">
-                    <a class="btn gentoo-org-sites dropdown-toggle" data-toggle="dropdown" data-target="#" href="#">
-                      <span class="fa fa-fw fa-map-o"></span> <span class="hidden-xs"> gentoo.org sites </span> <span class="caret"></span>
+        <xsl:choose>
+          <xsl:when test="$offline">
+            <nav class="offline">
+              <ul>
+                <li><xsl:call-template name="findPrevious"/></li>
+                <li><xsl:call-template name="findNext"/></li>
+              </ul>
+            </nav>
+          </xsl:when>
+          <xsl:otherwise>
+            <div class="site-title">
+              <div class="container">
+                <div class="row">
+                  <div class="site-title-buttons">
+                    <div class="btn-group btn-group-sm">
+                      <a href="https://get.gentoo.org/" role="button" class="btn get-gentoo"><span class="fa fa-fw fa-download"></span> <strong> Get Gentoo!</strong></a>
+                      <div class="btn-group btn-group-sm">
+                        <a class="btn gentoo-org-sites dropdown-toggle" data-toggle="dropdown" data-target="#" href="#">
+                          <span class="fa fa-fw fa-map-o"></span> <span class="hidden-xs"> gentoo.org sites </span> <span class="caret"></span>
+                        </a>
+                        <ul class="dropdown-menu dropdown-menu-right">
+                          <li><a href="https://www.gentoo.org/" title="Main Gentoo website"><span class="fa fa-home fa-fw"></span> gentoo.org</a></li>
+                          <li><a href="https://wiki.gentoo.org/" title="Find and contribute documentation"><span class="fa fa-file-text-o fa-fw"></span> Wiki</a></li>
+                          <li><a href="https://bugs.gentoo.org/" title="Report issues and find common issues"><span class="fa fa-bug fa-fw"></span> Bugs</a></li>
+                          <li><a href="https://forums.gentoo.org/" title="Discuss with the community"><span class="fa fa-comments-o fa-fw"></span> Forums</a></li>
+                          <li><a href="https://packages.gentoo.org/" title="Find software for your Gentoo"><span class="fa fa-hdd-o fa-fw"></span> Packages</a></li>
+                          <li class="divider"></li>
+                          <li><a href="https://planet.gentoo.org/" title="Find out what's going on in the developer community"><span class="fa fa-rss fa-fw"></span> Planet</a></li>
+                          <li><a href="https://archives.gentoo.org/" title="Read up on past discussions"><span class="fa fa-archive fa-fw"></span> Archives</a></li>
+                          <li><a href="https://sources.gentoo.org/" title="Browse our source code"><span class="fa fa-code fa-fw"></span> Sources</a></li>
+                          <li class="divider"></li>
+                          <li><a href="https://infra-status.gentoo.org/" title="Get updates on the services provided by Gentoo"><span class="fa fa-server fa-fw"></span> Infra Status</a></li>
+                        </ul>
+                      </div>
+                    </div>
+                  </div>
+                  <div>
+                    <a href="/" title="Back to the homepage" class="site-logo">
+                      <object data="https://assets.gentoo.org/tyrian/site-logo.svg" type="image/svg+xml">
+                        <img src="https://assets.gentoo.org/tyrian/site-logo.png" alt="Gentoo Linux Logo" />
+                      </object>
                     </a>
-                    <ul class="dropdown-menu dropdown-menu-right">
-                      <li><a href="https://www.gentoo.org/" title="Main Gentoo website"><span class="fa fa-home fa-fw"></span> gentoo.org</a></li>
-                      <li><a href="https://wiki.gentoo.org/" title="Find and contribute documentation"><span class="fa fa-file-text-o fa-fw"></span> Wiki</a></li>
-                      <li><a href="https://bugs.gentoo.org/" title="Report issues and find common issues"><span class="fa fa-bug fa-fw"></span> Bugs</a></li>
-                      <li><a href="https://forums.gentoo.org/" title="Discuss with the community"><span class="fa fa-comments-o fa-fw"></span> Forums</a></li>
-                      <li><a href="https://packages.gentoo.org/" title="Find software for your Gentoo"><span class="fa fa-hdd-o fa-fw"></span> Packages</a></li>
-                      <li class="divider"></li>
-                      <li><a href="https://planet.gentoo.org/" title="Find out what's going on in the developer community"><span class="fa fa-rss fa-fw"></span> Planet</a></li>
-                      <li><a href="https://archives.gentoo.org/" title="Read up on past discussions"><span class="fa fa-archive fa-fw"></span> Archives</a></li>
-                      <li><a href="https://sources.gentoo.org/" title="Browse our source code"><span class="fa fa-code fa-fw"></span> Sources</a></li>
-                      <li class="divider"></li>
-                      <li><a href="https://infra-status.gentoo.org/" title="Get updates on the services provided by Gentoo"><span class="fa fa-server fa-fw"></span> Infra Status</a></li>
-                    </ul>
+                    <span class="site-label">Development Guide</span>
                   </div>
                 </div>
               </div>
-              <div>
-                <a href="/" title="Back to the homepage" class="site-logo">
-                  <object data="https://assets.gentoo.org/tyrian/site-logo.svg" type="image/svg+xml">
-                    <img src="https://assets.gentoo.org/tyrian/site-logo.png" alt="Gentoo Linux Logo" />
-                  </object>
-                </a>
-                <span class="site-label">Development Guide</span>
-              </div>
             </div>
-          </div>
-        </div>
-        <nav class="tyrian-navbar" role="navigation">
-          <div class="container">
-            <div class="row">
-              <div class="navbar-header">
-                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
-                  <span class="sr-only">Toggle navigation</span>
-                  <span class="icon-bar"></span>
-                  <span class="icon-bar"></span>
-                  <span class="icon-bar"></span>
-                </button>
-              </div>
-              <div class="collapse navbar-collapse navbar-main-collapse">
-                <ul class="nav navbar-nav">
-                  <li><a href="{concat($relative_path_depth_recursion, substring-after(substring-before(@link, '##'), '::'), 'index.html', substring-after(@link, '##'))}"><span class="fa fa-home"/>&#160; Home</a></li>
-                  <li class="dropdown">
-                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><xsl:value-of select="/guide/chapter[1]/title"/> <span class="caret"></span></a>
-                    <xsl:call-template name="contentsTree">
-                      <xsl:with-param name="maxdepth" select="1"/>
-                      <xsl:with-param name="ulclass">dropdown-menu</xsl:with-param>
-                    </xsl:call-template>
-                  </li>
-                  <li><xsl:call-template name="findPrevious"/></li>
-                  <li><xsl:call-template name="findNext"/></li>
-                </ul>
-              </div>
-            </div>
-          </div>
-        </nav>
-        <nav class="navbar navbar-grey navbar-stick" id="devmanual-actions" role="navigation">
-          <div class="container">
-            <div class="row">
-              <div class="navbar-header">
-                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#gw-toolbar">
-                  <span class="sr-only">Toggle navigation</span>
-                  <span class="icon-bar"></span>
-                  <span class="icon-bar"></span>
-                  <span class="icon-bar"></span>
-                </button>
-              </div>
-              <div class="collapse navbar-collapse" id="gw-toolbar">
-                <div class="input-group">
-                  <input type="search" name="search" placeholder="Search" title="Search Gentoo Developer Manual [f]" accesskey="f" id="searchInput" class="form-control" onclick="fetchDocuments()"/>
-                  <div class="input-group-btn">
-                    <input type="submit" name="fulltext" value="Search" title="Search the pages for this text" id="mw-searchButton" class="searchButton btn btn-default" onclick="search()"/>
+            <nav class="tyrian-navbar" role="navigation">
+              <div class="container">
+                <div class="row">
+                  <div class="navbar-header">
+                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
+                      <span class="sr-only">Toggle navigation</span>
+                      <span class="icon-bar"></span>
+                      <span class="icon-bar"></span>
+                      <span class="icon-bar"></span>
+                    </button>
+                  </div>
+                  <div class="collapse navbar-collapse navbar-main-collapse">
+                    <ul class="nav navbar-nav">
+                      <li><a href="{concat($relative_path_depth_recursion, substring-after(substring-before(@link, '##'), '::'), 'index.html', substring-after(@link, '##'))}"><span class="fa fa-home"/>&#160; Home</a></li>
+                      <li class="dropdown">
+                        <a href="#" class="dropdown-toggle" data-toggle="dropdown"><xsl:value-of select="/guide/chapter[1]/title"/> <span class="caret"></span></a>
+                        <xsl:call-template name="contentsTree">
+                          <xsl:with-param name="maxdepth" select="1"/>
+                          <xsl:with-param name="ulclass">dropdown-menu</xsl:with-param>
+                        </xsl:call-template>
+                      </li>
+                      <li><xsl:call-template name="findPrevious"/></li>
+                      <li><xsl:call-template name="findNext"/></li>
+                    </ul>
                   </div>
                 </div>
               </div>
-            </div>
-          </div>
-        </nav>
-        <div id="searchResults" class="modal fade" role="dialog">
-          <div class="modal-dialog">
-            <div class="modal-content">
-              <div class="modal-header">
-              <button type="button" class="close" data-dismiss="modal">x</button>
-              <h4 class="modal-title">Search Results</h4>
-              </div>
-              <div class="modal-body">
-                <p>No results found.</p>
+            </nav>
+            <nav class="navbar navbar-grey navbar-stick" id="devmanual-actions" role="navigation">
+              <div class="container">
+                <div class="row">
+                  <div class="navbar-header">
+                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#gw-toolbar">
+                      <span class="sr-only">Toggle navigation</span>
+                      <span class="icon-bar"></span>
+                      <span class="icon-bar"></span>
+                      <span class="icon-bar"></span>
+                    </button>
+                  </div>
+                  <div class="collapse navbar-collapse" id="gw-toolbar">
+                    <div class="input-group">
+                      <input type="search" name="search" placeholder="Search" title="Search Gentoo Developer Manual [f]" accesskey="f" id="searchInput" class="form-control" onclick="fetchDocuments()"/>
+                      <div class="input-group-btn">
+                        <input type="submit" name="fulltext" value="Search" title="Search the pages for this text" id="mw-searchButton" class="searchButton btn btn-default" onclick="search()"/>
+                      </div>
+                    </div>
+                  </div>
+                </div>
               </div>
-              <div class="modal-footer">
-                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+            </nav>
+            <div id="searchResults" class="modal fade" role="dialog">
+              <div class="modal-dialog">
+                <div class="modal-content">
+                  <div class="modal-header">
+                    <button type="button" class="close" data-dismiss="modal">x</button>
+                    <h4 class="modal-title">Search Results</h4>
+                  </div>
+                  <div class="modal-body">
+                    <p>No results found.</p>
+                  </div>
+                  <div class="modal-footer">
+                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+                  </div>
+                </div>
               </div>
             </div>
-          </div>
-        </div>
-        </xsl:if>
+          </xsl:otherwise>
+        </xsl:choose>
         <div class="container">
           <div class="row">
             <div class="col-md010">

diff --git a/offline.css b/offline.css
index 42f94e9..85dfa56 100644
--- a/offline.css
+++ b/offline.css
@@ -17,3 +17,29 @@ header, footer {
 h1, h2, h3, h4, h5, h6 {
     line-height: 1.2;
 }
+
+nav.offline ul, .breadcrumb {
+    list-style-type: none;
+    padding: 0;
+    margin: 0;
+}
+
+nav.offline li, .breadcrumb li {
+    display: inline;
+}
+
+nav.offline li+li {
+    margin-left: 1em;
+}
+
+.breadcrumb li+li:before {
+    content: " / ";
+}
+
+.fa-arrow-left:after {
+    content: "\25c4"; /* BLACK LEFT-POINTING POINTER */
+}
+
+.fa-arrow-right:after {
+    content: "\25ba"; /* BLACK RIGHT-POINTING POINTER */
+}