[yelp-xsl] [mal2html-page.xsl] Implement e:links for sections
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-xsl] [mal2html-page.xsl] Implement e:links for sections
- Date: Tue, 2 Nov 2010 20:23:15 +0000 (UTC)
commit b65b7883719168163818e5eab1048cb7b1e1e20c
Author: Shaun McCance <shaunm gnome org>
Date: Tue Nov 2 10:37:17 2010 -0400
[mal2html-page.xsl] Implement e:links for sections
xslt/mallard/html/mal2html-page.xsl | 53 +++++++++++++++++++++++++++++------
1 files changed, 44 insertions(+), 9 deletions(-)
---
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index 757a639..93041ce 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -89,11 +89,13 @@ REMARK: Describe this template
</xsl:attribute>
<div class="linkdiv">
<div class="title">
- <xsl:call-template name="mal.link.content">
- <xsl:with-param name="node" select="$source"/>
- <xsl:with-param name="xref" select="$target/@id"/>
- <xsl:with-param name="role" select="'topic'"/>
- </xsl:call-template>
+ <span class="title">
+ <xsl:call-template name="mal.link.content">
+ <xsl:with-param name="node" select="$source"/>
+ <xsl:with-param name="xref" select="$target/@id"/>
+ <xsl:with-param name="role" select="'topic'"/>
+ </xsl:call-template>
+ </span>
<xsl:if test="$mal2html.editor_mode">
<xsl:variable name="page" select="$target/ancestor-or-self::mal:page[1]"/>
@@ -530,7 +532,9 @@ REMARK: Describe this template
<xsl:with-param name="links" select="$topicnodes"/>
</xsl:apply-templates>
</xsl:when>
- <xsl:when test="self::e:links"/>
+ <xsl:when test="self::e:links">
+ <xsl:apply-templates select="."/>
+ </xsl:when>
<xsl:otherwise>
<xsl:apply-templates mode="mal2html.block.mode" select="."/>
</xsl:otherwise>
@@ -655,6 +659,22 @@ REMARK: Describe this template
</xsl:if>
</xsl:template>
+<xsl:template match="e:links[ type = 'section']">
+ <xsl:if test="../mal:section">
+ <div class="links sectionlinks">
+ <xsl:apply-templates mode="mal2html.block.mode" select="mal:title"/>
+ <ul>
+ <xsl:for-each select="../mal:section">
+ <xsl:call-template name="mal2html.page.autolink">
+ <xsl:with-param name="xref" select="concat('#', @id)"/>
+ <xsl:with-param name="role" select="'section'"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </ul>
+ </div>
+ </xsl:if>
+</xsl:template>
+
<!--%%==========================================================================
mal2html.title.mode
@@ -737,15 +757,30 @@ div.copyrights {
<xsl:value-of select="$color.text_light"/><xsl:text>;
}
-div.links div.title { margin: 0 0 0.5em 0; }
-div.sect-links div.links div.title { margin: 1em 0 0.5em 1em; }
-div.links div.title span.title {
+div.links > div.title { margin: 1em 0 0.5em 1em; }
+div.links > div.title > span.title {
border-bottom: solid 1px </xsl:text>
<xsl:value-of select="$color.gray_border"/><xsl:text>;
}
div.links ul { margin: 0; padding: 0; }
li.links { margin: 0.5em 0 0 0; padding: 0 0 0 1em; list-style-type: none; }
+div.sectionlinks {
+ display: inline-block;
+ padding: 0.5em 1em 0.5em 1em;
+ background-color: </xsl:text>
+ <xsl:value-of select="$color.blue_background"/><xsl:text>;
+ border: solid 1px </xsl:text>
+ <xsl:value-of select="$color.blue_border"/><xsl:text>;
+}
+div.sectionlinks div.title { margin: 0; }
+div.sectionlinks ul { margin: 0; }
+div.sectionlinks li { padding: 0; }
+div.sectionlinks div.title span.title {
+ border-bottom: solid 1px </xsl:text>
+ <xsl:value-of select="$color.blue_border"/><xsl:text>;
+}
+
table.twocolumn { width: 100%; }
td.twocolumnleft { width: 48%; vertical-align: top; padding: 0; margin: 0; }
td.twocolumnright {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]