Skip to content
Snippets Groups Projects
Commit d718209b authored by 🚄 Job van der Voort 🚀's avatar 🚄 Job van der Voort 🚀
Browse files

responsive sidebar on dashboard

parent 8b6dd9d4
No related branches found
No related tags found
No related merge requests found
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')
Loading
Loading
@@ -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
Loading
Loading
@@ -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;
Loading
Loading
@@ -22,7 +21,6 @@
-moz-transition: all 0.4s;
-webkit-transition: all 0.4s;
 
&:hover {
background: #ddd;
color: #333;
Loading
Loading
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment