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
|
removeEmptyAttributes: true
|
||||||
},
|
},
|
||||||
partials: {
|
partials: {
|
||||||
head: 'partials/head.hbs',
|
layout: 'layout.hbs',
|
||||||
header: 'partials/header.hbs',
|
header: 'partials/header.hbs',
|
||||||
foot: 'partials/foot.hbs',
|
|
||||||
footer: 'partials/footer.hbs',
|
footer: 'partials/footer.hbs',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{{> header }}
|
{{#> layout }}
|
||||||
|
|
||||||
|
{{#*inline "page-content-block" }}
|
||||||
<section>
|
<section>
|
||||||
<h2 class="subtitle">An attempt at a viable alternative to Goodreads</h2>
|
<h2 class="subtitle">An attempt at a viable alternative to Goodreads</h2>
|
||||||
|
|
||||||
|
@ -24,5 +25,6 @@
|
||||||
{{ text }}
|
{{ text }}
|
||||||
</article>
|
</article>
|
||||||
</section>
|
</section>
|
||||||
|
{{/inline}}
|
||||||
|
|
||||||
{{> footer }}
|
{{/layout}}
|
|
@ -12,4 +12,29 @@
|
||||||
<link rel="stylesheet" href="/styles/index.css">{{!-- This is controlled by the resources router. --}}
|
<link rel="stylesheet" href="/styles/index.css">{{!-- This is controlled by the resources router. --}}
|
||||||
<script src="index.js"></script>
|
<script src="index.js"></script>
|
||||||
</head>
|
</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>
|
<footer>
|
||||||
<p>test footer</p>
|
<p>test footer</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
{{> foot }}
|
|
|
@ -1,5 +1,3 @@
|
||||||
{{> head }}
|
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<nav>
|
<nav>
|
||||||
<div class="brand">
|
<div class="brand">
|
||||||
|
@ -21,5 +19,3 @@
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main class="container">
|
|
Loading…
Reference in New Issue