-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhandlebars.html
More file actions
41 lines (36 loc) · 900 Bytes
/
Copy pathhandlebars.html
File metadata and controls
41 lines (36 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html lang="en">
<head>
<title>your page title goes here</title>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.2/jquery.min.js"></script>
<script src="handlebars.js"></script>
<script id="posts" type="text/x-handlebars">
{{#each posts}}
<article>
<h1>{{title}}</h1>
<p><time>Posted on {{published}}</time></p>
{{{body}}}
<footer>
<p>
Tags:
{{#if tags}}
{{#each tags}}
{{>tag}}
{{/each}}
{{else}}
Not Tagged
{{/if}}
</p>
</footer>
</article>
{{/each}}
</script>
<script id="tag" type="text/x-handlebars">
<strong>{{this}}</strong>
</script>
</head>
<body>
</body>
</html>