1 (in-package :lisp-on-lines
)
3 (export '(html-description))
5 (define-description html-description
()
6 ((css-class :value
"lol-description")
7 (dom-id :function
(lambda (x)
10 (gensym "DOM-ID-")))))
14 (define-description t
(html-description)
16 (:in-description html-description
))
18 (define-layered-class html-attribute
()
19 ((css-class :accessor attribute-css-class
20 :initform
"lol-attribute")
21 (dom-id :accessor attribute-dom-id
:initform nil
)))
23 (define-layered-class standard-attribute
24 :in-layer
#.
(defining-description 'html-description
)
29 :in-description html-description
((description t
))
30 (with-attributes (css-class dom-id
) description
33 :class
(attribute-value* css-class
)
34 :id
(attribute-value* dom-id
)
35 (dolist (attribute (attributes description
))
37 :class
(attribute-css-class attribute
)
38 (when (attribute-dom-id attribute
)
39 :id
(attribute-dom-id attribute
))
41 :class
"lol-attribute-label"
42 (<:as-html
(attribute-label attribute
)))
44 :class
"lol-attribute-value"
45 (<:as-html
(attribute-value* attribute
))))))))