[stylesheets] homogenize easy/fancy/footer

* with these reordering of functions, easy == fancy
* also footer = easy|fancy + footer
This commit is contained in:
Christopher Lam 2019-10-25 23:27:57 +08:00
parent 2dd2f0dc65
commit 0aad777870
4 changed files with 30 additions and 39 deletions

View File

@ -211,7 +211,6 @@
(border (opt-val "Tables" "Table border width"))
(headcolumn 0))
(gnc:html-document-set-style!
ssdoc "body"
'attribute (list "bgcolor" bgcolor)
@ -323,6 +322,8 @@
(gnc:html-document-set-style!
ssdoc "a" 'tag ""))
(add-css-information-to-doc options ssdoc doc)
(let ((t (gnc:make-html-table)))
;; we don't want a bevel for this table, but we don't want
;; that to propagate
@ -338,11 +339,8 @@
(if (and logopixmap (> (string-length logopixmap) 0))
(set! headcolumn 1))
(add-css-information-to-doc options ssdoc doc)
(let* ((title (gnc:html-document-title doc))
(doc-headline (gnc:html-document-headline doc))
(headline (if (eq? doc-headline #f) title doc-headline)))
(let* ((headline (or (gnc:html-document-headline doc)
(gnc:html-document-title doc))))
(gnc:html-table-set-cell!
t 1 headcolumn
@ -368,11 +366,10 @@
;; only setup an image if we specified one
(if (and logopixmap (> (string-length logopixmap) 0))
(begin
(gnc:html-table-set-cell!
t 0 0
(gnc:make-html-text
(gnc:html-markup-img (make-file-url logopixmap))))))
(gnc:html-table-set-cell!
t 0 0
(gnc:make-html-text
(gnc:html-markup-img (make-file-url logopixmap)))))
(if (and headpixmap (> (string-length headpixmap) 0))
(let* ((div (gnc:html-markup-img (make-file-url headpixmap)))

View File

@ -210,7 +210,6 @@
'attribute (list "bgcolor" bgcolor)
'attribute (list "text" textcolor)
'attribute (list "link" linkcolor))
;;;;
;;;;
;;;;
@ -328,15 +327,14 @@
'attribute (list "style" "margin-left:auto; margin-right:auto")
'inheritable? #f)
(let* ((title (gnc:html-document-title doc))
(doc-headline (gnc:html-document-headline doc))
(headline (if (eq? doc-headline #f) title doc-headline)))
;; set the header column to be the 2nd when we have a logo
;; do this so that when logo is not present, the document
;; is perfectly centered
(if (and logopixmap (> (string-length logopixmap) 0))
(set! headcolumn 1))
;; set the header column to be the 2nd when we have a logo
;; do this so that when logo is not present, the document
;; is perfectly centered
(if (and logopixmap (> (string-length logopixmap) 0))
(set! headcolumn 1))
(let* ((headline (or (gnc:html-document-headline doc)
(gnc:html-document-title doc))))
(gnc:html-table-set-cell!
t 1 headcolumn
@ -360,13 +358,12 @@
(gnc:html-markup-h3 headline))))
)
(if (and logopixmap
(not (string=? logopixmap "")))
;; check for logo image file name non blank
;; only setup an image if we specified one
(if (and logopixmap (> (string-length logopixmap) 0))
(gnc:html-table-set-cell!
t 0 0
(gnc:make-html-text
(gnc:html-markup-img (make-file-url logopixmap)))) )
(gnc:html-markup-img (make-file-url logopixmap)))))
(if (and headpixmap (> (string-length headpixmap) 0))
(let* ((div (gnc:html-markup-img (make-file-url headpixmap)))
@ -379,7 +376,6 @@
gnc:html-table-set-cell!
t 2 headcolumn
(gnc:html-document-objects doc))
(gnc:html-document-add-object! ssdoc t))
ssdoc))

View File

@ -219,7 +219,7 @@
(bgpixmap (opt-val "Images" "Background Tile"))
(headpixmap (opt-val "Images" "Heading Banner"))
(logopixmap (opt-val "Images" "Logo"))
(align (gnc:value->string(opt-val "Images" "Heading Alignment")))
(align (gnc:value->string (opt-val "Images" "Heading Alignment")))
(spacing (opt-val "Tables" "Table cell spacing"))
(padding (opt-val "Tables" "Table cell padding"))
(border (opt-val "Tables" "Table border width"))
@ -333,7 +333,8 @@
;; don't surround marked-up links with <a> </a>
(if (not links?)
(gnc:html-document-set-style! ssdoc "a" 'tag ""))
(gnc:html-document-set-style!
ssdoc "a" 'tag ""))
(add-css-information-to-doc options ssdoc doc)
@ -352,9 +353,8 @@
(if (and logopixmap (> (string-length logopixmap) 0))
(set! headcolumn 1))
(let* ((title (gnc:html-document-title doc))
(doc-headline (gnc:html-document-headline doc))
(headline (if (eq? doc-headline #f) title doc-headline)))
(let* ((headline (or (gnc:html-document-headline doc)
(gnc:html-document-title doc))))
(gnc:html-table-set-cell!
t 1 headcolumn
@ -380,11 +380,10 @@
;; only setup an image if we specified one
(if (and logopixmap (> (string-length logopixmap) 0))
(begin
(gnc:html-table-set-cell!
t 0 0
(gnc:make-html-text
(gnc:html-markup-img (make-file-url logopixmap))))))
(gnc:html-table-set-cell!
t 0 0
(gnc:make-html-text
(gnc:html-markup-img (make-file-url logopixmap)))))
(if (and headpixmap (> (string-length headpixmap) 0))
(let* ((div (gnc:html-markup-img (make-file-url headpixmap)))

View File

@ -285,7 +285,7 @@
(bgpixmap (opt-val "Images" "Background Tile"))
(headpixmap (opt-val "Images" "Heading Banner"))
(logopixmap (opt-val "Images" "Logo"))
(align (gnc:value->string(opt-val "Images" "Heading Alignment")))
(align (gnc:value->string (opt-val "Images" "Heading Alignment")))
(spacing (opt-val "Tables" "Table cell spacing"))
(padding (opt-val "Tables" "Table cell padding"))
(border (opt-val "Tables" "Table border width"))
@ -418,9 +418,8 @@
(if (and logopixmap (> (string-length logopixmap) 0))
(set! headcolumn 1))
(let* ((title (gnc:html-document-title doc))
(doc-headline (gnc:html-document-headline doc))
(headline (if (eq? doc-headline #f) title doc-headline)))
(let* ((headline (or (gnc:html-document-headline doc)
(gnc:html-document-title doc))))
(gnc:html-table-set-cell!
t 1 headcolumn