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