dlegr250_material_design 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/README.md +66 -0
- data/Rakefile +6 -0
- data/app/controllers/styleguide_controller.rb +5 -0
- data/app/views/styleguide/_buttons.html.erb +79 -0
- data/app/views/styleguide/_menus.html.erb +189 -0
- data/app/views/styleguide/_navigation.html.erb +28 -0
- data/app/views/styleguide/index.html.erb +9 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/dlegr250_material_design.gemspec +34 -0
- data/lib/dlegr250_material_design.rb +6 -0
- data/lib/dlegr250_material_design/version.rb +3 -0
- data/vendor/assets/javascripts/base/init.js.coffee +14 -0
- data/vendor/assets/javascripts/components/dialog.coffee +54 -0
- data/vendor/assets/javascripts/components/forms.coffee +17 -0
- data/vendor/assets/javascripts/components/layout.coffee +76 -0
- data/vendor/assets/javascripts/components/menus.coffee +87 -0
- data/vendor/assets/javascripts/components/snackbar_handler.coffee +8 -0
- data/vendor/assets/javascripts/components/tabs.coffee +18 -0
- data/vendor/assets/javascripts/components/utility.coffee +8 -0
- data/vendor/assets/javascripts/dlegr250_material_design.js +20 -0
- data/vendor/assets/javascripts/extensions/coffeescript.js.coffee +9 -0
- data/vendor/assets/javascripts/extensions/jquery.js.coffee +30 -0
- data/vendor/assets/javascripts/third_party/hammer.min.js +7 -0
- data/vendor/assets/javascripts/third_party/handlebars.latest.js +4454 -0
- data/vendor/assets/javascripts/third_party/jquery.hammer.js +33 -0
- data/vendor/assets/javascripts/third_party/snackbarlight.js +218 -0
- data/vendor/assets/stylesheets/base/base.scss +73 -0
- data/vendor/assets/stylesheets/base/global_classes.scss +261 -0
- data/vendor/assets/stylesheets/base/mixins.scss +202 -0
- data/vendor/assets/stylesheets/base/normalize.scss +229 -0
- data/vendor/assets/stylesheets/base/variables.scss +177 -0
- data/vendor/assets/stylesheets/components/badges.scss +28 -0
- data/vendor/assets/stylesheets/components/blank_slates.scss +58 -0
- data/vendor/assets/stylesheets/components/boxes.scss +34 -0
- data/vendor/assets/stylesheets/components/buttons.scss +225 -0
- data/vendor/assets/stylesheets/components/cards.scss +110 -0
- data/vendor/assets/stylesheets/components/code.scss +13 -0
- data/vendor/assets/stylesheets/components/dialogs.scss +57 -0
- data/vendor/assets/stylesheets/components/dividers.scss +35 -0
- data/vendor/assets/stylesheets/components/forms/error_messages.scss +27 -0
- data/vendor/assets/stylesheets/components/forms/fields.scss +56 -0
- data/vendor/assets/stylesheets/components/forms/labels.scss +17 -0
- data/vendor/assets/stylesheets/components/forms/radios.scss +90 -0
- data/vendor/assets/stylesheets/components/forms/selects.scss +15 -0
- data/vendor/assets/stylesheets/components/forms/text_fields.scss +38 -0
- data/vendor/assets/stylesheets/components/forms/toggles.scss +70 -0
- data/vendor/assets/stylesheets/components/lists.scss +242 -0
- data/vendor/assets/stylesheets/components/menus.scss +164 -0
- data/vendor/assets/stylesheets/components/overlay.scss +27 -0
- data/vendor/assets/stylesheets/components/snackbarlight.scss +77 -0
- data/vendor/assets/stylesheets/components/spinners.scss +67 -0
- data/vendor/assets/stylesheets/components/tabs.scss +62 -0
- data/vendor/assets/stylesheets/components/tooltips.scss +75 -0
- data/vendor/assets/stylesheets/dlegr250_material_design.scss +47 -0
- data/vendor/assets/stylesheets/fonts/material_design_iconic_font.scss +5168 -0
- data/vendor/assets/stylesheets/fonts/material_design_iconic_font/Material-Design-Iconic-Font.eot +0 -0
- data/vendor/assets/stylesheets/fonts/material_design_iconic_font/Material-Design-Iconic-Font.svg +787 -0
- data/vendor/assets/stylesheets/fonts/material_design_iconic_font/Material-Design-Iconic-Font.ttf +0 -0
- data/vendor/assets/stylesheets/fonts/material_design_iconic_font/Material-Design-Iconic-Font.woff +0 -0
- data/vendor/assets/stylesheets/fonts/material_design_iconic_font/Material-Design-Iconic-Font.woff2 +0 -0
- data/vendor/assets/stylesheets/layouts/application/appbar.scss +93 -0
- data/vendor/assets/stylesheets/layouts/application/base.scss +27 -0
- data/vendor/assets/stylesheets/layouts/application/main.scss +26 -0
- data/vendor/assets/stylesheets/layouts/application/sidebars.scss +85 -0
- data/vendor/assets/stylesheets/layouts/authentication/base.scss +53 -0
- metadata +155 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
//======================================================================
|
2
|
+
// EXAMPLE:
|
3
|
+
// <div class="badge badge-blue">10</div>
|
4
|
+
//======================================================================
|
5
|
+
|
6
|
+
// Badges - base
|
7
|
+
//----------------------------------------------------------------------
|
8
|
+
|
9
|
+
.badge {
|
10
|
+
display: inline-block;
|
11
|
+
font-size: $font-size-small;
|
12
|
+
padding: 2px 6px;
|
13
|
+
@include rounded-corners;
|
14
|
+
}
|
15
|
+
|
16
|
+
// Badges - colors
|
17
|
+
//----------------------------------------------------------------------
|
18
|
+
|
19
|
+
@each $color-name, $color in $colors {
|
20
|
+
.badge-#{$color-name} {
|
21
|
+
background-color: $color;
|
22
|
+
@if $color-name == "white" {
|
23
|
+
color: color("black");
|
24
|
+
} @else {
|
25
|
+
color: color("white");
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
//======================================================================
|
2
|
+
// EXAMPLE:
|
3
|
+
// <div class="blank-slate-container">
|
4
|
+
// <div class="blank-slate">
|
5
|
+
// <div class="blank-slate-icon">
|
6
|
+
// <span class="zmdi-hc-stack">
|
7
|
+
// <i class="zmdi zmdi-circle zmdi-hc-stack-2x"></i>
|
8
|
+
// <i class="zmdi zmdi-comments zmdi-hc-stack-1x zmdi-hc-inverse"></i>
|
9
|
+
// </span>
|
10
|
+
// </div>
|
11
|
+
// <div class="blank-slate-title">
|
12
|
+
// Title
|
13
|
+
// </div>
|
14
|
+
// <div class="blank-slate-subtitle">
|
15
|
+
// Subtitle
|
16
|
+
// </div>
|
17
|
+
// </div>
|
18
|
+
// </div>
|
19
|
+
//======================================================================
|
20
|
+
|
21
|
+
// Blank slates - base
|
22
|
+
//----------------------------------------------------------------------
|
23
|
+
|
24
|
+
.blank-slate-container {
|
25
|
+
display: flex;
|
26
|
+
flex-direction: column;
|
27
|
+
justify-content: center;
|
28
|
+
height: 80%;
|
29
|
+
}
|
30
|
+
|
31
|
+
.blank-slate {
|
32
|
+
color: color("hint");
|
33
|
+
margin: auto;
|
34
|
+
text-align: center;
|
35
|
+
}
|
36
|
+
|
37
|
+
// Blank slates - icon
|
38
|
+
//----------------------------------------------------------------------
|
39
|
+
|
40
|
+
.blank-slate-icon {
|
41
|
+
font-size: 72px;
|
42
|
+
}
|
43
|
+
|
44
|
+
// Blank slates - title
|
45
|
+
//----------------------------------------------------------------------
|
46
|
+
|
47
|
+
.blank-slate-title {
|
48
|
+
font-size: $font-size-large;
|
49
|
+
font-weight: bold;
|
50
|
+
padding: $spacing-normal 0;
|
51
|
+
}
|
52
|
+
|
53
|
+
// Blank slates - subtitle
|
54
|
+
//----------------------------------------------------------------------
|
55
|
+
|
56
|
+
.blank-slate-subtitle {
|
57
|
+
font-size: $font-size-normal;
|
58
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
//======================================================================
|
2
|
+
// EXAMPLE:
|
3
|
+
// <div class="box box-red rounded-corners constrained constrained-large">
|
4
|
+
// Text
|
5
|
+
// </div>
|
6
|
+
//======================================================================
|
7
|
+
|
8
|
+
// Boxes - base
|
9
|
+
//----------------------------------------------------------------------
|
10
|
+
|
11
|
+
.box {
|
12
|
+
border: 1px solid transparent;
|
13
|
+
box-sizing: border-box;
|
14
|
+
padding: $spacing-normal;
|
15
|
+
}
|
16
|
+
|
17
|
+
// Boxes - colored boxes
|
18
|
+
//----------------------------------------------------------------------
|
19
|
+
|
20
|
+
@each $color-name, $color in $colors {
|
21
|
+
.box-#{$color-name} {
|
22
|
+
background-color: $color;
|
23
|
+
|
24
|
+
@if $color-name == "hover" {
|
25
|
+
color: color("text");
|
26
|
+
} @else {
|
27
|
+
color: color("white");
|
28
|
+
}
|
29
|
+
|
30
|
+
&.box-bordered {
|
31
|
+
border-color: darken($color, 20%);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
@@ -0,0 +1,225 @@
|
|
1
|
+
//======================================================================
|
2
|
+
// EXAMPLE:
|
3
|
+
// <div class="button button-raised-{COLOR}">Text</div>
|
4
|
+
// <div class="button button-flat-{COLOR}">Text</div>
|
5
|
+
// <div class="button button-icon zmdi zmdi-star"></div>
|
6
|
+
// <div class="button button-icon-{COLOR} zmdi zmdi-star"></div>
|
7
|
+
//======================================================================
|
8
|
+
|
9
|
+
// Variables
|
10
|
+
//----------------------------------------------------------------------
|
11
|
+
|
12
|
+
$buttons: "button, .button, input[type='submit'], input[type='reset'], input[type='button']";
|
13
|
+
|
14
|
+
// Buttons - base
|
15
|
+
//----------------------------------------------------------------------
|
16
|
+
|
17
|
+
#{$buttons} {
|
18
|
+
border: 1px solid transparent;
|
19
|
+
box-sizing: border-box;
|
20
|
+
cursor: pointer;
|
21
|
+
display: inline-block;
|
22
|
+
font-size: $font-size-normal;
|
23
|
+
font-weight: 600;
|
24
|
+
height: $button-height;
|
25
|
+
line-height: $button-height;
|
26
|
+
letter-spacing: 0.5px;
|
27
|
+
min-width: 88px;
|
28
|
+
outline: none;
|
29
|
+
padding: 0 $spacing-normal;
|
30
|
+
text-align: center;
|
31
|
+
text-decoration: none;
|
32
|
+
text-transform: uppercase;
|
33
|
+
vertical-align: middle;
|
34
|
+
white-space: nowrap;
|
35
|
+
@include no-touch-highlight;
|
36
|
+
@include rounded-corners;
|
37
|
+
@include transition(all 0.2s ease-in-out);
|
38
|
+
|
39
|
+
&:hover {
|
40
|
+
text-decoration: none !important;
|
41
|
+
}
|
42
|
+
|
43
|
+
&.button-dense {
|
44
|
+
font-size: $font-size-small;
|
45
|
+
height: $button-height-dense !important;
|
46
|
+
line-height: $button-height-dense !important;
|
47
|
+
}
|
48
|
+
|
49
|
+
&.button-large {
|
50
|
+
height: $button-height-large !important;
|
51
|
+
line-height: $button-height-large !important;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
// Buttons - icon buttons
|
56
|
+
//----------------------------------------------------------------------
|
57
|
+
|
58
|
+
// Basic icon without any coloring
|
59
|
+
.button-icon {
|
60
|
+
border: none;
|
61
|
+
color: color("icon");
|
62
|
+
font-size: $font-size-icon;
|
63
|
+
font-weight: 400;
|
64
|
+
width: $button-icon-height;
|
65
|
+
height: $button-icon-height;
|
66
|
+
line-height: $button-icon-height;
|
67
|
+
min-width: $button-icon-height;
|
68
|
+
padding: 0;
|
69
|
+
@include rounded-corners(250px);
|
70
|
+
|
71
|
+
&:hover,
|
72
|
+
&.hover {
|
73
|
+
background-color: rgba(0, 0, 0, 0.1);
|
74
|
+
background-color: color("hover");
|
75
|
+
}
|
76
|
+
|
77
|
+
&:active,
|
78
|
+
&.active {
|
79
|
+
background-color: rgba(0, 0, 0, 0.18);
|
80
|
+
background-color: darken(color("hover"), 5%);
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
@each $color-name, $color in $colors {
|
85
|
+
.button-icon-#{$color-name} {
|
86
|
+
background-color: $color;
|
87
|
+
color: color("white");
|
88
|
+
|
89
|
+
&:hover,
|
90
|
+
&.hover {
|
91
|
+
background-color: lighten($color, 10%);
|
92
|
+
}
|
93
|
+
|
94
|
+
&:active,
|
95
|
+
&.active {
|
96
|
+
background: darken($color, 10%);
|
97
|
+
color: color("white");
|
98
|
+
}
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
// Buttons - raised colored
|
103
|
+
//----------------------------------------------------------------------
|
104
|
+
|
105
|
+
@each $color-name, $color in $colors {
|
106
|
+
.button-raised-#{$color-name} {
|
107
|
+
background-color: $color;
|
108
|
+
@if $color-name == "white" {
|
109
|
+
color: color("black");
|
110
|
+
} @else {
|
111
|
+
color: color("white");
|
112
|
+
}
|
113
|
+
@include box-shadow(0 1px 3px 0 rgba(0, 0, 0, 0.4));
|
114
|
+
|
115
|
+
&:hover,
|
116
|
+
&.hover {
|
117
|
+
background-color: lighten($color, 10%);
|
118
|
+
}
|
119
|
+
|
120
|
+
&:active,
|
121
|
+
&.active {
|
122
|
+
background: darken($color, 5%);
|
123
|
+
@include box-shadow(0 3px 12px 0 rgba(0, 0, 0, 0.5));
|
124
|
+
}
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
// Buttons - flat colored
|
129
|
+
//----------------------------------------------------------------------
|
130
|
+
|
131
|
+
@each $color-name, $color in $colors {
|
132
|
+
.button-flat-#{$color-name} {
|
133
|
+
background-color: transparent;
|
134
|
+
color: $color;
|
135
|
+
|
136
|
+
&:hover,
|
137
|
+
&.hover {
|
138
|
+
@if $color-name == "grey" {
|
139
|
+
background-color: rgba(0, 0, 0, 0.1);
|
140
|
+
} @else {
|
141
|
+
background-color: lighten($color, 40%);
|
142
|
+
}
|
143
|
+
}
|
144
|
+
|
145
|
+
&:active,
|
146
|
+
&.active {
|
147
|
+
@if $color-name == "grey" {
|
148
|
+
background-color: rgba(0, 0, 0, 0.18);
|
149
|
+
} @else {
|
150
|
+
background-color: lighten($color, 30%);
|
151
|
+
}
|
152
|
+
}
|
153
|
+
}
|
154
|
+
}
|
155
|
+
|
156
|
+
// Buttons - outline colored
|
157
|
+
//----------------------------------------------------------------------
|
158
|
+
|
159
|
+
@each $color-name, $color in $colors {
|
160
|
+
.button-outline-#{$color-name} {
|
161
|
+
background-color: transparent;
|
162
|
+
border-color: $color;
|
163
|
+
color: $color;
|
164
|
+
|
165
|
+
&:hover,
|
166
|
+
&.hover {
|
167
|
+
background-color: rgba(0, 0, 0, 0.05);
|
168
|
+
}
|
169
|
+
|
170
|
+
&:active,
|
171
|
+
&.active {
|
172
|
+
background-color: rgba(0, 0, 0, 0.1);
|
173
|
+
}
|
174
|
+
}
|
175
|
+
}
|
176
|
+
|
177
|
+
// Buttons - override text color
|
178
|
+
//----------------------------------------------------------------------
|
179
|
+
|
180
|
+
@each $color-name, $color in $colors {
|
181
|
+
.button.color-#{$color-name} {
|
182
|
+
color: $color;
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
186
|
+
// Buttons - Colored Floating Action Buttons (FAB)
|
187
|
+
//----------------------------------------------------------------------
|
188
|
+
|
189
|
+
@each $color-name, $color in $colors {
|
190
|
+
.fab-#{$color-name} {
|
191
|
+
background-color: $color;
|
192
|
+
@if $color-name == "white" {
|
193
|
+
color: color("black");
|
194
|
+
} @else {
|
195
|
+
color: color("white");
|
196
|
+
}
|
197
|
+
|
198
|
+
font-size: $font-size-icon;
|
199
|
+
height: $button-fab-height;
|
200
|
+
line-height: $button-fab-height;
|
201
|
+
min-width: 0;
|
202
|
+
padding: 0;
|
203
|
+
width: $button-fab-height;
|
204
|
+
|
205
|
+
@include box-shadow(0 3px 7px 0 rgba(0, 0, 0, 0.4));
|
206
|
+
@include rounded-corners(250px);
|
207
|
+
@include text-shadow(0 -1px 0 color("hint"));
|
208
|
+
|
209
|
+
&:hover,
|
210
|
+
&.hover {
|
211
|
+
background-color: lighten($color, 5%);
|
212
|
+
@include box-shadow(0 6px 12px 0 rgba(0, 0, 0, 0.5));
|
213
|
+
}
|
214
|
+
|
215
|
+
&:active,
|
216
|
+
&.active {
|
217
|
+
background: darken($color, 10%);
|
218
|
+
}
|
219
|
+
|
220
|
+
&.mini {
|
221
|
+
height: $button-fab-mini-height;
|
222
|
+
width: $button-fab-mini-height;
|
223
|
+
}
|
224
|
+
}
|
225
|
+
}
|
@@ -0,0 +1,110 @@
|
|
1
|
+
//======================================================================
|
2
|
+
// EXAMPLE:
|
3
|
+
// <div class="card">
|
4
|
+
// <header>
|
5
|
+
// <div class="card-title">Title</div>
|
6
|
+
// <div class="card-subtitle">Subtitle</div>
|
7
|
+
// </header>
|
8
|
+
// <div class="card-content">
|
9
|
+
// content...
|
10
|
+
// </div>
|
11
|
+
// <div class="card-actions">
|
12
|
+
//
|
13
|
+
// </div>
|
14
|
+
// </div>
|
15
|
+
//======================================================================
|
16
|
+
|
17
|
+
// Card - base
|
18
|
+
//----------------------------------------------------------------------
|
19
|
+
|
20
|
+
.card {
|
21
|
+
background-color: color("white");
|
22
|
+
border: 1px solid color("divider");
|
23
|
+
width: $card-width;
|
24
|
+
@include box-shadow(0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2));
|
25
|
+
@include rounded-corners;
|
26
|
+
|
27
|
+
&.xsmall {
|
28
|
+
width: $card-width * 0.33;
|
29
|
+
}
|
30
|
+
|
31
|
+
&.small {
|
32
|
+
width: $card-width * 0.5;
|
33
|
+
}
|
34
|
+
|
35
|
+
&.normal {
|
36
|
+
width: $card-width;
|
37
|
+
}
|
38
|
+
|
39
|
+
&.large {
|
40
|
+
width: $card-width * 2;
|
41
|
+
}
|
42
|
+
|
43
|
+
&.xlarge {
|
44
|
+
width: $card-width * 3;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
// Card - header
|
49
|
+
//----------------------------------------------------------------------
|
50
|
+
|
51
|
+
.card header {
|
52
|
+
border-bottom: 1px solid color("divider");
|
53
|
+
padding: $spacing-normal;
|
54
|
+
|
55
|
+
&.no-border {
|
56
|
+
border-bottom: none;
|
57
|
+
}
|
58
|
+
|
59
|
+
.card-title {
|
60
|
+
font-size: $font-size-large;
|
61
|
+
font-weight: bold;
|
62
|
+
}
|
63
|
+
|
64
|
+
.card-subtitle {
|
65
|
+
color: color("hint");
|
66
|
+
padding-top: $spacing-small;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
// Card - rich media
|
71
|
+
//----------------------------------------------------------------------
|
72
|
+
|
73
|
+
.card-rich-media {
|
74
|
+
img {
|
75
|
+
height: auto;
|
76
|
+
max-width: 100%;
|
77
|
+
width: 100%;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
// Card - content
|
82
|
+
//----------------------------------------------------------------------
|
83
|
+
|
84
|
+
.card-content {
|
85
|
+
padding: $spacing-normal;
|
86
|
+
}
|
87
|
+
|
88
|
+
// Card - actions
|
89
|
+
//----------------------------------------------------------------------
|
90
|
+
|
91
|
+
.card-actions {
|
92
|
+
border-top: 1px solid color("divider");
|
93
|
+
padding: $spacing-normal;
|
94
|
+
|
95
|
+
&.no-border {
|
96
|
+
border-top: none;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
// Card - image header
|
101
|
+
// Using an image at top instead of header text
|
102
|
+
//----------------------------------------------------------------------
|
103
|
+
|
104
|
+
.card-image {
|
105
|
+
img {
|
106
|
+
max-width: 100%;
|
107
|
+
width: 100%;
|
108
|
+
@include rounded-top-corners;
|
109
|
+
}
|
110
|
+
}
|