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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 150e255d5b879942ead118593bcdb7e1a90db8d8
4
- data.tar.gz: 2a6eecdd5b4c744bd4254785eae2165ccd2c22c9
3
+ metadata.gz: 3869267cd0f38e761d9d38d7074d7cf8f6a444b1
4
+ data.tar.gz: d10a993b3f12dec5ab0f044d452e1fcc3c955298
5
5
  SHA512:
6
- metadata.gz: 2e2ef3cfc478d7f756f81b3e554795b43cdb2cf06846a4e04682477c80620dce1f2e1b691f01a7405b3319c407121de1893399b75fbde1246bdaf6e7086be1c4
7
- data.tar.gz: a4b861b2e715b09b3e3144b5b72401ab64db8b261d4cb3b13ed40441e1ba044872af9aea446e27c5b28e27ffedbf472a98ff240fa2d5aa5f528228b084265643
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
- ## Requirements
5
+ Features:
6
6
 
7
- - rails_admin
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,3 +1,3 @@
1
1
  module RailsAdminMaterial
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.8"
3
3
  end
@@ -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
- .dropdown-header {
29
+ .sidebar-nav .nav-pills li {
30
+ margin-top: 0;
31
+ &.dropdown-header {
25
32
  border-bottom: 1px solid $gray-light2;
26
- }
27
- .nav-pills li {
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 i, .nav-tabs li.active span {
210
- color: $fg-nav-tabs-active;
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.6
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-01 00:00:00.000000000 Z
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: