summaryrefslogtreecommitdiff
path: root/xslt
diff options
context:
space:
mode:
authorShaun McCance <shaunm@redhat.com>2018-10-28 17:19:30 -0400
committerShaun McCance <shaunm@redhat.com>2018-10-28 17:19:30 -0400
commit0a73411dae3559bdeb17410b6a0a8a5727752630 (patch)
tree4c7a64ed5d9fa2ea72c1ee206347a0d394e5ee1e /xslt
parentb34a615ff6c04c638805d73de26ecf195852bbd8 (diff)
downloadyelp-xsl-0a73411dae3559bdeb17410b6a0a8a5727752630.tar.gz
Allow non-experimental hi element, now with style hints
Diffstat (limited to 'xslt')
-rw-r--r--xslt/mallard/html/mal2html-inline.xsl37
-rw-r--r--xslt/mallard/html/mal2html-page.xsl23
2 files changed, 60 insertions, 0 deletions
diff --git a/xslt/mallard/html/mal2html-inline.xsl b/xslt/mallard/html/mal2html-inline.xsl
index 4048b261..a65f276b 100644
--- a/xslt/mallard/html/mal2html-inline.xsl
+++ b/xslt/mallard/html/mal2html-inline.xsl
@@ -216,6 +216,43 @@ an `xref` or `href` attribute.
<xsl:call-template name="mal2html.span"/>
</xsl:template>
+<xsl:template mode="mal2html.inline.mode" match="mal:hi">
+ <xsl:variable name="style" select="concat(' ', @style, ' ')"/>
+ <xsl:call-template name="mal2html.span">
+ <xsl:with-param name="class">
+ <xsl:choose>
+ <xsl:when test="contains($style, ' ins ')">
+ <xsl:text>hi-ins</xsl:text>
+ </xsl:when>
+ <xsl:when test="contains($style, ' del ')">
+ <xsl:text>hi-del</xsl:text>
+ </xsl:when>
+ <xsl:when test="contains($style, ' red ')">
+ <xsl:text>hi-red</xsl:text>
+ </xsl:when>
+ <xsl:when test="contains($style, ' orange ')">
+ <xsl:text>hi-orange</xsl:text>
+ </xsl:when>
+ <xsl:when test="contains($style, ' yellow ')">
+ <xsl:text>hi-yellow</xsl:text>
+ </xsl:when>
+ <xsl:when test="contains($style, ' green ')">
+ <xsl:text>hi-green</xsl:text>
+ </xsl:when>
+ <xsl:when test="contains($style, ' blue ')">
+ <xsl:text>hi-blue</xsl:text>
+ </xsl:when>
+ <xsl:when test="contains($style, ' purple ')">
+ <xsl:text>hi-purple</xsl:text>
+ </xsl:when>
+ <xsl:when test="contains($style, ' gray ')">
+ <xsl:text>hi-gray</xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
<!-- = key = -->
<xsl:template mode="mal2html.inline.mode" match="mal:key">
<xsl:call-template name="mal2html.span"/>
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index f673d1f3..c2a01e7e 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -1429,6 +1429,29 @@ span.hi {
background-color: </xsl:text>
<xsl:value-of select="$color.bg.yellow"/><xsl:text>;
}
+span.hi.hi-ins {
+ background-color: </xsl:text>
+ <xsl:value-of select="$color.bg.green"/><xsl:text>;
+}
+span.hi.hi-del {
+ background-color: </xsl:text>
+ <xsl:value-of select="$color.bg.red"/><xsl:text>;
+ text-decoration: line-through;
+}
+span.hi.hi-red { background-color: </xsl:text>
+ <xsl:value-of select="$color.bg.red"/><xsl:text>; }
+span.hi.hi-orange { background-color: </xsl:text>
+ <xsl:value-of select="$color.bg.orange"/><xsl:text>; }
+span.hi.hi-yellow { background-color: </xsl:text>
+ <xsl:value-of select="$color.bg.yellow"/><xsl:text>; }
+span.hi.hi-green { background-color: </xsl:text>
+ <xsl:value-of select="$color.bg.green"/><xsl:text>; }
+span.hi.hi-blue { background-color: </xsl:text>
+ <xsl:value-of select="$color.bg.blue"/><xsl:text>; }
+span.hi.hi-purple { background-color: </xsl:text>
+ <xsl:value-of select="$color.bg.purple"/><xsl:text>; }
+span.hi.hi-gray { background-color: </xsl:text>
+ <xsl:value-of select="$color.bg.gray"/><xsl:text>; }
<!-- experimental/gloss -->
dt.gloss-term {