Sha256: cd09feb19cc8476842b7ea3bd614558ea45682eba11b276b59841ed943bcaf18
Contents?: true
Size: 1.68 KB
Versions: 7
Compression:
Stored size: 1.68 KB
Contents
doctype html html lang="en" meta name="viewport" content="width=device-width, initial-scale=1.0" head = head body = turbo_frame_tag "dialog" .h-screen.flex.overflow-hidden data-controller="satis-page" / TOPBAR .flex.flex-col.w-0.flex-1.overflow-hidden.page_bg .relative.z-10.flex-shrink-0.flex.topbar.h-16.bg-white.shadow.dark:py-4 .arrow .fa-solid.fa-bars / NAVBAR .flex-1.px-4.flex.justify-between = navbar / SIDEBAR .flex.flex-row == sidebar / BODY .page_body main.flex-1.relative.overflow-y-auto.focus:outline-none .mt-4 .max-w.mx-auto.px-4.sm:px-4.md:px-4 = body / Minimize Sidebar javascript: document.addEventListener("DOMContentLoaded", () => { let sidebar_collapse = document.querySelector(".sidebar"); let topbar = document.querySelector(".topbar"); let page_body = document.querySelector(".page_body"); let sidebarBtn = document.querySelector(".arrow"); // Check stored state and apply it const isClosed = sessionStorage.getItem('sidebarClosed') === 'true'; if (isClosed) { sidebar_collapse.classList.add("close"); topbar.classList.add("close"); page_body.classList.add("close"); } sidebarBtn.addEventListener("click", () => { sidebar_collapse.classList.toggle("close"); topbar.classList.toggle("close"); page_body.classList.toggle("close"); // Save the current state to sessionStorage const currentState = sidebar_collapse.classList.contains("close"); sessionStorage.setItem('sidebarClosed', currentState); }); });
Version data entries
7 entries across 7 versions & 1 rubygems