@@ -19,123 +19,125 @@ public String generate(Stream<Article> articleStream) {
19
19
head ();
20
20
shareBar .injectCssInto (this );
21
21
style ();
22
- text ("#newsletter-body {"
23
- // + " display: flex; "
24
- // + " flex-direction: column;" Not supported in email clients
25
- // + " align-items: center ;"
22
+ text ("" +
23
+ "* { "
24
+ + " margin: 0;"
25
+ + " padding: 0 ;"
26
26
+ "}"
27
+ + "#newsletter-body {"
28
+ + " padding: 5px;"
29
+ + "}"
27
30
+ "#title a {"
28
31
+ " text-decoration: none;"
29
32
+ " color: #26A3DB;"
30
33
+ "}"
31
- + "#title p {"
32
- + " font: 300 1.2em/1.8 Open Sans, regular;"
34
+ + "#intro {"
35
+ + " font: 300 1.2em/1.8 Open Sans, Helvetica, Verdana, sans-serif, regular;"
33
36
+ " color: #6d6d6d;"
34
37
+ " text-align: justify;"
35
38
+ "}"
36
- + "ul {"
37
- + " -webkit-padding-start: 0px;"
38
- + "}"
39
39
+ "li {"
40
40
+ " list-style-type: none;"
41
+ + " padding-top: 20px;"
42
+ + " padding-bottom: 20px;"
41
43
+ "}"
42
44
+ "li a {"
43
45
+ " text-decoration: none;"
44
46
+ " color: black;"
45
47
+ "}"
46
- + "#content { "
48
+ + "#article {"
49
+ + "width: 70%;"
50
+ + "margin: 0 auto;"
47
51
+ "}"
48
52
+ "#article-image { "
49
53
+ " object-fit: cover;"
50
54
+ "}"
51
55
+ "#article-title {"
52
56
+ " color: #000000;"
57
+ + " font-weight: bold;"
58
+ + " font-family: Open Sans, Helvetica, Verdana, sans-serif;"
59
+ + " line-height: 1.5;"
53
60
+ "}"
54
61
+ "#article-text {"
55
62
+ " color: #000000;"
63
+ + " font-weight: regular;"
64
+ + " font-family: Open Sans, Helvetica, Verdana, sans-serif;"
65
+ + " line-height: 1.5;"
56
66
+ "}"
57
67
// Mobile Small
58
68
+ " @media only screen and (min-width: 320px) {"
69
+ + "#newsletter-body {"
70
+ + "width:360px;"
71
+ + "}"
59
72
+ "#header-image { "
60
- + " background: url(https://s3-eu-west-1.amazonaws.com/novoda-public-image-bucket/Header_PhoneSmall.png);"
61
- + " width:360px; height:190px"
73
+ + " background-image : url(https://s3-eu-west-1.amazonaws.com/novoda-public-image-bucket/Header_PhoneSmall.png);"
74
+ + " width: 360px; height: 190px; "
62
75
+ "}"
63
- + "#intro {"
64
- + "max-width: 360px;"
65
- +"}"
66
76
+ "#article-image { "
67
77
+ " width: 360px; height: 202px;"
68
78
+ "}"
69
79
+ "#article-title {"
70
- + " font: bold 18px/1.5 Open Sans, Helvetica, Verdana, sans-serif;"
71
- + " max-width: 360px;"
80
+ + " font-size: 18px;"
72
81
+ "}"
73
82
+ "#article-text {"
74
- + " font: 200 14px/1.5 Open Sans, regular;"
75
- + " max-width: 360px;"
83
+ + " font-size: 14px;"
76
84
+ "}"
77
85
+ "}"
78
86
// Mobile Large
79
87
+ " @media only screen and (min-width: 425px) {"
88
+ + "#newsletter-body {"
89
+ + "width:425px;"
90
+ + "}"
80
91
+ "#header-image { "
81
- + " background: url(https://s3-eu-west-1.amazonaws.com/novoda-public-image-bucket/Header_PhoneLarge.png);"
82
- + " width:425px ; height:188px "
92
+ + " background-image : url(https://s3-eu-west-1.amazonaws.com/novoda-public-image-bucket/Header_PhoneLarge.png);"
93
+ + " width: 360px ; height: 190px; "
83
94
+ "}"
84
- + "#intro {"
85
- + "max-width: 360px;"
86
- +"}"
87
95
+ "#article-image { "
88
96
+ " width: 360px; height: 202px;"
89
97
+ "}"
90
98
+ "#article-title {"
91
- + " font: bold 18px/1.5 Open Sans, Helvetica, Verdana, sans-serif;"
92
- + " max-width: 360px;"
99
+ + " font-size: 18px;"
93
100
+ "}"
94
101
+ "#article-text {"
95
- + " font: 200 14px/1.5 Open Sans, regular;"
96
- + " max-width: 360px;"
102
+ + " font-size: 14px;"
97
103
+ "}"
98
104
+ "}"
99
105
// Tablet
100
106
+ " @media only screen and (min-width: 768px) {"
107
+ + "#newsletter-body {"
108
+ + "width:600px;"
109
+ + "}"
101
110
+ "#header-image { "
102
- + " background: url(https://s3-eu-west-1.amazonaws.com/novoda-public-image-bucket/Header_Tablet.png);"
103
- + " width:600px; height:180px"
111
+ + " background-image : url(https://s3-eu-west-1.amazonaws.com/novoda-public-image-bucket/Header_Tablet.png);"
112
+ + " width: 600px; height: 180px; "
104
113
+ "}"
105
- + "#intro {"
106
- + "max-width: 600px;"
107
- +"}"
108
114
+ "#article-image { "
109
115
+ " width: 480px; height: 268px;"
110
116
+ "}"
111
117
+ "#article-title {"
112
- + " font: bold 20px/1.5 Open Sans, Helvetica, Verdana, sans-serif;"
113
- + " max-width: 480px;"
118
+ + " font-size: 20px;"
114
119
+ "}"
115
120
+ "#article-text {"
116
- + " font: 200 16px/1.5 Open Sans, regular;"
117
- + " max-width: 480px;"
121
+ + " font-size: 16px;"
118
122
+ "}"
119
123
+ "}"
120
124
// Laptop
121
125
+ " @media only screen and (min-width: 1024px) {"
126
+ + "#newsletter-body {"
127
+ + "width:800px;"
128
+ + "}"
122
129
+ "#header-image { "
123
- + " background: url(https://s3-eu-west-1.amazonaws.com/novoda-public-image-bucket/Header_desktop.png);"
124
- + " width:800px; height:253px"
130
+ + " background-image : url(https://s3-eu-west-1.amazonaws.com/novoda-public-image-bucket/Header_desktop.png);"
131
+ + " width: 800px; height: 253px; "
125
132
+ "}"
126
- + "#intro {"
127
- + "max-width: 800px;"
128
- +"}"
129
133
+ "#article-image { "
130
134
+ " width: 480px; height: 268px;"
131
135
+ "}"
132
136
+ "#article-title {"
133
- + " font: bold 20px/1.5 Open Sans, Helvetica, Verdana, sans-serif;"
134
- + " max-width: 480px;"
137
+ + " font-size: 20px;"
135
138
+ "}"
136
139
+ "#article-text {"
137
- + " font: 200 16px/1.5 Open Sans, regular;"
138
- + " max-width: 480px;"
140
+ + " font-size: 16px;"
139
141
+ "}"
140
142
+ "}"
141
143
+ ""
@@ -148,9 +150,8 @@ public String generate(Stream<Article> articleStream) {
148
150
.div ()
149
151
.id ("title" )
150
152
.a ().href ("https://twitter.com/novoda" ).target ("_blank" )
151
- .img ()
153
+ .div ()
152
154
.id ("header-image" )
153
- .src ("https://s3-eu-west-1.amazonaws.com/novoda-public-image-bucket/blank.gif" )
154
155
.end ()
155
156
.end ()
156
157
.p ()
@@ -187,6 +188,7 @@ void makeList() {
187
188
li ()
188
189
.a ().href (article .getPageLink ())
189
190
.div ()
191
+ .id ("article" )
190
192
.img ()
191
193
.id ("article-image" )
192
194
.src (article .getImage ())
0 commit comments