1 |
commit: 66271602df53b2072fb6b9e896e9fd9b292678c8 |
2 |
Author: Max Magorsch <arzano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 25 19:01:53 2020 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 28 07:18:54 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=66271602 |
7 |
|
8 |
Revise the navbar items |
9 |
|
10 |
The navbar links have been shortened using css resulting in a |
11 |
fixed navbar size. In addition the searchbar in the lower navbar |
12 |
has been centered vertically. |
13 |
|
14 |
Signed-off-by: Max Magorsch <arzano <AT> gentoo.org> |
15 |
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> |
16 |
|
17 |
devbook.xsl | 10 +++++----- |
18 |
devmanual.css | 40 ++++++++++++++++++++++++++++++++++++++++ |
19 |
2 files changed, 45 insertions(+), 5 deletions(-) |
20 |
|
21 |
diff --git a/devbook.xsl b/devbook.xsl |
22 |
index e3bb38d..11b4fd5 100644 |
23 |
--- a/devbook.xsl |
24 |
+++ b/devbook.xsl |
25 |
@@ -701,7 +701,7 @@ |
26 |
--> |
27 |
<xsl:when test="count(/guide/include) > 0"> |
28 |
<xsl:variable name="doc" select="/guide/include[1]/@href"/> |
29 |
- <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> |
30 |
+ <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> |
31 |
</xsl:when> |
32 |
<xsl:otherwise> |
33 |
<!-- This document's path --> |
34 |
@@ -734,7 +734,7 @@ |
35 |
<xsl:with-param name="append">../</xsl:with-param> |
36 |
</xsl:call-template> |
37 |
</xsl:variable> |
38 |
- <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> |
39 |
+ <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> |
40 |
</xsl:when> |
41 |
<xsl:otherwise> |
42 |
<!-- We need to recurse downwards; so we need to strip off a directory element off our absolute path to feed |
43 |
@@ -781,7 +781,7 @@ |
44 |
* Fully recurse up the node to get the last extremity |
45 |
* Otherwise list the parent --> |
46 |
<xsl:when test="/guide/@root"> |
47 |
- <a href="#"><span class="fa fa-arrow-left"/>  <xsl:value-of select="/guide/chapter[1]/title"/></a> |
48 |
+ <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> |
49 |
</xsl:when> |
50 |
<xsl:otherwise> |
51 |
<!-- This document's path --> |
52 |
@@ -804,10 +804,10 @@ |
53 |
</xsl:call-template> |
54 |
</xsl:variable> |
55 |
<!-- Make a relative <a> link; we need an absolute reference for the XSLT processor though... --> |
56 |
- <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> |
57 |
+ <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> |
58 |
</xsl:when> |
59 |
<xsl:otherwise> |
60 |
- <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> |
61 |
+ <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> |
62 |
</xsl:otherwise> |
63 |
</xsl:choose> |
64 |
</xsl:otherwise> |
65 |
|
66 |
diff --git a/devmanual.css b/devmanual.css |
67 |
index 41c6beb..24b3551 100644 |
68 |
--- a/devmanual.css |
69 |
+++ b/devmanual.css |
70 |
@@ -33,4 +33,44 @@ pre span.Constant { color: black; } |
71 |
pre span.Comment { color: red; } |
72 |
pre span.Statement { color: darkred; } |
73 |
|
74 |
+.truncated-text { |
75 |
+ white-space: nowrap; |
76 |
+ overflow: hidden; |
77 |
+ text-overflow: ellipsis; |
78 |
+ vertical-align: top; |
79 |
+} |
80 |
+ |
81 |
+.w-250 { |
82 |
+ width: 250px; |
83 |
+} |
84 |
+ |
85 |
+.max-w-200 { |
86 |
+ max-width: 200px; |
87 |
+} |
88 |
+ |
89 |
+/* compatible to Bootstrap 4 for future migration */ |
90 |
+.d-inline-block { |
91 |
+ display: inline-block; |
92 |
+} |
93 |
+ |
94 |
+/* compatible to Bootstrap 4 for future migration */ |
95 |
+.text-center { |
96 |
+ text-align: center; |
97 |
+} |
98 |
+ |
99 |
+/* compatible to Bootstrap 4 for future migration */ |
100 |
+.mr-2 { |
101 |
+ margin-right: 8px; |
102 |
+} |
103 |
+ |
104 |
+/* compatible to Bootstrap 4 for future migration */ |
105 |
+.ml-2 { |
106 |
+ margin-left: 8px; |
107 |
+} |
108 |
+ |
109 |
+/* vertically center the search bar */ |
110 |
+.navbar-grey .input-group { |
111 |
+ margin-top: 3px; |
112 |
+} |
113 |
+ |
114 |
/* vim: set ts=4 tw=80 et : */ |