[yelp-xsl] mal2html-ui: Captions for overlays and thumbs



commit 1d6fddc39c940e34e14a6ddb05f8464e770516c2
Author: Shaun McCance <shaunm gnome org>
Date:   Mon Nov 5 10:29:17 2012 -0500

    mal2html-ui: Captions for overlays and thumbs

 xslt/mallard/html/mal2html-page.xsl |    8 +++++++-
 xslt/mallard/html/mal2html-ui.xsl   |   18 ++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index f7dad52..0b6ca28 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -945,7 +945,9 @@ div.ui-overlay > div.inner {
   -moz-border-radius: 6px;
   -webkit-border-radius: 6px;
   border-radius: 6px;
+  text-align: </xsl:text><xsl:value-of select="$left"/><xsl:text>;
 }
+div.ui-overlay > div.inner > div.title { margin-top: -4px; }
 a.ui-overlay-close {
   display: block;
   float: </xsl:text><xsl:value-of select="$right"/><xsl:text>;
@@ -1008,7 +1010,11 @@ div.ui-tile > a > span.ui-tile-text > span.title {
   font-weight: bold;
 }
 div.ui-tile-side > a > span.ui-tile-text > span.title { margin-top: 0; }
-div.ui-tile > a > span.ui-tile-text > span.desc { display: block; }
+div.ui-tile > a > span.ui-tile-text > span.desc {
+  display: block;
+  margin: 0.2em 0 0 0;
+  color: </xsl:text><xsl:value-of select="$color.text_light"/><xsl:text>;
+}
 span.ui-tile-img { text-align: center; }
 
 div.links-ui-hover {
diff --git a/xslt/mallard/html/mal2html-ui.xsl b/xslt/mallard/html/mal2html-ui.xsl
index 37a1e00..8971b78 100644
--- a/xslt/mallard/html/mal2html-ui.xsl
+++ b/xslt/mallard/html/mal2html-ui.xsl
@@ -541,6 +541,22 @@ ${node} element.
           </xsl:otherwise>
         </xsl:choose>
       </span>
+      <xsl:if test="$media/uix:thumb/uix:caption">
+        <span class="ui-tile-text" style="max-width: {2 * number($width)}px;">
+          <xsl:if test="$media/uix:thumb/uix:caption/mal:title">
+            <span class="title">
+              <xsl:apply-templates mode="mal2html.inline.mode"
+                                   select="$media/uix:thumb/uix:caption/mal:title[1]/node()"/>
+            </span>
+          </xsl:if>
+          <xsl:if test="$media/uix:thumb/uix:caption/mal:desc">
+            <span class="desc">
+              <xsl:apply-templates mode="mal2html.inline.mode"
+                                   select="$media/uix:thumb/uix:caption/mal:desc[1]/node()"/>
+            </span>
+          </xsl:if>
+        </span>
+      </xsl:if>
     </a>
     <div class="ui-overlay">
       <div class="inner">
@@ -552,9 +568,11 @@ ${node} element.
           </xsl:attribute>
           <xsl:text>â</xsl:text>
         </a>
+        <xsl:apply-templates mode="mal2html.block.mode" select="uix:caption/mal:title[1]"/>
         <div class="contents">
           <xsl:apply-templates mode="mal2html.block.mode" select="$media"/>
         </div>
+        <xsl:apply-templates mode="mal2html.block.mode" select="uix:caption/mal:desc[1]"/>
       </div>
     </div>
   </div>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]