[yelp-xsl] Added "lead" style hint for paragraphs in db and mal
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-xsl] Added "lead" style hint for paragraphs in db and mal
- Date: Tue, 13 Aug 2013 04:07:55 +0000 (UTC)
commit 55e2072fc866a6c45b77557700eeffbd78f7f13b
Author: Shaun McCance <shaunm gnome org>
Date: Tue Aug 13 00:06:48 2013 -0400
Added "lead" style hint for paragraphs in db and mal
xslt/common/html.xsl | 1 +
xslt/docbook/html/db2html-block.xsl | 7 ++++++-
xslt/mallard/html/mal2html-block.xsl | 10 +++++++++-
3 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/xslt/common/html.xsl b/xslt/common/html.xsl
index d157220..d2ab7dd 100644
--- a/xslt/common/html.xsl
+++ b/xslt/common/html.xsl
@@ -757,6 +757,7 @@ li > *:first-child { margin-top: 0; }
div.inner, div.region, div.contents, pre.contents { margin-top: 0; }
pre.contents div { margin-top: 0 !important; }
p img { vertical-align: middle; }
+p.lead { font-size: 1.2em; }
div.clear {
margin: 0; padding: 0;
height: 0; line-height: 0;
diff --git a/xslt/docbook/html/db2html-block.xsl b/xslt/docbook/html/db2html-block.xsl
index ad21f49..d422d38 100644
--- a/xslt/docbook/html/db2html-block.xsl
+++ b/xslt/docbook/html/db2html-block.xsl
@@ -278,7 +278,12 @@ This template handles conditional processing.
<p>
<xsl:call-template name="html.class.attr">
<xsl:with-param name="node" select="$node"/>
- <xsl:with-param name="class" select="$class"/>
+ <xsl:with-param name="class">
+ <xsl:value-of select="$class"/>
+ <xsl:if test="contains(concat(' ', $node/@role, ' '), ' lead ')">
+ <xsl:text> lead</xsl:text>
+ </xsl:if>
+ </xsl:with-param>
</xsl:call-template>
<xsl:call-template name="html.lang.attrs">
<xsl:with-param name="node" select="$node"/>
diff --git a/xslt/mallard/html/mal2html-block.xsl b/xslt/mallard/html/mal2html-block.xsl
index 93b66cf..7ad82dc 100644
--- a/xslt/mallard/html/mal2html-block.xsl
+++ b/xslt/mallard/html/mal2html-block.xsl
@@ -52,7 +52,12 @@ syntax highlighting support based on the #{mime} attribute of ${node}.
<xsl:template name="mal2html.pre">
<xsl:param name="node" select="."/>
<xsl:param name="numbered" select="contains(concat(' ', @style, ' '), 'numbered')"/>
- <xsl:variable name="if"><xsl:call-template name="mal.if.test"/></xsl:variable><xsl:if test="$if != ''">
+ <xsl:variable name="if">
+ <xsl:call-template name="mal.if.test">
+ <xsl:with-param name="node" select="$node"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <xsl:if test="$if != ''">
<xsl:variable name="first" select="$node/node()[1]/self::text()"/>
<xsl:variable name="last" select="$node/node()[last()]/self::text()"/>
<div>
@@ -476,6 +481,9 @@ in accordance with the Mallard specification on fallback block content.
<xsl:call-template name="html.class.attr">
<xsl:with-param name="class">
<xsl:text>p</xsl:text>
+ <xsl:if test="contains(concat(' ', @style, ' '), ' lead ')">
+ <xsl:text> lead</xsl:text>
+ </xsl:if>
<xsl:if test="$if != 'true'">
<xsl:text> if-if </xsl:text>
<xsl:value-of select="$if"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]