summaryrefslogtreecommitdiff
path: root/site/home.lisp
blob: 5efb5c82d8b01fc0674c0ee816dd08e941a63678 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(in-package #:vampire)

(wknd:defendpoint home.html
  :using user-known
  :get :route ""
  :returns "text/html"
  :handle
  (page "V A M P I R E"
    (<div> ($ :width "100%")
     (<navbar>)
     (<div> ($ :height "70%" )
      (<h3> "hey " (user-name user))
      (<form> (@ :method "POST" :action (wknd:route-to 'create.invite))
	      (<p> "Initiate an invitation...")
	      (<submit> "Bite Someone"))
      (<h2> "Outstanding inBites:")
      (<invite-list> user)))))

(defun <invite-list> (user)
  (apply #'<ul>
	 (mapcar (lambda (i) (<li> (key i)))
		 (invites-by-maker user))))