// Application shell (docs/design-system.md, "Application shell"): close the // rail drawer when a rail entry is chosen. // // Below the lg breakpoint the rail (#app-rail) is a Bootstrap offcanvas. On // the operator surface its entries navigate under hx-boost, which swaps the // body but leaves Bootstrap's scroll lock on behind unless the drawer // is hidden first; on the member surface a full page load follows and this // is a harmless no-op. Bootstrap's own data-bs-dismiss cannot go on the // links: it cancels an anchor's navigation. This file is external because // the content security policy forbids inline scripts. (function () { document.addEventListener('click', function (event) { var link = event.target.closest('#app-rail a[href]'); if (!link || typeof bootstrap === 'undefined') { return; } var rail = document.getElementById('app-rail'); var drawer = rail && bootstrap.Offcanvas.getInstance(rail); if (drawer) { drawer.hide(); } }); })();