Skip to content

Commit

Permalink
centre all the content
Browse files Browse the repository at this point in the history
  • Loading branch information
Blundell committed Sep 21, 2017
1 parent 727e04b commit c7af7fe
Showing 1 changed file with 33 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public String generate(Stream<Article> articleStream) {
shareBar.injectCssInto(this);
style();
text("body {"
+ " margin: 0 auto;"
+ " padding: 10px;"
+ "}"
+ "#header-image { "
Expand All @@ -43,10 +44,14 @@ public String generate(Stream<Article> 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;"
Expand All @@ -62,13 +67,19 @@ public String generate(Stream<Article> 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"
+ "}"
+ "#intro {"
+ "max-width: 360px;"
+"}"
+ "#content {"
+ "max-width: 360px;"
+"}"
+ "#article-image { "
+ " width: 360px; height: 202px;"
+ "}"
Expand All @@ -87,13 +98,19 @@ public String generate(Stream<Article> 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"
+ "}"
+ "#intro {"
+ "max-width: 360px;"
+"}"
+ "#content {"
+ "max-width: 360px;"
+"}"
+ "#article-image { "
+ " width: 360px; height: 202px;"
+ "}"
Expand All @@ -112,13 +129,19 @@ public String generate(Stream<Article> 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"
+ "}"
+ "#intro {"
+ "max-width: 600px;"
+"}"
+ "#content {"
+ "max-width: 600px;"
+"}"
+ "#article-image { "
+ " width: 480px; height: 268px;"
+ "}"
Expand All @@ -137,13 +160,19 @@ public String generate(Stream<Article> 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"
+ "}"
+ "#intro {"
+ "max-width: 800px;"
+"}"
+ "#content {"
+ "max-width: 800px;"
+"}"
+ "#article-image { "
+ " width: 480px; height: 268px;"
+ "}"
Expand All @@ -170,6 +199,7 @@ public String generate(Stream<Article> 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()
Expand All @@ -187,7 +217,8 @@ public String generate(Stream<Article> articleStream) {
+ " :-)")
.end()
.end()
.div();
.div()
.id("content");
makeList();
end();
div();
Expand Down

0 comments on commit c7af7fe

Please sign in to comment.