rails_admin_material 0.1.0 → 0.1.2

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: 351331bcc877ad66187498d6615ca6997bf13543
4
- data.tar.gz: 2f128103f0e008bee43232e93cf351aa408b41bd
3
+ metadata.gz: 31111050272562f4ebda11e4e1dca31394e6f4dd
4
+ data.tar.gz: a8cb1d2b2fe100feb8f418edf53703dfd2675c08
5
5
  SHA512:
6
- metadata.gz: 8c177480df52e9b679e4701da0c3183212f60ae19893dfdcfa989cd12a73561888d191dab291991f4e8355857ee316fa773f323588d551b62a8d759d18d863c8
7
- data.tar.gz: a4cc1068fdf818d509b45f27326b71a967f22cec48eae458be5ee0c71bcf15c420a1016749470efb196e1f21fe3be80176c0e47a9ea1d9c52cb03d587c4c79da
6
+ metadata.gz: 4b6b22199159c605e70c72148943b7e7fdc11e8068d2e551ee0a98b30f0d9cfa5b8bbbacc365d09b83a2121beb132e1a8bbd157e53590fb3bd43c2600161a980
7
+ data.tar.gz: e26b895a967d546e71db3a0bb80f909ca1c388a0cd223e25db44b13ef891775b39f718769b1575e1f36a0c7b59ee9e72e7cd3b869d395357ffdaa1167c4d02ff
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # RailsAdminMaterial theme
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
3
  A Material Design theme for rails_admin
4
4
 
@@ -8,18 +8,49 @@ A Material Design theme for rails_admin
8
8
 
9
9
  ## Installation
10
10
 
11
- - Add the gem to Gemfile: `gem 'rails_admin_material'`
11
+ - Add the gem to Gemfile (and execute *bundle*): `gem 'rails_admin_material'`
12
12
 
13
- - Execute: `bundle`
13
+ - Enable the theme in *config/application.rb* (just after *Bundler.require* line): `ENV['RAILS_ADMIN_THEME'] = 'material'`
14
14
 
15
- - Enable the theme in *config/application.rb*: `ENV['RAILS_ADMIN_THEME'] = 'material'`
15
+ - Edit or create *app/assets/javascripts/rails_admin/custom/ui.js* and add: `//= require rails_admin/themes/material/ui.js`
16
16
 
17
- - Edit or create `app/assets/javascripts/rails_admin/custom/ui.js` and add: `//= require rails_admin/themes/material/ui.js`
17
+ ## Customization
18
+
19
+ To change theme colors edit *app/assets/stylesheets/rails_admin/custom/variables.scss*:
20
+
21
+ ```sass
22
+ /// orange theme sample
23
+ $brand-primary: #d51;
24
+ $brand-info: #ea2;
25
+ $link-color: #800;
26
+ $nav-pills-active-link-hover-bg: #d51;
27
+ $btn-primary-bg: #d51;
28
+ $btn-primary-border: #da0;
29
+ $btn-info-bg: #fa4;
30
+ $btn-info-border: #da0;
31
+ ```
18
32
 
19
33
  ## Preview
20
34
 
21
35
  ![preview](preview.jpg)
22
36
 
