Skip to content

Commit

Permalink
scale image on display size
Browse files Browse the repository at this point in the history
  • Loading branch information
Blundell committed Sep 4, 2017
1 parent e26b294 commit fae7b8c
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@ void makeList() {
li().style("list-style-type: none; margin: 0; padding: 10px; overflow: auto;")
.a().style("text-decoration: none; color: black;").href(article.getPageLink())
.div()
.img()
.style("float: left; margin: 0 15px 0 0; width: 100px; height: 100px;" +
" object-fit: cover;" +
" border-radius: 6px; background-color: #fafafa; padding: 10px;")
.src(article.getImage())
.div()
.style("max-width: 100px")
.img()
.style("float: left; margin: 0 15px 0 0; max-width: 100%; width: auto; height: auto;" +
" object-fit: cover;" +
" border-radius: 6px; background-color: #fafafa; padding: 10px;")
.src(article.getImage())
.end()
.end()
.p()
.style("font: bold 20px/1.5 Helvetica, Verdana, sans-serif; color: #2d2d2d;")
Expand Down

0 comments on commit fae7b8c

Please sign in to comment.