...instead of just by layout name
Unified · Split
| @@ -124,6 +124,9 @@ class app.Router · 123 unmodified lines | |||
| 124 | isIndex: -> | 124 | isIndex: -> |
| 125 | @context?.path is '/' or (app.isSingleDoc() and @context?.entry?.isIndex()) | 125 | @context?.path is '/' or (app.isSingleDoc() and @context?.entry?.isIndex()) |
| 126 | 126 | ||
| 127 | isSettings: -> | ||
| 128 | @context?.path is '/settings' | ||
| 129 | |||
| 127 | setInitialPath: -> | 130 | setInitialPath: -> |
| 128 | # Remove superfluous forward slashes at the beginning of the path | 131 | # Remove superfluous forward slashes at the beginning of the path |
| 129 | if (path = location.pathname.replace /^\/{2,}/g, '/') isnt location.pathname | 132 | if (path = location.pathname.replace /^\/{2,}/g, '/') isnt location.pathname |
| @@ -129,7 +129,7 @@ class app.Settings · 128 unmodified lines | |||
| 129 | 129 | ||
| 130 | toggleLayout: (layout, enable) -> | 130 | toggleLayout: (layout, enable) -> |
| 131 | classList = document.body.classList | 131 | classList = document.body.classList |
| 132 | classList.toggle(layout, enable) unless layout is '_sidebar-hidden' | 132 | classList.toggle(layout, enable) unless app.router?.isSettings |
| 133 | classList.toggle('_overlay-scrollbars', $.overlayScrollbarsEnabled()) | 133 | classList.toggle('_overlay-scrollbars', $.overlayScrollbarsEnabled()) |
| 134 | return | 134 | return |
| 135 | 135 | ||