[yelp/yelp-3-0] [mal2html.xsl] Some styling to revision badges in editor mode



commit c1deeded18c9d0ce72c9362e78eabf7e9b2f14db
Author: Shaun McCance <shaunm gnome org>
Date:   Mon Mar 22 21:58:15 2010 -0500

    [mal2html.xsl] Some styling to revision badges in editor mode

 libyelp/yelp-settings.c     |    2 +-
 stylesheets/mal2html.xsl.in |   24 ++++++++++++++++++++++++
 stylesheets/yelp-common.xsl |    2 ++
 3 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/libyelp/yelp-settings.c b/libyelp/yelp-settings.c
index f74da60..15e7c6b 100644
--- a/libyelp/yelp-settings.c
+++ b/libyelp/yelp-settings.c
@@ -667,7 +667,7 @@ yelp_settings_get_all_params (YelpSettings *settings,
     ix = 2 * (YELP_SETTINGS_NUM_COLORS + YELP_SETTINGS_NUM_ICONS);
     params[ix++] = g_strdup ("theme.icon.admon.size");
     params[ix++] = g_strdup_printf ("%i", yelp_settings_get_icon_size (settings));
-    params[ix++] = g_strdup ("mal2html.editor_mode");
+    params[ix++] = g_strdup ("yelp.editor_mode");
     if (settings->priv->editor_mode)
         params[ix++] = g_strdup ("true()");
     else
diff --git a/stylesheets/mal2html.xsl.in b/stylesheets/mal2html.xsl.in
index 42703a3..9dc3fb9 100644
--- a/stylesheets/mal2html.xsl.in
+++ b/stylesheets/mal2html.xsl.in
@@ -12,6 +12,8 @@
 
 <xsl:param name="yelp.javascript"/>
 
+<xsl:param name="mal2html.editor_mode" select="$yelp.editor_mode"/>
+
 
 <xsl:param name="mal.chunk.chunk_top" select="true()"/>
 <xsl:param name="mal.chunk.extension" select="''"/>
@@ -52,4 +54,26 @@
   </xsl:choose>
 </xsl:template>
 
+<xsl:template name="mal2html.css.custom">
+<xsl:if test="$yelp.editor_mode">
+<xsl:text>
+div.head { margin: 0; }
+div.version {
+  margin: 0 -12px 1em -12px;
+  padding: 0.5em 12px 0.5em 12px;
+  position: relative;
+  left: auto; right: auto;
+  opacity: 1.0;
+  max-width: none;
+  border: none;
+  border-bottom: solid 1px </xsl:text>
+    <xsl:value-of select="$theme.color.gray_border"/><xsl:text>;
+  background-color: </xsl:text>
+    <xsl:value-of select="$theme.color.yellow_background"/><xsl:text>;
+}
+div.version:hover { opacity: 1.0; }
+</xsl:text>
+</xsl:if>
+</xsl:template>
+
 </xsl:stylesheet>
diff --git a/stylesheets/yelp-common.xsl b/stylesheets/yelp-common.xsl
index 8120eb5..70ea3e9 100644
--- a/stylesheets/yelp-common.xsl
+++ b/stylesheets/yelp-common.xsl
@@ -3,6 +3,8 @@
                 xmlns="http://www.w3.org/1999/xhtml";
                 version="1.0">
 
+<xsl:param name="yelp.editor_mode" select="false()"/>
+
 <!-- == yelp.common.css == -->
 <xsl:template name="theme.html.css.custom">
   <xsl:param name="direction"/>



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