2011-08-07 19:33:07 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
2011-08-08 00:44:17 +00:00
|
|
|
<head>
|
|
|
|
<title>
|
|
|
|
The Backbone Store
|
|
|
|
</title>
|
|
|
|
<link rel="stylesheet" href="jsonstore.css" type="text/css">
|
|
|
|
<script id="store_index_template" type="text/x-underscore-tmplate">
|
|
|
|
<h1>Product Catalog</h1>
|
|
|
|
<ul>
|
|
|
|
<% for(i=0,l=products.length;i<l;++i) { p = products[i]; %>
|
|
|
|
<li class="item">
|
|
|
|
<div class="item-image">
|
|
|
|
<a href="#item/<%= p.id %>">
|
|
|
|
<img alt="<%= p.title %>" src="<%= p.image %>" />
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="item-artist"><%= p.artist %></div>
|
|
|
|
<div class="item-title"><%= p.title %></div>
|
|
|
|
<div class="item-price">$<%= p.price %></div>
|
|
|
|
</li>
|
|
|
|
<% } %>
|
|
|
|
</ul>
|
|
|
|
</script>
|
|
|
|
<script id="store_item_template" type="text/x-underscore-template">
|
|
|
|
<div class="item-detail">
|
|
|
|
<div class="item-image">
|
|
|
|
<img alt="<%= title %>" src="<%= large_image %>" />
|
|
|
|
</div>
|
2011-02-04 03:15:16 +00:00
|
|
|
</div>
|
2011-08-08 00:44:17 +00:00
|
|
|
<div class="item-info">
|
|
|
|
<div class="item-artist"><%= artist %></div>
|
|
|
|
<div class="item-title"><%= title %></div>
|
|
|
|
<div class="item-price">$<%= price %></div>
|
|
|
|
<form action="#/cart" method="post">
|
|
|
|
<p>
|
|
|
|
<label>Quantity:</label>
|
|
|
|
<input class="uqf" name="quantity" size="2" type="text" value="1" />
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<input class="uq" type="submit" value="Add to Cart" />
|
|
|
|
</p>
|
|
|
|
</form>
|
|
|
|
<div class="item-link">
|
|
|
|
<a href="<%= url %>">Buy this item on Amazon</a>
|
|
|
|
</div>
|
|
|
|
<div class="back-link">
|
|
|
|
<a href="#">« Back to Items</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</script>
|
|
|
|
<script id="store_cart_template" type="text/x-underscore-template">
|
|
|
|
<p>Items: <%= count %> ($<%= cost %>)</p>
|
|
|
|
</script>
|
2011-08-08 00:08:39 +00:00
|
|
|
|
2011-08-08 00:44:17 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="container">
|
|
|
|
<div id="header">
|
|
|
|
<h1>
|
|
|
|
The Backbone Store
|
|
|
|
</h1>
|
2011-08-08 00:08:39 +00:00
|
|
|
|
2011-08-08 00:44:17 +00:00
|
|
|
<div class="cart-info">
|
|
|
|
</div>
|
|
|
|
</div>
|
2011-08-08 00:08:39 +00:00
|
|
|
|
2011-08-08 00:44:17 +00:00
|
|
|
<div id="main"> </div>
|
|
|
|
</div>
|
|
|
|
<script src="jquery-1.6.2.min.js" type="text/javascript"></script>
|
|
|
|
<script src="underscore.js" type="text/javascript"></script>
|
|
|
|
<script src="backbone.js" type="text/javascript"></script>
|
|
|
|
<script src="store.js" type="text/javascript"></script>
|
|
|
|
</body>
|
2010-12-09 00:21:22 +00:00
|
|
|
</html>
|