aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/html.lisp
blob: eb7bf95b573d0fb844f936c1a73935ff226cf1fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
(in-package #:vampire)


(defun page (title &rest body)
  (with-output-to-string (str)
    (html 
     (<html>
      (<head>
       (<title> title)
       (<meta> (@ :charset "UTF-8"))
       (<meta> (@ :name "viewport" :content "width=device-width, initial-scale=1.0")))
      (<body>
       (<div> ($ :width "777px" :height "899px" :margin "auto"
		 :display "flex" :justify-content "center")
	      (apply 'eval body))))
     str)))

(defun <navbar> ()
  (<div>
   ($ :height "100px" :width "100%" :display "flex" :justify-content "space-between")
   "MENU"
   (<linkto> "V A M P I R E" (wknd:route-to 'home.html))
   (<logout>)))

(defun <logout> ()
  (<form> (@ :method "POST" :action (wknd:route-to 'destroy.session)) (<submit> "Logout")))