1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-09 06:14:11 +01:00

Improve the help formatting with generous and ugly use of struts. Unfortunately, the HTML box model doesn't lend itself to automatic Vim-ish formatting.

--HG--
branch : xslt
This commit is contained in:
Kris Maglione
2009-10-28 04:37:53 -04:00
parent 21704fe309
commit 412f3101c1
5 changed files with 39 additions and 91 deletions

View File

@@ -46,11 +46,16 @@
</xsl:template>
<xsl:template match="liberator:tags" mode="pass-2">
<html:div style="clear: right"/>
<xsl:call-template name="parse-tags">
<xsl:with-param name="text" select="."/>
</xsl:call-template>
</xsl:template>
<xsl:template match="liberator:tag|@tag" mode="pass-2">
<xsl:call-template name="parse-tags">
<xsl:with-param name="text"><xsl:value-of select="."/></xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="parse-tags">
<xsl:param name="text"/>
<tags>
@@ -60,6 +65,25 @@
</tags>
</xsl:template>
<xsl:template match="liberator:item" mode="pass-2">
<xsl:copy>
<xsl:apply-templates select="liberator:tags|liberator:spec"/>
<html:hr style="border: 0; height: 0; margin: 0; width: 100%; float: right;"/>
<html:div liberator:highlight="HelpOptInfo">
<xsl:apply-templates select="liberator:type|liberator:default"/>
<html:div style="clear: both;"/>
</html:div>
<xsl:apply-templates select="liberator:description"/>
<html:div style="clear: both;"/>
</xsl:copy>
</xsl:template>
<xsl:template match="liberator:spec[preceding-sibling::liberator:spec]" mode="pass-2">
<html:div style="clear: both;"/>
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template match="liberator:default[not(@type='plain')]" mode="pass-2">
<xsl:variable name="type" select="preceding-sibling::liberator:type[1] | following-sibling::liberator:type[1]"/>
<xsl:copy>
@@ -146,12 +170,6 @@
</form>
</xsl:template>
<xsl:template match="liberator:tag|@tag" mode="pass-2">
<xsl:call-template name="parse-tags">
<xsl:with-param name="text"><xsl:value-of select="."/></xsl:with-param>
</xsl:call-template>
</xsl:template>
<!-- This does't work. Why?
<xsl:include href="chrome://liberator/content/overlay.xsl"/>
-->