37
+ ![preview2](preview2.jpg)
38
+
39
+ ## Troubleshooting
40
+
41
+ - If the styles are not applied try to clean the Rails pipeline cache:
42
+
43
+ ```sh
44
+ rake tmp:clear
45
+ rake assets:precompile
46
+ ```
47
+
48
+ ## Notes
49
+
50
+ - Tested on rails 5.0.1 with rails_admin 1.1.1
51
+
52
+ - Based on [Material Design for Bootstrap](http://fezvrasta.github.io/bootstrap-material-design/)
53
+
23
54
  ## Contributors
24
55
 
25
56
  - [Mattia Roccoberton](http://blocknot.es) - creator, maintainer
@@ -1,3 +1,3 @@
1
1
  module RailsAdminMaterial
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -6,6 +6,9 @@
6
6
  body {
7
7
  font-family: $admin-font;
8
8
  }
9
+ .bootstrap-datetimepicker-widget {
10
+ z-index: 999;
11
+ }
9
12
 
10
13
  // --- Header settings ----------------------------------------------------- //
11
14
  .navbar-header > .navbar-brand, .navbar-default .navbar-nav > li > a {
@@ -18,7 +21,6 @@ body {
18
21
 
19
22
  // --- Sidebar settings ---------------------------------------------------- //
20
23
  .sidebar-nav {
21
- margin-top: $generic-space * 2;
22
24
  .dropdown-header {
23
25
  border-bottom: 1px solid $gray-light2;
24
26
  }
@@ -26,6 +28,10 @@ body {
26
28
  margin-top: 0;
27
29
  }
28
30
  }
31
+ body.rails_admin .sidebar-nav {
32
+ background-color: $bg-sidebar-nav;
33
+ margin-top: $generic-space * 2;
34
+ }
29
35
 
30
36
  // --- Content settings ---------------------------------------------------- //
31
37
  .content {
@@ -41,6 +47,7 @@ body {
41
47
  // --- Form settings ------------------------------------------------------- //
42
48
  // Inline filter / search forms
43
49
  .pjax-form.form-inline .well {
50
+ box-shadow: 0 1px 4px $gray-light;
44
51
  padding-top: $generic-space * 2.5;
45
52
  padding-bottom: $generic-space;
46
53
  span a.btn {
@@ -52,11 +59,11 @@ body {
52
59
  }
53
60
  }
54
61
  // compact forms
55
- .form-horizontal .form-group {
62
+ .form-group {
56
63
  margin-top: $generic-space * 2;
57
64
  // nested tabs
58
65
  .tab-content {
59
- background-color: $well-bg;
66
+ background-color: $bg-nested-tab;
60
67
  border-top: 1px dashed $gray-light2;
61
68
  border-bottom: 1px dashed $gray-light2;
62
69
  }
@@ -65,10 +72,16 @@ body {
65
72
  margin-bottom: 0;
66
73
  }
67
74
  .checkbox label {
75
+ padding-left: 10px;
68
76
  text-align: left;
69
77
  }
70
- .control-label {
71
- margin-top: $generic-space;
78
+ .checkbox label, .radio label, label {
79
+ color: $gray-light;
80
+ }
81
+ label.control-label {
82
+ line-height: 2;
83
+ margin-top: 0;
84
+ // margin-top: $generic-space;
72
85
  }
73
86
  .controls .btn {
74
87
  margin-top: $generic-space;
@@ -79,10 +92,20 @@ body {
79
92
  .form-control.ra-multiselect-collection, .form-control.ra-multiselect-selection {
80
93
  @include gray-input-border();
81
94
  }
95
+ .form-control-static {
96
+ margin-left: $generic-space * 2.5;
97
+ }
98
+ .help-block {
99
+ margin-left: $generic-space * 2.5;
100
+ font-style: italic;
101
+ }
102
+ .input-group.filtering-select > .input-group-btn {
103
+ padding: 0 4px;
104
+ }
82
105
  .input-group.filtering-select ~ .help-block {
83
106
  top: -$generic-space * 2;
84
107
  }
85
- &.belongs_to_association_type > .control-label {
108
+ .well ~ .controls {
86
109
  margin-top: $generic-space * 2;
87
110
  }
88
111
  &.boolean_type .checkbox > label {
@@ -122,3 +145,18 @@ body {
122
145
  }
123
146
  }
124
147
  }
148
+ // fix missing font characters for true / false
149
+ .boolean_type > .label {
150
+ font-family: sans-serif;
151
+ }
152
+ .form-inline .form-control {
153
+ vertical-align: initial;
154
+ }
155
+
156
+ // --- Misc settings ------------------------------------------------------- //
157
+ .has_many_association_type .help-block {
158
+ top: -$generic-space * 3;
159
+ }
160
+ #filters_box a {
161
+ color: #fff;
162
+ }
@@ -1,15 +1,3 @@
1
- /// orange theme sample
2
- // $brand-primary: #d51;
3
- // $brand-info: #ea2;
4
- // $link-color: #800;
5
- // $nav-pills-active-link-hover-bg: #d51;
6
- // $btn-primary-bg: #d51;
7
- // $btn-primary-border: #da0;
8
- // $btn-info-bg: #fa4;
9
- // $btn-info-border: #da0;
10
-
11
- // ------------------------------------------------------------------------- //
12
-
13
1
  // font import
14
2
  @import url('https://fonts.googleapis.com/css?family=Roboto');
15
3
 
@@ -26,6 +14,8 @@ $admin-font: 'Roboto', sans-serif;
26
14
  // colors
27
15
  $gray-light2: lighten($gray-base, 80%) !default;
28
16
  // $gray-lighter2: lighten($gray-base, 96%) !default;
17
+ $bg-nested-tab: #f8f8f8;
18
+ $bg-sidebar-nav: #f0f0f0;
29
19
  $fg-navbar-brand: #fff;
30
20
 
31
21
  // spacing
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.0
4
+ version: 0.1.2
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-01-28 00:00:00.000000000 Z
11
+ date: 2017-01-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A Material Design theme for rails_admin
14
14
  email:
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.6.8
94
+ rubygems_version: 2.5.1
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: RailsAdminMaterial theme