Commit 41d8ae09 authored by Christopher Lemmer Webber's avatar Christopher Lemmer Webber

Add users-name and other parameters

parent 5b1f70e4
......@@ -25,6 +25,16 @@
(ok (xexp->html-bytes sxml)
#:content-type #"text/html"))
;;; Some parameters
;;; ===============
(define users-name
(make-parameter #f))
(define db
(make-parameter #f))
(define magenc-store
(make-parameter #f))
;;; Routing
;;; =======
......@@ -38,10 +48,11 @@
;;; Pages
;;; =====
;; Also serves as the actor page
(define (homepage req)
(render-ok
(generic-base-tmpl
'(p "Hi there!"))))
`(p "Hi there! This is " ,(users-name) "'s site."))))
(define (inbox req)
(render-ok
......@@ -95,7 +106,9 @@
;; @@: Not semantic naming!
(span (@ (id "site-header-left-stuff"))
(b (a (@ (href ,(golem-url homepage)))
"*golem*")))
"*golem*"))
" :: "
,(users-name) "'s site")
(span (@ (id "site-header-right-stuff"))
,(header-link "inbox"
(golem-url inbox))
......@@ -133,4 +146,7 @@
(module+ main
(install-default-factories!)
(main))
(parameterize ([users-name "Alice"]
[db 'TODO]
[magenc-store 'TODO])
(main)))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment