[yelp-xsl] mal2html: Support "button" style on link
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-xsl] mal2html: Support "button" style on link
- Date: Sun, 31 Jul 2011 17:52:59 +0000 (UTC)
commit 443fc67fe8ecda74050508e6715ad3ec32d687e5
Author: Shaun McCance <shaunm gnome org>
Date: Sun Jul 31 13:58:47 2011 -0400
mal2html: Support "button" style on link
xslt/mallard/html/mal2html-inline.xsl | 8 +++++++-
xslt/mallard/html/mal2html-page.xsl | 24 ++++++++++++++++++++++++
2 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/xslt/mallard/html/mal2html-inline.xsl b/xslt/mallard/html/mal2html-inline.xsl
index 1e81f0c..7150a45 100644
--- a/xslt/mallard/html/mal2html-inline.xsl
+++ b/xslt/mallard/html/mal2html-inline.xsl
@@ -245,7 +245,13 @@ an #{xref} or #{href} attribute.
<!-- = link = -->
<xsl:template mode="mal2html.inline.mode" match="mal:link">
- <xsl:call-template name="mal2html.span"/>
+ <xsl:call-template name="mal2html.span">
+ <xsl:with-param name="class">
+ <xsl:if test="contains(concat(' ', @style, ' '), ' button ')">
+ <xsl:text>link-button</xsl:text>
+ </xsl:if>
+ </xsl:with-param>
+ </xsl:call-template>
</xsl:template>
<!-- = link % mal2html.inline.content.mode = -->
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index 35c9f32..e494f1e 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -614,6 +614,30 @@ FIXME
</xsl:call-template>
</xsl:param>
<xsl:text>
+span.link-button a {
+ display: inline-block;
+ background-color: </xsl:text>
+ <xsl:value-of select="$color.blue_border"/><xsl:text>;
+ color: </xsl:text>
+ <xsl:value-of select="$color.background"/><xsl:text>;
+ text-shadow: </xsl:text>
+ <xsl:value-of select="$color.link"/><xsl:text> 1px 1px 0px;
+ border: solid 1px </xsl:text>
+ <xsl:value-of select="$color.link"/><xsl:text>;
+ padding: 0.2em 0.5em 0.2em 0.5em;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ border-radius: 2px;
+}
+span.link-button a:visited {
+ color: </xsl:text>
+ <xsl:value-of select="$color.background"/><xsl:text>;
+}
+span.link-button a:hover {
+ text-decoration: none;
+ color: </xsl:text>
+ <xsl:value-of select="$color.background"/><xsl:text>;
+}
div.floatleft {
float: left;
margin-right: 1em;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]