Pithos: Full page as an icon beside the menu button

In the sidebar, Full page had moved into the ☰ menu, two clicks away.
It is now also a ⤢ icon in the top bar beside ☰, where an expand button
is usually found (⇤ Back to sidebar in the full-page view on a narrow
screen). The menu keeps the labelled entry.
This commit is contained in:
Local Dev 2026-10-04 14:25:57 +02:00
parent 11ada7ca98
commit 47c0c27f3d
2 changed files with 15 additions and 0 deletions

View file

@ -434,3 +434,11 @@ nav a.nav-account.active .na-label { color: var(--accent); }
.na-space .bar { height: 4px; }
.na-space .bar.full > i { background: var(--warn); }
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 10px 4px; }
/* Full page / Back to sidebar as an icon beside the menu button (compact bar) */
.bar-btn { display: none; }
@media (max-width: 760px) {
.bar-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 8px;
background: var(--surface); color: var(--text); font: inherit; font-size: 16px; cursor: pointer; }
.bar-btn:hover { border-color: var(--accent); color: var(--accent); }
}

View file

@ -2324,6 +2324,12 @@ function addSidebarControls() {
} }, '⤢ Full page'));
$('.sidebar').insertBefore(row, $('#daemon-pill'));
addMenuAction('⤢ Open as full page', () => row.querySelector('button').click());
addBarButton('⤢', 'Open as full page', () => row.querySelector('button').click());
}
// A one-click icon in the compact top bar, beside ☰ (narrow layouts only).
function addBarButton(icon, label, run) {
$('.sidebar').insertBefore(h('button', { type: 'button', class: 'bar-btn', title: label, 'aria-label': label, onclick: run }, icon), $('#nav-toggle'));
}
// An action at the end of the ☰ menu (narrow layouts only; wide ones show
@ -2465,6 +2471,7 @@ function addBackToSidebar() {
} }, '⇤ Back to sidebar'));
$('.sidebar').insertBefore(row, $('#daemon-pill'));
addMenuAction('⇤ Back to sidebar', () => row.querySelector('button').click());
addBarButton('⇤', 'Back to sidebar', () => row.querySelector('button').click());
}
function showSignin() {