From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1148703-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 5FB8B138350 for <garchives@archives.gentoo.org>; Fri, 28 Feb 2020 07:20:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 750C4E08F7; Fri, 28 Feb 2020 07:20:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 4B51EE08F7 for <gentoo-commits@lists.gentoo.org>; Fri, 28 Feb 2020 07:20:56 +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 01C2434F42B for <gentoo-commits@lists.gentoo.org>; Fri, 28 Feb 2020 07:20:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 67013101 for <gentoo-commits@lists.gentoo.org>; Fri, 28 Feb 2020 07:20:53 +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: <1582874334.66271602df53b2072fb6b9e896e9fd9b292678c8.ulm@gentoo> Subject: [gentoo-commits] proj/devmanual:master commit in: / X-VCS-Repository: proj/devmanual X-VCS-Files: devbook.xsl devmanual.css X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 66271602df53b2072fb6b9e896e9fd9b292678c8 X-VCS-Branch: master Date: Fri, 28 Feb 2020 07:20:53 +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: 61821df3-5641-44c0-8f70-d31cc572874a X-Archives-Hash: d5d5ab02c9520e4211d97e5807e6135a commit: 66271602df53b2072fb6b9e896e9fd9b292678c8 Author: Max Magorsch <arzano <AT> gentoo <DOT> org> AuthorDate: Tue Feb 25 19:01:53 2020 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Fri Feb 28 07:18:54 2020 +0000 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=66271602 Revise the navbar items The navbar links have been shortened using css resulting in a fixed navbar size. In addition the searchbar in the lower navbar has been centered vertically. Signed-off-by: Max Magorsch <arzano <AT> gentoo.org> Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> devbook.xsl | 10 +++++----- devmanual.css | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 5 deletions(-) diff --git a/devbook.xsl b/devbook.xsl index e3bb38d..11b4fd5 100644 --- a/devbook.xsl +++ b/devbook.xsl @@ -701,7 +701,7 @@ --> <xsl:when test="count(/guide/include) > 0"> <xsl:variable name="doc" select="/guide/include[1]/@href"/> - <a href="{concat($doc, 'index.html')}"><xsl:value-of select="document(concat(/guide/@self, $doc, 'text.xml'))/guide/chapter[1]/title"/>  <span class="fa fa-arrow-right"/></a> + <a class="w-250 text-center" href="{concat($doc, 'index.html')}"><span class="truncated-text d-inline-block max-w-200 mr-2"><xsl:value-of select="document(concat(/guide/@self, $doc, 'text.xml'))/guide/chapter[1]/title"/></span><span class="fa fa-arrow-right"/></a> </xsl:when> <xsl:otherwise> <!-- This document's path --> @@ -734,7 +734,7 @@ <xsl:with-param name="append">../</xsl:with-param> </xsl:call-template> </xsl:variable> - <a href="{concat($relative_path_depth_recursion, $relative_path, 'index.html')}"><xsl:value-of select="document(concat($parentItem_actual, 'text.xml'))/guide/chapter[1]/title"/>  <span class="fa fa-arrow-right"/></a> + <a class="w-250 text-center" href="{concat($relative_path_depth_recursion, $relative_path, 'index.html')}"> <span class="truncated-text d-inline-block max-w-200 mr-2"><xsl:value-of select="document(concat($parentItem_actual, 'text.xml'))/guide/chapter[1]/title"/></span><span class="fa fa-arrow-right"/></a> </xsl:when> <xsl:otherwise> <!-- We need to recurse downwards; so we need to strip off a directory element off our absolute path to feed @@ -781,7 +781,7 @@ * Fully recurse up the node to get the last extremity * Otherwise list the parent --> <xsl:when test="/guide/@root"> - <a href="#"><span class="fa fa-arrow-left"/>  <xsl:value-of select="/guide/chapter[1]/title"/></a> + <a class="w-250 text-center" href="#"><span class="fa fa-arrow-left"/><span class="truncated-text d-inline-block max-w-200 ml-2"><xsl:value-of select="/guide/chapter[1]/title"/></span></a> </xsl:when> <xsl:otherwise> <!-- This document's path --> @@ -804,10 +804,10 @@ </xsl:call-template> </xsl:variable> <!-- Make a relative <a> link; we need an absolute reference for the XSLT processor though... --> - <a href="{concat('../', substring-before($myItem_path, 'text.xml'), 'index.html')}"><span class="fa fa-arrow-left"/>  <xsl:value-of select="document(concat($parentItem_path, $myItem_path))/guide/chapter[1]/title"/></a> + <a class="w-250 text-center" href="{concat('../', substring-before($myItem_path, 'text.xml'), 'index.html')}"><span class="fa fa-arrow-left"/><span class="truncated-text d-inline-block max-w-200 ml-2"><xsl:value-of select="document(concat($parentItem_path, $myItem_path))/guide/chapter[1]/title"/></span></a> </xsl:when> <xsl:otherwise> - <a href="../index.html"><span class="fa fa-arrow-left"/>  <xsl:value-of select="document(concat(/guide/@self, '../text.xml'))/guide/chapter[1]/title"/></a> + <a class="w-250 text-center" href="../index.html"><span class="fa fa-arrow-left"/><span class="truncated-text d-inline-block max-w-200 ml-2"><xsl:value-of select="document(concat(/guide/@self, '../text.xml'))/guide/chapter[1]/title"/></span></a> </xsl:otherwise> </xsl:choose> </xsl:otherwise> diff --git a/devmanual.css b/devmanual.css index 41c6beb..24b3551 100644 --- a/devmanual.css +++ b/devmanual.css @@ -33,4 +33,44 @@ pre span.Constant { color: black; } pre span.Comment { color: red; } pre span.Statement { color: darkred; } +.truncated-text { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: top; +} + +.w-250 { + width: 250px; +} + +.max-w-200 { + max-width: 200px; +} + +/* compatible to Bootstrap 4 for future migration */ +.d-inline-block { + display: inline-block; +} + +/* compatible to Bootstrap 4 for future migration */ +.text-center { + text-align: center; +} + +/* compatible to Bootstrap 4 for future migration */ +.mr-2 { + margin-right: 8px; +} + +/* compatible to Bootstrap 4 for future migration */ +.ml-2 { + margin-left: 8px; +} + +/* vertically center the search bar */ +.navbar-grey .input-group { + margin-top: 3px; +} + /* vim: set ts=4 tw=80 et : */