From: Christopher Allan Webber Date: Mon, 23 Jan 2017 22:20:47 +0000 (-0600) Subject: Add pre-tag to scrubl X-Git-Tag: fosdem-2017~92 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=bf6886fe1fb0d7128fd031c92ebeb3c8d4b9addd;p=mudsync.git Add pre-tag to scrubl --- diff --git a/data/web-static/css/main.css b/data/web-static/css/main.css index 308a556..f39402c 100644 --- a/data/web-static/css/main.css +++ b/data/web-static/css/main.css @@ -26,6 +26,11 @@ body { font-size: 12pt; } +span.pre-ish { + font-size: 12pt; + white-space: pre-wrap; +} + #stream-metabox { flex-direction: column; display: flex; @@ -90,7 +95,7 @@ body { padding: 15px; } -input { +#input-metabox input { border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-left-radius: 8px; diff --git a/mudsync/scrubl.scm b/mudsync/scrubl.scm index a3daa26..2fdd922 100644 --- a/mudsync/scrubl.scm +++ b/mudsync/scrubl.scm @@ -119,7 +119,6 @@ Pass in optional extra ARGS to the main META-WRITE" (lambda (p) (sxml->xml (scrubl-write-obj scrubl obj) - ;; (list 'pre (scrubl-write-obj scrubl obj)) p)))) @@ -131,6 +130,10 @@ Pass in optional extra ARGS to the main META-WRITE" (scrubl-write-obj scrubl arg)) args)))) +(define (scrubl-pre scrubl args) + `(span (@ (class "pre-ish")) + ,args)) + (define scrubl-sxml (make-scrubl `((p . ,(scrubl-sxml-simple-field 'p)) (strong . ,(scrubl-sxml-simple-field 'strong)) @@ -138,7 +141,8 @@ Pass in optional extra ARGS to the main META-WRITE" (b . ,(scrubl-sxml-simple-field 'strong)) (em . ,(scrubl-sxml-simple-field 'em)) (i . ,(scrubl-sxml-simple-field 'em)) - (br . ,(scrubl-sxml-simple-field 'br)) ;; is this useful? + (br . ,(scrubl-sxml-simple-field 'br)) + (pre . ,scrubl-pre) ;; "pre" style whitespace handling. (ul . ,(scrubl-sxml-simple-field 'ul)) (li . ,(scrubl-sxml-simple-field 'li))) scrubl-sxml-write))