Skip to content

Commit

Permalink
Add fixed-bottom to footer (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
infotexture authored Apr 10, 2024
2 parents f97472f + ac06cf7 commit 0171fa4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Customization/xsl/topic.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
>
<xsl:param name="defaultLanguage" select="'en'" as="xs:string"/>
<xsl:param name="BIDIRECTIONAL_DOCUMENT" select="'no'" as="xs:string"/>
<xsl:param name="BOOTSTRAP_CSS_FOOTER" select="'mt-3 border-top bg-primary-subtle'"/>
<xsl:param name="BOOTSTRAP_CSS_FOOTER" select="'border-top bg-primary-subtle'"/>
<xsl:param name="BOOTSTRAP_TOPBAR_HDR"/>


Expand Down Expand Up @@ -499,7 +499,7 @@
<footer xsl:use-attribute-sets="footer">
<!-- ↓ Add Bootstrap CSS ↓ -->
<xsl:attribute name="class">
<xsl:value-of select="$BOOTSTRAP_CSS_FOOTER"/>
<xsl:value-of select="concat('mt-auto ', $BOOTSTRAP_CSS_FOOTER)"/>
<xsl:if test="not($TOC_SPACER_PADDING = '0')">
<xsl:value-of select="concat(' py-', $TOC_SPACER_PADDING)"/>
</xsl:if>
Expand Down
18 changes: 18 additions & 0 deletions xsl/html5-bootstrap.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,24 @@
</head>
</xsl:template>

<xsl:template match="*" mode="addAttributesToBody" priority="5.0">
<xsl:attribute name="class">
<xsl:text>d-flex flex-column min-vh-100</xsl:text>
<xsl:if test="*[contains(@class, ' topic/body ')]/@outputclass">
<xsl:text> </xsl:text>
<xsl:value-of select="*[contains(@class, ' topic/body ')]/@outputclass"/>
</xsl:if>
<xsl:if test="self::dita">
<xsl:if test="*[contains(@class, ' topic/body ')]/*[contains(@class, ' topic/topic ')][1]/@outputclass">
<xsl:text> </xsl:text>
<xsl:value-of
select="*[contains(@class, ' topic/body ')]/*[contains(@class, ' topic/topic ')][1]/@outputclass"
/>
</xsl:if>
</xsl:if>
</xsl:attribute>
</xsl:template>

<!-- Override to use a CSS Grid -->
<xsl:template match="*" mode="chapterBody">
<body>
Expand Down

0 comments on commit 0171fa4

Please sign in to comment.