malvolio 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
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,85 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group callout
7
+ ////
8
+
9
+ /// Background color of a callout.
10
+ /// @type Color
11
+ $callout-background: $white !default;
12
+
13
+ /// Fade value for callout backgrounds.
14
+ /// @type Number
15
+ $callout-background-fade: 85% !default;
16
+
17
+ /// Padding inside a callout.
18
+ /// @type Length
19
+ $callout-padding: 10px !default;
20
+
21
+ /// Bottom margin of a callout.
22
+ /// @type Length
23
+ $callout-margin-bottom: $global-margin !default;
24
+
25
+ /// Border around a callout.
26
+ /// @type Border
27
+ $callout-border: 1px solid darken($callout-background, 20%) !default;
28
+
29
+ /// Border around a callout with the `.success` class.
30
+ /// @type Border
31
+ $callout-border-secondary: 1px solid darken($secondary-color, 20%) !default;
32
+
33
+ /// Border around a callout with the `.success` class.
34
+ /// @type Border
35
+ $callout-border-success: 1px solid darken($success-color, 20%) !default;
36
+
37
+ /// Border around a callout with the `.warning` class.
38
+ /// @type Border
39
+ $callout-border-warning: 1px solid darken($warning-color, 20%) !default;
40
+
41
+ /// Border around a callout with the `.alert` class.
42
+ /// @type Border
43
+ $callout-border-alert: 1px solid darken($alert-color, 20%) !default;
44
+
45
+ table.callout {
46
+ margin-bottom: $callout-margin-bottom;
47
+ Margin-bottom: $callout-margin-bottom;
48
+ }
49
+
50
+ th.callout-inner {
51
+ width: 100%;
52
+ border: $callout-border;
53
+ padding: $callout-padding;
54
+ background: $callout-background;
55
+
56
+ &.primary {
57
+ background: scale-color($primary-color, $lightness: $callout-background-fade);
58
+ border: $callout-border-secondary;
59
+ color: $black;
60
+ }
61
+
62
+ &.secondary {
63
+ background: scale-color($secondary-color, $lightness: $callout-background-fade);
64
+ border: $callout-border-secondary;
65
+ color: $black;
66
+ }
67
+
68
+ &.success {
69
+ background: scale-color($success-color, $lightness: $callout-background-fade);
70
+ border: $callout-border-success;
71
+ color: $white;
72
+ }
73
+
74
+ &.warning {
75
+ background: scale-color($warning-color, $lightness: $callout-background-fade);
76
+ border: $callout-border-warning;
77
+ color: $white;
78
+ }
79
+
80
+ &.alert {
81
+ background: scale-color($alert-color, $lightness: $callout-background-fade);
82
+ border: $callout-border-alert;
83
+ color: $white;
84
+ }
85
+ }
@@ -0,0 +1,139 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group media-query
7
+ ////
8
+
9
+ @media only screen and (max-width: #{$global-breakpoint}) {
10
+ table.body img {
11
+ width: auto;
12
+ height: auto;
13
+ }
14
+
15
+ table.body center {
16
+ min-width: 0 !important;
17
+ }
18
+
19
+ table.body .container {
20
+ width: $global-width-small !important;
21
+ }
22
+
23
+ //If it supports border-box, why not? Am I right?
24
+ //Also, by default pad that to the global-gutter variable
25
+ table.body .columns,
26
+ table.body .column {
27
+ height: auto !important;
28
+ -moz-box-sizing: border-box;
29
+ -webkit-box-sizing: border-box;
30
+ box-sizing: border-box;
31
+ padding-left: $global-gutter !important;
32
+ padding-right: $global-gutter !important;
33
+
34
+ // Nested columns won't double the padding
35
+ .column,
36
+ .columns {
37
+ padding-left: 0 !important;
38
+ padding-right: 0 !important;
39
+ }
40
+ }
41
+
42
+ // Collpased columns have no gutter.
43
+ .collapse {
44
+ table.body & .columns,
45
+ table.body & .column {
46
+ padding-left: 0 !important;
47
+ padding-right: 0 !important;
48
+ }
49
+ }
50
+
51
+ // Basic grid rules
52
+ @for $i from 1 through $grid-column-count {
53
+ td.small-#{$i},
54
+ th.small-#{$i} {
55
+ display: inline-block !important;
56
+ width: -zf-grid-calc-pct($i, $grid-column-count) !important;
57
+ }
58
+ }
59
+
60
+ //If it's the last column in column count (12 by default),
61
+ //give it block and 100% width to knock down the wimpy columns to their own row.
62
+ .columns td.small-#{$grid-column-count},
63
+ .column td.small-#{$grid-column-count},
64
+ .columns th.small-#{$grid-column-count},
65
+ .column th.small-#{$grid-column-count} {
66
+ display: block !important;
67
+ width: 100% !important;
68
+ }
69
+
70
+ @for $i from 1 through ($grid-column-count - 1) {
71
+ table.body td.small-offset-#{$i},
72
+ table.body th.small-offset-#{$i} {
73
+ //1.5 takes in effect a whole empty cell.
74
+ margin-left: -zf-grid-calc-pct($i, $grid-column-count) !important;
75
+ Margin-left: -zf-grid-calc-pct($i, $grid-column-count) !important;
76
+ }
77
+ }
78
+
79
+ table.body table.columns td.expander,
80
+ table.body table.columns th.expander {
81
+ display: none !important;
82
+ }
83
+
84
+ table.body .right-text-pad,
85
+ table.body .text-pad-right {
86
+ padding-left: $text-padding !important;
87
+ }
88
+
89
+ table.body .left-text-pad,
90
+ table.body .text-pad-left {
91
+ padding-right: $text-padding !important;
92
+ }
93
+
94
+ //menu
95
+ table.menu {
96
+ width: 100% !important;
97
+
98
+ td,
99
+ th {
100
+ width: auto !important;
101
+ display: inline-block !important;
102
+ }
103
+
104
+ &.vertical,
105
+ &.small-vertical {
106
+ td,
107
+ th {
108
+ display: block !important;
109
+ }
110
+ }
111
+ }
112
+
113
+ // Centers the menus!
114
+ table.menu[align="center"] {
115
+ width: auto !important;
116
+ }
117
+
118
+ // expands buttons for small only
119
+ table.button.small-expand,
120
+ table.button.small-expanded {
121
+ width: 100% !important;
122
+
123
+ table {
124
+ width: 100%;
125
+
126
+ a {
127
+ text-align: center !important;
128
+ width: 100% !important;
129
+ padding-left: 0 !important;
130
+ padding-right: 0 !important;
131
+ }
132
+ }
133
+
134
+ center {
135
+ min-width: 0;
136
+ }
137
+ }
138
+ }
139
+
@@ -0,0 +1,83 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group menu
7
+ ////
8
+
9
+ /// Padding inside a menu item.
10
+ /// @type Length
11
+ $menu-item-padding: 10px !default;
12
+
13
+ /// Right-hand spacing of items in menus with the `.simple` class.
14
+ /// @type Length
15
+ $menu-item-gutter: 10px !default;
16
+
17
+ /// This is the color of the menu item links.
18
+ /// @type Color
19
+ $menu-item-color: $primary-color !default;
20
+
21
+ table.menu {
22
+ width: $global-width;
23
+
24
+ td.menu-item,
25
+ th.menu-item {
26
+ padding: $menu-item-padding;
27
+ padding-right: $menu-item-gutter;
28
+
29
+ a {
30
+ color: $menu-item-color;
31
+ }
32
+ }
33
+ }
34
+
35
+ // Doesn't work on the pesky ESPs like outlook 2000
36
+ table.menu.vertical {
37
+ td.menu-item,
38
+ th.menu-item {
39
+ padding: $menu-item-padding;
40
+ padding-right: 0;
41
+ display: block;
42
+
43
+ a {
44
+ width: 100%;
45
+ }
46
+ }
47
+
48
+ // Nested lists need some more padding to the left
49
+ td.menu-item,
50
+ th.menu-item {
51
+ table.menu.vertical {
52
+ td.menu-item,
53
+ th.menu-item {
54
+ padding-left: $menu-item-padding;
55
+ }
56
+ }
57
+ }
58
+ }
59
+
60
+ table.menu.text-center a {
61
+ text-align: center;
62
+ }
63
+
64
+ //Centers the menus!
65
+ .menu[align="center"] {
66
+ width: auto !important;
67
+ }
68
+
69
+ // Remove outside padding so that the menu aligns with other elements on the page
70
+ .menu:not(.float-center) {
71
+ .menu-item:first-child{padding-left:0!important;}
72
+ .menu-item:last-child{padding-right:0!important;}
73
+ }
74
+ .menu.vertical .menu-item {
75
+ padding-left:0!important;
76
+ padding-right:0!important;
77
+ }
78
+ @media only screen and (max-width: #{$global-breakpoint}) {
79
+ .menu.small-vertical .menu-item {
80
+ padding-left:0!important;
81
+ padding-right:0!important;
82
+ }
83
+ }
@@ -0,0 +1,86 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group normalize
7
+ ////
8
+
9
+ #outlook a {
10
+ padding: 0;
11
+ }
12
+
13
+ body {
14
+ width: 100% !important;
15
+ min-width: 100%;
16
+ -webkit-text-size-adjust: 100%;
17
+ -ms-text-size-adjust: 100%;
18
+ margin: 0;
19
+ Margin: 0;
20
+ padding: 0;
21
+ -moz-box-sizing: border-box;
22
+ -webkit-box-sizing: border-box;
23
+ box-sizing: border-box;
24
+ }
25
+
26
+ .ExternalClass {
27
+ width: 100%;
28
+
29
+ &,
30
+ p,
31
+ span,
32
+ font,
33
+ td,
34
+ div {
35
+ line-height: 100%;
36
+ }
37
+ }
38
+
39
+ #backgroundTable {
40
+ margin: 0;
41
+ Margin: 0;
42
+ padding: 0;
43
+ width: 100% !important;
44
+ line-height: 100% !important;
45
+ }
46
+
47
+ img {
48
+ outline: none;
49
+ text-decoration: none;
50
+ -ms-interpolation-mode: bicubic;
51
+ width: auto;
52
+ max-width: 100%;
53
+ clear: both;
54
+ display: block;
55
+ }
56
+
57
+ center {
58
+ width: 100%;
59
+ min-width: $global-width;
60
+ }
61
+
62
+ a img {
63
+ border: none;
64
+ }
65
+
66
+ table {
67
+ border-spacing: 0;
68
+ border-collapse: collapse;
69
+ }
70
+
71
+ td {
72
+ word-wrap: break-word;
73
+ -webkit-hyphens: auto;
74
+ -moz-hyphens: auto;
75
+ hyphens: auto;
76
+ border-collapse: collapse !important;
77
+ }
78
+
79
+ table, tr, td {
80
+ padding-top: 0;
81
+ padding-right: 0;
82
+ padding-bottom: 0;
83
+ padding-left: 0;
84
+ vertical-align: top;
85
+ text-align: left;
86
+ }
@@ -0,0 +1,11 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group outlook
7
+ ////
8
+
9
+ body.outlook p {
10
+ display: inline !important;
11
+ }
@@ -0,0 +1,49 @@
1
+ // Foundation for Emails by ZURB
2
+ // zurb.com/ink/
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group thumbnail
7
+ ////
8
+
9
+ /// Border around thumbnail images.
10
+ /// @type Border
11
+ $thumbnail-border: solid 4px $white !default;
12
+
13
+ /// Bottom margin for thumbnail images.
14
+ /// @type Length
15
+ $thumbnail-margin-bottom: $global-margin !default;
16
+
17
+ /// Box shadow under thumbnail images.
18
+ /// @type Shadow
19
+ $thumbnail-shadow: 0 0 0 1px rgba($black, 0.2) !default;
20
+
21
+ /// Box shadow under thumbnail images.
22
+ /// @type Shadow
23
+ $thumbnail-shadow-hover: 0 0 6px 1px rgba($primary-color, 0.5) !default;
24
+
25
+ /// Transition proprties for thumbnail images.
26
+ /// @type Transition
27
+ $thumbnail-transition: box-shadow 200ms ease-out !default;
28
+
29
+ /// Default radius for thumbnail images.
30
+ /// @type Number
31
+ $thumbnail-radius: $global-radius !default;
32
+
33
+ /// Adds thumbnail styles to an element.
34
+ .thumbnail {
35
+ border: $thumbnail-border;
36
+ box-shadow: $thumbnail-shadow;
37
+ display: inline-block;
38
+ line-height: 0;
39
+ max-width: 100%;
40
+ transition: $thumbnail-transition;
41
+ border-radius: $thumbnail-radius;
42
+ margin-bottom: $thumbnail-margin-bottom;
43
+
44
+ &:hover,
45
+ &:focus {
46
+ box-shadow: $thumbnail-shadow-hover;
47
+ }
48
+ }
49
+