malvolio 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.rspec +3 -0
  4. data/.travis.yml +7 -0
  5. data/Gemfile +6 -0
  6. data/Gemfile.lock +184 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +61 -0
  9. data/Rakefile +6 -0
  10. data/bin/console +14 -0
  11. data/bin/malvolio +6 -0
  12. data/bin/setup +8 -0
  13. data/lib/generators/malvolio/create_generator.rb +27 -0
  14. data/lib/generators/malvolio/create_with_inky_generator.rb +27 -0
  15. data/lib/generators/malvolio/templates/base/config.yaml +1 -0
  16. data/lib/generators/malvolio/templates/base/index.html +16 -0
  17. data/lib/generators/malvolio/templates/base/index.scss +0 -0
  18. data/lib/generators/malvolio/templates/base_with_inky/config.yaml +1 -0
  19. data/lib/generators/malvolio/templates/base_with_inky/index.html +22 -0
  20. data/lib/generators/malvolio/templates/base_with_inky/scss/foundation_emails/_foundation_emails.scss +27 -0
  21. data/lib/generators/malvolio/templates/base_with_inky/scss/foundation_emails/_global.scss +95 -0
  22. data/lib/generators/malvolio/templates/base_with_inky/scss/foundation_emails/components/_alignment.scss +88 -0
  23. data/lib/generators/malvolio/templates/base_with_inky/scss/foundation_emails/components/_button.scss +312 -0
  24. data/lib/generators/malvolio/templates/base_with_inky/scss/foundation_emails/components/_callout.scss +85 -0
  25. data/lib/generators/malvolio/templates/base_with_inky/scss/foundation_emails/components/_code.scss +0 -0
  26. data/lib/generators/malvolio/templates/base_with_inky/scss/foundation_emails/components/_media-query.scss +139 -0
  27. data/lib/generators/malvolio/templates/base_with_inky/scss/foundation_emails/components/_menu.scss +83 -0
  28. data/lib/generators/malvolio/templates/base_with_inky/scss/foundation_emails/components/_normalize.scss +86 -0
  29. data/lib/generators/malvolio/templates/base_with_inky/scss/foundation_emails/components/_outlook-first.scss +11 -0
  30. data/lib/generators/malvolio/templates/base_with_inky/scss/foundation_emails/components/_thumbnail.scss +49 -0
  31. data/lib/generators/malvolio/templates/base_with_inky/scss/foundation_emails/components/_typography.scss +404 -0
  32. data/lib/generators/malvolio/templates/base_with_inky/scss/foundation_emails/components/_visibility.scss +66 -0
  33. data/lib/generators/malvolio/templates/base_with_inky/scss/foundation_emails/grid/_block-grid.scss +32 -0
  34. data/lib/generators/malvolio/templates/base_with_inky/scss/foundation_emails/grid/_grid.scss +180 -0
  35. data/lib/generators/malvolio/templates/base_with_inky/scss/foundation_emails/settings/_settings.scss +148 -0
  36. data/lib/generators/malvolio/templates/base_with_inky/scss/foundation_emails/util/_util.scss +22 -0
  37. data/lib/generators/malvolio/templates/base_with_inky/scss/index.scss +1 -0
  38. data/lib/malvolio.rb +7 -0
  39. data/lib/malvolio/cli.rb +50 -0
  40. data/lib/malvolio/compiler.rb +85 -0
  41. data/lib/malvolio/version.rb +3 -0
  42. data/malvolio.gemspec +46 -0
  43. metadata +228 -0
