[yelp-xsl] Refactored common theme XSLT, redid color scheme



commit 486c31977f1e95f3dad6b159298ef187ab5cd61d
Author: Shaun McCance <shaunm gnome org>
Date:   Sat Feb 27 20:22:30 2010 -0600

    Refactored common theme XSLT, redid color scheme

 xslt/docbook/html/db2html.xsl        |    3 +-
 xslt/docbook/html/db2xhtml.xsl       |    3 +-
 xslt/gettext/l10n.xml.in             |   11 ++------
 xslt/mallard/html/mal2html-table.xsl |    8 ++++-
 xslt/mallard/html/mal2html.xsl       |    4 ++-
 xslt/mallard/html/mal2xhtml.xsl      |    4 ++-
 xslt/theme/Makefile.am               |    1 -
 xslt/theme/test-theme.xslt           |   44 +++++++++++++++++++++++----------
 xslt/theme/theme-colors.xsl          |   31 ++++++++++++++++-------
 9 files changed, 70 insertions(+), 39 deletions(-)
---
diff --git a/xslt/docbook/html/db2html.xsl b/xslt/docbook/html/db2html.xsl
index 6a07ad5..786107c 100644
--- a/xslt/docbook/html/db2html.xsl
+++ b/xslt/docbook/html/db2html.xsl
@@ -43,7 +43,8 @@ DocBook to HTML
 <!--#@ db.chunk.extension -->
 <xsl:param name="db.chunk.extension" select="'.html'"/>
 
-<xsl:include href="../../common/theme.xsl"/>
+<xsl:include href="../../theme/theme-colors.xsl"/>
+<xsl:include href="../../theme/theme-icons.xsl"/>
 
 <xsl:include href="../common/db-chunk.xsl"/>
 <xsl:include href="../common/db-common.xsl"/>
diff --git a/xslt/docbook/html/db2xhtml.xsl b/xslt/docbook/html/db2xhtml.xsl
index d043983..515cc01 100644
--- a/xslt/docbook/html/db2xhtml.xsl
+++ b/xslt/docbook/html/db2xhtml.xsl
@@ -42,7 +42,8 @@ DocBook to XHTML
 <!--#@ db.chunk.extension -->
 <xsl:param name="db.chunk.extension" select="'.xhtml'"/>
 
-<xsl:include href="../../common/theme.xsl"/>
+<xsl:include href="../../theme/theme-colors.xsl"/>
+<xsl:include href="../../theme/theme-icons.xsl"/>
 
 <xsl:include href="../common/db-chunk.xsl"/>
 <xsl:include href="../common/db-common.xsl"/>
diff --git a/xslt/gettext/l10n.xml.in b/xslt/gettext/l10n.xml.in
index 26a7dbc..c121c84 100644
--- a/xslt/gettext/l10n.xml.in
+++ b/xslt/gettext/l10n.xml.in
@@ -314,13 +314,13 @@
   <_msg>Warning</_msg>
 </msgset>
 <msgset>
-  <msgid>watermark-blockquote-201C.png</msgid>
+  <msgid>yelp-watermark-quote-201C.png</msgid>
   <!--
   This is an image of the opening quotation character for your language.
   The image is used as a watermark on blockquote elements.  There are a
   number of different quote characters used by various languages, so the
   image name is translatable.  The name of the icon should be of the form
-  "watermark-blockquote-XXXX.png", where XXXX is the Unicode code point
+  "yelp-watermark-quote-XXXX.png", where XXXX is the Unicode code point
   of the opening quote character.  For example, some languages use the
   double angle quotation mark.  Translators for these languages should
   use "watermark-blockquote-00AB.png".
@@ -336,13 +336,8 @@
   don't make very nice watermarks, so if you would normally open a quote
   with single quotation marks in your language, use the corresponding
   double quotation mark for the watermark image.
-
-  Translators who have been around Gnome for a while should recognize
-  this as nearly the same as the "yelp-watermark-blockquote-201C" string
-  once found inside Yelp.  The watermark functionality has been moved to
-  gnome-doc-utils.
   -->
-  <_msg>watermark-blockquote-201C.png</_msg>
+  <_msg>yelp-watermark-quote-201C.png</_msg>
 </msgset>
 
 
