Skip to content

Commit e0e158c

Browse files
author
Stefan Selent
committed
Don't add auto-hide layout based on current location
...instead of just by layout name
1 parent bdb5c40 commit e0e158c

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎assets/javascripts/app/router.coffee‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ class app.Router
124124
isIndex: ->
125125
@context?.path is '/' or (app.isSingleDoc() and @context?.entry?.isIndex())
126126

127+
isSettings: ->
128+
@context?.path is '/settings'
129+
127130
setInitialPath: ->
128131
# Remove superfluous forward slashes at the beginning of the path
129132
if (path = location.pathname.replace /^\/{2,}/g, '/') isnt location.pathname

‎assets/javascripts/app/settings.coffee‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class app.Settings
129129

130130
toggleLayout: (layout, enable) ->
131131
classList = document.body.classList
132-
classList.toggle(layout, enable) unless layout is '_sidebar-hidden'
132+
classList.toggle(layout, enable) unless app.router?.isSettings
133133
classList.toggle('_overlay-scrollbars', $.overlayScrollbarsEnabled())
134134
return
135135

0 commit comments

Comments
 (0)