Created
March 24, 2017 19:37
-
-
Save ctbarber/d62c04203802f0bc5a34e06a52a99dca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- begin template match for badge box with icon snippet --> | |
<xsl:template match="table[@class='snippet-badge-box-icon-text']" mode="copy"> | |
<xsl:variable name="use-background"> | |
<xsl:choose> | |
<xsl:when test="lower-case(tbody/tr[2]/td[2]/node()) = ''"> | |
<xsl:text>no-background</xsl:text> | |
</xsl:when> | |
<xsl:when test="lower-case(tbody/tr[2]/td[2]/node()) = 'none'"> | |
<xsl:text>no-background</xsl:text> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:text>background</xsl:text> | |
</xsl:otherwise> | |
</xsl:choose> | |
</xsl:variable> | |
<div class="uthsc-badge-box"> | |
<div class="uthsc-badge-box-icon"> | |
<xsl:choose> | |
<xsl:when test="$use-background = 'background'"> | |
<span class="fa-stack fa-4x"> | |
<span class="fa fa-{tbody/tr[2]/td[2]/node()} fa-stack-2x"></span> | |
<span class="fa fa-{tbody/tr[3]/td[2]/node()} fa-stack-1x uthsc-badge-box-stacked"></span> | |
</span> | |
</xsl:when> | |
<xsl:otherwise> | |
<span class="fa fa-{tbody/tr[3]/td[2]/node()} fa-5x"></span> | |
</xsl:otherwise> | |
</xsl:choose> | |
</div> | |
<div class="uthsc-badge-box-text"> | |
<xsl:apply-templates select="tbody/tr[4]/td[2]/node()" mode="copy"/> | |
</div> | |
</div> | |
</xsl:template> | |
<!-- end template match for badge box with icon snippet --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment