diff --git a/enews/enews-java/html-generator/src/main/java/com/novoda/enews/HtmlGenerator.java b/enews/enews-java/html-generator/src/main/java/com/novoda/enews/HtmlGenerator.java index f4ceb67b7..30c008ee7 100644 --- a/enews/enews-java/html-generator/src/main/java/com/novoda/enews/HtmlGenerator.java +++ b/enews/enews-java/html-generator/src/main/java/com/novoda/enews/HtmlGenerator.java @@ -20,6 +20,7 @@ public String generate(Stream
articleStream) { shareBar.injectCssInto(this); style(); text("body {" + + " margin: 0 auto;" + " padding: 10px;" + "}" + "#header-image { " @@ -43,10 +44,14 @@ public String generate(Stream
articleStream) { + " text-decoration: none;" + " color: black;" + "}" + + "#content { " + + " margin: 0 auto;" + + " max-width: 360px;" + + "}" + "#article-image { " + " width: 150px; height: 84px;" + " object-fit: cover;" - + " border-radius: 6px; background-color: #fafafa; padding: 10px;" + + " background-color: #fafafa; padding: 10px;" + "}" + "#article-title {" + " font: bold 20px/1.5 Open Sans, Helvetica, Verdana, sans-serif;" @@ -62,6 +67,9 @@ public String generate(Stream
articleStream) { + "}" // Mobile Small + " @media only screen and (min-width: 320px) {" + + "body {" + + " max-width: 360px;" + + "}" + "#header-image { " + " background: url(https://s3-eu-west-1.amazonaws.com/novoda-public-image-bucket/Header_PhoneSmall.png);" + " width:360px; height:190px" @@ -69,6 +77,9 @@ public String generate(Stream
articleStream) { + "#intro {" + "max-width: 360px;" +"}" + + "#content {" + + "max-width: 360px;" + +"}" + "#article-image { " + " width: 360px; height: 202px;" + "}" @@ -87,6 +98,9 @@ public String generate(Stream
articleStream) { + "}" // Mobile Large + " @media only screen and (min-width: 425px) {" + + "body {" + + " max-width: 425px;" + + "}" + "#header-image { " + " background: url(https://s3-eu-west-1.amazonaws.com/novoda-public-image-bucket/Header_PhoneLarge.png);" + " width:425px; height:188px" @@ -94,6 +108,9 @@ public String generate(Stream
articleStream) { + "#intro {" + "max-width: 360px;" +"}" + + "#content {" + + "max-width: 360px;" + +"}" + "#article-image { " + " width: 360px; height: 202px;" + "}" @@ -112,6 +129,9 @@ public String generate(Stream
articleStream) { + "}" // Tablet + " @media only screen and (min-width: 768px) {" + + "body {" + + " max-width: 600px;" + + "}" + "#header-image { " + " background: url(https://s3-eu-west-1.amazonaws.com/novoda-public-image-bucket/Header_Tablet.png);" + " width:600px; height:180px" @@ -119,6 +139,9 @@ public String generate(Stream
articleStream) { + "#intro {" + "max-width: 600px;" +"}" + + "#content {" + + "max-width: 600px;" + +"}" + "#article-image { " + " width: 480px; height: 268px;" + "}" @@ -137,6 +160,9 @@ public String generate(Stream
articleStream) { + "}" // Laptop + " @media only screen and (min-width: 1024px) {" + + "body {" + + " max-width: 800px;" + + "}" + "#header-image { " + " background: url(https://s3-eu-west-1.amazonaws.com/novoda-public-image-bucket/Header_desktop.png);" + " width:800px; height:253px" @@ -144,6 +170,9 @@ public String generate(Stream
articleStream) { + "#intro {" + "max-width: 800px;" +"}" + + "#content {" + + "max-width: 800px;" + +"}" + "#article-image { " + " width: 480px; height: 268px;" + "}" @@ -170,6 +199,7 @@ public String generate(Stream
articleStream) { .a().href("https://twitter.com/novoda").target("_blank") .img() .id("header-image") + .src("https://s3-eu-west-1.amazonaws.com/novoda-public-image-bucket/blank.gif") .end() .end() .p() @@ -187,7 +217,8 @@ public String generate(Stream
articleStream) { + " :-)") .end() .end() - .div(); + .div() + .id("content"); makeList(); end(); div();