diff --git a/source/clog-element-common.lisp b/source/clog-element-common.lisp index 1dcc9d7..112e76e 100644 --- a/source/clog-element-common.lisp +++ b/source/clog-element-common.lisp @@ -168,19 +168,23 @@ CLOG-OBJ")) ;; create-div ;; ;;;;;;;;;;;;;;;; -(defgeneric create-div (clog-obj &key content class html-id auto-place) +(defgeneric create-div (clog-obj &key content hidden class html-id auto-place) (:documentation "Create a new CLOG-Div as child of CLOG-OBJ with :CONTENT (default \"\") and if :AUTO-PLACE (default t) place-inside-bottom-of -CLOG-OBJ")) +CLOG-OBJ. If hidden it true visiblep is set to nil.")) (defmethod create-div ((obj clog-obj) &key (content "") + (hidden nil) (class nil) (html-id nil) (auto-place t)) - (create-child obj (format nil "
~A
" + (create-child obj (format nil "~A
" + (if hidden + (format nil " style='visibility:hidden;'") + "") (if class (format nil " class='~A'" (escape-string class)) @@ -533,15 +545,19 @@ CLOG-OBJ")) ;; create-span ;; ;;;;;;;;;;;;;;;;; -(defgeneric create-span (clog-obj &key content class html-id auto-place) +(defgeneric create-span (clog-obj &key content hidden class html-id auto-place) (:documentation "Create a new CLOG-Span as child of CLOG-OBJ with CONTENT and if :AUTO-PLACE (default t) place-inside-bottom-of CLOG-OBJ")) (defmethod create-span ((obj clog-obj) &key (content "") + (hidden nil) (class nil) (html-id nil) (auto-place t)) - (create-child obj (format nil "~A" + (create-child obj (format nil "~A" + (if hidden + (format nil " style='visibility:hidden;'") + "") (if class (format nil " class='~A'" (escape-string class)) @@ -567,17 +583,21 @@ and if :AUTO-PLACE (default t) place-inside-bottom-of CLOG-OBJ")) :hgroup)) (defgeneric create-section (clog-obj section - &key content class html-id auto-place) + &key content hidden class html-id 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 "") + (hidden nil) (class nil) (html-id nil) (auto-place t)) - (create-child obj (format nil "<~A~A>~A~A>" + (create-child obj (format nil "<~A~A~A>~A~A>" section + (if hidden + (format nil " style='visibility:hidden;'") + "") (if class (format nil " class='~A'" (escape-string class)) @@ -601,21 +621,25 @@ CLOG-OBJ")) (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)) + :i :b :u :sub :su :center)) (defgeneric create-phrase (clog-obj phrase - &key content class html-id auto-place) + &key content hidden class html-id 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 "") + (hidden nil) (class nil) (html-id nil) (auto-place t)) - (create-child obj (format nil "<~A~A>~A~A>" + (create-child obj (format nil "<~A~A~A>~A~A>" phrase + (if hidden + (format nil " style='visibility:hidden;'") + "") (if class (format nil " class='~A'" (escape-string class)) @@ -866,13 +890,17 @@ and if :AUTO-PLACE (default t) place-inside-bottom-of CLOG-OBJ")) ;; create-table ;; ;;;;;;;;;;;;;;;;;; -(defgeneric create-table (clog-obj &key class html-id auto-place) +(defgeneric create-table (clog-obj &key hidden class html-id auto-place) (:documentation "Create a new CLOG-Table as child of CLOG-OBJ and if :AUTO-PLACE (default t) place-inside-bottom-of CLOG-OBJ")) (defmethod create-table ((obj clog-obj) - &key (class nil) (html-id nil) (auto-place t)) - (create-child obj (format nil "