@@ -0,0 +1,27 @@
1
+ // Foundation for Emails by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ @import
6
+ 'util/util',
7
+ 'global',
8
+ 'components/normalize',
9
+ 'grid/grid',
10
+ 'grid/block-grid',
11
+ 'components/alignment',
12
+ 'components/visibility',
13
+ 'components/typography',
14
+ 'components/button',
15
+ 'components/callout',
16
+ 'components/thumbnail',
17
+ 'components/menu',
18
+ 'components/outlook-first',
19
+ 'components/media-query';
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
@@ -0,0 +1,95 @@
1
+ // Foundation for Emails by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group global
7
+ ////
8
+
9
+ /// Primary color for interactive components like links and buttons.
10
+ /// @type Color
11
+ $primary-color: #2199e8 !default;
12
+
13
+ /// Secondary color, used with components that support the `.secondary` class.
14
+ /// @type Color
15
+ $secondary-color: #777777 !default;
16
+
17
+ /// Color to indicate a positive status or action, used with the `.success` class.
18
+ /// @type Color
19
+ $success-color: #3adb76 !default;
20
+
21
+ /// Color to indicate a caution status or action, used with the `.warning` class.
22
+ /// @type Color
23
+ $warning-color: #ffae00 !default;
24
+
25
+ /// Color to indicate a negative status or action, used with the `.alert` class.
26
+ /// @type Color
27
+ $alert-color: #ec5840 !default;
28
+
29
+ /// Color used for light gray UI items within Foundation.
30
+ /// @type Color
31
+ $light-gray: #f3f3f3 !default;
32
+
33
+ /// Color used for medium gray UI items within Foundation.
34
+ /// @type Color
35
+ $medium-gray: #cacaca !default;
36
+
37
+ /// Color used for dark gray UI items within Foundation.
38
+ /// @type Color
39
+ $dark-gray: #8a8a8a !default;
40
+
41
+ /// Color used for black ui items within Foundation
42
+ /// @type Color
43
+ $black: #0a0a0a !default;
44
+
45
+ /// Color used for white ui items within Foundation
46
+ /// @type Color
47
+ $white: #fefefe !default;
48
+
49
+ /// Color used code.
50
+ /// @type Color
51
+ $pre-color: #ff6908 !default;
52
+
53
+ /// Width of the container.
54
+ /// @type Number
55
+ $global-width: 580px !default;
56
+
57
+ /// Width of the container on small screens.
58
+ /// @type Length
59
+ $global-width-small: 95% !default;
60
+
61
+ /// Gutter for grid elements.
62
+ /// @type length
63
+ $global-gutter: 16px !default;
64
+
65
+ /// Body background color.
66
+ /// @type Length
67
+ $body-background: $light-gray !default;
68
+
69
+ /// Color for the container background
70
+ /// @type Color
71
+ $container-background: $white !default;
72
+
73
+ /// Global padding.
74
+ /// @type Number
75
+ $global-padding: 16px !default;
76
+
77
+ /// Global margin. Margin requires a capital 'M' to workin Outlook.com
78
+ /// @type Number
79
+ $global-margin: 16px !default;
80
+
81
+ /// Global radius of radius-corners.
82
+ /// @type Number
83
+ $global-radius: 3px !default;
84
+
85
+ /// Global rounded radius of rounded-corners.
86
+ /// @type Number
87
+ $global-rounded: 500px !default;
88
+
89
+ /// Global media query to switch from desktop to mobile styles.
90
+ /// @type String
91
+ $global-breakpoint: $global-width + $global-gutter !default;
92
+
93
+ .wrapper {
94
+ width: 100%;
95
+ }
@@ -0,0 +1,88 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group alignment
7
+ ////
8
+
9
+ table,
10
+ th,
11
+ td,
12
+ h1,
13
+ h2,
14
+ h3,
15
+ h4,
16
+ h5,
17
+ h6,
18
+ p,
19
+ span {
20
+ &.text-center {
21
+ text-align: center;
22
+ }
23
+
24
+ &.text-left {
25
+ text-align: left;
26
+ }
27
+
28
+ &.text-right {
29
+ text-align: right;
30
+ }
31
+ }
32
+
33
+ span.text-center {
34
+ display: block;
35
+ width: 100%;
36
+ text-align: center;
37
+ }
38
+
39
+ @media only screen and (max-width: #{$global-breakpoint}) {
40
+ .small-float-center {
41
+ margin: 0 auto !important;
42
+ float: none !important;
43
+ text-align: center !important;
44
+ }
45
+
46
+ .small-text-center {
47
+ text-align: center !important;
48
+ }
49
+
50
+ .small-text-left {
51
+ text-align: left !important;
52
+ }
53
+
54
+ .small-text-right {
55
+ text-align: right !important;
56
+ }
57
+ }
58
+
59
+ img.float-left {
60
+ float: left;
61
+ text-align: left;
62
+ }
63
+
64
+ img.float-right {
65
+ float: right;
66
+ text-align: right;
67
+ }
68
+
69
+ img.float-center,
70
+ img.text-center {
71
+ margin: 0 auto;
72
+ Margin: 0 auto;
73
+ float: none;
74
+ text-align: center;
75
+ }
76
+
77
+ table,
78
+ td,
79
+ th {
80
+ &.float-center {
81
+ margin: 0 auto;
82
+ Margin: 0 auto;
83
+ float: none;
84
+ text-align: center;
85
+ }
86
+ }
87
+
88
+
@@ -0,0 +1,312 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group button
7
+ ////
8
+
9
+ /// Padding inside buttons at various sizes.
10
+ /// @type Map
11
+ $button-padding: (
12
+ tiny: 4px 8px 4px 8px,
13
+ small: 5px 10px 5px 10px,
14
+ default: 8px 16px 8px 16px,
15
+ large: 10px 20px 10px 20px,
16
+ ) !default;
17
+
18
+ /// Font sizes of buttons at various sizes.
19
+ /// @type Map
20
+ $button-font-size: (
21
+ tiny: 10px,
22
+ small: 12px,
23
+ default: 16px,
24
+ large: 20px,
25
+ ) !default;
26
+
27
+ /// Text color of buttons.
28
+ /// @type Color
29
+ $button-color: $white !default;
30
+
31
+ /// Text color of buttons with a light background.
32
+ /// @type Color
33
+ $button-color-alt: $medium-gray !default;
34
+
35
+ /// Font weight of buttons.
36
+ /// @type Weight
37
+ $button-font-weight: bold !default;
38
+
39
+ /// Margin around buttons.
40
+ /// @type List
41
+ $button-margin: 0 0 $global-margin 0 !default;
42
+
43
+ /// Background color of buttons.
44
+ /// @type Color
45
+ $button-background: $primary-color !default;
46
+
47
+ /// Border around buttons.
48
+ /// @type Border
49
+ $button-border: 2px solid $button-background !default;
50
+
51
+ /// Border radius of buttons. Not supported by all email clients.
52
+ /// @type Number
53
+ $button-radius: $global-radius !default;
54
+
55
+ /// Border radius of rounded buttons. Not supported by all email clients.
56
+ /// @type Number
57
+ $button-rounded: $global-rounded !default;
58
+
59
+ table.button {
60
+ width: auto;
61
+ margin: $button-margin;
62
+ Margin: $button-margin;
63
+
64
+ table {
65
+
66
+ td {
67
+ text-align: left;
68
+ color: $button-color;
69
+ background: $button-background;
70
+ border: $button-border;
71
+
72
+ a {
73
+ font-family: $body-font-family;
74
+ font-size: map-get($button-font-size, default);
75
+ font-weight: $button-font-weight;
76
+ color: $button-color;
77
+ text-decoration: none;
78
+ text-align: left;
79
+ display: inline-block;
80
+ padding: map-get($button-padding, default);
81
+ border: 0 solid $button-background;
82
+ border-radius: $button-radius;
83
+ }
84
+ }
85
+ }
86
+
87
+ &.radius table td {
88
+ border-radius: $button-radius;
89
+ border: none;
90
+ }
91
+
92
+ &.rounded table td {
93
+ border-radius: $button-rounded;
94
+ border: none;
95
+ }
96
+ }
97
+
98
+ table.button:hover table tr td a,
99
+ table.button:active table tr td a,
100
+ table.button table tr td a:visited,
101
+ table.button.tiny:hover table tr td a,
102
+ table.button.tiny:active table tr td a,
103
+ table.button.tiny table tr td a:visited,
104
+ table.button.small:hover table tr td a,
105
+ table.button.small:active table tr td a,
106
+ table.button.small table tr td a:visited,
107
+ table.button.large:hover table tr td a,
108
+ table.button.large:active table tr td a,
109
+ table.button.large table tr td a:visited {
110
+ color: $button-color;
111
+ }
112
+
113
+ table.button.tiny {
114
+ table {
115
+ td,
116
+ a {
117
+ padding: map-get($button-padding, tiny);
118
+ }
119
+
120
+ a {
121
+ font-size: map-get($button-font-size, tiny);
122
+ font-weight: normal;
123
+ }
124
+ }
125
+ }
126
+
127
+ table.button.small {
128
+ table {
129
+ td,
130
+ a {
131
+ padding: map-get($button-padding, small);
132
+ font-size: map-get($button-font-size, small);
133
+ }
134
+ }
135
+ }
136
+
137
+ table.button.large {
138
+ table {
139
+ a {
140
+ padding: map-get($button-padding, large);
141
+ font-size: map-get($button-font-size, large);
142
+ }
143
+ }
144
+ }
145
+
146
+ table.button.expand,
147
+ table.button.expanded {
148
+ width: 100%;
149
+
150
+ table {
151
+ width: 100%;
152
+
153
+ a {
154
+ text-align: center;
155
+ width: 100%;
156
+ padding-left: 0;
157
+ padding-right: 0;
158
+ }
159
+ }
160
+
161
+ center {
162
+ min-width: 0;
163
+ }
164
+ }
165
+
166
+ table.button:hover,
167
+ table.button:visited,
168
+ table.button:active {
169
+ table {
170
+ td {
171
+ background: darken($button-background, 10%);
172
+ color: $button-color;
173
+ }
174
+ }
175
+ }
176
+
177
+ table.button:hover,
178
+ table.button:visited,
179
+ table.button:active {
180
+ table {
181
+ a {
182
+ border: 0 solid darken($button-background, 10%);
183
+ }
184
+ }
185
+ }
186
+
187
+ table.button.secondary {
188
+ table {
189
+ td {
190
+ background: $secondary-color;
191
+ color: $button-color;
192
+ border: 0px solid $secondary-color;
193
+ }
194
+
195
+ a {
196
+ color: $button-color;
197
+ border: 0 solid $secondary-color;
198
+ }
199
+ }
200
+ }
201
+
202
+ table.button.secondary:hover {
203
+ table {
204
+ td {
205
+ background: lighten($secondary-color, 10%);
206
+ color: $button-color;
207
+ }
208
+
209
+ a {
210
+ border: 0 solid lighten($secondary-color, 10%);
211
+ }
212
+ }
213
+ }
214
+
215
+ table.button.secondary:hover {
216
+ table {
217
+ td a {
218
+ color: $button-color;
219
+ }
220
+ }
221
+ }
222
+
223
+ table.button.secondary:active {
224
+ table {
225
+ td a {
226
+ color: $button-color;
227
+ }
228
+ }
229
+ }
230
+
231
+ table.button.secondary {
232
+ table {
233
+ td a:visited {
234
+ color: $button-color;
235
+ }
236
+ }
237
+ }
238
+
239
+ table.button.success {
240
+ table {
241
+ td {
242
+ background: $success-color;
243
+ border: 0px solid $success-color;
244
+ }
245
+
246
+ a {
247
+ border: 0 solid $success-color;
248
+ }
249
+ }
250
+ }
251
+
252
+ table.button.success:hover {
253
+ table {
254
+ td {
255
+ background: darken($success-color, 10%);
256
+ }
257
+
258
+ a {
259
+ border: 0 solid darken($success-color, 10%);
260
+ }
261
+ }
262
+ }
263
+
264
+ table.button.alert {
265
+ table {
266
+ td {
267
+ background: $alert-color;
268
+ border: 0px solid $alert-color;
269
+ }
270
+
271
+ a {
272
+ border: 0 solid $alert-color;
273
+ }
274
+ }
275
+ }
276
+
277
+ table.button.alert:hover {
278
+ table {
279
+ td {
280
+ background: darken($alert-color, 10%);
281
+ }
282
+
283
+ a {
284
+ border: 0 solid darken($alert-color, 10%);
285
+ }
286
+ }
287
+ }
288
+
289
+ table.button.warning {
290
+ table {
291
+ td {
292
+ background: $warning-color;
293
+ border: 0px solid $warning-color;
294
+ }
295
+
296
+ a {
297
+ border: 0px solid $warning-color;
298
+ }
299
+ }
300
+ }
301
+
302
+ table.button.warning:hover {
303
+ table {
304
+ td {
305
+ background: darken($warning-color, 10%);
306
+ }
307
+
308
+ a {
309
+ border: 0px solid darken($warning-color, 10%);
310
+ }
311
+ }
312
+ }