mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
inline element types
This commit is contained in:
parent
a8553bfaf7
commit
b3fd50e526
2 changed files with 62 additions and 1 deletions
|
|
@ -457,3 +457,54 @@ CLOG-OBJ"))
|
|||
(create-child obj (format nil "<span>~A</span>" (escape-string content))
|
||||
:clog-type 'clog-span :auto-place auto-place))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Implementation - clog-section
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defclass clog-section (clog-element)()
|
||||
(:documentation "CLOG Section Objects."))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;
|
||||
;; create-section ;;
|
||||
;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(deftype section-type () '(member :address :article :aside :header :main :nav
|
||||
:p :pre :section :blockquote :h1 :h2 :h3 :h4 :h5 :h6
|
||||
:hgroup))
|
||||
|
||||
(defgeneric create-section (clog-obj section &key content auto-place)
|
||||
(:documentation "Create a new CLOG-Section of section type as child of
|
||||
CLOG-OBJ with CONTENT and if :AUTO-PLACE (default t) place-inside-bottom-of
|
||||
CLOG-OBJ"))
|
||||
|
||||
(defmethod create-section ((obj clog-obj) section
|
||||
&key (content "") (auto-place t))
|
||||
(create-child obj (format nil "<~A>~A</~A>"
|
||||
section (escape-string content) section)
|
||||
:clog-type 'clog-section :auto-place auto-place))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Implementation - clog-phrase
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defclass clog-phrase (clog-element)()
|
||||
(:documentation "CLOG Phrase Objects."))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
;; create-phrase ;;
|
||||
;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(deftype phrase-type () '(member :abbr :code :strong :em :dfn :samp :kbd :var
|
||||
:marked :del :ins :s :q :big :small :time :tt :cite
|
||||
:i :b :u :sub :su))
|
||||
|
||||
(defgeneric create-phrase (clog-obj phrase &key content auto-place)
|
||||
(:documentation "Create a new CLOG-Phrase of phrase type as child of
|
||||
CLOG-OBJ with CONTENT and if :AUTO-PLACE (default t) place-inside-bottom-of
|
||||
CLOG-OBJ"))
|
||||
|
||||
(defmethod create-phrase ((obj clog-obj) phrase
|
||||
&key (content "") (auto-place t))
|
||||
(create-child obj (format nil "<~A>~A</~A>"
|
||||
phrase (escape-string content) phrase)
|
||||
:clog-type 'clog-phrase :auto-place auto-place))
|
||||
|
|
|
|||
12
clog.lisp
12
clog.lisp
|
|
@ -336,7 +336,17 @@ embedded in a native template application.)"
|
|||
|
||||
"CLOG-Span - Class for CLOG Inline Spans"
|
||||
(clog-span class)
|
||||
(create-span generic-function))
|
||||
(create-span generic-function)
|
||||
|
||||
"CLOG-Section - Class for CLOG Inline Sections"
|
||||
(section-type type)
|
||||
(clog-section class)
|
||||
(create-section generic-function)
|
||||
|
||||
"CLOG-Phrase - Class for CLOG Inline Phrases"
|
||||
(phrase-type type)
|
||||
(clog-phrase class)
|
||||
(create-phrase generic-function))
|
||||
|
||||
(defsection @clog-form (:title "CLOG Form Objects")
|
||||
"CLOG-Form - Class for organizing Form Elements in to a From"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue