[yelp-xsl] mal2html-ui: Default overlay thumbs to caption-under
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-xsl] mal2html-ui: Default overlay thumbs to caption-under
- Date: Tue, 6 Nov 2012 04:25:10 +0000 (UTC)
commit 1c4643dd3ca023856ad60144df2f185313212c04
Author: Shaun McCance <shaunm gnome org>
Date: Mon Nov 5 23:24:31 2012 -0500
mal2html-ui: Default overlay thumbs to caption-under
xslt/mallard/html/mal2html-ui.xsl | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/xslt/mallard/html/mal2html-ui.xsl b/xslt/mallard/html/mal2html-ui.xsl
index 8971b78..b0a7f9e 100644
--- a/xslt/mallard/html/mal2html-ui.xsl
+++ b/xslt/mallard/html/mal2html-ui.xsl
@@ -499,7 +499,12 @@ ${node} element.
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <div class="ui-tile ui-tile-side">
+ <xsl:variable name="tiles-side">
+ <xsl:if test="contains(concat(' ', @style, ' '), ' tiles-side ')">
+ <xsl:text>ui-tile-side</xsl:text>
+ </xsl:if>
+ </xsl:variable>
+ <div class="ui-tile {$tiles-side}">
<a href="{$media/@src}" class="ui-overlay">
<span class="ui-tile-img" style="width: {$width}px; height: {$height}px;">
<xsl:choose>
@@ -542,7 +547,19 @@ ${node} element.
</xsl:choose>
</span>
<xsl:if test="$media/uix:thumb/uix:caption">
- <span class="ui-tile-text" style="max-width: {2 * number($width)}px;">
+ <span class="ui-tile-text">
+ <xsl:attribute name="style">
+ <xsl:text>max-width: </xsl:text>
+ <xsl:choose>
+ <xsl:when test="$tiles-side != ''">
+ <xsl:value-of select="2 * number($width)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$width"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>px;</xsl:text>
+ </xsl:attribute>
<xsl:if test="$media/uix:thumb/uix:caption/mal:title">
<span class="title">
<xsl:apply-templates mode="mal2html.inline.mode"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]