1 (in-package :lisp-on-lines
)
3 (export '(html-description) (find-package :lisp-on-lines
))
5 (define-description html-description
()
9 (define-description t
()
10 ((css-class :value
"lol-description")
11 (dom-id :function
(lambda (x)
14 (gensym "DOM-ID-")))))
15 (:in-description html-description
))
17 (define-layered-class html-attribute
()
18 ((css-class :accessor attribute-css-class
19 :initform
"lol-attribute")
20 (dom-id :accessor attribute-dom-id
:initform nil
)))
22 (define-layered-class standard-attribute
23 :in-layer
#.
(defining-description 'html-description
)
28 :in-description html-description
((description t
))
29 (with-attributes (css-class dom-id
) description
33 .lol-attribute-label, .lol-attribute-value {
40 .lol-attribute-label {
46 .lol-attribute-value {
55 :class
(list (attribute-value* css-class
) "lol-description")
56 :id
(attribute-value* dom-id
)
57 (dolist (attribute (attributes description
))
59 :class
(attribute-css-class attribute
)
60 (when (attribute-dom-id attribute
)
61 :id
(attribute-dom-id attribute
))
62 (let ((label (attribute-label attribute
)))
65 :class
"lol-attribute-label"
68 :class
"lol-attribute-value"
69 (<:as-html
(format nil
"~A" (attribute-value* attribute
))))