diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/endpoints.lisp | 6 | ||||
-rw-r--r-- | src/pages/tavern.lisp | 10 | ||||
-rw-r--r-- | src/views/adventure.lisp | 4 |
3 files changed, 19 insertions, 1 deletions
diff --git a/src/endpoints.lisp b/src/endpoints.lisp index 51d2de3..096603a 100644 --- a/src/endpoints.lisp +++ b/src/endpoints.lisp @@ -138,6 +138,12 @@ functions in url parameters in endpoint definitions." (render (page-render-mode) (make-instance 'tavern :player me)))) +(defendpoint* :get "/tavern/adventures" () () + (with-session (me) + (render (page-render-mode) + (make-instance 'tavern-adventures + :your-adventures (adventures-visible-by me))))) + (defendpoint* :get "/goddess-shrine" () () (with-session (player) (render (page-render-mode) :goddess-shrine))) diff --git a/src/pages/tavern.lisp b/src/pages/tavern.lisp index 0ec3cd5..591d424 100644 --- a/src/pages/tavern.lisp +++ b/src/pages/tavern.lisp @@ -12,6 +12,7 @@ (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) @@ -19,3 +20,12 @@ (: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)))) diff --git a/src/views/adventure.lisp b/src/views/adventure.lisp index 8d4cebc..85d8e3d 100644 --- a/src/views/adventure.lisp +++ b/src/views/adventure.lisp @@ -2,7 +2,6 @@ (in-package :dnd) - (defrender :inline ((adventure adventure)) (with-html (:a :href (urlpath adventure) (title adventure)))) @@ -10,3 +9,6 @@ (defrender :option ((adventure adventure)) (with-html (:option :value (uid adventure) (title adventure)))) + +(defrender :list-item ((adventure adventure)) + (render :inline adventure)) |