feat(voyage): implement page-shell pattern (eyebrow + title + lede + meta)
This commit is contained in:
parent
0eb56edb6d
commit
7c468097cf
1 changed files with 24 additions and 0 deletions
|
|
@ -826,6 +826,30 @@ playground first-run shows a complete round-trip-able artifact.
|
|||
'</div>';
|
||||
}
|
||||
|
||||
// ---- v4.3 Step 9 — renderPageShell --------------------------------
|
||||
// Universal page-header for dashboard + artifact-detail flater.
|
||||
// Returns an HTML string wrapping body content with DS Tier 3
|
||||
// page__eyebrow / page__title / page__lede / page__meta typography.
|
||||
function renderPageShell(opts, bodyHtml) {
|
||||
var o = opts || {};
|
||||
var parts = ['<section class="page-shell">'];
|
||||
if (o.eyebrow) {
|
||||
parts.push('<div class="page__eyebrow">' + escapeHtml(o.eyebrow) + '</div>');
|
||||
}
|
||||
if (o.title) {
|
||||
parts.push('<h1 class="page__title">' + escapeHtml(o.title) + '</h1>');
|
||||
}
|
||||
if (o.lede) {
|
||||
parts.push('<p class="page__lede">' + escapeHtml(o.lede) + '</p>');
|
||||
}
|
||||
if (o.meta) {
|
||||
parts.push('<div class="page__meta">' + escapeHtml(o.meta) + '</div>');
|
||||
}
|
||||
parts.push('<div class="page-shell__body">' + (bodyHtml || '') + '</div>');
|
||||
parts.push('</section>');
|
||||
return parts.join('');
|
||||
}
|
||||
|
||||
// ---- DOM wiring ----------------------------------------------------
|
||||
function $(id) { return document.getElementById(id); }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue