Skip to content

Instantly share code, notes, and snippets.

@knu
Created May 26, 2015 04:16
Show Gist options
  • Save knu/7276d6c6854e3cf87dfb to your computer and use it in GitHub Desktop.
Save knu/7276d6c6854e3cf87dfb to your computer and use it in GitHub Desktop.
ActiveAdmin: How to introduce Slicknav menu
@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;
}
}
#= require active_admin/base
#= require slicknav
$ ->
$('#header').slicknav(label: $('#site_title').text())
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