Created
May 26, 2015 04:16
-
-
Save knu/7276d6c6854e3cf87dfb to your computer and use it in GitHub Desktop.
ActiveAdmin: How to introduce Slicknav menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "active_admin/mixins"; | |
@import "active_admin/base"; | |
@import "responsive_active_admin"; | |
@import "slicknav"; | |
.slicknav_menu { | |
display: none; | |
@include responsive { | |
display: block; | |
} | |
.slicknav_btn { | |
background-color: #404040; // the default color looks too dark | |
} | |
.slicknav_nav { | |
h1 { | |
display: none; | |
} | |
ul + ul { | |
border-top: 1px solid rgba(0, 0, 0, 0.2); | |
} | |
li.current a { | |
border-radius: 10px; | |
background-color: #7B8389; | |
color: #fff; | |
} | |
} | |
} | |
#header { | |
@include responsive { | |
display: none; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#= require active_admin/base | |
#= require slicknav | |
$ -> | |
$('#header').slicknav(label: $('#site_title').text()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rails-assets.org' do | |
gem 'rails-assets-slicknav' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment