summaryrefslogtreecommitdiff
path: root/src/pages
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2023-03-07 18:36:45 -0800
committercolin <colin@cicadas.surf>2023-03-07 18:36:45 -0800
commite2a60e8d2b8e41bcd2c9a39d8e2210f701b92353 (patch)
tree91a8e68115fcbc506c9952161a1a8f37315b16cf /src/pages
parenteea0da373349349b4d25dd4bc116a9c9eb04fb98 (diff)
Add: growing an app skeleton
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/adventure-page.lisp10
-rw-r--r--src/pages/hero-page.lisp12
-rw-r--r--src/pages/quest-page.lisp11
-rw-r--r--src/pages/tavern.lisp4
4 files changed, 33 insertions, 4 deletions
diff --git a/src/pages/adventure-page.lisp b/src/pages/adventure-page.lisp
index fd9cb09..80361a0 100644
--- a/src/pages/adventure-page.lisp
+++ b/src/pages/adventure-page.lisp
@@ -2,7 +2,11 @@
(in-package :dnd)
-(defrender :page ((adventure adventure))
- (with-page (:title (title adventure))
- (:h1 (title adventure))
+(defclass adventure-page ()
+ ((adventure :reader adventure :initarg :adventure)
+ (player :reader player :initarg :player)))
+
+(defrender t ((page adventure-page))
+ (with-page (:title (title (adventure page)))
+ (:h1 (title (adventure page)))
(:p "uhh......")))
diff --git a/src/pages/hero-page.lisp b/src/pages/hero-page.lisp
new file mode 100644
index 0000000..f413d9f
--- /dev/null
+++ b/src/pages/hero-page.lisp
@@ -0,0 +1,12 @@
+;;;; hero-apge.lisp -- shows a particular hero
+
+(in-package :dnd)
+
+(defclass hero-page ()
+ ((hero :reader hero :initarg :hero)
+ (player :reader player :initarg :player)))
+
+(defrender t ((page hero-page))
+ (with-page (:title (unique-name (hero page)))
+ (:h1 (unique-name (hero page)))
+ (:p "uhhh.....")))
diff --git a/src/pages/quest-page.lisp b/src/pages/quest-page.lisp
new file mode 100644
index 0000000..9c02d51
--- /dev/null
+++ b/src/pages/quest-page.lisp
@@ -0,0 +1,11 @@
+;;;; quest-page.lisp
+
+(in-package :dnd)
+
+(defclass quest-page ()
+ ((quest :reader quest :initarg :quest)
+ (player :reader player :initarg :player)))
+
+(defrender t ((page quest))
+ (with-page (:title (unique-name (quest page )))
+ (:h1 (unique-name (quest page)))))
diff --git a/src/pages/tavern.lisp b/src/pages/tavern.lisp
index 1f6c441..0ec3cd5 100644
--- a/src/pages/tavern.lisp
+++ b/src/pages/tavern.lisp
@@ -9,7 +9,9 @@
(with-page (:title "A Bustling Tavern")
(let ((player (player tavern)))
(render :details player)
- (render :list (player-heroes player))
+ (when (player-heroes player)
+ (:h2 "Your Heroes'")
+ (render :list (player-heroes player)))
(:br)
(:a :href "/goddess-shrine" "Pray a new hero rises.")
(:br)