Christopher Currie wrote:
Reece Dunn wrote:
Hi all,

Thanks for the feedback. Below, you will find the patches to boost/doc/html/boostbook.css and boost/tools/boostbook/xsl/html.xsl. I am also going to put these in the Files section if you want to grab a copy from there. Here is the status on some of the feedback from the new look and feel:

I've applied these patches so that the new format will appear when the metacomm regression tests are built. These are found at:


http://www.boost.org/regression-logs/cs-win32_metacomm/doc/html/index.html

I have supplied new patches that fix a few things, including navigation links :).


[1] Boost navigation links and "standalone": links are not generated when the doc.standalone parameter is set to 'true'.

Where is this parameter set, and when would it apply?

As Volodya said, you can set them in the bjam file, or you can change them at the top of the html.xsl stylesheet (look for:
<xsl:param name="doc.standalone" select="'false'"/>
)


I have also parametized the boost image information (src, alt, width, height) so you can change the location if it is different.

[2] Navigation arrows at the top: I am working on these :). Don't worry, getting this functionality is high on my priorities. Does anyone know where the code that generates the bottom links is found, to speed up the process?

My (uneducated) guess would be somewhere within the code imported with chunk.xsl, since I think that's what does the segmenting.

I did a search for the code: see my MavLinks post for more information.


[4] Empty TOC's: I am working on removing empty TOCs - this is only in some of the docs (boostbook/doc/html/reference for example).

Boost.Any and Boost.Array docs have some strangeness in this regard, as well.

I'll look into this, see what's going on.


[4] Table Rendering: I have worked out a CSS approach that does what Volodya has suggested regarding a 'flat' table layout -- what do other people think? NOTE: You can revert back to the 3D look by removing:
[114] table, td, th{ border: 0pc; }

This seems to be being overridden by a 'border="1"' attribute within the table element of some tables; see bbv2.reference.init.html.

Looks like we'll have to override the XSL:T code :(.


Regards,
Reece

_________________________________________________________________
Express yourself with cool emoticons - download MSN Messenger today! http://www.msn.co.uk/messenger
Index: html.xsl
===================================================================
RCS file: /cvsroot/boost/boost/tools/boostbook/xsl/html.xsl,v
retrieving revision 1.10
diff -u -w -r1.10 html.xsl
--- html.xsl    5 Feb 2004 15:16:39 -0000       1.10
+++ html.xsl    9 Feb 2004 14:05:05 -0000
@@ -5,9 +5,9 @@

<!-- Import the HTML chunking stylesheet -->
<xsl:import
- href="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl"/>
+ href="../../../../../docbook/xsl/html/chunk.xsl"/>


-  <xsl:param name="html.stylesheet" select="'reference.css'"/>
+  <xsl:param name="html.stylesheet" select="'boostbook.css'"/>
  <xsl:param name="navig.graphics" select="1"/>
  <xsl:param name="navig.graphics.extension" select="'.png'"/>
  <xsl:param name="chapter.autolabel" select="1"/>
@@ -19,40 +19,157 @@
  <xsl:param name="generate.manifest" select="1"/>
  <xsl:param name="generate.section.toc.level" select="3"/>

