From 47c0c27f3ddba5d2998269e820ad7c35c224e9cd Mon Sep 17 00:00:00 2001 From: Local Dev Date: Sun, 4 Oct 2026 14:25:57 +0200 Subject: [PATCH] Pithos: Full page as an icon beside the menu button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- ui/app.css | 8 ++++++++ ui/app.js | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/ui/app.css b/ui/app.css index 297a896..9554806 100644 --- a/ui/app.css +++ b/ui/app.css @@ -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); } +} diff --git a/ui/app.js b/ui/app.js index 0a4a6c1..d807cc4 100644 --- a/ui/app.js +++ b/ui/app.js @@ -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() {