diff --git a/xslt/mallard/html/mal2html-table.xsl b/xslt/mallard/html/mal2html-table.xsl
index 118fb49..dfe4b4c 100644
--- a/xslt/mallard/html/mal2html-table.xsl
+++ b/xslt/mallard/html/mal2html-table.xsl
@@ -485,10 +485,14 @@ REMARK: Describe this module
     </xsl:choose>
     <xsl:choose>
       <xsl:when test="$shaderow = 1 and $shadecol = 1">
-        <xsl:text>background-color: #d3d7cf;</xsl:text>
+        <xsl:text>background-color: </xsl:text>
+        <xsl:value-of select="$theme.color.dark_background"/>
+        <xsl:text>;</xsl:text>
       </xsl:when>
       <xsl:when test="$shaderow = 1 or $shadecol = 1">
-        <xsl:text>background-color: #eeeeec;</xsl:text>
+        <xsl:text>background-color: </xsl:text>
+        <xsl:value-of select="$theme.color.gray_background"/>
+        <xsl:text>;</xsl:text>
       </xsl:when>
     </xsl:choose>
   </xsl:variable>
diff --git a/xslt/mallard/html/mal2html.xsl b/xslt/mallard/html/mal2html.xsl
index 41d8b09..ba5c3af 100644
--- a/xslt/mallard/html/mal2html.xsl
+++ b/xslt/mallard/html/mal2html.xsl
@@ -58,9 +58,11 @@ REMARK: Describe this module
 <xsl:include href="mal2html-page.xsl"/>
 <xsl:include href="mal2html-table.xsl"/>
 
-<xsl:include href="../../common/theme.xsl"/>
 <xsl:include href="../../common/utils.xsl"/>
 
+<xsl:include href="../../theme/theme-colors.xsl"/>
+<xsl:include href="../../theme/theme-icons.xsl"/>
+
 <!-- FIXME -->
 <xsl:template match="*">
   <xsl:message>
diff --git a/xslt/mallard/html/mal2xhtml.xsl b/xslt/mallard/html/mal2xhtml.xsl
index 2cb9133..d8baebf 100644
--- a/xslt/mallard/html/mal2xhtml.xsl
+++ b/xslt/mallard/html/mal2xhtml.xsl
@@ -57,9 +57,11 @@ REMARK: Describe this module
 <xsl:include href="mal2html-page.xsl"/>
 <xsl:include href="mal2html-table.xsl"/>
 
-<xsl:include href="../../common/theme.xsl"/>
 <xsl:include href="../../common/utils.xsl"/>
 
+<xsl:include href="../../theme/theme-colors.xsl"/>
+<xsl:include href="../../theme/theme-icons.xsl"/>
+
 <!-- FIXME -->
 <xsl:template match="*">
   <xsl:message>
diff --git a/xslt/theme/Makefile.am b/xslt/theme/Makefile.am
index 5c38e13..2e9dad3 100644
--- a/xslt/theme/Makefile.am
+++ b/xslt/theme/Makefile.am
@@ -2,7 +2,6 @@ xsldir=$(datadir)/yelp-xsl/xslt/theme
 
 xsl_DATA =			\
 	theme-colors.xsl	\
-	theme-html.xsl		\
 	theme-icons.xsl
 
 EXTRA_DIST=$(xsl_DATA)
diff --git a/xslt/theme/test-theme.xslt b/xslt/theme/test-theme.xslt
index 6e44dc6..fa77c02 100644
--- a/xslt/theme/test-theme.xslt
+++ b/xslt/theme/test-theme.xslt
@@ -26,18 +26,21 @@ h2 {
 }
 div {
   min-height: 4em;
-  min-width: 4em;
-  margin: 1em 1em 0 0;
+  min-width: 6em;
+  margin: 1em 0.5em 0 0.5em;
   padding: 2px;
 }
 p { margin: 0.5em 0 0.5em 0; }
-td div { text-align: center; }
+td { text-align: center; }
 p.text {
   color:  </xsl:text><xsl:value-of select="$theme.color.text"/><xsl:text>;
 }
 p.light {
   color:  </xsl:text><xsl:value-of select="$theme.color.text_light"/><xsl:text>;
 }
+p.error {
+  color:  </xsl:text><xsl:value-of select="$theme.color.text_error"/><xsl:text>;
+}
 p.link {
   color:  </xsl:text><xsl:value-of select="$theme.color.link"/><xsl:text>;
 }
