;; Profile and actor timeline components (defcomp ~federation-actor-profile-header (&key avatar-html display-name username domain summary-html follow-html) (div :class "bg-white rounded-lg shadow-sm border border-stone-200 p-6 mb-6" (div :class "flex items-center gap-4" (raw! avatar-html) (div :class "flex-1" (h1 :class "text-xl font-bold" (raw! display-name)) (div :class "text-stone-500" "@" (raw! username) "@" (raw! domain)) (raw! summary-html)) (raw! follow-html)))) (defcomp ~federation-actor-timeline-layout (&key header-html timeline-html) (raw! header-html) (div :id "timeline" (raw! timeline-html))) (defcomp ~federation-follow-form (&key action csrf actor-url label cls) (div :class "flex-shrink-0" (form :method "post" :action action (input :type "hidden" :name "csrf_token" :value csrf) (input :type "hidden" :name "actor_url" :value actor-url) (button :type "submit" :class cls (raw! label))))) (defcomp ~federation-profile-summary (&key summary) (div :class "text-sm text-stone-600 mt-2" (raw! summary))) ;; Public profile page (defcomp ~federation-activity-obj-type (&key obj-type) (span :class "text-sm text-stone-500" (raw! obj-type))) (defcomp ~federation-activity-card (&key activity-type published obj-type-html) (div :class "bg-white rounded-lg shadow p-4" (div :class "flex justify-between items-start" (span :class "font-medium" (raw! activity-type)) (span :class "text-sm text-stone-400" (raw! published))) (raw! obj-type-html))) (defcomp ~federation-activities-list (&key items-html) (div :class "space-y-4" (raw! items-html))) (defcomp ~federation-activities-empty () (p :class "text-stone-500" "No activities yet.")) (defcomp ~federation-profile-page (&key display-name username domain summary-html activities-heading activities-html) (div :class "py-8" (div :class "bg-white rounded-lg shadow p-6 mb-6" (h1 :class "text-2xl font-bold" (raw! display-name)) (p :class "text-stone-500" "@" (raw! username) "@" (raw! domain)) (raw! summary-html)) (h2 :class "text-xl font-bold mb-4" (raw! activities-heading)) (raw! activities-html))) (defcomp ~federation-profile-summary-text (&key text) (p :class "mt-2" (raw! text)))