commit:     f24bc4e057a0553d388699431bf7f3f21c8179d1
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  3 19:07:20 2021 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Mar  3 19:07:20 2021 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=f24bc4e0

devbook.xsl: Split some very long lines for better readability

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

 devbook.xsl | 43 +++++++++++++++++++++++++++++++++++--------
 1 file changed, 35 insertions(+), 8 deletions(-)

diff --git a/devbook.xsl b/devbook.xsl
index 49dc0c3..75aa8f0 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -671,7 +671,12 @@
       -->
       <xsl:when test="count(/guide/include) &gt; 0">
         <xsl:variable name="doc" select="/guide/include[1]/@href"/>
-        <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>
+        <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 -->
@@ -704,7 +709,12 @@
                 <xsl:with-param name="append">../</xsl:with-param>
               </xsl:call-template>
             </xsl:variable>
-            <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>
+            <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
@@ -751,7 +761,12 @@
                * Fully recurse up the node to get the last extremity
              * Otherwise list the parent -->
       <xsl:when test="/guide/@root">
-        <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>
+        <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 -->
@@ -774,10 +789,20 @@
             </xsl:call-template>
             </xsl:variable>
             <!-- Make a relative <a> link; we need an absolute reference for 
the XSLT processor though... -->
-            <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>
+            <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 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>
+            <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>
@@ -794,9 +819,11 @@
             <xsl:with-param name="append">../</xsl:with-param>
           </xsl:call-template>
         </xsl:variable>
-
-        <li><a href="{$relative_path_depth_recursion}index.html"><xsl:value-of 
select="document(concat(/guide/@self, concat($relative_path_depth_recursion, 
'text.xml')))/guide/chapter[1]/title"/></a></li>
-
+        <li>
+          <a href="{$relative_path_depth_recursion}index.html">
+            <xsl:value-of select="document(concat(/guide/@self, 
concat($relative_path_depth_recursion, 'text.xml')))/guide/chapter[1]/title"/>
+          </a>
+        </li>
         <xsl:call-template name="printParentDocs">
           <xsl:with-param name="depth" select="$depth - 1"/>
         </xsl:call-template>

Reply via email to