Commit d718209b authored by Job van der Voort's avatar Job van der Voort

responsive sidebar on dashboard

parent 8b6dd9d4
responsive_resize = ->
current_width = $(window).width()
if current_width < 985
$('.side').addClass("ui right wide sidebar")
$('.responsive-side').addClass("ui right wide sidebar")
else
$('.side').removeClass("ui right wide sidebar")
$('.responsive-side').removeClass("ui right wide sidebar")
$ ->
# Depending on window size, set the sidebar offscreen.
responsive_resize()
$('.ui.sidebar')
......@@ -22,6 +23,7 @@ $ ->
container.sidebar "hide" if not container.is(e.target) and container.has(e.target).length is 0
return
# On resize, check if sidebar should be offscreen.
$(window).resize ->
responsive_resize()
return
......@@ -7,12 +7,11 @@
}
.sidebar-expand-button {
background: #fff;
background: #f9f9f9;
color: #555;
padding: 10px 15px;
padding: 9px 12px 6px 14px;
border: 1px solid #E1E1E1;
border-right: 0;
border-radius: 3px;
position: fixed;
top: 108px;
right: 0px;
......@@ -22,7 +21,6 @@
-moz-transition: all 0.4s;
-webkit-transition: all 0.4s;
&:hover {
background: #ddd;
color: #333;
......
......@@ -2,7 +2,7 @@
.dashboard.row
.activities.col-md-8
= render 'activities'
.side.col-md-4
.side.col-md-4.responsive-side
= render 'sidebar'
.sidebar-expand-button.hidden-lg.hidden-md
......
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