Put the control buttons on their own row below the title row
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -685,17 +685,19 @@
|
||||
if (sec) state.current = sec.id;
|
||||
root.append(
|
||||
h('header', { class: 'top' },
|
||||
h('div', { class: 'titlerow' },
|
||||
h('h1', {}, state.doc.meta.title || 'Final Wishes'),
|
||||
h('span', { class: 'muted' }, 'Last update: ' + state.doc.meta.lastUpdated),
|
||||
h('span', { class: 'muted', id: 'version', title: 'Version of this app' }, 'Ver ' + APP_VERSION),
|
||||
h('span', { id: 'dirty', class: 'badge tbd', hidden: !state.dirty }, 'Unsaved changes'),
|
||||
h('span', { id: 'status', class: 'muted', role: 'status' }, state.status),
|
||||
h('span', { id: 'status', class: 'muted', role: 'status' }, state.status)),
|
||||
h('div', { class: 'toolbar' },
|
||||
btn('Save', () => save(), state.dirty ? 'primary' : ''),
|
||||
state.editing ? btn('Cancel', cancelEdit, '', { title: 'Discard unsaved changes to this section and stop editing' }) : null,
|
||||
btn('Backup copy', () => save({ backup: true })),
|
||||
btn('Change passphrase', changePassphrase),
|
||||
btn('Print…', openPrintDialog),
|
||||
btn(state.editing ? 'Done editing' : 'Edit', () => { state.editing = !state.editing; render(); }, state.editing ? 'primary' : '')),
|
||||
btn(state.editing ? 'Done editing' : 'Edit', () => { state.editing = !state.editing; render(); }, state.editing ? 'primary' : ''))),
|
||||
h('div', { class: 'layout' }, renderNav(),
|
||||
h('main', {}, onHeader ? [h('h2', {}, 'Print header'), headerPanel()]
|
||||
: sec ? [h('h2', {}, sec.title), state.editing ? editSection(sec) : viewSection(sec)]
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
body { margin: 0; background: var(--bg); color: var(--fg); }
|
||||
#app { max-width: 70rem; margin: 0 auto; padding: 1rem; }
|
||||
h1 { font-size: 1.4rem; margin: 0; } h2 { margin: 0 0 .75rem; } h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
|
||||
.top { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; padding-bottom: .75rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
|
||||
.top h1 { flex: 1 1 auto; }
|
||||
.top { display: flex; flex-direction: column; gap: .75rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
|
||||
.top .titlerow, .top .toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; } .top h1 { flex: 1 1 auto; }
|
||||
.layout { display: grid; grid-template-columns: 15rem 1fr; gap: 1.5rem; align-items: start; }
|
||||
@media (max-width: 700px) { .layout { grid-template-columns: 1fr; } }
|
||||
nav ul { list-style: none; margin: 0; padding: 0; }
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// YYMMDD is the date, X the iteration that day (A first, B second, ...).
|
||||
// Bump with `npm run bump` (see bump-version.js). build.js strips `export`.
|
||||
|
||||
export const APP_VERSION = '261117B';
|
||||
export const APP_VERSION = '261121A';
|
||||
|
||||
const VERSION_RE = /^(\d{6})([A-Z])$/;
|
||||
export const isVersion = (v) => typeof v === 'string' && VERSION_RE.test(v);
|
||||
|
||||
Reference in New Issue
Block a user