rails_admin_material 0.1.6 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/lib/rails_admin_material/version.rb +1 -1
- data/vendor/assets/javascripts/rails_admin/themes/material/ui.js +27 -0
- data/vendor/assets/stylesheets/rails_admin/themes/material/theming.scss +45 -7
- data/vendor/assets/stylesheets/rails_admin/themes/material/variables.scss +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3869267cd0f38e761d9d38d7074d7cf8f6a444b1
|
4
|
+
data.tar.gz: d10a993b3f12dec5ab0f044d452e1fcc3c955298
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72ce6bd50f4432b665640694aeb0c02f53b005c15b62c23a575080c0a05aadc0cb60048b39be9274e56ed9ffd73a4d390c3db4dabacdf6dc9db98a0c82a1eae5
|
7
|
+
data.tar.gz: 71dbe879f9f738c844b58413c01b1009a8342a17dfe8abedd9344cf43600457eefd565a10e8b77c14a727b71de3d1f04529304477df28dc54b81e8a3380448cd
|
data/README.md
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
# RailsAdminMaterial theme [![Gem Version](https://badge.fury.io/rb/rails_admin_material.svg)](https://badge.fury.io/rb/rails_admin_material)
|
2
2
|
|
3
|
-
A Material Design theme for rails_admin
|
3
|
+
A Material Design theme for [rails_admin](https://github.com/sferik/rails_admin).
|
4
4
|
|
5
|
-
|
5
|
+
Features:
|
6
6
|
|
7
|
-
-
|
7
|
+
- better UI
|
8
|
+
|
9
|
+
- improved nested forms styles
|
10
|
+
|
11
|
+
- hide/show sidebar button
|
8
12
|
|
9
13
|
## Installation
|
10
14
|
|
@@ -16,7 +20,7 @@ A Material Design theme for rails_admin
|
|
16
20
|
|
17
21
|
## Customization
|
18
22
|
|
19
|
-
To change theme colors edit *app/assets/stylesheets/rails_admin/custom/variables.scss*:
|
23
|
+
To change theme colors add / edit *app/assets/stylesheets/rails_admin/custom/variables.scss*:
|
20
24
|
|
21
25
|
```sass
|
22
26
|
// orange theme sample
|
@@ -1,6 +1,33 @@
|
|
1
1
|
//= require rails_admin/themes/material/bootstrap-material-design/material
|
2
2
|
//= require rails_admin/themes/material/bootstrap-material-design/ripples
|
3
3
|
|
4
|
+
var classes_sidebar = false;
|
5
|
+
var classes_content = false;
|
6
|
+
|
7
|
+
function toggleMenu( e ) {
|
8
|
+
e.preventDefault();
|
9
|
+
if( classes_sidebar ) {
|
10
|
+
$('.sidebar-nav > .nav').animate( { width: 'toggle' }, 200 );
|
11
|
+
$('.sidebar-nav').attr( 'class', classes_sidebar )
|
12
|
+
$('.sidebar-nav ~ div').attr( 'class', classes_content );
|
13
|
+
classes_sidebar = false;
|
14
|
+
$('#btn-menu-wrapper > a').addClass( 'opened' );
|
15
|
+
$('#btn-menu-wrapper i').attr( 'class', 'icon-chevron-left' );
|
16
|
+
}
|
17
|
+
else {
|
18
|
+
$('.sidebar-nav > .nav').animate( { width: 'toggle' }, 200 );
|
19
|
+
classes_sidebar = $('.sidebar-nav').attr( 'class' );
|
20
|
+
classes_content = $('.sidebar-nav ~ div').attr( 'class' );
|
21
|
+
$('.sidebar-nav').attr( 'class', 'sidebar-nav' );
|
22
|
+
$('.sidebar-nav ~ div').attr( 'class', 'content-expanded' );
|
23
|
+
$('#btn-menu-wrapper > a').removeClass( 'opened' );
|
24
|
+
$('#btn-menu-wrapper i').attr( 'class', 'icon-chevron-right' );
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
4
28
|
$(document).on('rails_admin.dom_ready', function(){
|
5
29
|
$.material.init();
|
30
|
+
if( !$('#btn-menu-wrapper').length ) {
|
31
|
+
$('.sidebar-nav').prepend( '<div id="btn-menu-wrapper"><a href="#" class="btn btn-info btn-xs opened" onclick="Javascript:toggleMenu(event)"><i class="icon-chevron-left"></i></a></div>' );
|
32
|
+
}
|
6
33
|
});
|
@@ -9,6 +9,12 @@ body {
|
|
9
9
|
.bootstrap-datetimepicker-widget {
|
10
10
|
z-index: 999;
|
11
11
|
}
|
12
|
+
.panel {
|
13
|
+
border: 1px solid $fg-shadow;
|
14
|
+
.panel-title {
|
15
|
+
color: #fff;
|
16
|
+
}
|
17
|
+
}
|
12
18
|
|
13
19
|
// --- Header settings ----------------------------------------------------- //
|
14
20
|
.navbar-header > .navbar-brand, .navbar-default .navbar-nav > li > a {
|
@@ -20,12 +26,12 @@ body {
|
|
20
26
|
}
|
21
27
|
|
22
28
|
// --- Sidebar settings ---------------------------------------------------- //
|
23
|
-
.sidebar-nav {
|
24
|
-
|
29
|
+
.sidebar-nav .nav-pills li {
|
30
|
+
margin-top: 0;
|
31
|
+
&.dropdown-header {
|
25
32
|
border-bottom: 1px solid $gray-light2;
|
26
|
-
|
27
|
-
|
28
|
-
margin-top: 0;
|
33
|
+
font-size: 100%;
|
34
|
+
margin-bottom: $generic-space * 1.5;
|
29
35
|
}
|
30
36
|
}
|
31
37
|
body.rails_admin .sidebar-nav {
|
@@ -67,12 +73,26 @@ body.rails_admin .sidebar-nav {
|
|
67
73
|
}
|
68
74
|
// inline filter form
|
69
75
|
#filters_box {
|
76
|
+
> .form-search:first-child {
|
77
|
+
margin-top: $generic-space;;
|
78
|
+
}
|
79
|
+
> .form-search {
|
80
|
+
margin-bottom: $generic-space;;
|
81
|
+
}
|
70
82
|
.label > a {
|
71
83
|
color: #fff;
|
72
84
|
}
|
85
|
+
.label {
|
86
|
+
vertical-align: baseline;
|
87
|
+
}
|
73
88
|
select.form-control {
|
74
89
|
border: 1px solid $gray-light2;
|
75
90
|
}
|
91
|
+
input, select {
|
92
|
+
vertical-align: baseline;
|
93
|
+
vertical-align: -moz-middle-with-baseline;
|
94
|
+
vertical-align: -webkit-baseline-middle;
|
95
|
+
}
|
76
96
|
}
|
77
97
|
// compact forms
|
78
98
|
.form-group {
|
@@ -206,8 +226,9 @@ body.rails_admin .sidebar-nav {
|
|
206
226
|
display: table;
|
207
227
|
}
|
208
228
|
}
|
209
|
-
.nav-tabs li.active
|
210
|
-
color: $
|
229
|
+
.nav-tabs li.active {
|
230
|
+
background-color: $bg-nav-tabs-active;
|
231
|
+
border-bottom: 1px solid $fg-shadow;
|
211
232
|
}
|
212
233
|
#fields_to_export > .form-group.control-group {
|
213
234
|
margin-bottom: $generic-space * 5;
|
@@ -217,3 +238,20 @@ body.rails_admin .sidebar-nav {
|
|
217
238
|
text-align: center;
|
218
239
|
}
|
219
240
|
}
|
241
|
+
#btn-menu-wrapper {
|
242
|
+
padding: 0 3px 10px 3px;
|
243
|
+
position: relative;
|
244
|
+
z-index: 999;
|
245
|
+
> a {
|
246
|
+
padding-left: 10px;
|
247
|
+
padding-right: 10px;
|
248
|
+
&.opened {
|
249
|
+
position: absolute;
|
250
|
+
right: 5px;
|
251
|
+
}
|
252
|
+
}
|
253
|
+
}
|
254
|
+
.content-expanded {
|
255
|
+
padding-left: 60px;
|
256
|
+
padding-right: 15px;
|
257
|
+
}
|
@@ -14,11 +14,14 @@ $admin-font: 'Roboto', sans-serif;
|
|
14
14
|
// colors
|
15
15
|
$gray-light2: lighten($gray-base, 80%) !default;
|
16
16
|
// $gray-lighter2: lighten($gray-base, 96%) !default;
|
17
|
+
|
17
18
|
$bg-nested-tab: transparent; // #f8f8f8;
|
18
19
|
$bg-sidebar-nav: #f0f0f0;
|
20
|
+
$bg-nav-tabs-active: lighten($brand-primary, 15%) !default;
|
21
|
+
|
19
22
|
$fg-navbar-brand: #fff;
|
20
|
-
$fg-nav-tabs-active: #fb1 !default;
|
21
23
|
$fg-help-block: #999;
|
24
|
+
$fg-shadow: #ddd;
|
22
25
|
|
23
26
|
// spacing
|
24
27
|
$generic-space: 5px;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_admin_material
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattia Roccoberton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A Material Design theme for rails_admin
|
14
14
|
email:
|