|
Boost-Build : |
From: Reece Dunn (msclrhd_at_[hidden])
Date: 2004-02-04 21:02:33
Christopher Currie wrote:
>Vladimir Prus wrote:
> > Douglas Gregor wrote:
> >
> >>On Tuesday 03 February 2004 05:24 pm, Christopher Currie wrote:
> >>
> >>>What we *may* end up doing is tweaking the stylesheets to create a
> >>>different L&F. I'm pretty sure the existing stylesheets are designed to
> >>>follow some Boost guidelines, but Zbynek's layout got some good
>reviews,
> >>>so if possible we'd like to modernize them a little.
> >>
> >>If you happen to come up with a slick new look & feel that we can apply
>to
> >>BoostBook, I wouldn't mind :). I'm actually a bit envious of Spirit's
>docs,
> >>which look _very_ nice, but not envious enough to actually try to
>duplicate
> >>what they've done :)
> >
> > I too find Spirit docs to be very nice. I actually think it would be
>nice to
> > go ahead and steal at least the navigation arrors ;-)
> >
> > As for other elements: like gradient background of examples, and so on,
>I just
> > have no idea how it's implemented and how hard it's to steal.
The way they do it is setting the table/body background to a gif
(libs/spirit/doc/theme/bkd.gif). E.g.
<style>
body{ background-image: url('llibs/spirit/doc/theme/bkd.gif') }
</style>
If you have MS IE5.5 or later, you can use:
<style>
body{ filter:progid:DXImageTransform.Microsoft.Gradient
(
GradientType=1,
StartColorStr='white',
EndColorStr='#888888'
); }
</style>
to achieve the same affect. This is more flexible and is easy to modify, but
is platform-specific and if applied to the body element, can turn scrolling
into "jumping" :).
I have included an updated stylesheet that uses the MS filter technique (I
don't know how it looks in another browser such as Mozilla). Again, this is
still incomplete.
Regards,
Reece
_________________________________________________________________
Sign-up for a FREE BT Broadband connection today!
http://www.msn.co.uk/specials/btbroadband
------=_NextPart_000_5329_1c0b_4e16 Content-Type: text/xml; name="boostbook-html.xsl"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="boostbook-html.xsl"
<?xml version = "1.0"?>
<xsl:stylesheet version = "1.0"
xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
xmlns:xi = "http://www.w3.org/2001/XInclude"
>
<xsl:param name = "boost.gif">../../../c++boost.gif</xsl:param>
<xsl:output method = "html"/>
<xsl:template match = "chapter">
<html><head>
<title><xsl:value-of select = "title/text()"/></title>
<link type = "text/css" rel = "stylesheet" href = "boostbook.css"/>
</head><body>
<xsl:apply-templates select = "title"/>
<table width = "100%"><tr>
<td valign = "top"><img src = "{$boost.gif}"/></td>
<td class = "toc" valign = "top">
<xsl:apply-templates select = "section" mode = "contents"/>
<!--xsl:apply-templates select = "section|xi:include" mode = "contents"/-->
</td>
</tr></table>
<xsl:apply-templates select = "section"/>
<!--xsl:apply-templates select = "section|xi:include"/-->
<hr/>
<div style = "text-align: right;">
<div>Revised <xsl:value-of select = "@last-revision"/></div>
<div><xsl:apply-templates select = "chapterinfo/copyright"/></div>
</div>
</body></html>
</xsl:template>
<xsl:template match = "copyright">
Copyright (C)
<xsl:apply-templates select = "holder"/>
<xsl:apply-templates select = "date"/>
</xsl:template>
<xsl:template match = "section|table" mode = "contents">
<div>
<a href = "#{@id}" class = "slink"><xsl:value-of select = "title/text()"/></a>
<xsl:if test = "section"><div style = "margin-left: 1.5pc;">
<xsl:apply-templates select = "section|table" mode = "contents"/>
</div></xsl:if>
</div>
</xsl:template>
<xsl:template match = "section">
<xsl:apply-templates/>
</xsl:template>
<!-- xi:include -->
<xsl:template match = "xi:include" mode = "contents">
<xsl:apply-templates select = "document(@href)" mode = "contents"/>
</xsl:template>
<xsl:template match = "xi:include">
<xsl:apply-templates select = "document(@href)"/>
</xsl:template>
<!-- title -->
<xsl:template match = "chapter/title" mode = "class">
title
</xsl:template>
<xsl:template match = "section/title" mode = "class">
sec-title
</xsl:template>
<xsl:template match = "section/section/title" mode = "class">
sec2-title
</xsl:template>
<xsl:template match = "table/title" mode = "class">
table-title
</xsl:template>
<xsl:template match = "refsection/title" mode = "class">
refsec-title
</xsl:template>
<xsl:template match = "title">
<a name = "{../@id}"/><div>
<xsl:attribute name = "class">
<xsl:apply-templates select = "." mode = "class"/>
</xsl:attribute>
<xsl:apply-templates/>
</div>
</xsl:template>
<!-- reference -->
<xsl:template match = "refentry">
<hr/><a name = "{@id}"/>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match = "refentry/refmeta">
<xsl:apply-templates select = "refentrytitle"/>
</xsl:template>
<xsl:template match = "refentry/refmeta/refentrytitle">
<div class = "ref-title"><xsl:apply-templates/></div>
</xsl:template>
<xsl:template match = "sgmltag">
<span class = "code"><xsl:apply-templates/></span>
</xsl:template>
<xsl:template match = "refnamediv">
<div style = "margin-bottom: 1pc;"><xsl:apply-templates select = "refpurpose"/></div>
</xsl:template>
<xsl:template match = "refsynopsisdiv">
<div class = "listing"><div class = "code"><xsl:apply-templates/></div></div>
</xsl:template>
<!-- HTML-like elements -->
<xsl:template match = "para">
<div style = "margin-bottom: 1pc;">
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match = "simpara">
<div><xsl:apply-templates/></div>
</xsl:template>
<xsl:template match = "programlisting">
<pre class = "listing"><xsl:apply-templates/></pre>
</xsl:template>
<xsl:template match = "link">
<a href = "#{@linkend}" class = "ulink"><xsl:apply-templates/></a>
</xsl:template>
<xsl:template match = "ulink">
<a href = "{@url}" class = "ulink"><xsl:apply-templates/></a>
</xsl:template>
<xsl:template match = "filename">
<span class = "filename"><xsl:apply-templates/></span>
</xsl:template>
<xsl:template match = "code">
<span class = "code"><xsl:apply-templates/></span>
</xsl:template>
<xsl:template match = "emphasis[@role = 'bold']">
<span style = "font-weight: bold;"><xsl:apply-templates/></span>
</xsl:template>
<!-- list formatting -->
<xsl:template match = "itemizedlist">
<ul><xsl:apply-templates/></ul>
</xsl:template>
<xsl:template match = "orderedlist">
<ol><xsl:apply-templates/></ol>
</xsl:template>
<xsl:template match = "itemizedlist/listitem|orderedlist/listitem">
<li><xsl:apply-templates/></li>
</xsl:template>
<!-- table formatting -->
<xsl:template match = "table">
<xsl:apply-templates select = "title"/>
<div class = "table"><table border = "1">
<xsl:apply-templates select = "tgroup/thead/row|tgroup/tbody/row"/>
</table></div>
</xsl:template>
<xsl:template match = "informaltable">
<table border = "0" width = "100%">
<xsl:apply-templates select = "tgroup/thead/row|tgroup/tbody/row"/>
</table>
</xsl:template>
<xsl:template match = "thead/row|tbody/row">
<tr><xsl:apply-templates select = "entry"/></tr>
</xsl:template>
<xsl:template match = "thead/row/entry">
<th><xsl:apply-templates/></th>
</xsl:template>
<xsl:template match = "tbody/row/entry">
<td valign = "top"><xsl:apply-templates/></td>
</xsl:template>
</xsl:stylesheet>
------=_NextPart_000_5329_1c0b_4e16 Content-Type: text/css; name="boostbook.css"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="boostbook.css"
th
{
font-weight: bold;
text-align: center;
background-color: lightskyblue;
}
body
{
filter:progid:DXImageTransform.Microsoft.Gradient
(
GradientType=1,
StartColorStr='white',
EndColorStr='#888888'
);
}
.title, .sec-title, .sec2-title, .table-title, .ref-title, .refsec-title
{
font-weight: bold;
font-size: 2pc;
font-family: Times New Roman;
margin-bottom: 1pc;
}
.title
{
text-align: center;
background-color: lightskyblue;
}
.sec-title
{
background-color: #EEE;
}
.ref-title
{
text-align: right;
background-color: #EEC;
}
.refsec-title
{
text-align: center;
font-size: 1.5pc;
}
.toc
{
border: 0.2em ridge lightcoral;
margin-left: 5%;
margin-right: 5%;
margin-top: 1pc;
margin-bottom: 1pc;
padding: 0.5pc;
width: 50%;
background-color: #DDD;
filter:progid:DXImageTransform.Microsoft.Gradient
(
GradientType=1,
StartColorStr='#BBBBBB',
EndColorStr='white'
);
}
.listing
{
background-color: #EED;
border: 0.1em ridge cyan;
margin-left: 3pc;
padding: 1pc;
width: 50%;
filter:progid:DXImageTransform.Microsoft.Gradient
(
GradientType=1,
StartColorStr='#EEEEDD',
EndColorStr='white'
);
}
.filename, .code
{
font-family: Lucida Console;
font-size: 80%;
}
.table
{
text-align: center;
margin-bottom: 1pc;
}
@media screen
{
.ulink, .slink
{
color: blue;
}
}
@media print
{
.ulink, .slink
{
color: black;
}
}
------=_NextPart_000_5329_1c0b_4e16--
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk