aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2021-03-03 20:07:20 +0100
committerUlrich Müller <ulm@gentoo.org>2021-03-03 20:07:20 +0100
commitf24bc4e057a0553d388699431bf7f3f21c8179d1 (patch)
tree846b2c771eb653787126787676e2d30e1bc35804
parentMakefile: Suppress spurious tidy warnings (diff)
downloaddevmanual-master.tar.gz
devmanual-master.tar.bz2
devmanual-master.zip
devbook.xsl: Split some very long lines for better readabilityHEADmaster
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
-rw-r--r--devbook.xsl43
1 files 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>