Last active
April 4, 2022 22:54
-
-
Save steppat/8a7468e439dfa4500af90a613fa40f44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String divTemplate = | |
""" | |
<div class=\"card text-white bg-dark mb-3\" style=\"max-width: 18rem;\"> | |
<h4 class=\"card-header\">%s</h4> | |
<div class=\"card-body\"> | |
<img class=\"card-img\" src=\"%s\" alt=\"%s\"> | |
<p class=\"card-text mt-2\">Nota: %s - Ano: %s</p> | |
</div> | |
</div> | |
"""; | |
//usando o template com os dados do filme | |
writer.println(String.format(divTemplate, movie.title(), movie.urlImage(), movie.title(), movie.rating(), movie.year())); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment