Last active
January 27, 2017 23:56
-
-
Save tiagolpadua/df22fdf114d7fcac6555efb1dd104b64 to your computer and use it in GitHub Desktop.
js-35-nodejs
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
CLEARDB_DATABASE_URL: mysql://bf9bbcabb0d149:ecdd51aa@us-cdbr-iron-east-04.cleardb.net/heroku_334ed86d480b2e2 | |
?reconnect=true |
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
<html> | |
<body> | |
<form action="/promocoes" method="post"> | |
<div> | |
<input type="text" name="mensagem"/> | |
</div> | |
<div> | |
<select name="livro[id]"> | |
<% for(var i=0; i<lista.length; i++) {%> | |
<option value="<%=lista[i].id%>"> | |
<%=lista[i].titulo%></option> | |
<% } %> | |
</select> | |
</div> | |
<input type="submit" value="Promoção relâmpago"/> | |
</form> | |
</body> | |
</html> |
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
<% include ../includes/header.ejs %> | |
<h1>Lançamentos</h1> | |
<%for(i=0; i<3; i++) {%> | |
<li class="col-left"> | |
<a href="linkDetalhe" class="block clearfix"> | |
<img width="170" height="240" src="http://smartmobilestudio.com/wp-content/uploads/2012/06/leather-book-preview.png" alt="<%=livros[i].titulo%>" title="<%=livros[i].titulo%>"> | |
<h2 class="product-title"><%=livros[i].titulo%></h2> | |
<small class="buy-button">Lançamento!</small> | |
</a> | |
</li> | |
<%}%> | |
<h1>Ofertas</h1> | |
<%for(i=0; i<livros.length; i++) {%> | |
<li> | |
<a href="linkDetalhe" class="block clearfix"> | |
<h2 class="product-title"> | |
<%=livros[i].titulo%> | |
</h2> | |
<img width="143" height="202" src="http://smartmobilestudio.com/wp-content/uploads/2012/06/leather-book-preview.png" alt="<%=livros[i].titulo%>" title="<%=livros[i].titulo%>" /> | |
<small class="buy-button">Compre</small> | |
</a> | |
</li> | |
<%}%> | |
<% include ../includes/footer.ejs %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment