dlegr250_material_design 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +4 -0
  5. data/Gemfile +4 -0
  6. data/README.md +66 -0
  7. data/Rakefile +6 -0
  8. data/app/controllers/styleguide_controller.rb +5 -0
  9. data/app/views/styleguide/_buttons.html.erb +79 -0
  10. data/app/views/styleguide/_menus.html.erb +189 -0
  11. data/app/views/styleguide/_navigation.html.erb +28 -0
  12. data/app/views/styleguide/index.html.erb +9 -0
  13. data/bin/console +14 -0
  14. data/bin/setup +7 -0
  15. data/dlegr250_material_design.gemspec +34 -0
  16. data/lib/dlegr250_material_design.rb +6 -0
  17. data/lib/dlegr250_material_design/version.rb +3 -0
  18. data/vendor/assets/javascripts/base/init.js.coffee +14 -0
  19. data/vendor/assets/javascripts/components/dialog.coffee +54 -0
  20. data/vendor/assets/javascripts/components/forms.coffee +17 -0
  21. data/vendor/assets/javascripts/components/layout.coffee +76 -0
  22. data/vendor/assets/javascripts/components/menus.coffee +87 -0
  23. data/vendor/assets/javascripts/components/snackbar_handler.coffee +8 -0
  24. data/vendor/assets/javascripts/components/tabs.coffee +18 -0
  25. data/vendor/assets/javascripts/components/utility.coffee +8 -0
  26. data/vendor/assets/javascripts/dlegr250_material_design.js +20 -0
  27. data/vendor/assets/javascripts/extensions/coffeescript.js.coffee +9 -0
  28. data/vendor/assets/javascripts/extensions/jquery.js.coffee +30 -0
  29. data/vendor/assets/javascripts/third_party/hammer.min.js +7 -0
  30. data/vendor/assets/javascripts/third_party/handlebars.latest.js +4454 -0
  31. data/vendor/assets/javascripts/third_party/jquery.hammer.js +33 -0
  32. data/vendor/assets/javascripts/third_party/snackbarlight.js +218 -0
  33. data/vendor/assets/stylesheets/base/base.scss +73 -0
  34. data/vendor/assets/stylesheets/base/global_classes.scss +261 -0
  35. data/vendor/assets/stylesheets/base/mixins.scss +202 -0
  36. data/vendor/assets/stylesheets/base/normalize.scss +229 -0
  37. data/vendor/assets/stylesheets/base/variables.scss +177 -0
  38. data/vendor/assets/stylesheets/components/badges.scss +28 -0
  39. data/vendor/assets/stylesheets/components/blank_slates.scss +58 -0
  40. data/vendor/assets/stylesheets/components/boxes.scss +34 -0
  41. data/vendor/assets/stylesheets/components/buttons.scss +225 -0
  42. data/vendor/assets/stylesheets/components/cards.scss +110 -0
  43. data/vendor/assets/stylesheets/components/code.scss +13 -0
  44. data/vendor/assets/stylesheets/components/dialogs.scss +57 -0
  45. data/vendor/assets/stylesheets/components/dividers.scss +35 -0
  46. data/vendor/assets/stylesheets/components/forms/error_messages.scss +27 -0
  47. data/vendor/assets/stylesheets/components/forms/fields.scss +56 -0
  48. data/vendor/assets/stylesheets/components/forms/labels.scss +17 -0
  49. data/vendor/assets/stylesheets/components/forms/radios.scss +90 -0
  50. data/vendor/assets/stylesheets/components/forms/selects.scss +15 -0
  51. data/vendor/assets/stylesheets/components/forms/text_fields.scss +38 -0
  52. data/vendor/assets/stylesheets/components/forms/toggles.scss +70 -0
  53. data/vendor/assets/stylesheets/components/lists.scss +242 -0
  54. data/vendor/assets/stylesheets/components/menus.scss +164 -0
  55. data/vendor/assets/stylesheets/components/overlay.scss +27 -0
  56. data/vendor/assets/stylesheets/components/snackbarlight.scss +77 -0
  57. data/vendor/assets/stylesheets/components/spinners.scss +67 -0
  58. data/vendor/assets/stylesheets/components/tabs.scss +62 -0
  59. data/vendor/assets/stylesheets/components/tooltips.scss +75 -0
  60. data/vendor/assets/stylesheets/dlegr250_material_design.scss +47 -0
  61. data/vendor/assets/stylesheets/fonts/material_design_iconic_font.scss +5168 -0
  62. data/vendor/assets/stylesheets/fonts/material_design_iconic_font/Material-Design-Iconic-Font.eot +0 -0
  63. data/vendor/assets/stylesheets/fonts/material_design_iconic_font/Material-Design-Iconic-Font.svg +787 -0
  64. data/vendor/assets/stylesheets/fonts/material_design_iconic_font/Material-Design-Iconic-Font.ttf +0 -0
  65. data/vendor/assets/stylesheets/fonts/material_design_iconic_font/Material-Design-Iconic-Font.woff +0 -0
  66. data/vendor/assets/stylesheets/fonts/material_design_iconic_font/Material-Design-Iconic-Font.woff2 +0 -0
  67. data/vendor/assets/stylesheets/layouts/application/appbar.scss +93 -0
  68. data/vendor/assets/stylesheets/layouts/application/base.scss +27 -0
  69. data/vendor/assets/stylesheets/layouts/application/main.scss +26 -0
  70. data/vendor/assets/stylesheets/layouts/application/sidebars.scss +85 -0
  71. data/vendor/assets/stylesheets/layouts/authentication/base.scss +53 -0
  72. metadata +155 -0
@@ -0,0 +1,202 @@
1
+ //======================================================================
2
+ // SCSS mixins accessible in every SCSS file imported after this one.
3
+ // Mixins abstract browser-specific vendor prefixes when applicable.
4
+ //======================================================================
5
+
6
+ // Default values for mixins
7
+ //----------------------------------------------------------------------
8
+
9
+ $default-rounded-corners-radius: 3px;
10
+
11
+ // Rounded corners
12
+ //----------------------------------------------------------------------
13
+
14
+ @mixin rounded-corners($radius: $default-rounded-corners-radius) {
15
+ behavior: url(border-radius.htc);
16
+ border-radius: $radius;
17
+ -moz-border-radius: $radius;
18
+ -webkit-border-radius: $radius;
19
+ }
20
+
21
+ @mixin rounded-top-corners($radius: $default-rounded-corners-radius) {
22
+ behavior: url(border-radius.htc);
23
+ border-radius: $radius $radius 0 0;
24
+ -moz-border-radius: $radius $radius 0 0;
25
+ -webkit-border-radius: $radius $radius 0 0;
26
+ }
27
+
28
+ @mixin rounded-right-corners($radius: $default-rounded-corners-radius) {
29
+ behavior: url(border-radius.htc);
30
+ border-radius: 0 $radius $radius 0;
31
+ -moz-border-radius: 0 $radius $radius 0;
32
+ -webkit-border-radius: 0 $radius $radius 0;
33
+ }
34
+
35
+ @mixin rounded-bottom-corners($radius: $default-rounded-corners-radius) {
36
+ behavior: url(border-radius.htc);
37
+ border-radius: 0 0 $radius $radius;
38
+ -moz-border-radius: 0 0 $radius $radius;
39
+ -webkit-border-radius: 0 0 $radius $radius;
40
+ }
41
+
42
+ @mixin rounded-left-corners($radius: $default-rounded-corners-radius) {
43
+ behavior: url(border-radius.htc);
44
+ border-radius: $radius 0 0 $radius;
45
+ -moz-border-radius: $radius 0 0 $radius;
46
+ -webkit-border-radius: $radius 0 0 $radius;
47
+ }
48
+
49
+ @mixin rounded-top-left-corner($radius: $default-rounded-corners-radius) {
50
+ behavior: url(border-radius.htc);
51
+ border-radius: $radius 0 0 0;
52
+ -moz-border-radius: $radius 0 0 0;
53
+ -webkit-border-radius: $radius 0 0 0;
54
+ }
55
+
56
+ @mixin rounded-top-right-corner($radius: $default-rounded-corners-radius) {
57
+ behavior: url(border-radius.htc);
58
+ border-radius: 0 $radius 0 0;
59
+ -moz-border-radius: 0 $radius 0 0;
60
+ -webkit-border-radius: 0 $radius 0 0;
61
+ }
62
+
63
+ @mixin rounded-bottom-left-corner($radius: $default-rounded-corners-radius) {
64
+ behavior: url(border-radius.htc);
65
+ border-radius: 0 0 0 $radius;
66
+ -moz-border-radius: 0 0 0 $radius;
67
+ -webkit-border-radius: 0 0 0 $radius;
68
+ }
69
+
70
+ @mixin rounded-bottom-right-corner($radius: $default-rounded-corners-radius) {
71
+ behavior: url(border-radius.htc);
72
+ border-radius: 0 0 $radius 0;
73
+ -moz-border-radius: 0 0 $radius 0;
74
+ -webkit-border-radius: 0 0 $radius 0;
75
+ }
76
+
77
+ // Gradient
78
+ //----------------------------------------------------------------------
79
+
80
+ @mixin linear-gradient($from, $to) {
81
+ background-color: $from;
82
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from($from), to($to));
83
+ background-image: -moz-linear-gradient(top, $from, $to);
84
+ background-image: -ms-linear-gradient(top, $from, $to);
85
+ background-image: -o-linear-gradient(top, $from, $to);
86
+ background-image: linear-gradient(top, $from, $to);
87
+ }
88
+
89
+ // Effects
90
+ //----------------------------------------------------------------------
91
+
92
+ @mixin transition($effect...) {
93
+ @if length($effect) == 0 {
94
+ $effect: all 0.20s ease;
95
+ }
96
+
97
+ transition: $effect;
98
+ -moz-transition: $effect;
99
+ -o-transition: $effect;
100
+ -webkit-transition: $effect;
101
+ }
102
+
103
+ @mixin transform($text...) {
104
+ -webkit-transform: $text;
105
+ -moz-transform: $text;
106
+ -ms-transform: $text;
107
+ transform: $text;
108
+ }
109
+
110
+ // Visibility
111
+ //----------------------------------------------------------------------
112
+
113
+ @mixin visibility($text) {
114
+ visibility: $text;
115
+ -webkit-backface-visibility: $text;
116
+ -moz-backface-visibility: $text;
117
+ backface-visibility: $text;
118
+ }
119
+
120
+ // See: css-tricks.com/css-transparency-settings-for-all-broswers
121
+ @mixin transparency($value: 0.5) {
122
+ filter: alpha(opacity=($value * 100));
123
+ opacity: $value;
124
+ zoom: 1;
125
+ }
126
+
127
+ // Shadows
128
+ //----------------------------------------------------------------------
129
+
130
+ @mixin box-shadow($text...) {
131
+ @if length($text) == 0 {
132
+ $text: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.16);
133
+ }
134
+
135
+ box-shadow: $text;
136
+ -moz-box-shadow: $text;
137
+ -webkit-box-shadow: $text;
138
+ }
139
+
140
+ @mixin text-shadow($text) {
141
+ text-shadow: $text;
142
+ -moz-text-shadow: $text;
143
+ -webkit-text-shadow: $text;
144
+ }
145
+
146
+ // Flexbox
147
+ //----------------------------------------------------------------------
148
+
149
+ // For a row of flex elements, such as the appbar.
150
+ @mixin flex-parent-row() {
151
+ align-items: center;
152
+ -ms-flex-align: center;
153
+ -webkit-align-items: center;
154
+ -webkit-box-align: center;
155
+ display: flex;
156
+ display: -ms-flexbox;
157
+ display: -webkit-flex;
158
+ flex-direction: row;
159
+ flex-wrap: nowrap;
160
+ }
161
+
162
+ // Center elements vertically and horizontally
163
+ @mixin flex-center() {
164
+ align-items: center;
165
+ -ms-flex-align: center;
166
+ -webkit-align-items: center;
167
+ -webkit-box-align: center;
168
+ display: flex;
169
+ display: -ms-flexbox;
170
+ display: -webkit-flex;
171
+ flex-direction: column;
172
+ flex-wrap: nowrap;
173
+ justify-content: center;
174
+ height: 100%;
175
+ width: 100%;
176
+ }
177
+
178
+ // Boxes
179
+ //----------------------------------------------------------------------
180
+
181
+ // Using border-box takes element's padding into consideration
182
+ @mixin full-width() {
183
+ box-sizing: border-box !important;
184
+ -moz-box-sizing: border-box !important;
185
+ -webkit-box-sizing: border-box !important;
186
+ width: 100% !important;
187
+ }
188
+
189
+ // Touch
190
+ //----------------------------------------------------------------------
191
+
192
+ // By default, touch devices highlight elements when selected
193
+ @mixin no-touch-highlight() {
194
+ -webkit-touch-callout: none;
195
+ -webkit-user-select: none;
196
+ -khtml-user-select: none;
197
+ -moz-user-select: none;
198
+ -ms-user-select: none;
199
+ user-select: none;
200
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
201
+ -webkit-tap-highlight-color: transparent;
202
+ }
@@ -0,0 +1,229 @@
1
+ //======================================================================
2
+ // DO NOT TOUCH THIS FILE!
3
+ //
4
+ // File: base/normalize.css.scss
5
+ // Desc: Reset file that other styles build upon.
6
+ //
7
+ // See: http://nicolasgallagher.com/about-normalize-css/
8
+ //
9
+ // normalize.css v3.0.0 | MIT License | git.io/normalize
10
+ //======================================================================
11
+
12
+ html {
13
+ font-family: sans-serif;
14
+ -ms-text-size-adjust: 100%;
15
+ -webkit-text-size-adjust: 100%;
16
+ }
17
+
18
+ body {
19
+ margin: 0;
20
+ }
21
+
22
+ article,
23
+ aside,
24
+ details,
25
+ figcaption,
26
+ figure,
27
+ footer,
28
+ header,
29
+ hgroup,
30
+ main,
31
+ nav,
32
+ section,
33
+ summary {
34
+ display: block;
35
+ }
36
+
37
+ audio,
38
+ canvas,
39
+ progress,
40
+ video {
41
+ display: inline-block;
42
+ vertical-align: baseline;
43
+ }
44
+
45
+ audio:not([controls]) {
46
+ display: none;
47
+ height: 0;
48
+ }
49
+
50
+ [hidden],
51
+ template {
52
+ display: none;
53
+ }
54
+
55
+ a {
56
+ background: transparent;
57
+ }
58
+
59
+ a:active,
60
+ a:hover {
61
+ outline: 0;
62
+ }
63
+
64
+ abbr[title] {
65
+ border-bottom: 1px dotted;
66
+ }
67
+
68
+ b,
69
+ strong {
70
+ font-weight: bold;
71
+ }
72
+
73
+ dfn {
74
+ font-style: italic;
75
+ }
76
+
77
+ h1 {
78
+ font-size: 2em;
79
+ margin: 0.67em 0;
80
+ }
81
+
82
+ mark {
83
+ background: #ff0;
84
+ color: #000;
85
+ }
86
+
87
+ small {
88
+ font-size: 80%;
89
+ }
90
+
91
+ sub,
92
+ sup {
93
+ font-size: 75%;
94
+ line-height: 0;
95
+ position: relative;
96
+ vertical-align: baseline;
97
+ }
98
+
99
+ sup {
100
+ top: -0.5em;
101
+ }
102
+
103
+ sub {
104
+ bottom: -0.25em;
105
+ }
106
+
107
+ img {
108
+ border: 0;
109
+ }
110
+
111
+ svg:not(:root) {
112
+ overflow: hidden;
113
+ }
114
+
115
+ figure {
116
+ margin: 1em 40px;
117
+ }
118
+
119
+ hr {
120
+ -moz-box-sizing: content-box;
121
+ box-sizing: content-box;
122
+ height: 0;
123
+ }
124
+
125
+ pre {
126
+ overflow: auto;
127
+ }
128
+
129
+ code,
130
+ kbd,
131
+ pre,
132
+ samp {
133
+ font-family: monospace, monospace;
134
+ font-size: 1em;
135
+ }
136
+
137
+ button,
138
+ input,
139
+ optgroup,
140
+ select,
141
+ textarea {
142
+ color: inherit;
143
+ font: inherit;
144
+ margin: 0;
145
+ }
146
+
147
+ button {
148
+ overflow: visible;
149
+ }
150
+
151
+ button,
152
+ select {
153
+ text-transform: none;
154
+ }
155
+
156
+ button,
157
+ html input[type="button"],
158
+ input[type="reset"],
159
+ input[type="submit"] {
160
+ -webkit-appearance: button;
161
+ cursor: pointer;
162
+ }
163
+
164
+ button[disabled],
165
+ html input[disabled] {
166
+ cursor: default;
167
+ }
168
+
169
+ button::-moz-focus-inner,
170
+ input::-moz-focus-inner {
171
+ border: 0;
172
+ padding: 0;
173
+ }
174
+
175
+ input {
176
+ line-height: normal;
177
+ }
178
+
179
+ input[type="checkbox"],
180
+ input[type="radio"] {
181
+ box-sizing: border-box;
182
+ padding: 0;
183
+ }
184
+
185
+ input[type="number"]::-webkit-inner-spin-button,
186
+ input[type="number"]::-webkit-outer-spin-button {
187
+ height: auto;
188
+ }
189
+
190
+ input[type="search"] {
191
+ -webkit-appearance: textfield;
192
+ -moz-box-sizing: content-box;
193
+ -webkit-box-sizing: content-box;
194
+ box-sizing: content-box;
195
+ }
196
+
197
+ input[type="search"]::-webkit-search-cancel-button,
198
+ input[type="search"]::-webkit-search-decoration {
199
+ -webkit-appearance: none;
200
+ }
201
+
202
+ fieldset {
203
+ border: 1px solid #c0c0c0;
204
+ margin: 0 2px;
205
+ padding: 0.35em 0.625em 0.75em;
206
+ }
207
+
208
+ legend {
209
+ border: 0;
210
+ padding: 0;
211
+ }
212
+
213
+ textarea {
214
+ overflow: auto;
215
+ }
216
+
217
+ optgroup {
218
+ font-weight: bold;
219
+ }
220
+
221
+ table {
222
+ border-collapse: collapse;
223
+ border-spacing: 0;
224
+ }
225
+
226
+ td,
227
+ th {
228
+ padding: 0;
229
+ }
@@ -0,0 +1,177 @@
1
+ //======================================================================
2
+ // SCSS variables accessible in every SCSS file imported after this one.
3
+ //======================================================================
4
+
5
+ // Dimensions - application
6
+ //----------------------------------------------------------------------
7
+
8
+ $application-container-min-width: 300px;
9
+
10
+ // Dimensions - appbar
11
+ //----------------------------------------------------------------------
12
+
13
+ $appbar-height: 64px;
14
+ $appbar-button-height: 46px;
15
+
16
+ // Dimensions - sidebars
17
+ //----------------------------------------------------------------------
18
+
19
+ $sidebar-width: 300px;
20
+
21
+ // Dimensions - main
22
+ //----------------------------------------------------------------------
23
+
24
+ $main-top: $appbar-height;
25
+ $main-left: $sidebar-width + 1; // Allows for 1px border
26
+
27
+ // Dimensions - cards
28
+ //----------------------------------------------------------------------
29
+
30
+ $card-width-xsmall: 180px;
31
+ $card-width-small: 220px;
32
+ $card-width: 280px;
33
+ $card-width-large: 360px;
34
+ $card-width-xlarge: 420px;
35
+
36
+ // Dimensions - menus
37
+ //----------------------------------------------------------------------
38
+
39
+ $menu-width: 56px;
40
+ $menu-width-factors: 1, 2, 3, 4, 5, 6, 7;
41
+
42
+ // Dimensions - tabs
43
+ //----------------------------------------------------------------------
44
+
45
+ $tab-height: 48px;
46
+
47
+ // Dimensions - buttons
48
+ //----------------------------------------------------------------------
49
+
50
+ $button-height-dense: 32px;
51
+ $button-height: 36px;
52
+ $button-height-large: 56px;
53
+
54
+ $button-icon-height: 40px;
55
+
56
+ $button-fab-mini-height: $button-icon-height;
57
+ $button-fab-height: 56px;
58
+
59
+ // Dimensions - inputs (text-fields, etc...)
60
+ //----------------------------------------------------------------------
61
+
62
+ $input-height: 40px;
63
+
64
+ // Font sizes
65
+ //----------------------------------------------------------------------
66
+
67
+ $font-size-xsmall: 10px;
68
+ $font-size-small: 12px;
69
+ $font-size-normal: 14px;
70
+ $font-size-large: 20px;
71
+ $font-size-xlarge: 34px;
72
+
73
+ $font-size-text-field: 16px;
74
+
75
+ $font-size-icon: 24px;
76
+
77
+ // Spacing
78
+ //----------------------------------------------------------------------
79
+
80
+ $spacing-xsmall: 4px;
81
+ $spacing-small: 8px;
82
+ $spacing-normal: 16px;
83
+ $spacing-large: 24px;
84
+ $spacing-xlarge: 32px;
85
+
86
+ // Depth (z-index)
87
+ //----------------------------------------------------------------------
88
+
89
+ $layout-depth: 10;
90
+ $menu-depth: 20;
91
+ $overlay-depth: 30;
92
+ $sidebar-depth: 40;
93
+ $dialog-depth: 50;
94
+
95
+ // Device breakpoints
96
+ //----------------------------------------------------------------------
97
+
98
+ $small-width: 400px;
99
+ $medium-width: 750px;
100
+ $large-width: 1000px;
101
+
102
+ // Convenience variables
103
+ //----------------------------------------------------------------------
104
+
105
+
106
+
107
+ // Color variables
108
+ // See: http://www.google.com/design/spec/style/color.html
109
+ //----------------------------------------------------------------------
110
+
111
+ $colors: (
112
+ "red" : #db4437,
113
+ "blue" : #2196f3,
114
+ "dark-blue" : darken(#2196f3, 10%),
115
+ "grey" : #9e9e9e,
116
+ "black" : #000000,
117
+ "white" : #ffffff,
118
+ "pink" : #e91e63,
119
+ "purple" : #9c27b0,
120
+ "deep-purple": #673ab7,
121
+ "indigo" : #3f51b5,
122
+ "light-blue" : #03a9f4,
123
+ "cyan" : #00bcd4,
124
+ "teal" : #009688,
125
+ "green" : #4caf50,
126
+ "light-green": #8bc34a,
127
+ "lime" : #cddc39,
128
+ "yellow" : #ffeb3b,
129
+ "highlight" : #ffffcc,
130
+ "amber" : #ffc107,
131
+ "orange" : #ff9800,
132
+ "dark-orange": #ef6c00,
133
+ "deep-orange": #ff5722,
134
+ "brown" : #795548,
135
+ "blue-grey" : #607d8b,
136
+ "icon" : #737373,
137
+ "helper" : rgba(0, 0, 0, 0.54),
138
+ "hint" : rgba(0, 0, 0, 0.54),
139
+ "text" : rgb(51, 51, 51),
140
+ "divider" : rgba(0, 0, 0, 0.12),
141
+ "hover" : #eceff1,
142
+ "snackbar" : #323232
143
+ );
144
+
145
+ // Easier way to reference $colors map
146
+ @function color($color-name) {
147
+ @return map-get($colors, $color-name);
148
+ }
149
+
150
+ // Defaults - Application colors (user can override)
151
+ //----------------------------------------------------------------------
152
+
153
+ // Body
154
+ $body-background-color: #eee !default;
155
+
156
+ // appbar and any colored component
157
+ $primary-color: color("blue") !default;
158
+ $secondary-color: color("red") !default;
159
+
160
+ // Hover color for lists, menus, etc...
161
+ $hover-color: color("hover") !default;
162
+
163
+ // Appbar only
164
+ $appbar-text-color: color("white") !default;
165
+ $appbar-button-color: color("hint") !default;
166
+
167
+ // Merge defaults back into globals to use in colored components.
168
+ // Having this here allows access to the color helpers already created
169
+ // in the $colors global so you can do color("primary") instead of #fff.
170
+ //----------------------------------------------------------------------
171
+
172
+ $app-config: (
173
+ "primary": $primary-color,
174
+ "secondary": $secondary-color,
175
+ "hover": $hover-color
176
+ );
177
+ $colors: map-merge(($colors), ($app-config));