summaryrefslogtreecommitdiff
path: root/help3xsl
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@libreoffice.org>2018-12-26 12:54:58 -0200
committerOlivier Hallot <olivier.hallot@libreoffice.org>2018-12-26 22:15:20 +0100
commite6095165acb81b895d5671a4414faf7885a622ff (patch)
treeb58f3496f4d7d128cc924d152e677e0acc038ac6 /help3xsl
parent2d43bbab27930b562466b9a05c8fcdcae1e08537 (diff)
Review code in help page and mute l10n when OK
+ Added "smathcode" role to render smath code paragraphs + let smath code samples be copied to clipboard. Change-Id: I580c162d0c77f51d0de817ca143a845abf56eca9 Reviewed-on: https://gerrit.libreoffice.org/65621 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.xsl19
2 files changed, 25 insertions, 4 deletions
diff --git a/help3xsl/default.css b/help3xsl/default.css
index 6cb76ce384..0870b7a1ba 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -39,14 +39,15 @@ h5,
h6,
.listitem,
.listitemintable,
-.tablecontent,
-.input {
+.tablecontent {
font-family: -apple-system, system-ui, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "DejaVu Sans", "Lucida Grande", "Helvetica Neue", Helvetica, Arial, sans-serif, FreeSerif, NanumGothic, "Noto Sans Tibetan", Taprom;
}
.input {
+ background-color: rgba(0,0,0,0.04);
transition-property: background-color;
transition-duration: 150ms;
border-bottom: 1px dashed rgba(0,0,0,0.1);
+ font-family: Menlo, Consolas, "DejaVu Sans Mono", "Nimbus Mono L", "Lucida Sans Typewriter", "Courier New", Courier, Monaco, monospace;
}
[data-tooltip]{
position:relative;
@@ -115,6 +116,11 @@ pre,
padding: 1px 3px;
font-family: Menlo, Consolas, "DejaVu Sans Mono", "Nimbus Mono L", "Lucida Sans Typewriter", "Courier New", Courier, Monaco, monospace;
}
+.smathcode {
+ border-radius: 2px;
+ padding: 1px 3px;
+ font-family: Menlo, Consolas, "DejaVu Sans Mono", "Nimbus Mono L", "Lucida Sans Typewriter", "Courier New", Courier, Monaco, monospace;
+}
.acronym {
font-weight: bold;
}
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index ad285480de..5fa01a773b 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -538,7 +538,7 @@
</xsl:call-template>
</xsl:when>
- <xsl:when test="contains(' note warning tip ',@role)">
+ <xsl:when test="@role='note' or @role='tip' or @role='warning'">
<xsl:call-template name="insertnote">
<xsl:with-param name="type" select="@role" />
</xsl:call-template>
@@ -552,6 +552,10 @@
<xsl:value-of select="." />
</xsl:when>
+ <xsl:when test="@role='smathcode'">
+ <p id="{@id}" class="smathcode"><span class="input" data-tooltip="{$ui_copyclip}"><xsl:apply-templates /></span></p>
+ </xsl:when>
+
<xsl:when test="@role='logocode'">
<xsl:call-template name="insertlogocode" />
</xsl:when>
@@ -579,7 +583,7 @@
</xsl:call-template>
</xsl:when>
- <xsl:when test="contains(' note warning tip ',@role)">
+ <xsl:when test="@role='note' or @role='tip' or @role='warning'">
<xsl:call-template name="insertnote">
<xsl:with-param name="type" select="@role" />
</xsl:call-template>
@@ -589,6 +593,17 @@
<xsl:apply-templates />
</xsl:when>
+ <xsl:when test="@role='bascode' or @role='pycode'">
+ <xsl:value-of select="." />
+ </xsl:when>
+
+ <xsl:when test="@role='smathcode'">
+ <p id="{@id}" class="smathcode"><span class="input" data-tooltip="{$ui_copyclip}"><xsl:apply-templates /></span></p>
+ </xsl:when>
+
+ <xsl:when test="@role='logocode'">
+ <xsl:call-template name="insertlogocode" />
+ </xsl:when>
<xsl:otherwise>
<xsl:call-template name="insertpara" />
</xsl:otherwise>