[yelp-xsl] [mallard/html] Doc updates and moved CSS to mal2html-page.xsl
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-xsl] [mallard/html] Doc updates and moved CSS to mal2html-page.xsl
- Date: Fri, 4 Jun 2010 22:19:05 +0000 (UTC)
commit aa7e09f4bd813e5618bb32036e37a7d6fb583850
Author: Shaun McCance <shaunm gnome org>
Date: Fri Jun 4 17:09:49 2010 -0500
[mallard/html] Doc updates and moved CSS to mal2html-page.xsl
xslt/mallard/html/Makefile.am | 1 -
xslt/mallard/html/mal2html-css.xsl | 212 -----------------------------------
xslt/mallard/html/mal2html-list.xsl | 22 +++-
xslt/mallard/html/mal2html-page.xsl | 182 ++++++++++++++++++++++++++++++
4 files changed, 201 insertions(+), 216 deletions(-)
---
diff --git a/xslt/mallard/html/Makefile.am b/xslt/mallard/html/Makefile.am
index b8dfbe8..f1ff895 100644
--- a/xslt/mallard/html/Makefile.am
+++ b/xslt/mallard/html/Makefile.am
@@ -2,7 +2,6 @@ xsldir=$(datadir)/yelp-xsl/xslt/mallard/html
xsl_DATA = \
mal2html-block.xsl \
- mal2html-css.xsl \
mal2html-inline.xsl \
mal2html-list.xsl \
mal2html-media.xsl \
diff --git a/xslt/mallard/html/mal2html-list.xsl b/xslt/mallard/html/mal2html-list.xsl
index 6989fda..1cbe4db 100644
--- a/xslt/mallard/html/mal2html-list.xsl
+++ b/xslt/mallard/html/mal2html-list.xsl
@@ -23,9 +23,13 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
version="1.0">
<!--!!==========================================================================
-Mallard to HTML - List Elements
+Mallard to HTML - Lists
+Handle Mallard list elements.
+:Revision: version="1.0" date="2010-06-04" status="final"
-REMARK: Describe this module
+This stylesheet contains templates for the #{list}, #{steps}, #{terms}, and
+#{tree} elements in %{mal2html.block.mode}. It handles the parent list elements,
+as well as any special processing for child #{item} elements.
-->
<!-- = list = -->
@@ -143,7 +147,19 @@ REMARK: Describe this module
</div>
</xsl:template>
-<!-- = tree/item = -->
+<!--%%==========================================================================
+mal2html.tree.mode
+Process an #{item} element inside a #{tree}.
+:Revision: version="1.0" date="2010-06-04" status="final"
+$lines: Whether to draw lines indicating hierarchy.
+$prefix: The line markers used by the parent #{item}.
+
+This mode is used for processing #{item} elements in #{tree} elements. It is
+applied by the template for #{tree} and recursively calls itself. If the parent
+#{tree} has the style hint #{"lines"}, the ${lines} parameter will be #{true}.
+In this case, this template calculates a prefix based on its position and
+neighboring #{item} elements, and passes that prefix to child elements.
+-->
<xsl:template mode="mal2html.tree.mode" match="mal:item">
<xsl:param name="lines" select="false()"/>
<xsl:param name="prefix" select="''"/>
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index a7ba1dd..9a1633b 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -625,4 +625,186 @@ FIXE
</xsl:element>
</xsl:template>
+<!--%# html.css.mode -->
+<xsl:template mode="html.css.mode" match="mal:page">
+ <xsl:param name="direction">
+ <xsl:call-template name="l10n.direction"/>
+ </xsl:param>
+ <xsl:param name="left">
+ <xsl:call-template name="l10n.align.start">
+ <xsl:with-param name="direction" select="$direction"/>
+ </xsl:call-template>
+ </xsl:param>
+ <xsl:param name="right">
+ <xsl:call-template name="l10n.align.end">
+ <xsl:with-param name="direction" select="$direction"/>
+ </xsl:call-template>
+ </xsl:param>
+<xsl:text>
+div.floatleft {
+ float: left;
+ margin-top: 0;
+ margin-right: 1em;
+}
+div.floatright {
+ float: right;
+ margin-top: 0;
+ margin-left: 1em;
+}
+
+div.navbar {
+ margin: 0;
+ float: right;
+}
+a.navbar-prev::before {
+ content: '</xsl:text><xsl:choose>
+ <xsl:when test="$left = 'left'"><xsl:text>◀  </xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>▶  </xsl:text></xsl:otherwise>
+ </xsl:choose><xsl:text>';
+ color: </xsl:text><xsl:value-of select="$color.text_light"/><xsl:text>;
+}
+a.navbar-next::after {
+ content: '</xsl:text><xsl:choose>
+ <xsl:when test="$left = 'left'"><xsl:text>  ▶</xsl:text></xsl:when>
+ <xsl:otherwise><xsl:text>  ◀</xsl:text></xsl:otherwise>
+ </xsl:choose><xsl:text>';
+ color: </xsl:text><xsl:value-of select="$color.text_light"/><xsl:text>;
+}
+div.copyrights {
+ text-align: center;
+ color: </xsl:text>
+ <xsl:value-of select="$color.text_light"/><xsl:text>;
+}
+
+div.autolinks ul { margin: 0; padding: 0; }
+div.autolinks div.title { margin: 1em 0 0 1em; }
+div.autolinks div.title span {
+ border-bottom: solid 1px </xsl:text>
+ <xsl:value-of select="$color.gray_border"/><xsl:text>;
+}
+li.autolink { margin: 0.5em 0 0 0; padding: 0 0 0 1em; list-style-type: none; }
+
+table.twocolumn { width: 100%; }
+td.twocolumnleft { width: 48%; vertical-align: top; padding: 0; margin: 0; }
+td.twocolumnright {
+ width: 52%; vertical-align: top;
+ margin: 0; padding: 0;
+ padding-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 1em;
+ -webkit-padding-start: 1em;
+ -webkit-padding-end: 0;
+ -moz-padding-start: 1em;
+ -moz-padding-end: 0;
+}
+
+div.linkdiv div.title {
+ font-size: 1em;
+ color: inherit;
+}
+div.linkdiv div.desc {
+ color: </xsl:text><xsl:value-of select="$color.text_light"/><xsl:text>;
+}
+div.linkdiv {
+ margin: 0;
+ padding: 0.5em;
+ -moz-border-radius: 6px;
+ border: solid 1px </xsl:text>
+ <xsl:value-of select="$color.background"/><xsl:text>;
+}
+a:hover div.linkdiv {
+ text-decoration: none;
+ border-color: </xsl:text>
+ <xsl:value-of select="$color.blue_border"/><xsl:text>;
+ background-color: </xsl:text>
+ <xsl:value-of select="$color.blue_background"/><xsl:text>;
+}
+
+div.example {
+ border-</xsl:text><xsl:value-of select="$left"/><xsl:text>: solid 4px </xsl:text>
+ <xsl:value-of select="$color.gray_border"/><xsl:text>;
+ padding-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 1em;
+}
+
+div.cite-comment {
+ margin-top: 0.5em;
+ color: </xsl:text><xsl:value-of select="$color.text_light"/><xsl:text>;
+}
+
+
+ul.tree {
+ margin: 0; padding: 0;
+ list-style-type: none;
+}
+li.tree { margin: 0; padding: 0; }
+li.tree div { margin: 0; padding: 0; }
+ul.tree ul.tree {
+ margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 1.44em;
+ -webkit-margin-start: 1.44em;
+ -webkit-margin-end: 0;
+ -moz-margin-start: 1.44em;
+ -moz-margin-end: 0;
+}
+div.tree-lines ul.tree { margin-left: 0; }
+
+span.hi {
+ background-color: </xsl:text>
+ <xsl:value-of select="$color.yellow_background"/><xsl:text>;
+}
+</xsl:text>
+<xsl:if test="$mal2html.editor_mode">
+<xsl:text>
+div.version {
+ position: absolute;
+ </xsl:text><xsl:value-of select="$right"/><xsl:text>: 12px;
+ opacity: 0.2;
+ margin-top: -1em;
+ padding: 0.5em 1em 0.5em 1em;
+ max-width: 24em;
+ border: solid 1px </xsl:text>
+ <xsl:value-of select="$color.gray_border"/><xsl:text>;
+ background-color: </xsl:text>
+ <xsl:value-of select="$color.yellow_background"/><xsl:text>;
+}
+div.version:hover { opacity: 0.8; }
+div.version p.version { margin-top: 0.2em; }
+div.linkdiv div.title span.status {
+ font-size: 0.83em;
+ font-weight: normal;
+ padding-left: 0.2em;
+ padding-right: 0.2em;
+ color: </xsl:text>
+ <xsl:value-of select="$color.text_light"/><xsl:text>;
+ border: solid 1px </xsl:text>
+ <xsl:value-of select="$color.red_border"/><xsl:text>;
+}
+div.linkdiv div.title span.status-stub { background-color: </xsl:text>
+ <xsl:value-of select="$color.red_background"/><xsl:text>; }
+div.linkdiv div.title span.status-draft { background-color: </xsl:text>
+ <xsl:value-of select="$color.red_background"/><xsl:text>; }
+div.linkdiv div.title span.status-incomplete { background-color: </xsl:text>
+ <xsl:value-of select="$color.red_background"/><xsl:text>; }
+div.linkdiv div.title span.status-review { background-color: </xsl:text>
+ <xsl:value-of select="$color.yellow_background"/><xsl:text>; }
+div.linkdiv div.desc {
+ margin-top: 0.2em;
+ color: </xsl:text>
+ <xsl:value-of select="$color.text_light"/><xsl:text>;
+}
+div.comment {
+ padding: 0.5em;
+ border: solid 2px </xsl:text>
+ <xsl:value-of select="$color.red_border"/><xsl:text>;
+ background-color: </xsl:text>
+ <xsl:value-of select="$color.red_background"/><xsl:text>;
+}
+div.comment div.comment {
+ margin: 1em 1em 0 1em;
+}
+div.comment div.cite {
+ margin: 0 0 0.5em 0;
+ font-style: italic;
+}
+</xsl:text>
+</xsl:if>
+</xsl:template>
+
</xsl:stylesheet>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]