mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
More additions to tutorial 30
This commit is contained in:
parent
f39656e7b3
commit
f3356197cf
2 changed files with 29 additions and 20 deletions
|
|
@ -13,17 +13,19 @@
|
|||
(defun init-site (body)
|
||||
(clog-web-initialize body)
|
||||
(create-web-site body
|
||||
;; use the default theme
|
||||
:theme 'clog-web:default-theme
|
||||
;; theme settings - in this case w3.css color of menu bar
|
||||
:settings '(:menu-class "w3-black")
|
||||
:title "CLOG - The Common Lisp Omnificent GUI"
|
||||
:footer "(c) 2022 David Botton"
|
||||
:logo "/img/clog-liz.png"))
|
||||
|
||||
;; This is the menu structure
|
||||
(defparameter *menu* `(("Content" (("Home" "/")
|
||||
("Content from Lambda" "/lambda")
|
||||
("Content from File" "/readme")))
|
||||
("Help" (("About" "/about")))))
|
||||
(defparameter *menu* `(("Content" (("Home" "/" on-main)
|
||||
("Content from Lambda" "/lambda" on-lambda)
|
||||
("Content from File" "/readme" on-readme)))
|
||||
("Help" (("About" "/about" on-about)))))
|
||||
|
||||
;; Page handlers
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
@ -58,15 +60,13 @@
|
|||
|
||||
;; Start the webserver
|
||||
(defun start-tutorial ()
|
||||
;; Initialize CLOG and the / url path
|
||||
;; Initialize CLOG and the / url path (since / in our menu could just be nil)
|
||||
(initialize 'on-main
|
||||
;; Use long polling technique so pages are crawled by google
|
||||
:long-poll-first t
|
||||
;; Supply so meta info
|
||||
:boot-function (clog-web-meta
|
||||
"clogpower.com - CLOG - the common lisp omnificent gui"))
|
||||
;; Setup additional paths
|
||||
(set-on-new-window 'on-about :path "/about")
|
||||
(set-on-new-window 'on-lambda :path "/lambda")
|
||||
(set-on-new-window 'on-readme :path "/readme")
|
||||
;; clog web helper to set up routes in menu
|
||||
(clog-web-routes-from-menu *menu*)
|
||||
(open-browser))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue