From: Christopher Allan Webber Date: Fri, 20 Jan 2017 17:43:43 +0000 (-0600) Subject: scrolly stuff X-Git-Tag: fosdem-2017~114 X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=commitdiff_plain;h=f19d236c49f1145138e2274d2f5ab3fb1be3e890 scrolly stuff --- diff --git a/data/web-static/css/main.css b/data/web-static/css/main.css index fdf3955..43ecd07 100644 --- a/data/web-static/css/main.css +++ b/data/web-static/css/main.css @@ -11,19 +11,20 @@ body { margin: 0px; } -#stream-output { +#stream-metabox { flex: 1; min-height: 85vh; max-height: 85vh; background-color: #d5d5d5; padding: 10px; + overflow-y: scroll; } -#input-box { +#input-metabox { flex: 1; min-height: 15vh; max-height: 15vh; background-color: #414141; color: #d5d5d5; padding: 10px; -} \ No newline at end of file +} diff --git a/mudsync/networking.scm b/mudsync/networking.scm index f69f47a..b938c8a 100644 --- a/mudsync/networking.scm +++ b/mudsync/networking.scm @@ -208,10 +208,17 @@ #:websocket-handler (wrap-apply websocket-handler))))) (define (view:main-display request body) + (define one-entry + '(div (@ (class "stream-entry")) + (p "This is an entry!") + (p "Let's try a few paragraphs") + (p "okay?"))) + (define body-tmpl - '((div (@ (id "stream-output")) - (p "nope")) - (div (@ (id "input-box")) + `((div (@ (id "stream-metabox")) + (div (@ (id "stream")) + ,@(map (const one-entry) (iota 10)))) + (div (@ (id "input-metabox")) (p "test test") (input (@ (id "input")))))) @@ -224,9 +231,9 @@ (body ,@body-tmpl))) (define (write-template-to-string) (with-fluids ((%default-port-encoding "UTF-8")) - (with-output-to-string - (lambda () - (sxml->xml (main-tmpl)))))) + (call-with-output-string + (lambda (p) + (sxml->xml (main-tmpl) p))))) (values (build-response #:code 200 #:headers '((content-type . (application/xhtml+xml)))) (write-template-to-string)))