+ <xsl:param name="doc.standalone" select="'false'"/>
+ <xsl:param name="image.boost.src" select="'../../c++boost.gif'"/>
+ <xsl:param name="image.boost.alt" select="'c++boost.gif (8819 bytes)'"/>
+ <xsl:param name="image.boost.w" select="277"/>
+ <xsl:param name="image.boost.h" select="86"/>
+
<xsl:template name="header.navigation">
- <table border="1" cellpadding="2" bgcolor="#007F7F">
- <tr>
- <td bgcolor="#FFFFFF">
- <img src="../../c++boost.gif"
- alt="c++boost.gif (8819 bytes)" width="277" height="86"/>
- </td>
- <td>
- <a href="../../index.htm">
- <font color="#FFFFFF" size="4" face="Arial">Home</font>
- </a>
+ <xsl:param name = "prev" select = "/foo"/>
+ <xsl:param name = "next" select = "/foo"/>
+ <xsl:param name = "nav.context"/>
+
+ <xsl:choose>
+ <xsl:when test = "$doc.standalone = 'true'">
+ <table width = "100%"><tr>
+ <td width = "50%">
+ <img src="{$image.boost.src}" alt="{$image.boost.alt}"
+ width="{$image.boost.w}" height="{$image.boost.h}"/>
+ </td><td width = "50%" class = "standalone-title">
+ <xsl:apply-templates select="." mode="object.title.markup"/>
</td>
- <td>
- <a href="libraries.html">
- <font color="#FFFFFF" size="4" face="Arial">Libraries</font>
- </a>
+ </tr></table>
+ </xsl:when><xsl:otherwise>
+ <table cellpadding = "2" width = "100%" class = "boost-head"><tr>
+ <td bgcolor = "#FFFFFF" width = "50%" class = "boost-headelem">
+ <img src="{$image.boost.src}" alt="{$image.boost.alt}"
+ width="{$image.boost.w}" height="{$image.boost.h}"/>
</td>
- <td>
- <a href="../../people/people.htm">
- <font color="#FFFFFF" size="4" face="Arial">People</font>
- </a>
+ <xsl:if test = "not($doc.standalone = 'true')">
+ <td align = "center" class = "boost-headtd">
+ <a href="../../index.htm" class = "boost-headelem">Home</a>
+ </td><td align = "center" class = "boost-headtd">
+ <a href="libraries.html" class = "boost-headelem">Libraries</a>
+ </td><td align = "center" class = "boost-headtd">
+ <a href="../../people/people.htm" class = "boost-headelem">People</a>
+ </td><td align = "center" class = "boost-headtd">
+ <a href="../../more/faq.htm" class = "boost-headelem">FAQ</a>
+ </td><td align = "center" class = "boost-headtd">
+ <a href="../../more/index.htm" class = "boost-headelem">More</a>
</td>
- <td>
- <a href="../../more/faq.htm">
- <font color="#FFFFFF" size="4" face="Arial">FAQ</font>
+ </xsl:if>
+ </tr></table>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!-- top-level navigation: based on
+ docbook/html/chunk-common.xsl[footer.navigation] -->
+
+ <xsl:variable name="home" select="/*[1]"/>
+ <xsl:variable name="up" select="parent::*"/>
+
+ <xsl:variable name="row1" select="count($prev) &gt; 0
+ or count($up) &gt; 0
+ or count($next) &gt; 0"/>
+
+ <xsl:variable name="row2" select="($prev and $navig.showtitles != 0)
+ or (generate-id($home) != generate-id(.)
+ or $nav.context = 'toc')
+ or ($chunk.tocs.and.lots != 0
+ and $nav.context != 'toc')
+ or ($next and $navig.showtitles != 0)"/>
+
+ <xsl:if test="
+ $suppress.navigation = '0' and $suppress.header.navigation = '0'
+ "><table width = "100%" class = "navheader">
+ <tr>
+ <td align = "left" width = "40%">
+ <!-- prev:name -->
+ <xsl:if test="$navig.showtitles != 0">
+ <xsl:apply-templates select="$prev" mode="object.title.markup"/>
+ </xsl:if>
+ <xsl:text>&#160;</xsl:text>
+ </td><td align = "center" width = "20%">
+ <!-- home -->
+ <xsl:choose>
+ <xsl:when test="$home != . or $nav.context = 'toc'">
+ <a accesskey="h">
+ <xsl:attribute name="href"><xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$home"/>
+ </xsl:call-template></xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'home'"/>
+ </xsl:call-template>
</a>
+ <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
+ <xsl:text>&#160;|&#160;</xsl:text>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>&#160;</xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
+ <a accesskey="t">
+ <xsl:attribute name="href">
+ <xsl:apply-templates select="/*[1]"
+ mode="recursive-chunk-filename"/>
+ <xsl:text>-toc</xsl:text>
+ <xsl:value-of select="$html.ext"/>
+ </xsl:attribute>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'nav-toc'"/>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ </td><td align = "right" width = "40%">
+ <!-- next:name -->
+ <xsl:text>&#160;</xsl:text>
+ <xsl:if test="$navig.showtitles != 0">
+ <xsl:apply-templates select="$next" mode="object.title.markup"/>
+ </xsl:if>
</td>
- <td>
- <a href="../../more/index.htm">
- <font color="#FFFFFF" size="4" face="Arial">More</font>
+ </tr><tr>
+ <td align = "left" width = "40%">
+ <!-- prev -->
+ <xsl:if test="count($prev)>0"><a accesskey="p">
+ <xsl:attribute name="href"><xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$prev"/>
+ </xsl:call-template></xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'prev'"/>
+ </xsl:call-template>
+ </a></xsl:if>
+ <xsl:text>&#160;</xsl:text>
+ </td><td align = "center" width = "20%">
+ <!-- up -->
+ <xsl:choose>
+ <xsl:when test="count($up)>0">
+ <a accesskey="u">
+ <xsl:attribute name="href"><xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$up"/>
+ </xsl:call-template></xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'up'"/>
+ </xsl:call-template>
</a>
+ </xsl:when>
+ <xsl:otherwise>&#160;</xsl:otherwise>
+ </xsl:choose>
+ </td><td align = "right" width = "40%">
+ <!-- next -->
+ <xsl:text>&#160;</xsl:text>
+ <xsl:if test="count($next)>0"><a accesskey="n">
+ <xsl:attribute name="href"><xsl:call-template name="href.target">
+ <xsl:with-param name="object" select="$next"/>
+ </xsl:call-template></xsl:attribute>
+ <xsl:call-template name="navig.content">
+ <xsl:with-param name="direction" select="'next'"/>
+ </xsl:call-template>
+ </a></xsl:if>
</td>
</tr>
- </table>
+ </table></xsl:if>
+ <hr/>
</xsl:template>


  <xsl:template name="format.cvs.revision">
