From 0544adbee6ba992d33eb4418e844b3ca46e8fbc3 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Wed, 11 Feb 2026 10:13:31 +0100 Subject: [PATCH] fix(portal): Hide all LuCI chrome for full viewport Co-Authored-By: Claude Opus 4.5 --- .../resources/view/secubox-portal/index.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/package/secubox/luci-app-secubox-portal/htdocs/luci-static/resources/view/secubox-portal/index.js b/package/secubox/luci-app-secubox-portal/htdocs/luci-static/resources/view/secubox-portal/index.js index 7ca30bf7..acc53d58 100644 --- a/package/secubox/luci-app-secubox-portal/htdocs/luci-static/resources/view/secubox-portal/index.js +++ b/package/secubox/luci-app-secubox-portal/htdocs/luci-static/resources/view/secubox-portal/index.js @@ -670,16 +670,28 @@ return view.extend({ hideNavigation: function() { document.body.classList.add('c3-portal-mode'); - ['#mainmenu', '.main-left', 'header.main-header', 'nav[role="navigation"]', 'aside'].forEach(function(sel) { + // Hide all LuCI chrome: header, nav, sidebar, footer + [ + '#mainmenu', '.main-left', 'header.main-header', 'header', + 'nav[role="navigation"]', 'aside', 'footer', '.container > header', + '.pull-right', '#indicators', '.brand', '#topmenu', '#tabmenu' + ].forEach(function(sel) { var el = document.querySelector(sel); if (el) el.style.display = 'none'; }); - var main = document.querySelector('.main-right') || document.querySelector('#maincontent'); + // Full viewport for portal + var main = document.querySelector('.main-right') || document.querySelector('#maincontent') || document.querySelector('.container'); if (main) { main.style.marginLeft = '0'; + main.style.marginTop = '0'; main.style.width = '100%'; main.style.padding = '0'; + main.style.maxWidth = 'none'; } + // Hide body padding/margin from LuCI + document.body.style.padding = '0'; + document.body.style.margin = '0'; + document.body.style.overflow = 'hidden'; }, injectCSS: function() {