Set up handlebars layout correctly
This commit is contained in:
parent
e4eb9a846c
commit
c986cdb4fd
|
@ -28,9 +28,8 @@ fastify.register(require('point-of-view'), {
|
|||
removeEmptyAttributes: true
|
||||
},
|
||||
partials: {
|
||||
head: 'partials/head.hbs',
|
||||
layout: 'layout.hbs',
|
||||
header: 'partials/header.hbs',
|
||||
foot: 'partials/foot.hbs',
|
||||
footer: 'partials/footer.hbs',
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{{> header }}
|
||||
{{#> layout }}
|
||||
|
||||
{{#*inline "page-content-block" }}
|
||||
<section>
|
||||
<h2 class="subtitle">An attempt at a viable alternative to Goodreads</h2>
|
||||
|
||||
|
@ -24,5 +25,6 @@
|
|||
{{ text }}
|
||||
</article>
|
||||
</section>
|
||||
{{/inline}}
|
||||
|
||||
{{> footer }}
|
||||
{{/layout}}
|
|
@ -12,4 +12,29 @@
|
|||
<link rel="stylesheet" href="/styles/index.css">{{!-- This is controlled by the resources router. --}}
|
||||
<script src="index.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<body>
|
||||
{{#> header-block }}
|
||||
{{> header }}
|
||||
{{/header-block}}
|
||||
|
||||
<main class="container">
|
||||
{{#> page-content-block }}
|
||||
{{!-- Wrap the actual page content in {{#*inline "page-content-block"}} to insert it here --}}
|
||||
{{/page-content-block}}
|
||||
</main>
|
||||
|
||||
{{#> footer-block }}
|
||||
{{> footer }}
|
||||
{{/footer-block}}
|
||||
|
||||
{{#> scripts-block }}
|
||||
<script>
|
||||
(function () {
|
||||
alert('test');
|
||||
})();
|
||||
</script>
|
||||
{{/scripts-block}}
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,7 +0,0 @@
|
|||
<script>
|
||||
(function() {
|
||||
alert('test');
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,7 +1,3 @@
|
|||
</main>
|
||||
|
||||
<footer>
|
||||
<p>test footer</p>
|
||||
</footer>
|
||||
|
||||
{{> foot }}
|
|
@ -1,5 +1,3 @@
|
|||
{{> head }}
|
||||
|
||||
<header>
|
||||
<nav>
|
||||
<div class="brand">
|
||||
|
@ -21,5 +19,3 @@
|
|||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main class="container">
|
Loading…
Reference in New Issue