Commit f25ba6e0 authored by Jacob Schatz's avatar Jacob Schatz

Resize sidebar on initial page refresh.

parent e0efdc4b
......@@ -269,11 +269,19 @@ $ ->
'<div class="device-lg visible-lg"></div>')
checkBootstrapBreakpoints()
$(window).on "resize", (e) ->
fitSidebarForSize = ->
oldBootstrapBreakpoint = bootstrapBreakpoint
checkBootstrapBreakpoints()
if bootstrapBreakpoint != oldBootstrapBreakpoint
$(document).trigger('breakpoint:change',[bootstrapBreakpoint])
$(document).trigger('breakpoint:change', [bootstrapBreakpoint])
checkInitialSidebarSize = ->
if bootstrapBreakpoint is "xs" or "sm"
$(document).trigger('breakpoint:change', [bootstrapBreakpoint])
$(window).on "resize", (e) ->
fitSidebarForSize()
setBootstrapBreakpoints()
checkInitialSidebarSize()
new Aside()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment