The-Backbone-Store/thestore/index.html

76 lines
2.6 KiB
HTML
Raw Normal View History

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>
</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="#">&laquo; 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>
2016-04-05 20:52:44 +00:00
<script src="lib/jquery.js" type="text/javascript"></script>
2016-04-05 20:40:44 +00:00
<script src="lib/underscore.js" type="text/javascript"></script>
<script src="lib/backbone.js" type="text/javascript"></script>
2011-08-08 00:44:17 +00:00
<script src="store.js" type="text/javascript"></script>
</body>
2010-12-09 00:21:22 +00:00
</html>