Files
rose-ash/federation/sexp/notifications.sexpr
giles f9d9697c67
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m20s
Externalize sexp to .sexpr files + render() API
Replace all 676 inline sexp() string calls across 7 services with
render(component_name, **kwargs) calls backed by 46 external .sexpr
component definition files (587 defcomps total).

- Add render() function to shared/sexp/jinja_bridge.py
- Add load_service_components() helper and update load_sexp_dir() for *.sexpr
- Update parser keyword regex to support HTMX hx-on::event syntax
- Convert remaining inline HTML in route files to render() calls
- Add shared/sexp/templates/misc.sexp for cross-service utility components

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 16:14:58 +00:00

26 lines
1.1 KiB
Plaintext

;; Notification components
(defcomp ~federation-notification-preview (&key preview)
(div :class "text-sm text-stone-500 mt-1 truncate" (raw! preview)))
(defcomp ~federation-notification-card (&key cls avatar-html from-name from-username from-domain action-text preview-html time-html)
(div :class cls
(div :class "flex items-start gap-3"
(raw! avatar-html)
(div :class "flex-1"
(div :class "text-sm"
(span :class "font-semibold" (raw! from-name))
" " (span :class "text-stone-500" "@" (raw! from-username) (raw! from-domain))
" " (span :class "text-stone-600" (raw! action-text)))
(raw! preview-html)
(div :class "text-xs text-stone-400 mt-1" (raw! time-html))))))
(defcomp ~federation-notifications-empty ()
(p :class "text-stone-500" "No notifications yet."))
(defcomp ~federation-notifications-list (&key items-html)
(div :class "space-y-2" (raw! items-html)))
(defcomp ~federation-notifications-page (&key notifs-html)
(h1 :class "text-2xl font-bold mb-6" "Notifications") (raw! notifs-html))