35 lines
512 B
Handlebars
35 lines
512 B
Handlebars
{{#contentFor 'pageStyles'}}
|
|
<style>
|
|
.clicker {
|
|
color: blue;
|
|
};
|
|
</style>
|
|
{{/contentFor}}
|
|
|
|
|
|
{{#contentFor 'pageScripts'}}
|
|
<script>
|
|
$(function() {
|
|
$('.clicker').click(function() {
|
|
$(this).text('Hello express-hbs!');
|
|
});
|
|
});
|
|
</script>
|
|
{{/contentFor}}
|
|
|
|
|
|
<h1>{{title}}</h1>
|
|
<p class='clicker'>Click me!</p>
|
|
<p>
|
|
<a href='/fruits'>Favorite fruits</a>
|
|
</p>
|
|
<p>
|
|
<!-- sync helper -->
|
|
{{{link 'Vegetables' href='/veggies'}}}
|
|
</p>
|
|
|
|
<!-- async helper -->
|
|
<div>
|
|
{{{readFile 'tos.txt'}}}
|
|
</div>
|