[gnome-doc-utils/mallard: 5/87] Tweaks to styling, getting things working again



commit d4566c3361cffae8dd2eb57f52241349420b92a6
Author: Shaun McCance <shaunm gnome org>
Date:   Thu Nov 6 08:42:53 2008 -0600

    Tweaks to styling, getting things working again
---
 doc/mallard/C/spec_pages.xml         |   28 ------
 xslt/mallard/html/mal2html-block.xsl |    8 +-
 xslt/mallard/html/mal2html-css.xsl   |  170 +++++++++++++++++++++++++++++++++-
 xslt/mallard/html/mal2html-page.xsl  |  166 +---------------------------------
 4 files changed, 174 insertions(+), 198 deletions(-)

diff --git a/doc/mallard/C/spec_pages.xml b/doc/mallard/C/spec_pages.xml
deleted file mode 100644
index 97eb15f..0000000
--- a/doc/mallard/C/spec_pages.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<page xmlns="http://www.gnome.org/~shaunm/mallard";
-      type="guide"
-      id="spec_pages">
-
-<info>
-  <link type="guide" xref="spec" weight="1"/>
-
-  <credit type="author">
-    <name>Shaun McCance</name>
-    <email>shaunm gnome org</email>
-  </credit>
-  <copyright>
-    <year>2008</year>
-    <name>Shaun McCance</name>
-  </copyright>
-
-  <version number="0.1" date="2007-02-22" status="stub"/>
-</info>
-
-<title>Page Elements</title>
-
-<synopsis><code mime="application/relax-ng-compact-syntax">
-namespace local = ""
-default namespace mal = "http://www.gnome.org/~shaunm/mallard";
-start = <link xref="mal_page">mal_page</link>
-</code></synopsis>
-
-</page>
diff --git a/xslt/mallard/html/mal2html-block.xsl b/xslt/mallard/html/mal2html-block.xsl
index b2c4b72..d79c74d 100644
--- a/xslt/mallard/html/mal2html-block.xsl
+++ b/xslt/mallard/html/mal2html-block.xsl
@@ -49,7 +49,7 @@ pre.code {
   background: url(mallard-icon-code.png) no-repeat top right;
   border: solid 2px </xsl:text>
   <xsl:call-template name="theme.get_color">
-    <xsl:with-param name="id" select="'gray-light'"/>
+    <xsl:with-param name="id" select="'gray-border'"/>
   </xsl:call-template>
   <xsl:text>;
   padding: 0.5em 1em 0.5em 1em;
@@ -205,15 +205,15 @@ div.title {
   <div class="cite">
     <!-- FIXME: i18n -->
     <xsl:choose>
-      <xsl:when test="@name and @date">
+      <xsl:when test="mal:name and @date">
         <xsl:text>from </xsl:text>
-        <xsl:apply-templates mode="mal2html.inline.mode" select="@name"/>
+        <xsl:apply-templates mode="mal2html.inline.mode" select="mal:name"/>
         <xsl:text> on </xsl:text>
         <xsl:apply-templates mode="mal2html.inline.mode" select="@date"/>
       </xsl:when>
       <xsl:otherwise>
         <xsl:text>from </xsl:text>
-        <xsl:apply-templates mode="mal2html.inline.mode" select="@name"/>
+        <xsl:apply-templates mode="mal2html.inline.mode" select="mal:name"/>
       </xsl:otherwise>
     </xsl:choose>
   </div>
diff --git a/xslt/mallard/html/mal2html-css.xsl b/xslt/mallard/html/mal2html-css.xsl
index fcdcc2f..837a304 100644
--- a/xslt/mallard/html/mal2html-css.xsl
+++ b/xslt/mallard/html/mal2html-css.xsl
@@ -84,9 +84,177 @@ by extension stylesheets to extend or override the CSS.
   <xsl:call-template name="mal2html.block.css"/>
   <xsl:call-template name="mal2html.inline.css"/>
   <xsl:call-template name="mal2html.list.css"/>
-  <xsl:call-template name="mal2html.page.css"/>
   <xsl:call-template name="mal2html.table.css"/>
 <xsl:text>
+html { height: 100%; }
+body {
+  direction: </xsl:text><xsl:call-template name="l10n.direction"/><xsl:text>;
+  margin: 0px;
+  background-color: </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'gray-background'"/>
+  </xsl:call-template>
+  <xsl:text>;
+  padding: 12px;
+  min-height: 100%;
+}
+<!-- FIXME: only in editor mode & better colors -->
+body.status-stub { background-color:  </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'red-background'"/>
+  </xsl:call-template>
+  <xsl:text>; }
+body.status-draft { background-color:  </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'red-background'"/>
+  </xsl:call-template>
+  <xsl:text>; }
+body.status-incomplete { background-color:  </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'red-background'"/>
+  </xsl:call-template>
+  <xsl:text>; }
+body.status-review { background-color:  </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'yellow-background'"/>
+  </xsl:call-template>
+  <xsl:text>; }
+div.version {
+  margin: 0 0 1em 0;
+  padding: 0.5em 1em 0.5em 1em;
+  max-width: 60em;
+  border: solid 1px </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'gray-border'"/>
+  </xsl:call-template>
+  <xsl:text>;
+  background-color: </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'yellow-background'"/>
+  </xsl:call-template>
+  <xsl:text>;
+}
+div.version p.version {
+  margin-top: 0.2em;
+}
+div.body {
+  margin: 0;
+  padding: 1em;
+  max-width: 60em;
+  min-height: 20em;
+  border: solid 1px </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'gray-border'"/>
+  </xsl:call-template>
+  <xsl:text>;
+  background-color: </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'background'"/>
+  </xsl:call-template>
+  <xsl:text>;
+}
+div.copyrights {
+  text-align: center;
+  color: </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'text-light'"/>
+  </xsl:call-template>
+  <xsl:text>;
+}
+div.section { margin-top: 2em; clear: both; }
+div.section div.section { margin-top: 1.72em; margin-left: 1.72em; }
+div.section div.section div.section { margin-top: 1.44em; }
+div.header {
+  margin: 0;
+  color: </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'text-light'"/>
+  </xsl:call-template>
+  <xsl:text>;
+  border-bottom: solid 1px </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'gray-border'"/>
+  </xsl:call-template>
+  <xsl:text>;
+}
+div.section div.section div.header { border: none; }
+h1, h2, h3, h4, h5, h6, h7 { margin: 0; }
+h1.title { font-size: 1.44em; }
+h2.title { font-size: 1.2em; }
+h3.title { font-size: 1em; }
+h4.title { font-size: 1em; }
+h5.title { font-size: 1em; }
+h6.title { font-size: 1em; }
+h7.title { font-size: 1em; }
+
+div.pagelink div.title {
+  font-size: 1em;
+  color: inherit;
+}
+div.pagelink div.desc {
+  margin-top: 0.2em;
+  color: </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'text-light'"/>
+  </xsl:call-template>
+  <xsl:text>;
+}
+div.pagelink {
+  margin: 0;
+  padding: 0.5em;
+  border: solid 1px </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'background'"/>
+  </xsl:call-template>
+  <xsl:text>;
+}
+div.pagelink:hover {
+  border-color: </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'blue-border'"/>
+  </xsl:call-template>
+  <xsl:text>;
+  background-color: </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'blue-background'"/>
+  </xsl:call-template>
+  <xsl:text>;
+}
+ul.guidelinks {
+  display: block;
+  margin: 0;
+  text-align: right;
+}
+li.guidelink { display: inline; }
+li.guidelink::before {
+  content: ' â?¢ ';
+  color: </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'gray-dark'"/>
+  </xsl:call-template>
+  <xsl:text>;
+}
+li.guidelink-first::before, li.guidelink-only::before {
+  content: '';
+}
+div.seealsolinks { margin: 0; }
+div.seealsolink {
+  display: inline;
+}
+div.seealsolink::before {
+  content: ' â?¢ ';
+  color: </xsl:text>
+  <xsl:call-template name="theme.get_color">
+    <xsl:with-param name="id" select="'gray-dark'"/>
+  </xsl:call-template>
+  <xsl:text>;
+}
+div.seealsolink-first::before, div.seealsolink-only::before {
+  content: ' : ';
+}
+
+
+
 div, pre, p { margin: 1em 0 0 0; padding: 0; }
 .first-child { margin-top: 0; }
 a {
diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl
index 6fb6ff8..fdfbf5d 100644
--- a/xslt/mallard/html/mal2html-page.xsl
+++ b/xslt/mallard/html/mal2html-page.xsl
@@ -41,7 +41,7 @@ REMARK: Describe this template
     <xsl:for-each select="$node/mal:info/mal:copyright">
       <div class="copyright">
         <!-- FIXME: i18n -->
-        <xsl:value-of select="concat('© ', @year, ' ', @name)"/>
+        <xsl:value-of select="concat('© ', mal:year, ' ', mal:name)"/>
       </div>
     </xsl:for-each>
   </div>
@@ -493,170 +493,6 @@ REMARK: Describe this template
 </xsl:template>
 
 
-<!--**==========================================================================
-mal2html.page.css
-Outputs CSS that controls the appearance of page elements
-
-REMARK: Describe this template
--->
-<xsl:template name="mal2html.page.css">
-<xsl:text>
-html { height: 100%; }
-body {
-  direction: </xsl:text><xsl:call-template name="l10n.direction"/><xsl:text>;
-  margin: 0px;
-  background-color: </xsl:text>
-  <xsl:call-template name="theme.get_color">
-    <xsl:with-param name="id" select="'gray-background'"/>
-  </xsl:call-template>
-  <xsl:text>;
-  padding: 12px;
-  min-height: 100%;
-}
-<!-- FIXME: only in editor mode & better colors -->
-<!--
-body.status-stub { background-color: #ffedc9; }
-body.status-draft { background-color: #ffedc9; }
-body.status-incomplete { background-color: #ffedc9; }
-body.status-review { background-color: #ffedc9; }
--->
-div.version {
-  margin: 0 0 1em 0;
-  padding: 0.5em 1em 0.5em 1em;
-  max-width: 60em;
-  border: solid 1px </xsl:text>
-  <xsl:call-template name="theme.get_color">
-    <xsl:with-param name="id" select="'gray-border'"/>
-  </xsl:call-template>
-  <xsl:text>;
-  background-color: </xsl:text>
-  <xsl:call-template name="theme.get_color">
-    <xsl:with-param name="id" select="'yellow-background'"/>
-  </xsl:call-template>
-  <xsl:text>;
-}
-div.version p.version {
-  margin-top: 0.2em;
-}
-div.body {
-  margin: 0;
-  padding: 1em;
-  max-width: 60em;
-  min-height: 20em;
-  border: solid 1px </xsl:text>
-  <xsl:call-template name="theme.get_color">
-    <xsl:with-param name="id" select="'gray-border'"/>
-  </xsl:call-template>
-  <xsl:text>;
-  background-color: </xsl:text>
-  <xsl:call-template name="theme.get_color">
-    <xsl:with-param name="id" select="'background'"/>
-  </xsl:call-template>
-  <xsl:text>;
-}
-div.copyrights {
-  text-align: center;
-  color: </xsl:text>
-  <xsl:call-template name="theme.get_color">
-    <xsl:with-param name="id" select="'text-light'"/>
-  </xsl:call-template>
-  <xsl:text>;
-}
-div.section { margin-top: 2em; clear: both; }
-div.section div.section { margin-top: 1.72em; margin-left: 1.72em; }
-div.section div.section div.section { margin-top: 1.44em; }
-div.header {
-  margin: 0;
-  color: </xsl:text>
-  <xsl:call-template name="theme.get_color">
-    <xsl:with-param name="id" select="'text-light'"/>
-  </xsl:call-template>
-  <xsl:text>;
-  border-bottom: solid 1px </xsl:text>
-  <xsl:call-template name="theme.get_color">
-    <xsl:with-param name="id" select="'gray-border'"/>
-  </xsl:call-template>
-  <xsl:text>;
-}
-div.section div.section div.header { border: none; }
-h1, h2, h3, h4, h5, h6, h7 { margin: 0; }
-h1.title { font-size: 1.72em; }
-h2.title { font-size: 1.44em; }
-h3.title { font-size: 1.2em; }
-h4.title { font-size: 1em; }
-h5.title { font-size: 1em; }
-h6.title { font-size: 1em; }
-h7.title { font-size: 1em; }
-
-div.pagelink div.title {
-  font-size: 1em;
-  color: inherit;
-}
-div.pagelink div.desc {
-  margin-top: 0.2em;
-  color: </xsl:text>
-  <xsl:call-template name="theme.get_color">
-    <xsl:with-param name="id" select="'text-light'"/>
-  </xsl:call-template>
-  <xsl:text>;
-}
-div.pagelink {
-  margin: 0;
-  padding: 0.5em;
-  border: solid 1px </xsl:text>
-  <xsl:call-template name="theme.get_color">
-    <xsl:with-param name="id" select="'background'"/>
-  </xsl:call-template>
-  <xsl:text>;
-}
-div.pagelink:hover {
-  border-color: </xsl:text>
-  <xsl:call-template name="theme.get_color">
-    <xsl:with-param name="id" select="'blue-medium'"/>
-  </xsl:call-template>
-  <xsl:text>;
-  background-color: </xsl:text>
-  <xsl:call-template name="theme.get_color">
-    <xsl:with-param name="id" select="'blue-light'"/>
-  </xsl:call-template>
-  <xsl:text>;
-}
-ul.guidelinks {
-  display: block;
-  margin: 0;
-  text-align: right;
-}
-li.guidelink { display: inline; }
-li.guidelink::before {
-  content: ' â?¢ ';
-  color: </xsl:text>
-  <xsl:call-template name="theme.get_color">
-    <xsl:with-param name="id" select="'gray-dark'"/>
-  </xsl:call-template>
-  <xsl:text>;
-}
-li.guidelink-first::before, li.guidelink-only::before {
-  content: '';
-}
-div.seealsolinks { margin: 0; }
-div.seealsolink {
-  display: inline;
-}
-div.seealsolink::before {
-  content: ' â?¢ ';
-  color: </xsl:text>
-  <xsl:call-template name="theme.get_color">
-    <xsl:with-param name="id" select="'gray-dark'"/>
-  </xsl:call-template>
-  <xsl:text>;
-}
-div.seealsolink-first::before, div.seealsolink-only::before {
-  content: ' : ';
-}
-</xsl:text>
-</xsl:template>
-
-
 <!-- == Matched Templates == -->
 
 <!-- = / = -->



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