aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLudovic Court`es2006-07-21 16:32:43 +0000
committerLudovic Court`es2006-07-21 16:32:43 +0000
commitce8ab209442beed465642c3208bd3e3ed7609292 (patch)
tree020eccb3b3245fb69e21fba34b370f051aadc5ed /src
parent272de5b9dc48596d0c3776cf3e9e7acf49655136 (diff)
downloadskribilo-ce8ab209442beed465642c3208bd3e3ed7609292.tar.gz
skribilo-ce8ab209442beed465642c3208bd3e3ed7609292.tar.lz
skribilo-ce8ab209442beed465642c3208bd3e3ed7609292.zip
Made the HTML engine and `web-book' more style-neutral.
* src/guile/skribilo/engine/html.scm: Switched all color- and font-related customs to `#f' by default. Adapted a few writers so that they can properly handle this. * src/guile/skribilo/package/web-book.scm: Be careful when using `color' et al. git-archimport-id: lcourtes@laas.fr--2005-libre/skribilo--devo--1.2--patch-21
Diffstat (limited to 'src')
-rw-r--r--src/guile/skribilo/engine/html.scm33
-rw-r--r--src/guile/skribilo/package/web-book.scm29
2 files changed, 32 insertions, 30 deletions
diff --git a/src/guile/skribilo/engine/html.scm b/src/guile/skribilo/engine/html.scm
index 15bea53..843f099 100644
--- a/src/guile/skribilo/engine/html.scm
+++ b/src/guile/skribilo/engine/html.scm
@@ -115,7 +115,7 @@
;; emit-sui
(emit-sui #f)
;; the body
- (background "#ffffff")
+ (background #f)
(foreground #f)
;; the margins
(margin-padding 3)
@@ -124,42 +124,42 @@
(section-left-margin #f)
(left-margin-font #f)
(left-margin-size 17.)
- (left-margin-background "#dedeff")
+ (left-margin-background #f)
(left-margin-foreground #f)
(right-margin #f)
(chapter-right-margin #f)
(section-right-margin #f)
(right-margin-font #f)
(right-margin-size 17.)
- (right-margin-background "#dedeff")
+ (right-margin-background #f)
(right-margin-foreground #f)
;; author configuration
(author-font #f)
;; title configuration
(title-font #f)
- (title-background "#8381de")
+ (title-background #f)
(title-foreground #f)
(file-title-separator " -- ")
;; html file naming
(file-name-proc ,html-file-default)
;; index configuration
- (index-header-font-size +2.)
+ (index-header-font-size #f) ;; +2.
;; chapter configuration
(chapter-number->string number->string)
(chapter-file #f)
;; section configuration
(section-title-start "<h3>")
(section-title-stop "</h3>")
- (section-title-background "#dedeff")
- (section-title-foreground "black")
+ (section-title-background #f)
+ (section-title-foreground #f)
(section-title-number-separator " ")
(section-number->string number->string)
(section-file #f)
;; subsection configuration
(subsection-title-start "<h3>")
(subsection-title-stop "</h3>")
- (subsection-title-background "#ffffff")
- (subsection-title-foreground "#8381de")
+ (subsection-title-background #f)
+ (subsection-title-foreground #f)
(subsection-title-number-separator " ")
(subsection-number->string number->string)
(subsection-file #f)
@@ -167,7 +167,7 @@
(subsubsection-title-start "<h4>")
(subsubsection-title-stop "</h4>")
(subsubsection-title-background #f)
- (subsubsection-title-foreground "#8381de")
+ (subsubsection-title-foreground #f)
(subsubsection-title-number-separator " ")
(subsubsection-number->string number->string)
(subsubsection-file #f)
@@ -877,7 +877,10 @@
(when title
(display "<table width=\"100%\" class=\"skribetitle\" cellspacing=\"0\" cellpadding=\"0\"><tbody>\n<tr>")
(if (html-color-spec? tbg)
- (printf "<td align=\"center\" bgcolor=\"~a\">" tbg)
+ (printf "<td align=\"center\"~A>"
+ (if (html-color-spec? tbg)
+ (string-append "bgcolor=\"" tbg "\"")
+ ""))
(display "<td align=\"center\">"))
(if (string? tfg)
(printf "<font color=\"~a\">" tfg))
@@ -1068,13 +1071,9 @@
(display "</td></tr>"))
;; name
(printf "<tr><td align=\"~a\">" align)
- (if nfn
- (printf "<font ~a>\n" nfn)
- (display "<font size=\"+2\"><i>\n"))
+ (if nfn (printf "<font ~a>\n" nfn))
(output name e)
- (if nfn
- (printf "</font>\n")
- (display "</i></font>\n"))
+ (if nfn (printf "</font>\n"))
(display "</td></tr>")
;; title
(if title (row title))
diff --git a/src/guile/skribilo/package/web-book.scm b/src/guile/skribilo/package/web-book.scm
index a954c7a..e52bdc3 100644
--- a/src/guile/skribilo/package/web-book.scm
+++ b/src/guile/skribilo/package/web-book.scm
@@ -35,10 +35,11 @@
(center
(table :width 97. :border 1 :frame 'box
:cellpadding 0 :cellspacing 0
- (tr :bg (engine-custom e 'title-background)
- (th (color :fg (engine-custom e 'background)
- (bold "main page"))))
- (tr :bg (engine-custom e 'background)
+ (tr :bg (engine-custom e 'title-background)
+ (th (let ((text (bold "main page"))
+ (bg (engine-custom e 'background)))
+ (if bg (color :fg bg text) text))))
+ (tr :bg (engine-custom e 'background)
(td (apply table :width 100. :border 0
(tr (td :align 'left
:valign 'top
@@ -60,12 +61,13 @@
(define chapter-browsing
(lambda (n e)
(center
- (table :width 97. :border 1 :frame 'box
+ (table :width 97. :border 1 :frame 'box
:cellpadding 0 :cellspacing 0
- (tr :bg (engine-custom e 'title-background)
- (th (color :fg (engine-custom e 'background)
- (bold (markup-option n :title)))))
- (tr :bg (engine-custom e 'background)
+ (tr :bg (engine-custom e 'title-background)
+ (th (let ((title (bold (markup-option n :title)))
+ (bg (engine-custom e 'background)))
+ (if bg (color :fg title) title))))
+ (tr :bg (engine-custom e 'background)
(td (toc (handle n) :chapter #t :section #t :subsection #t)))))))
;*---------------------------------------------------------------------*/
@@ -79,10 +81,11 @@
(center
(table :width 97. :border 1 :frame 'box
:cellpadding 0 :cellspacing 0
- (tr :bg (engine-custom e 'title-background)
- (th (color :fg (engine-custom e 'background)
- (bold (if chap "Chapters" "Sections")))))
- (tr :bg (engine-custom e 'background)
+ (tr :bg (engine-custom e 'title-background)
+ (th (let ((text (bold (if chap "Chapters" "Sections")))
+ (bg (engine-custom e 'background)))
+ (if bg (color :fg bg text) text))))
+ (tr :bg (engine-custom e 'background)
(td (if chap
(toc (handle n) :chapter #t :section #f)
(toc (handle n) :section #t :subsection #t)))))))))