commit: 489be66826523c8ba5e7bc92ad42d4b40445bbbd
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 1 16:56:38 2024 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Nov 1 16:56:38 2024 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=489be668
devbook.xsl: Suppress permalinks in offline mode
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
devbook.xsl | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/devbook.xsl b/devbook.xsl
index 87aa0e8..9bbac18 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -26,7 +26,9 @@
<xsl:template match="chapter">
<h1 class="first-header">
<xsl:apply-templates select="title"/>
- <a class="permalink" href=""><span class="fa fa-link"/></a>
+ <xsl:if test="not($offline)">
+ <a class="permalink" href=""><span class="fa fa-link"/></a>
+ </xsl:if>
</h1>
<xsl:apply-templates select="*[not(self::title)]"/>
</xsl:template>
@@ -43,7 +45,9 @@
<xsl:element name="h{$level}">
<xsl:attribute name="id"><xsl:value-of select="$anchor"/></xsl:attribute>
<xsl:apply-templates select="title"/>
- <a class="permalink" href="#{$anchor}"><span class="fa fa-link"/></a>
+ <xsl:if test="not($offline)">
+ <a class="permalink" href="#{$anchor}"><span class="fa fa-link"/></a>
+ </xsl:if>
</xsl:element>
<xsl:apply-templates select="*[not(self::title)]"/>
</div>