diff options
author | Arun Isaac | 2023-08-28 18:07:58 +0100 |
---|---|---|
committer | Arun Isaac | 2023-08-29 17:08:46 +0100 |
commit | 09499acd48b979dd05ebb45d5ac024b14d30d8f1 (patch) | |
tree | a79ced7a09faf132d07a9d1879f889ca600f4c7d /src/guile | |
parent | 05fe77afa44799bb5b5a21946bdcf2ea2ba1091d (diff) | |
download | skribilo-09499acd48b979dd05ebb45d5ac024b14d30d8f1.tar.gz skribilo-09499acd48b979dd05ebb45d5ac024b14d30d8f1.tar.lz skribilo-09499acd48b979dd05ebb45d5ac024b14d30d8f1.zip |
html: Implement flush without HTML tables.
* src/guile/skribilo/engine/html.scm (flush): Implement without HTML
tables, using CSS only.
Diffstat (limited to 'src/guile')
-rw-r--r-- | src/guile/skribilo/engine/html.scm | 48 |
1 files changed, 15 insertions, 33 deletions
diff --git a/src/guile/skribilo/engine/html.scm b/src/guile/skribilo/engine/html.scm index 2c70ef8..01fb583 100644 --- a/src/guile/skribilo/engine/html.scm +++ b/src/guile/skribilo/engine/html.scm @@ -1683,39 +1683,21 @@ ignored, return #f." ;* flush ... */ ;*---------------------------------------------------------------------*/ (markup-writer 'flush - :options '(:side) - :before (lambda (node engine) - (case (markup-option node :side) - ((center) - (html-open 'center - `((class . ,(markup-class node))))) - ((left) - (html-open 'p - `((class . ,(markup-class node)) - (style . "text-align:left;")))) - ((right) - (html-open 'table - `((width . "100%") - (cellpadding . "0") - (cellspacing . "0") - (border . "0"))) - (html-open 'tr) - (html-open 'td - '((align . "right")))) - (else - (skribe-error 'flush - "Invalid side" - (markup-option node :side))))) - :after (lambda (node engine) - (case (markup-option node :side) - ((center) - (html-close 'center)) - ((right) - (html-close 'td) - (html-close 'tr) - (html-close 'table)) - ((left) - (html-close 'p))))) + :options '(:side) + :before (lambda (node engine) + (let ((text-align + (case (markup-option node :side) + ((left center right) + (symbol->string (markup-option node :side))) + (else + (skribe-error 'flush + "Invalid side" + (markup-option node :side)))))) + (html-open 'span + `((class . ,(markup-class node)) + (style . ,(style-declaration + `((text-align . ,text-align)))))))) + :after "</span>\n") ;*---------------------------------------------------------------------*/ ;* center ... */ |