[yelp-xsl] Style work on previous/next links
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-xsl] Style work on previous/next links
- Date: Sat, 20 Jul 2013 14:58:44 +0000 (UTC)
commit 77c42cd89b6ba007a0532ea4f76352ed101f9dc4
Author: Shaun McCance <shaunm gnome org>
Date: Sat Jul 20 10:58:30 2013 -0400
Style work on previous/next links
xslt/common/html.xsl | 53 +++++++++++++++++++++++++--------
xslt/dita/html/dita2html-topic.xsl | 3 --
xslt/docbook/html/db2html-links.xsl | 3 --
xslt/mallard/html/mal2html-links.xsl | 3 --
xslt/mallard/html/mal2html-page.xsl | 3 ++
5 files changed, 43 insertions(+), 22 deletions(-)
---
diff --git a/xslt/common/html.xsl b/xslt/common/html.xsl
index aa12991..d157220 100644
--- a/xslt/common/html.xsl
+++ b/xslt/common/html.xsl
@@ -976,24 +976,51 @@ div.sectionlinks div.sectionlinks li {
padding-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 1.44em;
}
div.nextlinks {
+ font-size: 1.2em;
margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 1.2em;
float: </xsl:text><xsl:value-of select="$right"/><xsl:text>;
clear: both;
}
-a.nextlinks-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>;
- vertical-align: bottom;
+div.nextlinks a {
+ background-color: </xsl:text><xsl:value-of select="$color.gray_background"/><xsl:text>;
+ display: inline-block;
+ position: relative;
+ height: 1.44em;
+ padding: 0.2em 0.83em;
+ margin-bottom: 1em;
+}
+a.nextlinks-prev { margin-</xsl:text><xsl:value-of select="$left"/><xsl:text>: 0.72em; }
+a.nextlinks-next { margin-</xsl:text><xsl:value-of select="$right"/><xsl:text>: 0.72em; }
+a.nextlinks-prev:after, a.nextlinks-next:after {
+ border: solid transparent;
+ content: " ";
+ position: absolute;
+ height: 0; width: 0;
+ border-width: 0.92em;
+ top: 50%;
+ margin-top: -0.92em;
+}
+a.nextlinks-prev:after {
+ </xsl:text><xsl:value-of select="$right"/><xsl:text>: 100%;
+ border-</xsl:text><xsl:value-of select="$right"/><xsl:text>-color: </xsl:text>
+ <xsl:value-of select="$color.gray_background"/><xsl:text>;
}
-a.nextlinks-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>;
+a.nextlinks-next:after {
+ </xsl:text><xsl:value-of select="$left"/><xsl:text>: 100%;
+ border-</xsl:text><xsl:value-of select="$left"/><xsl:text>-color: </xsl:text>
+ <xsl:value-of select="$color.gray_background"/><xsl:text>;
+}
+div.nextlinks a:hover {
+border: none;
+ background: </xsl:text><xsl:value-of select="$color.blue_background"/><xsl:text>
+}
+a.nextlinks-prev:hover:after {
+ border-</xsl:text><xsl:value-of select="$right"/><xsl:text>-color: </xsl:text>
+ <xsl:value-of select="$color.blue_background"/><xsl:text>
+}
+a.nextlinks-next:hover:after {
+ border-</xsl:text><xsl:value-of select="$left"/><xsl:text>-color: </xsl:text>
+ <xsl:value-of select="$color.blue_background"/><xsl:text>
}
div.serieslinks {
display: inline-block;
diff --git a/xslt/dita/html/dita2html-topic.xsl b/xslt/dita/html/dita2html-topic.xsl
index 3bf35b6..2427540 100644
--- a/xslt/dita/html/dita2html-topic.xsl
+++ b/xslt/dita/html/dita2html-topic.xsl
@@ -98,9 +98,6 @@ REMARK: Describe this module
</xsl:call-template>
</a>
</xsl:if>
- <xsl:if test="$prev and $next">
- <xsl:text>  |  </xsl:text>
- </xsl:if>
<xsl:if test="$next">
<a class="nextlinks-next">
<xsl:attribute name="href">
diff --git a/xslt/docbook/html/db2html-links.xsl b/xslt/docbook/html/db2html-links.xsl
index 0700b53..0641f81 100644
--- a/xslt/docbook/html/db2html-links.xsl
+++ b/xslt/docbook/html/db2html-links.xsl
@@ -135,9 +135,6 @@ and "Next", although the actual page titles are used for tooltips.
</xsl:call-template>
</a>
</xsl:if>
- <xsl:if test="$prev_id != '' and $next_id != ''">
- <xsl:text>  |  </xsl:text>
- </xsl:if>
<xsl:if test="$next_id != ''">
<a class="nextlinks-next">
<xsl:attribute name="href">
diff --git a/xslt/mallard/html/mal2html-links.xsl b/xslt/mallard/html/mal2html-links.xsl
index 00b4bb0..67b494e 100644
--- a/xslt/mallard/html/mal2html-links.xsl
+++ b/xslt/mallard/html/mal2html-links.xsl
@@ -435,9 +435,6 @@ calling functions in !{mal2html-page}.
</xsl:for-each>
</a>
</xsl:if>
- <xsl:if test="$prev and $next">
- <xsl:text>  |  </xsl:text>
- </xsl:if>
<xsl:if test="$next">
<a class="nextlinks-next">
<xsl:attribute name="href">
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index 015c625..fbec693 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -758,6 +758,9 @@ templates that handle #{page} and #{section} elements.
<xsl:for-each select="mal:section">
<xsl:call-template name="mal2html.section"/>
</xsl:for-each>
+ <xsl:if test="self::mal:page and not(mal:links[ type = 'prevnext'])">
+ <xsl:call-template name="mal2html.links.prevnext"/>
+ </xsl:if>
<xsl:variable name="postlinks" select="mal:section/following-sibling::mal:links"/>
<xsl:if test="(not(mal:section) and (
($guidenodes and not(mal:links[ type = 'guide']))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]