summaryrefslogtreecommitdiff
path: root/src/pages/tavern.lisp
blob: 591d42485543b067f0d9532180cf9453cf79fee3 (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
28
29
30
31
;;;; pages/tavern.lisp -- enter the tavern 

(in-package :dnd)

(defclass/std tavern ()
  ((player)))

(defrender t ((tavern tavern))
  (with-page (:title "A Bustling Tavern")
      (let ((player (player tavern)))
        (render :details player)
        (when (player-heroes player)
          (:h2 "Your Heroes'")
          (render :list (player-heroes player)))
        (:a :href "tavern/adventures"  "Adventures for which you are seer.")
        (:br)
        (:a :href "/goddess-shrine" "Pray a new hero rises.")
        (:br)
        (:a :href "/spymaster" "Report a Roguish Rumour...")
        (:br)
        (:a :href "/adventure-awaits" "Embark on a new Adventure!"))))


(defclass/std tavern-adventures ()
  ((your-adventures)))


(defrender t ((page tavern-adventures))
  (with-page (:title "Your Adventures")
    (:h1 "You are seer on teh following adventures")
    (render :list (your-adventures page))))