feat(sacred-valley): card factory, registry ordering, view skeleton
Adds the Plan 6 card framework: svCard() chrome factory, pure orderCards() ordering helper with unit tests, three stub card modules (clock/weather/host-perf), and rewrites sacred_valley.js with the two-band layout that mounts ordered cards. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
12
public/components/sv_card.js
Normal file
12
public/components/sv_card.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { el } from '../dom.js';
|
||||
|
||||
// Builds the refined-B chrome shell and returns { root, body }. The card module
|
||||
// fills `body` in its mount(); start()/stop() own its refresh timer.
|
||||
export function svCard(def) {
|
||||
const body = el('div', { class: 'sv-card-body' });
|
||||
const root = el('div', { class: 'sv-card', dataset: { size: def.size || 'm', cardId: def.id } },
|
||||
el('div', { class: 'sv-card-title' }, def.title),
|
||||
body
|
||||
);
|
||||
return { root, body };
|
||||
}
|
||||
Reference in New Issue
Block a user