[gnome-doc-utils/mallard: 42/87] Adjusting styling for page links and lists
- From: Shaun McCance <shaunm src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-doc-utils/mallard: 42/87] Adjusting styling for page links and lists
- Date: Sun, 19 Apr 2009 12:17:52 -0400 (EDT)
commit cefe594f1a12c775935e08082768058e21e13b05
Author: Shaun McCance <shaunm gnome org>
Date: Thu Nov 13 16:25:54 2008 -0600
Adjusting styling for page links and lists
---
xslt/mallard/html/mal2html-css.xsl | 20 +++-----
xslt/mallard/html/mal2html-list.xsl | 10 ++++
xslt/mallard/html/mal2html-page.xsl | 94 +++++++++++++++++------------------
3 files changed, 63 insertions(+), 61 deletions(-)
diff --git a/xslt/mallard/html/mal2html-css.xsl b/xslt/mallard/html/mal2html-css.xsl
index 1eb8709..79efa89 100644
--- a/xslt/mallard/html/mal2html-css.xsl
+++ b/xslt/mallard/html/mal2html-css.xsl
@@ -122,7 +122,7 @@ body.status-review { background-color: </xsl:text>
div.version {
margin: 0 0 1em 0;
padding: 0.5em 1em 0.5em 1em;
- max-width: 60em;
+ max-width: 48em;
border: solid 1px </xsl:text>
<xsl:call-template name="theme.get_color">
<xsl:with-param name="id" select="'gray-border'"/>
@@ -140,7 +140,7 @@ div.version p.version {
div.body {
margin: 0;
padding: 1em;
- max-width: 60em;
+ max-width: 48em;
min-height: 20em;
border: solid 1px </xsl:text>
<xsl:call-template name="theme.get_color">
@@ -154,7 +154,7 @@ div.body {
<xsl:text>;
}
div.copyrights {
- max-width: 60em;
+ max-width: 48em;
text-align: center;
color: </xsl:text>
<xsl:call-template name="theme.get_color">
@@ -222,16 +222,10 @@ div.pagelink:hover {
<xsl:text>;
}
-ul.seealsolinks {
- margin: 0; padding: 0;
-}
-li.seealsolink {
- margin-left: 1.44em;
-}
-li.seealsolinksep {
- margin: 0.5em 0 0.5em 1.44em;
+div.pagelinksep {
+ margin: 0.5em;
list-style-type: none;
- max-width: 12em;
+ max-width: 24em;
border-bottom: solid 1px </xsl:text>
<xsl:call-template name="theme.get_color">
<xsl:with-param name="id" select="'gray-border'"/>
@@ -239,7 +233,7 @@ li.seealsolinksep {
<xsl:text>;
}
-div, pre, p { margin: 1em 0 0 0; padding: 0; }
+div, pre, p, li { margin: 1em 0 0 0; padding: 0; }
.first-child { margin-top: 0; }
a {
text-decoration: none;
diff --git a/xslt/mallard/html/mal2html-list.xsl b/xslt/mallard/html/mal2html-list.xsl
index 18b5e98..5e5093b 100644
--- a/xslt/mallard/html/mal2html-list.xsl
+++ b/xslt/mallard/html/mal2html-list.xsl
@@ -74,6 +74,11 @@ ul.list-tree ul.list-tree li {
<xsl:template mode="mal2html.list.bullet.mode" match="mal:item">
<li>
+ <xsl:if test="not(preceding-sibling::mal:item)">
+ <xsl:attribute name="class">
+ <xsl:text>first-child</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
<xsl:apply-templates mode="mal2html.block.mode"/>
</li>
</xsl:template>
@@ -95,6 +100,11 @@ ul.list-tree ul.list-tree li {
<xsl:template mode="mal2html.list.tree.mode" match="mal:item">
<li>
+ <xsl:if test="not(preceding-sibling::mal:item)">
+ <xsl:attribute name="class">
+ <xsl:text>first-child</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
<p>
<xsl:apply-templates mode="mal2html.inline.mode"
select="*[not(self::mal:item)]"/>
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index 50da8a2..a68cd1a 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -213,62 +213,60 @@ REMARK: Describe this template
</xsl:element>
</div>
<div class="seealsolinks">
- <ul class="seealsolinks">
- <xsl:for-each select="$pagelinks">
- <xsl:call-template name="mal2html.page.seealsolink">
+ <xsl:for-each select="$pagelinks">
+ <xsl:call-template name="mal2html.page.pagelink">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="page" select="."/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <!-- FIXME: exclude pagelinks -->
+ <xsl:for-each select="$guidelinks">
+ <xsl:variable name="linkid">
+ <xsl:choose>
+ <xsl:when test="contains(@xref, '#')">
+ <xsl:value-of select="@xref"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat(@xref, '#', @xref)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:for-each select="$cache">
+ <xsl:call-template name="mal2html.page.pagelink">
<xsl:with-param name="node" select="$node"/>
- <xsl:with-param name="page" select="."/>
+ <xsl:with-param name="page" select="key('cache_key', $linkid)"/>
</xsl:call-template>
</xsl:for-each>
- <!-- FIXME: exclude pagelinks -->
- <xsl:for-each select="$guidelinks">
- <xsl:variable name="linkid">
- <xsl:choose>
- <xsl:when test="contains(@xref, '#')">
- <xsl:value-of select="@xref"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat(@xref, '#', @xref)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:for-each select="$cache">
- <xsl:call-template name="mal2html.page.seealsolink">
- <xsl:with-param name="node" select="$node"/>
- <xsl:with-param name="page" select="key('cache_key', $linkid)"/>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:for-each>
+ </xsl:for-each>
- <xsl:if test="($pagelinks or $guidelinks) and ($inlinks or $outlinks)">
- <li class="seealsolinksep"/>
- </xsl:if>
+ <xsl:if test="($pagelinks or $guidelinks) and ($inlinks or $outlinks)">
+ <div class="pagelinksep"/>
+ </xsl:if>
- <xsl:for-each select="$inlinks">
- <xsl:call-template name="mal2html.page.seealsolink">
+ <xsl:for-each select="$inlinks">
+ <xsl:call-template name="mal2html.page.pagelink">
+ <xsl:with-param name="node" select="$node"/>
+ <xsl:with-param name="page" select="."/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <xsl:for-each select="$outlinks">
+ <xsl:variable name="linkid">
+ <xsl:choose>
+ <xsl:when test="contains(@xref, '#')">
+ <xsl:value-of select="@xref"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat(@xref, '#', @xref)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:for-each select="$cache">
+ <xsl:call-template name="mal2html.page.pagelink">
<xsl:with-param name="node" select="$node"/>
- <xsl:with-param name="page" select="."/>
+ <xsl:with-param name="page" select="key('cache_key', $linkid)"/>
</xsl:call-template>
</xsl:for-each>
- <xsl:for-each select="$outlinks">
- <xsl:variable name="linkid">
- <xsl:choose>
- <xsl:when test="contains(@xref, '#')">
- <xsl:value-of select="@xref"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat(@xref, '#', @xref)"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:for-each select="$cache">
- <xsl:call-template name="mal2html.page.seealsolink">
- <xsl:with-param name="node" select="$node"/>
- <xsl:with-param name="page" select="key('cache_key', $linkid)"/>
- </xsl:call-template>
- </xsl:for-each>
- </xsl:for-each>
- </ul>
+ </xsl:for-each>
</div>
</div>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]