mirror of
https://github.com/moparisthebest/xeps
synced 2025-02-27 16:11:44 -05:00
Support existing uses of <div class="example">
This commit is contained in:
parent
fc06bd46fd
commit
3f29a910da
10
xep.xsl
10
xep.xsl
@ -1053,7 +1053,13 @@ content: "XEP-<xsl:value-of select='/xep/header/number'/>";
|
|||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match='div'>
|
<xsl:template match='div'>
|
||||||
<div>
|
<xsl:variable name='type'>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test='@class = "example"'>figure</xsl:when>
|
||||||
|
<xsl:otherwise>div</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
<xsl:element name='{$type}'>
|
||||||
<xsl:variable name='class.count' select='count(@class)'/>
|
<xsl:variable name='class.count' select='count(@class)'/>
|
||||||
<xsl:if test='$class.count=1'>
|
<xsl:if test='$class.count=1'>
|
||||||
<xsl:attribute name='class'><xsl:value-of select='@class'/></xsl:attribute>
|
<xsl:attribute name='class'><xsl:value-of select='@class'/></xsl:attribute>
|
||||||
@ -1063,7 +1069,7 @@ content: "XEP-<xsl:value-of select='/xep/header/number'/>";
|
|||||||
<xsl:attribute name='style'><xsl:value-of select='@style'/></xsl:attribute>
|
<xsl:attribute name='style'><xsl:value-of select='@style'/></xsl:attribute>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
</div>
|
</xsl:element>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match='em'>
|
<xsl:template match='em'>
|
||||||
|
@ -1281,7 +1281,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
figure.code,
|
figure.code,
|
||||||
figure.code-example {
|
figure.code-example,
|
||||||
|
figure.example {
|
||||||
/* margin: 1.5em; */
|
/* margin: 1.5em; */
|
||||||
padding: 1.5em;
|
padding: 1.5em;
|
||||||
border: 1px solid rgba(19, 181, 234, 1.0);
|
border: 1px solid rgba(19, 181, 234, 1.0);
|
||||||
@ -1475,6 +1476,7 @@
|
|||||||
nav#toc ol.toc li a:hover:before {
|
nav#toc ol.toc li a:hover:before {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and ( max-width: 60em ) {
|
@media screen and ( max-width: 60em ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user