Update docstrings in album
This commit is contained in:
parent
a825a3d6d0
commit
4dcaa7a00d
1 changed files with 33 additions and 7 deletions
|
@ -5,13 +5,32 @@
|
|||
(:import-from :cl-sbt :write-string-to-file :with-page)
|
||||
(:import-from :spinneret :with-html-string)
|
||||
(:export
|
||||
:show-album-page))
|
||||
:show-album-page
|
||||
:contact
|
||||
:about
|
||||
:header
|
||||
:main
|
||||
:footer
|
||||
:*navbar-header-id*)
|
||||
(:documentation "The `cl-sbt-album` package provides macros for building an
|
||||
album-style website page using Bootstrap and Spinneret."))
|
||||
|
||||
(in-package :cl-sbt-album)
|
||||
|
||||
(defvar *navbar-header-id* "navbarHeader")
|
||||
|
||||
(defmacro about ((&key (textbody "secondary")) &body body)
|
||||
"Generates an HTML 'About' section with the provided content.
|
||||
|
||||
TEXTBODY: Specifies the color scheme of the text body. Default is 'secondary'.
|
||||
|
||||
BODY: Specifies the HTML content to be included in the 'About' section. This
|
||||
can be any valid HTML content that spinneret:with-html can parse.
|
||||
|
||||
Example usage:
|
||||
(about () \"This is an about section.\")
|
||||
; This will generate an 'About' section with secondary color text and the
|
||||
; provided content."
|
||||
`(spinneret:with-html
|
||||
(:h4 "About"
|
||||
(:p :class ,(concatenate 'string
|
||||
|
@ -19,6 +38,17 @@
|
|||
,@body))))
|
||||
|
||||
(defmacro contact (&rest rest)
|
||||
"Generates an HTML 'Contact' section with the provided links.
|
||||
|
||||
REST: A list of plists, each representing a link. Each plist should contain a
|
||||
:url and a :label.
|
||||
|
||||
Example usage:
|
||||
(contact (:url \"#\" :label \"Follow on Twitter\")
|
||||
(:url \"#\" :label \"Like on Facebook\")
|
||||
(:url \"#\" :label \"Email me\"))
|
||||
; This will generate a 'Contact' section with three links, each with the
|
||||
; provided URL and label."
|
||||
`(spinneret:with-html
|
||||
(:h4 "Contact")
|
||||
(:ul :class "list-unstyled"
|
||||
|
@ -44,7 +74,7 @@ predefined content."
|
|||
(container ()
|
||||
(row ()
|
||||
(col (:sm (8 nil) :md (7 nil) :spacing (:property :p :side :y :size 4))
|
||||
(about "Add some information about the album below, the author, or any other background context. Make it a few sentences long so folks can pick up some informative tidbits. Then, link them off to some social networking sites or contact information."))
|
||||
(about () "Add some information about the album below, the author, or any other background context. Make it a few sentences long so folks can pick up some informative tidbits. Then, link them off to some social networking sites or contact information."))
|
||||
(col (:sm (8 nil) :md (nil 1))
|
||||
(contact (:url "#" :label "Follow on Twitter")
|
||||
(:url "#" :label "Like on Facebook")
|
||||
|
@ -54,10 +84,6 @@ predefined content."
|
|||
(toggler ,*navbar-header-id*))
|
||||
,@body)))
|
||||
|
||||
(defmacro main (&body body)
|
||||
`(spinneret:with-html
|
||||
(:main ,@body)))
|
||||
|
||||
(defmacro footer ((&key (textbody "secondary") (spacing nil)) &body body)
|
||||
"Generates an HTML footer with Bootstrap classes.
|
||||
|
||||
|
@ -98,5 +124,5 @@ Example usage:
|
|||
(defmacro album-page (title &body body)
|
||||
`(with-page (:title ,title)
|
||||
(header)
|
||||
(main ,@body)
|
||||
(:main ,@body)
|
||||
(footer (:spacing (:property :p :side :y :size 5)))))
|
||||
|
|
Loading…
Add table
Reference in a new issue