(in-package :lisp-on-lines) ;;;; A few layers related to attributes (deflayer omit-nil-attributes) (defdisplay :in-layer omit-nil-attributes :around ((attribute standard-attribute) object) (when (attribute-value object attribute) (call-next-method))) (deflayer show-attribute-labels) (defdisplay :in-layer show-attribute-labels :around ((attribute standard-attribute) object) (<:span :class "lol-label" (<:as-html (or (label attribute) (attribute.name attribute)) " ")) (<:span :class "lol-attribute" (call-next-method))) (deflayer use-pretty-labels) (define-layered-method label :in-layer use-pretty-labels :around (standard-attribute) (let ((label (call-next-method))) (when label (string-capitalize (substitute #\Space #\- label))))) (deflayer inspect-attributes) (defdisplay :in-layer inspect-attributes :around ((attribute standard-attribute) object) (call-next-method) (