refactored index.html
This commit is contained in:
parent
eb7ad3687c
commit
d3d46bbfd2
@ -10,15 +10,6 @@
|
|||||||
width: 30em;
|
width: 30em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.book {
|
|
||||||
padding: 10px;
|
|
||||||
border-bottom: 1px solid red;
|
|
||||||
}
|
|
||||||
|
|
||||||
#books {
|
|
||||||
width: 30em;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<!-- SCRIPTS -->
|
<!-- SCRIPTS -->
|
||||||
<!-- import handlebars -->
|
<!-- import handlebars -->
|
||||||
@ -36,7 +27,7 @@
|
|||||||
<input id="nbr_books" type="number" value="2" min="1" max="5">
|
<input id="nbr_books" type="number" value="2" min="1" max="5">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!--
|
||||||
<div id="books">
|
<div id="books">
|
||||||
<script id="books-template" type="text/x-handlebars-template">
|
<script id="books-template" type="text/x-handlebars-template">
|
||||||
{{#each this}}
|
{{#each this}}
|
||||||
@ -49,6 +40,7 @@
|
|||||||
{{/each}}
|
{{/each}}
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -70,17 +62,11 @@
|
|||||||
|
|
||||||
console.log('all the books: ' + JSON.stringify(msg));
|
console.log('all the books: ' + JSON.stringify(msg));
|
||||||
|
|
||||||
compile_results_and_display(msg);
|
//compile_results_and_display(msg);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function get_books() {
|
/*
|
||||||
|
|
||||||
socket.emit('give some books', "nothing");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function compile_results_and_display(results) {
|
function compile_results_and_display(results) {
|
||||||
|
|
||||||
var template_script = $("#books-template").html();
|
var template_script = $("#books-template").html();
|
||||||
@ -92,6 +78,7 @@
|
|||||||
$('#books').append(template(results));
|
$('#books').append(template(results));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user