projects
/
mudsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
scrolly stuff
[mudsync.git]
/
mudsync
/
networking.scm
diff --git
a/mudsync/networking.scm
b/mudsync/networking.scm
index f69f47a92cc13dc3a3d305954e321c76793ad857..b938c8a9427bdf53936c44c1e9b7a045abdd4048 100644
(file)
--- a/
mudsync/networking.scm
+++ b/
mudsync/networking.scm
@@
-208,10
+208,17
@@
#:websocket-handler (wrap-apply websocket-handler)))))
(define (view:main-display request body)
#: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
(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"))))))
(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"))
(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)))
(values (build-response #:code 200
#:headers '((content-type . (application/xhtml+xml))))
(write-template-to-string)))