/
inline_script.handlebars.html
131 lines (112 loc) · 2.93 KB
/
inline_script.handlebars.html
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
---
published: false
layout: post
title: "Test"
date: 2013-02-13 15:36
comments: true
external-url:
categories:
---
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test</title>
</head>
<body>
<div id="test">
<h1>Test</h1>
<p>Test</p>
</div>
<script type="text/javascript">
// Do stuff
console.log('Bi-winning');
</script>
<div data-container="draggable"></div>
<div data-attribute_weird="yes"></div>
<script data-partial="nav" type="text/x-handlebars-template">
<ul>
{{#each route}}
<li><button data-app-route="{{ path }}">{{{ name }}}</button></li>
{{/each}}
</ul>
</script>
<script type="text/x-handlebars-template" id="template-gallery">
<div class="{{class}}" id="{{myId}}">
<div class="content_container">
{{{content}}}
</div>
<div id="gallery">
{{#each content.galleryImages}}
<a href="{{../content.fullBaseUrl}}{{imageUrl}}">
<img src="{{../content.thumbBaseUrl}}{{imageUrl}}" />
</a>
{{/each}}
{{#each array}}
{{@index}}: {{this}}
{{/each}}
{{#each object}}
{{@key}}: {{this}}
{{/each}}
</div>
{{#if date}}
<h3 class="date">{{date}}</h3>
{{else}}
<h3 class="no_date">No date available.</h3>
{{/if}}
{{! <p>Not that interesting.}} <p>No comment.</p>
{{!-- <p>Even less interesting. {{#if otherCondition}}<strong>"{{otherTestToken}}"</strong> {{/if}}</p> --}} <p>Nothing to see here.</p>
{{!-- <p>Marginally less interesting. {{{testToken}}}</p> --}} <p>Move along.</p>
</div>
</script>
<script type="text/x-handlebars" id="template-small-second">
<div class="{{class}}" id="{{myId}}">
<div class="content_container">
{{{content}}}
</div>
{{#list nav id="nav-bar" class="top" bubbles=false}}
<a href="{{url}}">{{title}}</a>
{{/list}}
<button class="tiny button" {{action addToCampaign id="add-campaign" bubbles=false}}>Choose</button>
<p class="{{class}}">Filler</p>
<a class="pull-left" {{bind-attr href=link}}>
<img {{bind-attr src=this.thumbLink alt=this.name}} class="media-object">
</a>
</script>
<script type="text/javascript">
// Do stuff
console.log('Tri-winning');
$('#jquery').remove();
if('great') {
console.log('yes');
} else {
console.log('no');
}
</script>
<script type="text/template" id="template-small-third">
<div class="{{class}}" id="{{myId}}">
<div class="content_container">
{{!~whitespace control~}}
{{~foo~}}{{~foo}}{{foo~}}
{{~&foo~}}{{~{foo}~}}
{{~#if foo~}} bar {{~/if~}}
{{~^if foo~}} bar {{~/if~}}
{{#if foo~}} bar {{~^~}} baz {{~/if}}
{{#if foo~}} bar {{~else~}} baz {{~/if}}
foo {{~> dude~}} {{> dude~}}
</div>
</script>
<!-- escaped mustaches -->
<script id="template" type="text/x-handlebars">
\{{#with foo}}
\{{bar}}
{{baz}}
\{{/with}}
\{{escaped}}
{{{{raw}}}
{{escaped}}
{{{{/raw}}}}
</script>
</body>
</html>