bootstrap-email 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,41 @@
1
+ h1, h2, h3, h4, h5, h6,
2
+ .h1, .h2, .h3, .h4, .h5, .h6 {
3
+ margin-top: 0;
4
+ margin-bottom: 0;
5
+ // margin-bottom: $font-size-base / 2;
6
+ font-weight: 500;
7
+ color: inherit;
8
+ text-align: left;
9
+ vertical-align: baseline;
10
+ }
11
+
12
+ @for $n from 1 through 6 {
13
+ h#{$n}, .h#{$n} {
14
+ font-size: heading-size($n);
15
+ line-height: heading-line-height($n);
16
+ }
17
+ }
18
+
19
+ .text-left {
20
+ text-align: left !important;
21
+ }
22
+
23
+ .text-right {
24
+ text-align: right !important;
25
+ }
26
+
27
+ .text-center {
28
+ text-align: center !important;
29
+ }
30
+
31
+ .p {
32
+ width: 100%;
33
+ & > tbody > tr > td {
34
+ margin: 0;
35
+ padding: 0 0 $font-size-base * 1.25 0;
36
+ & > p {
37
+ margin: 0;
38
+ padding: 0;
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,107 @@
1
+ $font-size-base: 16px;
2
+ $line-height-base: 1.5;
3
+ $headings-line-height: 1.2;
4
+ $headings-ratios: (1: 2.25, 2: 2, 3: 1.75, 4: 1.5, 5: 1.25, 6: 1);
5
+
6
+ //
7
+ // Color system
8
+ //
9
+
10
+ $white: #ffffff !default;
11
+ $gray-100: #f8f9fa !default;
12
+ $gray-200: #e9ecef !default;
13
+ $gray-300: #dee2e6 !default;
14
+ $gray-400: #ced4da !default;
15
+ $gray-500: #adb5bd !default;
16
+ $gray-600: #868e96 !default;
17
+ $gray-700: #495057 !default;
18
+ $gray-800: #343a40 !default;
19
+ $gray-900: #212529 !default;
20
+ $black: #000000 !default;
21
+
22
+ $grays: (
23
+ 100: $gray-100,
24
+ 200: $gray-200,
25
+ 300: $gray-300,
26
+ 400: $gray-400,
27
+ 500: $gray-500,
28
+ 600: $gray-600,
29
+ 700: $gray-700,
30
+ 800: $gray-800,
31
+ 900: $gray-900
32
+ ) !default;
33
+
34
+ $blue: #007bff !default;
35
+ $indigo: #6610f2 !default;
36
+ $purple: #6f42c1 !default;
37
+ $pink: #e83e8c !default;
38
+ $red: #dc3545 !default;
39
+ $orange: #fd7e14 !default;
40
+ $yellow: #ffc107 !default;
41
+ $green: #28a745 !default;
42
+ $teal: #20c997 !default;
43
+ $cyan: #17a2b8 !default;
44
+
45
+ $colors: (
46
+ blue: $blue,
47
+ indigo: $indigo,
48
+ purple: $purple,
49
+ pink: $pink,
50
+ red: $red,
51
+ orange: $orange,
52
+ yellow: $yellow,
53
+ green: $green,
54
+ teal: $teal,
55
+ cyan: $cyan,
56
+ white: $white,
57
+ gray: $gray-600,
58
+ gray-dark: $gray-800
59
+ ) !default;
60
+
61
+ $theme-primary: $blue !default;
62
+ $theme-secondary: $gray-600 !default;
63
+ $theme-success: $green !default;
64
+ $theme-danger: $red !default;
65
+ $theme-warning: $yellow !default;
66
+ $theme-info: $cyan !default;
67
+ $theme-light: $gray-100 !default;
68
+ $theme-dark: $gray-800 !default;
69
+
70
+ $theme-colors: (
71
+ primary: $theme-primary,
72
+ secondary: $theme-secondary,
73
+ success: $theme-success,
74
+ danger: $theme-danger,
75
+ warning: $theme-warning,
76
+ info: $theme-info,
77
+ light: $theme-light,
78
+ dark: $theme-dark
79
+ ) !default;
80
+
81
+ $spacer: $font-size-base;
82
+ $spacers: (
83
+ 0: 0,
84
+ 1: ($spacer * .25),
85
+ 2: ($spacer * .5),
86
+ 3: $spacer,
87
+ 4: ($spacer * 1.5),
88
+ 5: ($spacer * 3)
89
+ ) !default;
90
+
91
+ $font-family-sans-serif: Helvetica, Arial, sans-serif !default;
92
+
93
+ $widths: (
94
+ 25: 25%,
95
+ 50: 50%,
96
+ 75: 75%,
97
+ 100: 100%,
98
+ auto: auto
99
+ ) !default;
100
+
101
+ $table-border-color: $gray-200;
102
+ $table-border-width: 1px;
103
+
104
+ // Utility functions
105
+ @function heading-size($n) { @return map-get($headings-ratios, $n) * $font-size-base; }
106
+ @function heading-line-height($n) { @return heading-size($n) * $headings-line-height; }
107
+
@@ -0,0 +1,11 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <link rel="stylesheet" href="../../css/email.css">
6
+ <!-- inject-style src="./css/head.css" -->
7
+ </head>
8
+ <body>
9
+ <%= contents %>
10
+ </body>
11
+ </html>
@@ -0,0 +1,9 @@
1
+ <table class="mx-auto" align="center">
2
+ <tbody>
3
+ <tr>
4
+ <td>
5
+ <%= contents %>
6
+ </td>
7
+ </tr>
8
+ </tbody>
9
+ </table>
@@ -0,0 +1,9 @@
1
+ <table class="float-left" align="left">
2
+ <tbody>
3
+ <tr>
4
+ <td>
5
+ <%= contents %>
6
+ </td>
7
+ </tr>
8
+ </tbody>
9
+ </table>
@@ -0,0 +1,9 @@
1
+ <table class="float-right" align="right">
2
+ <tbody>
3
+ <tr>
4
+ <td>
5
+ <%= contents %>
6
+ </td>
7
+ </tr>
8
+ </tbody>
9
+ </table>
@@ -0,0 +1,9 @@
1
+ <table valign="top" class="<%= classes %>">
2
+ <tbody>
3
+ <tr>
4
+ <td valign="top">
5
+ <%= contents %>
6
+ </td>
7
+ </tr>
8
+ </tbody>
9
+ </table>
@@ -0,0 +1,3 @@
1
+ <th class="<%= classes %>" align="left" valign="top">
2
+ <%= contents %>
3
+ </th>
@@ -0,0 +1,29 @@
1
+ <table class="<%= classes %>">
2
+ <tbody>
3
+ <tr>
4
+ <td align="center">
5
+ <!--[if (gte mso 9)|(IE)]>
6
+ <table align="center">
7
+ <tbody>
8
+ <tr>
9
+ <td width="600">
10
+ <![endif]-->
11
+ <table align="center">
12
+ <tbody>
13
+ <tr>
14
+ <td>
15
+ <%= contents %>
16
+ </td>
17
+ </tr>
18
+ </tbody>
19
+ </table>
20
+ <!--[if (gte mso 9)|(IE)]>
21
+ </td>
22
+ </tr>
23
+ </tbody>
24
+ </table>
25
+ <![endif]-->
26
+ </td>
27
+ </tr>
28
+ </tbody>
29
+ </table>
@@ -0,0 +1,3 @@
1
+ <div class="<%= classes %>">
2
+ <%= contents %>
3
+ </div>
@@ -0,0 +1,9 @@
1
+ <div class="<%= classes %>">
2
+ <table>
3
+ <tbody>
4
+ <tr>
5
+ <td></td>
6
+ </tr>
7
+ </tbody>
8
+ </table>
9
+ </div>
@@ -0,0 +1,7 @@
1
+ <table class="<%= classes %>">
2
+ <thead>
3
+ <tr>
4
+ <%= contents %>
5
+ </tr>
6
+ </thead>
7
+ </table>
@@ -0,0 +1,9 @@
1
+ <table class="<%= classes %>" align="left">
2
+ <tbody>
3
+ <tr>
4
+ <td>
5
+ <%= contents %>
6
+ </td>
7
+ </tr>
8
+ </tbody>
9
+ </table>
@@ -0,0 +1,9 @@
1
+ <table class="<%= classes %>">
2
+ <tbody>
3
+ <tr>
4
+ <td>
5
+ <%= contents %>
6
+ </td>
7
+ </tr>
8
+ </tbody>
9
+ </table>
@@ -0,0 +1 @@
1
+ @import '../../../core/bootstrap-email'
@@ -1,8 +1,7 @@
1
1
  class ActionMailer::Base
2
-
3
2
  # sit in the middle and compile the html
4
3
  def bootstrap_mail *args
5
- bootstrap = BootstrapEmail::Compiler.new(mail(*args) { |format| format.html { render layout: 'layouts/bootstrap-mailer.html.erb' } } )
4
+ bootstrap = BootstrapEmail::Compiler.new(mail(*args) { |format| format.html { render layout: 'layouts/bootstrap-mailer.html.erb' } })
6
5
  bootstrap.perform_full_compile
7
6
  end
8
7
 
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap-email
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stuart Yamartino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-11 00:00:00.000000000 Z
11
+ date: 2018-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: premailer-rails
14
+ name: actionmailer
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.9'
19
+ version: '3'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '6'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: '1.9'
29
+ version: '3'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '6'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: nokogiri
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -39,25 +45,19 @@ dependencies:
39
45
  - !ruby/object:Gem::Version
40
46
  version: '1.6'
41
47
  - !ruby/object:Gem::Dependency
42
- name: actionmailer
48
+ name: premailer-rails
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '3'
48
- - - "<"
51
+ - - "~>"
49
52
  - !ruby/object:Gem::Version
50
- version: '6'
53
+ version: '1.9'
51
54
  type: :runtime
52
55
  prerelease: false
53
56
  version_requirements: !ruby/object:Gem::Requirement
54
57
  requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- version: '3'
58
- - - "<"
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '6'
60
+ version: '1.9'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rails
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -85,6 +85,38 @@ extensions: []
85
85
  extra_rdoc_files: []
86
86
  files:
87
87
  - VERSION
88
+ - core/bootstrap-email.scss
89
+ - core/head.scss
90
+ - core/sass/_alert.scss
91
+ - core/sass/_badge.scss
92
+ - core/sass/_button.scss
93
+ - core/sass/_card.scss
94
+ - core/sass/_color.scss
95
+ - core/sass/_container.scss
96
+ - core/sass/_display.scss
97
+ - core/sass/_functions.scss
98
+ - core/sass/_grid.scss
99
+ - core/sass/_hr.scss
100
+ - core/sass/_image.scss
101
+ - core/sass/_preview.scss
102
+ - core/sass/_reboot_email.scss
103
+ - core/sass/_spacing.scss
104
+ - core/sass/_table.scss
105
+ - core/sass/_typography.scss
106
+ - core/sass/_variables.scss
107
+ - core/template.html.erb
108
+ - core/templates/align-center.html.erb
109
+ - core/templates/align-left.html.erb
110
+ - core/templates/align-right.html.erb
111
+ - core/templates/body.html.erb
112
+ - core/templates/col.html.erb
113
+ - core/templates/container.html.erb
114
+ - core/templates/div.html.erb
115
+ - core/templates/hr.html.erb
116
+ - core/templates/row.html.erb
117
+ - core/templates/table-left.html.erb
118
+ - core/templates/table.html.erb
119
+ - lib/assets/stylesheets/bootstrap-email.scss
88
120
  - lib/bootstrap-email.rb
89
121
  - lib/bootstrap-email/action_mailer.rb
90
122
  - lib/bootstrap-email/engine.rb