Replace duplicated _post_header_html, _oob_header_html, and header-child components across blog/events/market/errors with shared sexpr components (~post-label, ~page-cart-badge, ~oob-header, ~header-child, ~error-content) and shared Python helpers (post_header_html, oob_header_html, header_child_html, error_content_html). App-specific logic (blog container-nav wrapping, admin cog, events calendar links) preserved via thin wrappers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
1003 B
Plaintext
27 lines
1003 B
Plaintext
;; Events header components
|
|
|
|
(defcomp ~events-calendars-label ()
|
|
(<> (i :class "fa fa-calendar" :aria-hidden "true") (div "Calendars")))
|
|
|
|
(defcomp ~events-markets-label ()
|
|
(<> (i :class "fa fa-shopping-bag" :aria-hidden "true") (div "Markets")))
|
|
|
|
(defcomp ~events-calendar-label (&key name description)
|
|
(div :class "flex flex-col md:flex-row md:gap-2 items-center min-w-0"
|
|
(div :class "flex flex-row items-center gap-2"
|
|
(i :class "fa fa-calendar")
|
|
(div :class "shrink-0" name))
|
|
(div :id "calendar-description-title"
|
|
:class "text-base font-normal break-words whitespace-normal min-w-0 break-all w-full text-center block"
|
|
description)))
|
|
|
|
(defcomp ~events-day-label (&key date-str)
|
|
(div :class "flex gap-1 items-center"
|
|
(i :class "fa fa-calendar-day")
|
|
(span date-str)))
|
|
|
|
(defcomp ~events-entry-label (&key entry-id title-html times-html)
|
|
(div :id (str "entry-title-" entry-id) :class "flex gap-1 items-center"
|
|
(raw! title-html) (raw! times-html)))
|
|
|