diff options
Diffstat (limited to 'stylesheets')
-rw-r--r-- | stylesheets/Makefile.am | 2 | ||||
-rw-r--r-- | stylesheets/db2html.xsl.in | 16 | ||||
-rw-r--r-- | stylesheets/info2html.xsl | 82 | ||||
-rw-r--r-- | stylesheets/man2html.xsl | 44 |
4 files changed, 121 insertions, 23 deletions
diff --git a/stylesheets/Makefile.am b/stylesheets/Makefile.am index 014bf126..45aed593 100644 --- a/stylesheets/Makefile.am +++ b/stylesheets/Makefile.am @@ -2,6 +2,6 @@ xsldir=$(datadir)/sgml/docbook/yelp -xsl_DATA = db2html.xsl man2html.xsl toc2html.xsl +xsl_DATA = db2html.xsl info2html.xsl man2html.xsl toc2html.xsl EXTRA_DIST=$(xsl_DATA) diff --git a/stylesheets/db2html.xsl.in b/stylesheets/db2html.xsl.in index d0c6cd7c..cbd46dc1 100644 --- a/stylesheets/db2html.xsl.in +++ b/stylesheets/db2html.xsl.in @@ -105,25 +105,15 @@ <xsl:template name="db2html.css.custom"> <xsl:text> h1 + div h2[class~="title"] { margin-top: 2em; } - h1 { color: </xsl:text> - <xsl:value-of select="$yelp.color.selected1"/><xsl:text>; } - h2 { color: </xsl:text> - <xsl:value-of select="$yelp.color.selected1"/><xsl:text>; } - h3 { color: </xsl:text> - <xsl:value-of select="$yelp.color.selected1"/><xsl:text>; } - h4 { color: </xsl:text> - <xsl:value-of select="$yelp.color.selected1"/><xsl:text>; } - h5 { color: </xsl:text> - <xsl:value-of select="$yelp.color.selected1"/><xsl:text>; } - h6 { color: </xsl:text> - <xsl:value-of select="$yelp.color.selected1"/><xsl:text>; } - h7 { color: </xsl:text> + h1, h2, h3, h4, h5, h6, h7 { color: </xsl:text> <xsl:value-of select="$yelp.color.selected1"/><xsl:text>; } + h3 span[class~="title"] { border-bottom: none; } h4 span[class~="title"] { border-bottom: none; } h5 span[class~="title"] { border-bottom: none; } h6 span[class~="title"] { border-bottom: none; } h7 span[class~="title"] { border-bottom: none; } + div[class~="admonition"] { color: </xsl:text> <xsl:value-of select="$yelp.color.base3"/><xsl:text>; } div[class~="programlisting"] { diff --git a/stylesheets/info2html.xsl b/stylesheets/info2html.xsl new file mode 100644 index 00000000..a0401d1f --- /dev/null +++ b/stylesheets/info2html.xsl @@ -0,0 +1,82 @@ +<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- --> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:yelp="http://www.gnome.org/yelp/ns" + xmlns="http://www.w3.org/1999/xhtml" + extension-element-prefixes="yelp" + version="1.0"> + +<xsl:param name="stylesheet_path" select="''"/> + +<xsl:param name="yelp.icon.blockquote"/> +<xsl:param name="yelp.icon.caution"/> +<xsl:param name="yelp.icon.important"/> +<xsl:param name="yelp.icon.note"/> +<xsl:param name="yelp.icon.programlisting"/> +<xsl:param name="yelp.icon.tip"/> +<xsl:param name="yelp.icon.warning"/> + +<xsl:param name="yelp.color.text"/> +<xsl:param name="yelp.color.anchor"/> +<xsl:param name="yelp.color.background"/> +<xsl:param name="yelp.color.rule"/> +<xsl:param name="yelp.color.base0"/> +<xsl:param name="yelp.color.base1"/> +<xsl:param name="yelp.color.base2"/> +<xsl:param name="yelp.color.base3"/> +<xsl:param name="yelp.color.selected0"/> +<xsl:param name="yelp.color.selected1"/> +<xsl:param name="yelp.color.selected2"/> +<xsl:param name="yelp.color.selected3"/> + +<xsl:template match="/"> + <yelp:document href="index"> + <html> + <head> + <title> + <xsl:text>FOO</xsl:text> + </title> + <style type="text/css"> + <xsl:call-template name="html.css"/> + </style> + </head> + <body> + <pre class="body"> + <xsl:value-of select="."/> + </pre> + </body> + </html> + </yelp:document> +</xsl:template> + +<xsl:template name="html.css"><xsl:text> +h1 { font-size: 1.6em; font-weight: bold; } +h2 { font-size: 1.4em; font-weight: bold; } +h3 { font-size: 1.2em; font-weight: bold; } + +h1, h2, h3, h4, h5, h6, h7 { color: </xsl:text> +<xsl:value-of select="$yelp.color.selected1"/><xsl:text>; } + +body { margin: 0em; padding: 0em; } +pre[class~="body"] { +margin-left: 0.8em; +margin-right: 0.8em; +margin-bottom: 1.6em; +} + +p, div { margin: 0em; } +p + *, div + *, { margin-top: 1em; } + +dl { margin: 0em; } +dl dd + dt { margin-top: 1em; } +dl dd { + margin-top: 0.5em; + margin-left: 2em; + margin-right: 1em; +} +ol { margin-left: 2em; } +ul { margin-left: 2em; } +ul li { margin-right: 1em; } +</xsl:text></xsl:template> + +</xsl:stylesheet> diff --git a/stylesheets/man2html.xsl b/stylesheets/man2html.xsl index a089827f..3ab5cdc5 100644 --- a/stylesheets/man2html.xsl +++ b/stylesheets/man2html.xsl @@ -1,15 +1,33 @@ <?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:exsl="http://exslt.org/common" xmlns:yelp="http://www.gnome.org/yelp/ns" xmlns="http://www.w3.org/1999/xhtml" - extension-element-prefixes="exsl yelp" + extension-element-prefixes="yelp" version="1.0"> <xsl:param name="stylesheet_path" select="''"/> -<xsl:param name="color_gray_background" select="'#E6E6E6'"/> -<xsl:param name="color_gray_border" select="'#A1A1A1'"/> + +<xsl:param name="yelp.icon.blockquote"/> +<xsl:param name="yelp.icon.caution"/> +<xsl:param name="yelp.icon.important"/> +<xsl:param name="yelp.icon.note"/> +<xsl:param name="yelp.icon.programlisting"/> +<xsl:param name="yelp.icon.tip"/> +<xsl:param name="yelp.icon.warning"/> + +<xsl:param name="yelp.color.text"/> +<xsl:param name="yelp.color.anchor"/> +<xsl:param name="yelp.color.background"/> +<xsl:param name="yelp.color.rule"/> +<xsl:param name="yelp.color.base0"/> +<xsl:param name="yelp.color.base1"/> +<xsl:param name="yelp.color.base2"/> +<xsl:param name="yelp.color.base3"/> +<xsl:param name="yelp.color.selected0"/> +<xsl:param name="yelp.color.selected1"/> +<xsl:param name="yelp.color.selected2"/> +<xsl:param name="yelp.color.selected3"/> <xsl:template match="Man"> <xsl:choose> @@ -48,6 +66,9 @@ h1 { font-size: 1.6em; font-weight: bold; } h2 { font-size: 1.4em; font-weight: bold; } h3 { font-size: 1.2em; font-weight: bold; } +h1, h2, h3, h4, h5, h6, h7 { color: </xsl:text> +<xsl:value-of select="$yelp.color.selected1"/><xsl:text>; } + div[class~="SH"] { margin-left: 1.2em; } div[class~="SS"] { margin-left: 1.6em; } @@ -61,13 +82,18 @@ margin-bottom: 1.6em; } p, div { margin: 0em; } -p + p, p + div, div + p, div + div { margin-top: 0.8em; } +p + *, div + * { margin-top: 1em; } dl { margin: 0em; } -ol { margin: 0em; } -ul { margin: 0em; } -ul li { padding-left: 0.4em; } -dd + dt { margin-top: 1.6em; } +dl dd + dt { margin-top: 1em; } +dl dd { + margin-top: 0.5em; + margin-left: 2em; + margin-right: 1em; +} +ol { margin-left: 2em; } +ul { margin-left: 2em; } +ul li { margin-right: 1em; } </xsl:text></xsl:template> <!-- ======================================================================= --> |