Commit e692616a authored by Shaun McCance's avatar Shaun McCance

[info2html.xsl] Using common CSS for info documents

parent 9562d018
......@@ -86,6 +86,7 @@ Makefile.in
/stamp-h1
/stylesheets/db-title.xsl
/stylesheets/db2html.xsl
/stylesheets/info2html.xsl
/stylesheets/mal2html.xsl
/stylesheets/toc2html.xsl
/stylesheets/yelp-common.xsl
......
......@@ -91,6 +91,13 @@ AC_SUBST(XSL_DB2XHTML)
XSL_MAL2XHTML="`$PKG_CONFIG --variable=mal2xhtml yelp-xsl`"
AC_SUBST(XSL_MAL2XHTML)
XSL_THEME_COLORS="`$PKG_CONFIG --variable=xsltdir yelp-xsl`/theme/theme-colors.xsl"
AC_SUBST(XSL_THEME_COLORS)
XSL_THEME_ICONS="`$PKG_CONFIG --variable=xsltdir yelp-xsl`/theme/theme-icons.xsl"
AC_SUBST(XSL_THEME_ICONS)
XSL_THEME_HTML="`$PKG_CONFIG --variable=xsltdir yelp-xsl`/theme/theme-html.xsl"
AC_SUBST(XSL_THEME_HTML)
XSL_GETTEXT="`$PKG_CONFIG --variable=gettext yelp-xsl`"
AC_SUBST(XSL_GETTEXT)
......@@ -268,6 +275,7 @@ src/Makefile
stylesheets/Makefile
stylesheets/db2html.xsl
stylesheets/db-title.xsl
stylesheets/info2html.xsl
stylesheets/mal2html.xsl
stylesheets/toc2html.xsl
stylesheets/yelp-common.xsl
......
......@@ -12,4 +12,11 @@ xsl_DATA = \
toc2html.xsl \
yelp-common.xsl
EXTRA_DIST=$(xsl_DATA) db2html.xsl.in db-title.xsl.in mal2html.xsl.in toc2html.xsl.in yelp-common.xsl.in
EXTRA_DIST= \
$(xsl_DATA) \
db2html.xsl.in \
db-title.xsl.in \
info2html.xsl.in \
mal2html.xsl.in \
toc2html.xsl.in \
yelp-common.xsl.in
......@@ -6,29 +6,11 @@
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="theme.color.text"/>
<xsl:param name="theme.color.background"/>
<xsl:param name="theme.color.text_light"/>
<xsl:param name="theme.color.link"/>
<xsl:param name="theme.color.link_visited"/>
<xsl:param name="theme.color.gray_background"/>
<xsl:param name="theme.color.gray_border"/>
<xsl:param name="theme.color.blue_background"/>
<xsl:param name="theme.color.blue_border"/>
<xsl:param name="theme.color.red_background"/>
<xsl:param name="theme.color.red_border"/>
<xsl:param name="theme.color.yellow_background"/>
<xsl:param name="theme.color.yellow_border"/>
<xsl:import href="@XSL_GETTEXT@"/>
<xsl:import href="@XSL_THEME_COLORS@"/>
<xsl:import href="@XSL_THEME_ICONS@"/>
<xsl:import href="@XSL_THEME_HTML@"/>
<xsl:include href="yelp-common.xsl"/>
<xsl:template match="/Info">
<xsl:apply-templates select="Section"/>
......@@ -46,9 +28,11 @@
</style>
</head>
<body>
<pre class="body">
<div class="head"/>
<div class="body">
<xsl:apply-templates select="node()[not(self::Section)]"/>
</pre>
</div>
<div class="foot"/>
</body>
</html>
</yelp:document>
......@@ -71,17 +55,21 @@
<xsl:template match="a">
<xsl:element name="a">
<xsl:attribute name="href"> <xsl:value-of select="@href"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:value-of select="@href"/>
</xsl:attribute>
<xsl:value-of select="node()"/>
</xsl:element>
</xsl:template>
<xsl:template match="img">
<xsl:element name="a">
<xsl:attribute name="href"> <xsl:value-of select="@src"/></xsl:attribute>
<xsl:element name="img">
<xsl:attribute name="src"> <xsl:value-of select="@src"/></xsl:attribute>
</xsl:element>
<xsl:attribute name="href">
<xsl:value-of select="@src"/>
</xsl:attribute>
<xsl:element name="img">
<xsl:attribute name="src"> <xsl:value-of select="@src"/></xsl:attribute>
</xsl:element>
</xsl:element>
</xsl:template>
......@@ -93,35 +81,11 @@
<xsl:apply-templates select="node()[not(self::noteholder)]"/>
</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="$theme.color.text"/><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; }
img { border: none; }
</xsl:text></xsl:template>
<xsl:template name="html.css">
<xsl:call-template name="theme.html.css"/>
<xsl:text>
body { white-space: pre; font-family: monospace; }
</xsl:text>
</xsl:template>
</xsl:stylesheet>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment