Files
rose-ash/shared/sexp/components.py
giles 53c4a0a1e0
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m13s
Externalize sexp component templates and delete redundant HTML fragments
Move 24 defcomp definitions from Python string constants in components.py
to 7 grouped .sexp files under shared/sexp/templates/. Add load_sexp_dir()
to jinja_bridge.py for file-based loading. Migrate events and market
link-card fragment handlers from render_template to sexp. Delete 9
superseded Jinja HTML fragment templates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 08:55:54 +00:00

19 lines
476 B
Python

"""
Shared s-expression component definitions.
Loaded at app startup via ``load_shared_components()``. Each component
is defined in an external ``.sexp`` file under ``templates/``.
"""
from __future__ import annotations
import os
from .jinja_bridge import load_sexp_dir
def load_shared_components() -> None:
"""Register all shared s-expression components."""
templates_dir = os.path.join(os.path.dirname(__file__), "templates")
load_sexp_dir(templates_dir)