From 8703a0d42c3c1da47d764c41c74a72ef4f14dbef Mon Sep 17 00:00:00 2001 From: dakkar Date: Mon, 31 Aug 2009 16:42:18 +0200 Subject: stylesheets, and better ReST conformance - layout with two columns and fixed footer - imported docutils official stylesheet - changed the XSLT code to produce XHTML more in line with rst2html.py --- additions/content.css | 9 +- additions/layout.css | 119 ++++++++++++++++++++++--- doit.sh | 1 + templates/du2html.xsl | 106 ++++++++++++++++------- templates/reST.xsl | 234 ++++++++++++++++++++++++++++++++++---------------- 5 files changed, 350 insertions(+), 119 deletions(-) diff --git a/additions/content.css b/additions/content.css index 321a2d8..47b7742 100644 --- a/additions/content.css +++ b/additions/content.css @@ -1 +1,8 @@ -div.literal-block { white-space: pre } +div.footnote { + border-left: solid 1px black; + margin-left: 1px; +} + +div.caption { + font-style: italic; +} diff --git a/additions/layout.css b/additions/layout.css index b25faf7..4ae46d7 100644 --- a/additions/layout.css +++ b/additions/layout.css @@ -1,22 +1,117 @@ -body { font: normal 100% Times, Times New Roman, serif; } +div { + border: thin solid green; +} -h1 { font-family: Georgia, serif; font-size: 2em; margin: 0.5em; } -#title { max-width: 60em; margin: 0.2em auto;} +/* sticky footer */ -div { border: thin solid green; margin: 0.3em } +div { + margin: 0; + padding: 0; +} -span.title { font-size: 0.3em; display: block; float: right} +body { + font: normal 100%/1.375 Times, Times New Roman, serif; +} + +html, body { + height: 100%; +} + +#wrapper { + min-height: 100%; + margin: 0 auto -4em auto; +} + +#push { + height: 4em; +} + +#push { + clear: both; +} + +#footer { + margin: 0 auto; + height: 4em; + max-width: 58em; +} + +#wrapper { + max-width: 60em; /* leave "air" at the sides */ +} + +/* columns */ + +#main-col { + float: left; + width: 70%; +} + +#sidebar { + float: right; + width: 25%; +} + +/* title */ + +#title { + max-width: 60em; + margin: 0.2em auto; +} + +h1 { + font-family: Georgia, serif; + font-size: 2em; + line-height: 1.15; + margin: 0.5em; +} + +/* top boxes */ + +#tags, #alt-langs { + position: relative; + text-align: center; + width: 70%; + min-height: 1.5em; + margin: 0 auto; +} + +#tags ul, #tags li { + display: inline; + margin: 0.3em; + padding: 0; + border: none; + list-style: none +} -#tags { position: relative; text-align: center; max-width: 40em; float: left; } -#tags ul, #tags li { display: inline; margin: 0.3em; padding: 0; border: none; list-style: none } #tags li:before { content: '-' } #tags li:after { content: '-' } -#nav-links { position: relative; max-width: 15em; float: right; margin: 0 0 0.5em 0.5em; } -#nav-links dt, #nav-links dd { display: inline } +/* main content */ -#content { clear: left; max-width: 60em; margin: 2em auto 0 auto; } +#content { + width: 100%; + line-height: 1.35; +} + +#dates { + position: relative; + width: 80%; + margin: 0 auto; +} + +/* sidebar */ + +#nav-links, #nav-tags { + position: relative; +} + +#nav-links dt, #nav-links dd { display: inline } -#dates { position: relative; max-width: 60em; margin: 0 auto; } +/* boxes, misc */ -#nav-tags { position: absolute; max-width: 15em; right: 0; top :0; } +span.title { + font-size: 0.3em; + display: block; + float: right +} diff --git a/doit.sh b/doit.sh index 1e2fbe6..d7ae2df 100755 --- a/doit.sh +++ b/doit.sh @@ -14,6 +14,7 @@ fi if [[ "$*" != '--clean' ]]; then rsync -r output/ /var/www/localhost/htdocs/ rsync -r additions/ /var/www/localhost/htdocs/ + rsync /usr/share/doc/docutils-*/html/html4css1.css /var/www/localhost/htdocs/ fi diff --git a/templates/du2html.xsl b/templates/du2html.xsl index 07521a6..6d30510 100644 --- a/templates/du2html.xsl +++ b/templates/du2html.xsl @@ -60,6 +60,15 @@ Documenti correlati Related documents Alcuni tag Some tags Tutti i tag All tags +Attenzione! Attention! +Cautela! Caution! +!PERICOLO! !DANGER! +Errore Error +Suggerimento Hint +Importante Important +Nota Note +Trucco Tip +Avvertenza Warning @@ -95,7 +104,7 @@ - + @@ -105,15 +114,30 @@ - + + + - - - + + + + + + + + + + + + + + + + @@ -122,6 +146,7 @@ <x:value-of select="title"/> + @@ -134,30 +159,45 @@ -
-

- -

- - - -
-
- -
- - +
+ + +
+ +
+ +
+ +
+ + @@ -166,7 +206,7 @@ - + @@ -216,7 +256,7 @@
- +
@@ -229,7 +269,7 @@
  • - + ()
  • @@ -265,7 +305,7 @@
  • - +
  • @@ -298,7 +338,7 @@ diff --git a/templates/reST.xsl b/templates/reST.xsl index ecf3bd5..db6e93b 100644 --- a/templates/reST.xsl +++ b/templates/reST.xsl @@ -1,6 +1,8 @@ - - - + +

    + + +

    +
    - - footnoteref - - footnote-backref- - - - - #footnote- - - - - [ - - ] - + + [ + + ] + - - footnote - - footnote- - - - - - footnotereturn - - #footnote-backref- - - - - return to content - - - # - - : - - - - + + +
    + + + [] + + + [] + ( + + + + + , + + ) + + + + +
    + + + + + + + -
    +
      + + +
    -
    +
      + + + + + +
    @@ -260,24 +283,29 @@
    + + + + -
    +
    + + : + + + - - - - - - - +
    OptionDescription
    + +
    @@ -286,19 +314,21 @@
    - + -
    + + ,
    - + - + + @@ -326,6 +356,62 @@ + +

    + +

    +
    + + +

    + +

    +
    + + + + +
    +

    + +
    +
    + + + + + + +
    + +
    +
    + + +

    +
    + + + + + + + + +

    + +

    +
    + + +

    +
    - - +
    @@ -407,5 +492,8 @@
    + +
    +
    -- cgit v1.2.3