Added fieldsets and style blocks

This commit is contained in:
David Botton 2022-01-23 08:15:42 -05:00
parent 07f029640c
commit dea4e9d037
3 changed files with 58 additions and 1 deletions

View file

@ -765,6 +765,31 @@ virtual keyboards."))
""))
:clog-type 'clog-fieldset :html-id html-id :auto-place t))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation - clog-legend
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defclass clog-legend (clog-element)()
(:documentation "CLOG Fieldset Legend Object"));
;;;;;;;;;;;;;;;;;;;
;; create-legend ;;
;;;;;;;;;;;;;;;;;;;
(defgeneric create-legend (clog-obj &key content class html-id)
(:documentation "Create a new clog-legend as child of CLOG-OBJ."))
(defmethod create-legend ((obj clog-obj) &key (content "")
(class nil)
(html-id nil))
(create-child obj (format nil "<legend~A>~A</legend>"
(if class
(format nil " class='~A'"
(escape-string class))
"")
content)
:clog-type 'clog-legend :html-id html-id :auto-place t))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Implementation - clog-data-list
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -517,6 +517,9 @@ embedded in a native template application.)"
(clog-fieldset class)
(create-fieldset generic-function)
"CLOG-Legend - Class for CLOG Legends"
(clog-legend class)
(create-legend generic-function)
"CLOG-Form-Element - Class for form elements"
(clog-form-element class)

View file

@ -47,6 +47,12 @@
:control "tcol")
'(:tag "span"
:control "span")
'(:tag "style"
:control "style-block")
'(:tag "fieldset"
:control "fieldset")
'(:tag "legend"
:control "legend")
'(:tag "div"
:control "div")))
@ -386,6 +392,19 @@
:create-type :element
:create-content ""
:properties (,@*props-element*))
`(:name "fieldset"
:description "Fieldset"
:clog-type clog:clog-fieldset
:create clog:create-fieldset
:create-type :base
:properties (,@*props-base*))
`(:name "legend"
:description "Fieldset Legend"
:clog-type clog:clog-legend
:create clog:create-legend
:create-content "Legend here"
:create-type :element
:properties (,@*props-element*))
`(:name "span"
:description "Span"
:clog-type clog:clog-span
@ -792,4 +811,14 @@
:clog-type clog:clog-canvas
:create clog:create-canvas
:create-type :base
:properties (,@*props-base*))))
:properties (,@*props-base*))
`(:name "style-block"
:description "Style"
:clog-type clog:clog-style-block
:create clog:create-style-block
:create-type :base
:properties ((:name "media"
:attr "media")
(:name "type"
:prop "type")
,@*props-text*))))