feat: v1 system element library — all ContentElements as shortcode templates + sidecars #27
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/deckle!27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/14"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #14
Ships the complete v1 element library: every system element as a Hugo shortcode template (
layouts/shortcodes/X.html) plus an editor sidecar (editor/elements/X.yaml) in the sample site, fully editable through #3's schema-generated forms.What's included
Elements — Structure:
grid/column(fixed six-step responsive width set as classes),spacer. Content:text,text-media,image,gallery/gallery-item,hero(reworked:headingparam + markdown body with inline elements),quote,video-embed,accordion/accordion-item(details/summary),page-teasers,html. Inline:button,icon.Contract —
docs/elements.mddocuments the class vocabulary (ce-*BEM), placement metadata (accepts/within/inline, declared here for #6 to enforce), body policies, and the width/spacer scales. All markup is semantic and theme-agnostic: classes only, no inline styles, no CSS, no third-party assets.Machinery (one minimal addition) — sidecars may declare
hidden: true; the schema is still loaded, served, and editable in place, but stays out of the default picker.htmlships hidden. This was the only spec-required flag inexpressible in #3's schema.Privacy —
video-embedrenders a local consent facade; verified zero<iframe>s and zero third-partysrc/hrefin the built site until click. The self-contained inline loader then builds the privacy-enhanced embed URL (youtube-nocookie.com,player.vimeo.com?dnt=1) client-side.Drafts —
page-teasersfilterswhere .RegularPages "Draft" false; verified the draft post never appears even when built with--buildDrafts(as the preview supervisor does).Tests — one canonical round-trip corpus fixture per element (nesting for grid/gallery/accordion, inline button+icon inside bodies);
TestSiteElementLibrarylocks the full element set with groups/icons/hidden served by the API;TestSiteContentCanonicalkeeps all sample-site content byte-for-byte canonical;TestSiteSidecarsValidasserts zero sidecar validation errors.Sample site — one example page per element under
content/elements/, self-contained placeholder SVGs, andgoldmark unsafe = true(required for inline shortcode output inside markdown bodies — documented indocs/elements.md). The pre-librarynoticedemo element is removed; the home page uses the new hero.Verification
go vet ./...,go test ./...(all packages), and the web suite: greenhugo --buildDraftsbuild of the sample site: 0 iframes, 0 third-party refs, 0 inline styles under/elements/, 0 placeholder/raw-HTML-omitted leaks, draft absent from teasers, inline button/icon render mid-sentence in the hero body🤖 Generated with Claude Code
https://claude.ai/code/session_01L3Ry5memduD4ENKfZj4ksc
Pull request closed