Replace masonry grid with an absolute-positioned 12-col canvas: drag to move, corner to resize, per-card free/overlap toggle (Alt = no-snap). Geometry persisted (migration 027: dashboard_layout.geom + extras). Two new addable decorative cards: blank spacer + animated blackflame (canvas particle flame). Old layout auto-migrates by flow-placement. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
15 lines
604 B
JavaScript
15 lines
604 B
JavaScript
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. Position +
|
|
// size are set by the Sacred Valley canvas (absolute geometry), not here.
|
|
// Decorative cards (blank / blackflame) carry no title bar.
|
|
export function svCard(def) {
|
|
const body = el('div', { class: 'sv-card-body' });
|
|
const root = el('div', { class: 'sv-card', dataset: { cardId: def.id } },
|
|
def.title ? el('div', { class: 'sv-card-title' }, def.title) : null,
|
|
body
|
|
);
|
|
return { root, body };
|
|
}
|