-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
207 lines (204 loc) · 6.75 KB
/
index.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<!DOCTYPE html>
<html>
<head>
<link href='css/bootstrap.min.css' rel='stylesheet' />
<link href='css/application.css' rel='stylesheet' />
<script src='js/libs/jquery-1.10.2.min.js'></script>
<script src='js/libs/handlebars-1.0.0.js'></script>
<script src='js/libs/ember.js'></script>
<script src='js/libs/ember-data.js'></script>
<script src='js/app.js'></script>
</head>
<body>
<script type='text/x-handlebars' data-template-name='application'>
<div class='navbar navbar-default'>
<div class='container'>
{{#link-to 'index' class='navbar-brand'}}
<img src='images/logo.png' alt='logo' height='34' width='224' />
{{/link-to}}
<ul class='nav navbar-nav navbar-right'>
{{#link-to 'index' tagName='li'}}Home{{/link-to}}
{{#link-to 'products' tagName='li'}}Products{{/link-to}}
{{#link-to 'contacts' tagName='li'}}Contacts{{/link-to}}
</ul>
</div>
</div>
<div class='container'>
{{outlet}}
</div>
<footer class='container'>
<hr />
<p class='pull-left'>© 2013 The Flint & Flame</p>
<p class='pull-right'>{{#link-to 'credits'}}Credits{{/link-to}}</p>
</footer>
</script>
<script type='text/x-handlebars' data-template-name='index'>
<div class='jumbotron'>
<h1>Welcome to The Flint & Flame!</h1>
<p class='tagline'>
<img {{bind-attr src='logo'}} alt='Logo' />
Everything you need to make it through the winter.
</p>
<p>
{{#link-to 'products' class='btn btn-primary btn-lg'}}
Browse All {{productsCount}} Items »
{{/link-to}}
</p>
</div>
<div class='row'>
{{#each onSale}}
{{product-details product=this classNames='col-sm-4'}}
{{/each}}
</div>
<p class='pull-right text-muted'>Rendered on {{time}}</p>
</script>
<script type='text/x-handlebars' data-template-name='contacts/index'>
<div class='row'>
<img {{bind-attr src='avatar'}} alt='Avatar' class='img-thumbnail col-sm-4'/>
<div class='col-sm-8'>
<h1>About The Fire Sprites</h1>
<p>Contact {{contactName}} for more info!</p>
<p>Current Status: {{open}}.</p>
</div>
</div>
</script>
<script type='text/x-handlebars' data-template-name='credits'>
<h1>Thanks for the Help!</h1>
<p>This site would not be possible without the hardworking Ember Core Team!</p>
</script>
<script type='text/x-handlebars' data-template-name='products'>
<div class='row'>
<div class='col-sm-3'>
<div class='list-group'>
{{#link-to 'products.deals' classNames='list-group-item'}}Deals{{/link-to}}
{{#link-to 'products.onsale' classNames='list-group-item'}}On Sale{{/link-to}}
</div>
<div class='list-group'>
{{#each}}
{{#link-to 'product' this classNames='list-group-item'}}
{{title}}
{{/link-to}}
{{/each}}
</div>
</div>
<div class='col-sm-9'>
{{outlet}}
</div>
</div>
</script>
<script type='text/x-handlebars' data-template-name='product'>
<div class='row'>
<div class='col-sm-7'>
<h2>{{title}}</h2>
<h3 class='text-success'>${{price}}</h3>
<p class='text-muted'>{{description}}</p>
<p>Finely crafted by {{#link-to 'contact' crafter}}{{crafter.name}}{{/link-to}}.</p>
{{render 'reviews' reviews}}
{{#if text}}
{{text}}
{{/if}}
{{textarea valueBinding='text'}}
</div>
<div class='col-sm-5'>
<img {{bind-attr src='image'}} class='img-thumbnail img-rounded'/>
</div>
</div>
{{contact-details contact=crafter className='row'}}
</script>
<script type='text/x-handlebars' data-template-name='products/index'>
<h1>Products!</h1>
<ul class='list-unstyled'>
{{#each}}
{{product-details product=this classNames='row' tagName='li'}}
{{/each}}
</ul>
</script>
<script type='text/x-handlebars' data-template-name='contacts'>
<div class='row'>
<div class='col-sm-9'>
{{outlet}}
</div>
<div class='col-sm-3'>
<div class='list-group'>
{{#each}}
{{#link-to 'contact' this classNames='list-group-item'}}
{{name}}
{{/link-to}}
{{/each}}
</div>
</div>
</div>
</script>
<script type='text/x-handlebars' data-template-name='contact'>
<div class='row'>
<div class='col-sm-5'>
<img {{bind-attr src='avatar' alt='name'}} class='img-thumbnail img-rounded'/>
</div>
<div class='col-sm-7'>
<h2>{{name}}</h2>
<p>{{about}}</p>
{{render 'contact/products' products}}
</div>
</div>
</script>
<script type='text/x-handlebars' data-template-name='contact/products'>
<h3>Products here3</h3>
<ul>
{{#each}}
<li>{{#link-to 'product' this}}{{title}}{{/link-to}}</li>
{{/each}}
</ul>
</script>
<script type='text/x-handlebars' data-template-name='products/onsale'>
<h1>Products On Sale</h1>
<ul class='list-unstyled'>
{{#each}}
{{product-details product=this classNames='row' tagName='li'}}
{{/each}}
</ul>
</script>
<script type='text/x-handlebars' data-template-name='products/deals'>
<h1>Todays Product Deals!</h1>
<ul class='list-unstyled'>
{{#each}}
{{product-details product=this classNames='row' tagName='li'}}
{{/each}}
</ul>
</script>
<script type='text/x-handlebars' data-template-name='components/product-details'>
<img {{bind-attr src='product.image'}} class='img-thumbnail col-sm-5' />
<div class='col-sm-7'>
<h2>{{product.title}}</h2>
<p class='product-description'>{{product.description}}</p>
<p>{{#link-to 'product' product class='btn btn-success'}}
Buy for ${{product.price}}{{/link-to}}
</p>
{{#if hasReviews}}
<p class='text-muted'>Read all reviews ({{reviewsCount}}).</p>
{{/if}}
</div>
</script>
<script type='text/x-handlebars' data-template-name='components/contact-details'>
<div class='col-sm-9'>
<h2>About {{contact.name}}</h2>
<p>{{contact.about}}</p>
{{#if isProductive}}
<p class='text-muted'>Responsible for {{productsCount}} amazing products!</p>
{{/if}}
</div>
<div class='col-sm-3'>
<img {{bind-attr src='contact.avatar' alt='contact.name'}} class='img-thumbnail img-rounded'/>
</div>
</script>
<script type='text/x-handlebars' data-template-name='reviews'>
<h3>Reviews</h3>
<ul>
{{#each}}
<li><p>{{text}}</p></li>
{{else}}
<li><p class='text-muted'><em>No reviews yet. Be the first to write one!</em></p></li>
{{/each}}
</ul>
</script>
</body>
</html>