diff options
Diffstat (limited to 'help3xsl')
-rw-r--r-- | help3xsl/default.css | 10 | ||||
-rw-r--r-- | help3xsl/online_transform.xsl | 18 |
2 files changed, 27 insertions, 1 deletions
diff --git a/help3xsl/default.css b/help3xsl/default.css index 33888ccd2a..988d3cf8d1 100644 --- a/help3xsl/default.css +++ b/help3xsl/default.css @@ -329,6 +329,16 @@ h6 { display:inline-block; border:none; } +.screenshot, .genericimage { + border-collapse: collapse; + margin-left: auto; + margin-right: auto; + border-style:none; + display:block; + box-shadow: 10px 10px 5px grey; +} +.iconimage {} + .switch, .switchinline {} diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl index 83c6894511..14fc99c8eb 100644 --- a/help3xsl/online_transform.xsl +++ b/help3xsl/online_transform.xsl @@ -1132,6 +1132,22 @@ </xsl:otherwise> </xsl:choose> </xsl:variable> + <xsl:variable name="imagestyle"> + <xsl:choose> + <xsl:when test="starts-with(@src,'media/screenshots/')"> + <xsl:value-of select="'screenshot'"/> + </xsl:when> + <xsl:when test="starts-with(@src,'media/')"> + <xsl:value-of select="'genericimage'"/> + </xsl:when> + <xsl:when test="not(starts-with(@src,'media/'))"> + <xsl:value-of select="'iconimage'"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="'genericimage'"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> <xsl:variable name="alt"><xsl:value-of select="./alt"/></xsl:variable> <xsl:variable name="width"> <xsl:if test="string-length(@width)!=0"> @@ -1143,7 +1159,7 @@ <xsl:call-template name="convert2px"><xsl:with-param name="value" select="@height"/></xsl:call-template> </xsl:if> </xsl:variable> - <img src="{$src2}" alt="{$alt}" title="{$alt}" style="{concat('width:',$width,';height:',$height)}"/> + <img src="{$src2}" class="{$imagestyle}" alt="{$alt}" title="{$alt}" style="{concat('width:',$width,';height:',$height)}"/> </xsl:template> <!-- Insert an object --> |