@@ -192,4 +309,18 @@
  <!-- We don't want refentry's to show up in the TOC because they
       will merely be redundant with the synopsis. -->
  <xsl:template match="refentry" mode="toc"/>
+
+  <!-- override the behaviour of some DocBook elements for better
+       rendering facilities -->
+
+  <xsl:template match = "programlisting[ancestor::informaltable]">
+     <pre class = "table-{name(.)}"><xsl:apply-templates/></pre>
+  </xsl:template>
+
+  <xsl:template match = "refsynopsisdiv">
+     <h2 class = "{name(.)}-title">Synopsis</h2>
+     <div class = "{name(.)}">
+        <xsl:apply-templates/>
+     </div>
+  </xsl:template>
 </xsl:stylesheet>

? boostbook.css.diff
Index: boostbook.css
===================================================================
RCS file: /cvsroot/boost/boost/doc/html/boostbook.css,v
retrieving revision 1.1
diff -u -w -r1.1 boostbook.css
--- boostbook.css       5 Feb 2004 22:14:19 -0000       1.1
+++ boostbook.css       9 Feb 2004 13:56:47 -0000
@@ -4,20 +4,23 @@
   text-align:       center;
}

-.title
+a img{ border: 0.1em solid black; }
+
+.title, .refnamediv h2, .standalone-title
{
   font-weight:   bold;
   font-size:     2pc;
   font-family:   Times New Roman;
   margin-bottom: 1pc;
-   text-align:    center;
}

.toc
{
   margin-left:   15%;
   margin-right:  15%;
+   margin-top:    1pc;
   margin-bottom: 0pc;
+   padding:       0.5pc;
}

div pre.programlisting, .refsynopsisdiv
@@ -32,35 +35,44 @@
   font-size:   80%;
}

-.table
+.table, .title, .refnamediv h2
{
   text-align: center;
}

+.section .section .title, .chapter .section .title, .table .title
+{
+   text-align: left;
+}
+
+.informaltable table
+{
+   width: 100%;
+}
+
@media screen
{
   a{ color: blue; }
+   table, td, th{ border: 0pc; }

-   th, .title
+   th, .title, .refnamediv h2
   {
      background-color: lightskyblue;
   }

-   .section .title
+   .section .section .title, .chapter .section .title, .table .title
   {
-      background-color: #DDD;
-      text-align:       left;
+      background-color: white;
   }

-   .table .title
+   .table table, div.informaltable table, .section-title
   {
-      background-color: white;
-      text-align:       left;
+      background-color: #EEE;
   }

-   div.table table, div.informaltable table, .section-title
+   .table table tr td, div.informaltable table tr td
   {
-      background-color: #EEE;
+      background-color: #CCC;
   }

   .programlisting, .table-programlisting
@@ -75,6 +87,8 @@
      background-color: lightskyblue;
      border:           0.2em ridge cyan;
      padding:          1pc;
+      font-family:      Courier, Lucida Console;
+      font-size:        80%;
   }

   .boost-head
@@ -83,11 +97,10 @@
      border:           0.1em outset #007F7F;
   }

-   .boost-headelem
+   .toc
   {
-      color:       white;
-      font-family: Arial;
-      font-weight: bold;
+      background-color: #DDD;
+      border:           0.2em ridge lightcoral;
   }

   table.boost-head tr td
@@ -95,27 +108,25 @@
      border: 0.1em inset #007F7F;
   }

-   .toc
+   .boost-headelem
   {
-      border:           0.2em ridge lightcoral;
-      padding:          0.5pc;
-      background-color: #DDD;
+      color:       white;
+      font-family: Arial;
+      font-weight: bold;
   }
}

@media print
{
-   body
-   {
-      text-align: justify;
-   }
-
+   body{ text-align: justify; }
   a{ color: black; }
+   table{ border: 0pc; }

   .boost-head, table.boost-head tr td
   {
      border: 0em;
   }
-}

+   .toc{ border: 0.2em solid black; }
+}




Reply via email to