summaryrefslogtreecommitdiffstats
path: root/help3xsl
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@libreoffice.org>2019-10-21 18:58:42 -0300
committerOlivier Hallot <olivier.hallot@libreoffice.org>2019-10-22 16:28:15 +0200
commit0dc045bd9c85db452d996f589202088dfc82ceec (patch)
tree02f03ab0ba22e3160e2406a389de4ccd7a31a6b6 /help3xsl
parentReduce string repetition in XForm Help page (diff)
downloadhelp-0dc045bd9c85db452d996f589202088dfc82ceec.tar.gz
help-0dc045bd9c85db452d996f589202088dfc82ceec.zip
Add Option View help page screenshot
+ tweak CSS for images Change-Id: Iaa304a0ccecb6cdea2421de4ffaed52d71a0c76b Reviewed-on: https://gerrit.libreoffice.org/81287 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl')
-rw-r--r--help3xsl/default.css10
-rw-r--r--help3xsl/online_transform.xsl18
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 -->