diff options
Diffstat (limited to 'help3xsl')
-rw-r--r-- | help3xsl/default.css | 17 | ||||
-rw-r--r-- | help3xsl/online_transform.xsl | 59 |
2 files changed, 74 insertions, 2 deletions
diff --git a/help3xsl/default.css b/help3xsl/default.css index e6a59ad8b8..285d1e9002 100644 --- a/help3xsl/default.css +++ b/help3xsl/default.css @@ -124,10 +124,23 @@ pre, border-top: 1px solid black; } .emph, -.menuitem, -.keycode { +.menuitem { font-weight: bold; } +.keycode { + /*font-weight: bold;*/ + font-family: Menlo, Consolas, "DejaVu Sans Mono", "Nimbus Mono L", "Lucida Sans Typewriter", "Courier New", Courier, Monaco, monospace; +} +.widget{ + padding: 1px 10px; + background: #f0f0f0; + background: linear-gradient(to bottom,#f0f0f0,#fcfcfc); + border-radius: 3px; + color: #303030; + border: 1px solid #a0a0a0; + border-bottom-width: 2px; + white-space: nowrap; +} /* div's for warning, tip and note */ .note, .tip, diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl index 95892bdd4c..59eb5120a8 100644 --- a/help3xsl/online_transform.xsl +++ b/help3xsl/online_transform.xsl @@ -800,6 +800,65 @@ </xsl:call-template> </xsl:template> +<!-- XHP extensions (2018) --> +<!-- H1-H6 --> +<xsl:template match="h1 | h2 | h3 | h4 | h5 | h6"> + <xsl:element name="{local-name()}"> + <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute><xsl:apply-templates /> + </xsl:element> +</xsl:template> +<xsl:template match="h1 | h2 | h3 | h4 | h5 | h6" mode="embedded"> + <xsl:element name="{concat('h',substring-after(local-name(),'h') + 1)}"> + <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute><xsl:apply-templates mode="embedded"/> + </xsl:element> +</xsl:template> + +<!-- INPUT --> +<xsl:template match="input"> + <span class="input" data-tooltip="{$ui_copyclip}"><xsl:apply-templates /></span> +</xsl:template> +<xsl:template match="input" mode="embedded"> + <span class="input" data-tooltip="{$ui_copyclip}"><xsl:apply-templates mode="embedded"/></span> +</xsl:template> + +<!--MENUITEM, KEYCODE, LITERAL, WIDGET--> +<xsl:template match="menuitem | keycode | literal | widget"> + <span class="{local-name()}"><xsl:apply-templates /></span> +</xsl:template> +<xsl:template match="menuitem | input | keycode | literal" mode="embedded"> + <span class="{local-name()}"><xsl:apply-templates mode="embedded"/></span> +</xsl:template> + +<!--NOTE TIP AND WARNING--> +<xsl:template match="tip | note | warning"> + <xsl:variable name="imgsrc"> + <xsl:choose> + <xsl:when test="local-name()='note'"><xsl:value-of select="$note_img"/></xsl:when> + <xsl:when test="local-name()='tip'"><xsl:value-of select="$tip_img"/></xsl:when> + <xsl:when test="local-name()='warning'"><xsl:value-of select="$warning_img"/></xsl:when> + </xsl:choose> + </xsl:variable> + <div class="{local-name()}"> + <div class="noteicon"><img src="{$imgsrc}" alt="{local-name()}" title="{local-name()}"/></div> + <div class="notetext"><p id="{@id}"><xsl:apply-templates /></p></div> + </div> + <br/> +</xsl:template> +<xsl:template match="tip | note | warning" mode="embedded"> + <xsl:variable name="imgsrc"> + <xsl:choose> + <xsl:when test="local-name()='note'"><xsl:value-of select="$note_img"/></xsl:when> + <xsl:when test="local-name()='tip'"><xsl:value-of select="$tip_img"/></xsl:when> + <xsl:when test="local-name()='warning'"><xsl:value-of select="$warning_img"/></xsl:when> + </xsl:choose> + </xsl:variable> + <div class="{local-name()}"> + <div class="noteicon"><img src="{$imgsrc}" alt="{local-name()}" title="{local-name()}"/></div> + <div class="notetext"><p id="{@id}"><xsl:apply-templates mode="embedded"/></p></div> + </div> + <br/> +</xsl:template> + <!-- In case of missing help files --> <xsl:template match="help-id-missing"><xsl:value-of select="$Id"/></xsl:template> |