@@ -83,45 +86,52 @@ div.yellowbr {
 </xsl:template>
 
 <xsl:template name="boxes">
-  <h2>Background Colors</h2>
+  <h2>Backgrounds and Borders</h2>
   <table>
     <tr>
-      <td><div/></td>
+      <td></td>
+      <td style="color: {$theme.color.gray_border}"><xsl:value-of select="$theme.color.gray_border"/></td>
+      <td style="color: {$theme.color.blue_border}"><xsl:value-of select="$theme.color.blue_border"/></td>
+      <td style="color: {$theme.color.red_border}"><xsl:value-of select="$theme.color.red_border"/></td>
+      <td style="color: {$theme.color.yellow_border}"><xsl:value-of select="$theme.color.yellow_border"/></td>
+    </tr>
+    <tr>
+      <td><div><xsl:value-of select="$theme.color.background"/></div></td>
       <td><div class="graybr"/></td>
       <td><div class="bluebr"/></td>
       <td><div class="redbr"/></td>
       <td><div class="yellowbr"/></td>
     </tr>
     <tr>
-      <td><div class="graybg"/></td>
+      <td><div class="graybg"><xsl:value-of select="$theme.color.gray_background"/></div></td>
       <td><div class="graybg graybr"/></td>
       <td><div class="graybg bluebr"/></td>
       <td><div class="graybg redbr"/></td>
       <td><div class="graybg yellowbr"/></td>
     </tr>
     <tr>
-      <td><div class="darkbg"/></td>
+      <td><div class="darkbg"><xsl:value-of select="$theme.color.dark_background"/></div></td>
       <td><div class="darkbg graybr"/></td>
       <td><div class="darkbg bluebr"/></td>
       <td><div class="darkbg redbr"/></td>
       <td><div class="darkbg yellowbr"/></td>
     </tr>
     <tr>
-      <td><div class="bluebg"/></td>
+      <td><div class="bluebg"><xsl:value-of select="$theme.color.blue_background"/></div></td>
       <td><div class="bluebg graybr"/></td>
       <td><div class="bluebg bluebr"/></td>
       <td><div class="bluebg redbr"/></td>
       <td><div class="bluebg yellowbr"/></td>
     </tr>
     <tr>
-      <td><div class="redbg"/></td>
+      <td><div class="redbg"><xsl:value-of select="$theme.color.red_background"/></div></td>
       <td><div class="redbg graybr"/></td>
       <td><div class="redbg bluebr"/></td>
       <td><div class="redbg redbr"/></td>
       <td><div class="redbg yellowbr"/></td>
     </tr>
     <tr>
-      <td><div class="yellowbg"/></td>
+      <td><div class="yellowbg"><xsl:value-of select="$theme.color.yellow_background"/></div></td>
       <td><div class="yellowbg graybr"/></td>
       <td><div class="yellowbg bluebr"/></td>
       <td><div class="yellowbg redbr"/></td>
@@ -135,38 +145,44 @@ div.yellowbr {
   <table>
     <tr>
       <td><div>
-        <p class="text">text</p>
-        <p class="light">light</p>
-        <p class="link">link</p>
-        <p class="visited">visited</p>
+        <p class="text"><xsl:value-of select="$theme.color.text"/></p>
+        <p class="light"><xsl:value-of select="$theme.color.text_light"/></p>
+        <p class="error"><xsl:value-of select="$theme.color.text_error"/></p>
+        <p class="link"><xsl:value-of select="$theme.color.link"/></p>
+        <p class="visited"><xsl:value-of select="$theme.color.link_visited"/></p>
       </div></td>
       <td><div class="graybg">
         <p class="text">text</p>
         <p class="light">light</p>
+        <p class="error">error</p>
         <p class="link">link</p>
         <p class="visited">visited</p>
       </div></td>
       <td><div class="darkbg">
         <p class="text">text</p>
         <p class="light">light</p>
+        <p class="error">error</p>
         <p class="link">link</p>
         <p class="visited">visited</p>
       </div></td>
       <td><div class="bluebg">
         <p class="text">text</p>
         <p class="light">light</p>
+        <p class="error">error</p>
         <p class="link">link</p>
         <p class="visited">visited</p>
       </div></td>
       <td><div class="redbg">
         <p class="text">text</p>
         <p class="light">light</p>
+        <p class="error">error</p>
         <p class="link">link</p>
         <p class="visited">visited</p>
       </div></td>
       <td><div class="yellowbg">
         <p class="text">text</p>
         <p class="light">light</p>
+        <p class="error">error</p>
         <p class="link">link</p>
         <p class="visited">visited</p>
       </div></td>
diff --git a/xslt/theme/theme-colors.xsl b/xslt/theme/theme-colors.xsl
index 3ae1013..d647dd2 100644
--- a/xslt/theme/theme-colors.xsl
+++ b/xslt/theme/theme-colors.xsl
@@ -77,7 +77,18 @@ This parameter specifies the color for light text.  The light text
 color is used to make bold headings and certain parenthetical text
 less intense.  It should be legible on all background colors.
 -->
-<xsl:param name="theme.color.text_light" select="'#444'"/>
+<xsl:param name="theme.color.text_light" select="'#2e3436'"/>
+
+<!--@@==========================================================================
+theme.color.text_error
+The error text color.
+:Revision:version="1.0" date="2010-01-26"
+
+This parameter specifies the color for error text.  The error text
+color is used to style error messages from command line sessions.
+It should be legible on all background colors.
+-->
+<xsl:param name="theme.color.text_error" select="'#a40000'"/>
 
 <!--@@==========================================================================
 theme.color.blue_background
@@ -88,7 +99,7 @@ This parameter specifies the blue background color.  The blue
 background color may be used by certain types of block elements.
 Foreground colors should be legible on this color.
 -->
-<xsl:param name="theme.color.blue_background" select="'#c6d8eb'"/>
+<xsl:param name="theme.color.blue_background" select="'#d9ebff'"/>
 
 <!--@@==========================================================================
 theme.color.blue_border
@@ -98,7 +109,7 @@ The blue border color.
 This parameter specifies the blue border color.  The blue
 border color may be used by certain types of block elements.
 -->
-<xsl:param name="theme.color.blue_border" select="'#3465a4'"/>
+<xsl:param name="theme.color.blue_border" select="'#729fcf'"/>
 
 <!--@@==========================================================================
 theme.color.gray_background
@@ -109,7 +120,7 @@ This parameter specifies the gray background color.  The gray
 background color may be used by certain types of block elements.
 Foreground colors should be legible on this color.
 -->
-<xsl:param name="theme.color.gray_background" select="'#dfe1d3'"/>
+<xsl:param name="theme.color.gray_background" select="'#f3f3f0'"/>
 
 <!--@@==========================================================================
 theme.color.dark_background
@@ -120,7 +131,7 @@ This parameter specifies the dark gray background color.  The dark
 gray background color may be used by certain types of block elements.
 Foreground colors should be legible on this color.
 -->
-<xsl:param name="theme.color.dark_background" select="'#d3d7cf'"/>
+<xsl:param name="theme.color.dark_background" select="'#eeeeec'"/>
 
 <!--@@==========================================================================
 theme.color.gray_border
@@ -130,7 +141,7 @@ The gray border color.
 This parameter specifies the gray border color.  The gray
 border color may be used by certain types of block elements.
 -->
-<xsl:param name="theme.color.gray_border" select="'#888a85'"/>
+<xsl:param name="theme.color.gray_border" select="'#babdb6'"/>
 
 <!--@@==========================================================================
 theme.color.red_background
@@ -141,7 +152,7 @@ This parameter specifies the red background color.  The red
 background color may be used by certain types of block elements.
 Foreground colors should be legible on this color.
 -->
-<xsl:param name="theme.color.red_background" select="'#f8a9a9'"/>
+<xsl:param name="theme.color.red_background" select="'#ffcccc'"/>
 
 <!--@@==========================================================================
 theme.color.red_border
@@ -151,7 +162,7 @@ The red border color.
 This parameter specifies the red border color.  The red
 border color may be used by certain types of block elements.
 -->
-<xsl:param name="theme.color.red_border" select="'#cc0000'"/>
+<xsl:param name="theme.color.red_border" select="'#ef2929'"/>
 
 <!--@@==========================================================================
 theme.color.yellow_background
@@ -162,7 +173,7 @@ This parameter specifies the yellow background color.  The yellow
 background color may be used by certain types of block elements.
 Foreground colors should be legible on this color.
 -->
-<xsl:param name="theme.color.yellow_background" select="'#fdf3a6'"/>
+<xsl:param name="theme.color.yellow_background" select="'#fff8bf'"/>
 
 <!--@@==========================================================================
 theme.color.yellow_border
@@ -172,6 +183,6 @@ The yellow border color.
 This parameter specifies the yellow border color.  The yellow
 border color may be used by certain types of block elements.
 -->
-<xsl:param name="theme.color.yellow_border" select="'#c4a000'"/>
+<xsl:param name="theme.color.yellow_border" select="'#edd400'"/>
 
 </xsl:stylesheet>



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