From d97fa236de7c359ac318819062131137e3064082 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Fri, 20 Jan 2017 11:07:37 -0600 Subject: [PATCH] Full screen css structure --- data/web-static/css/main.css | 29 +++++++++++++++++++++++++++++ mudsync/networking.scm | 20 ++++++++------------ 2 files changed, 37 insertions(+), 12 deletions(-) create mode 100644 data/web-static/css/main.css diff --git a/data/web-static/css/main.css b/data/web-static/css/main.css new file mode 100644 index 0000000..fdf3955 --- /dev/null +++ b/data/web-static/css/main.css @@ -0,0 +1,29 @@ +*, *:before, *:after { + box-sizing: border-box; +} + + +body { + height: 100%; + display: flex; + flex-direction: column; + border: 0px; + margin: 0px; +} + +#stream-output { + flex: 1; + min-height: 85vh; + max-height: 85vh; + background-color: #d5d5d5; + padding: 10px; +} + +#input-box { + 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 6f60ad9..f69f47a 100644 --- a/mudsync/networking.scm +++ b/mudsync/networking.scm @@ -209,23 +209,19 @@ (define (view:main-display request body) (define body-tmpl - '(body - (@ (style "display: flex; flex-direction: column; align-content: stretch; align-items: stretch;")) - (div (@ (style "background: #555555; flex: 1;") - (id "stream-output")) + '((div (@ (id "stream-output")) (p "nope")) - (div (@ (id "input-box") - (style "flex: 1; background: #000055;")) + (div (@ (id "input-box")) (p "test test") (input (@ (id "input")))))) (define (main-tmpl) - `(html (@ (xmlns "http://www.w3.org/1999/xhtml") - (style "width: 100%; height: 100%;")) - (head - (title "Mudsync!") - (meta (@ (charset "UTF-8")))) - ,body-tmpl)) + `(html (@ (xmlns "http://www.w3.org/1999/xhtml")) + (head (title "Mudsync!") + (meta (@ (charset "UTF-8"))) + (link (@ (rel "stylesheet") + (href "/static/css/main.css")))) + (body ,@body-tmpl))) (define (write-template-to-string) (with-fluids ((%default-port-encoding "UTF-8")) (with-output-to-string -- 2.31.1