-
Notifications
You must be signed in to change notification settings - Fork 8
/
index.html
99 lines (88 loc) · 4.1 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
<!doctype html>
<html lang="en" ng-app="amazonApp">
<head>
<meta charset="utf-8">
<title>Amazon Search</title>
<link rel="stylesheet" href="includes/bootstrap/css/bootstrap.min.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="includes/angular/angular.js"></script>
<script src="js/amazonApp.js"></script>
</head>
<body ng-controller="amazonCtrl">
<!--
to add?: https://github.com/silviomoreto/bootstrap-select
http://silviomoreto.github.io/bootstrap-select/
-->
<center>
<form ng-submit="processForm()" class="form-inline">
<div class="form-group" width="100%">
<label>Category</label>
<select ng-model="selectedCategory" ng-options="category.value as category.name for category in categories" ></select>
</div>
<div class="form-group" ng-class="{ 'has-error' : errorKeyword }" width="100%">
<label>Keyword</label>
<INPUT TYPE="text" SIZE="15" ng-model="keyword">
<!-- <span class="help-block" ng-show="errorKeyword">{{ errorKeyword }}</span> -->
</div>
<div class="form-group" width="100%">
<label>Location</label>
<select ng-model="selectedLocation" ng-options="local.value as local.name for local in locations" ></select>
</div>
<button type="submit" class="btn btn-success btn-lg btn-block">
<span class="glyphicon glyphicon-flash"></span> Search
</button>
</form>
<pre ng-show="keyword">
Searching {{ keyword }} .....
</pre>
<span class="help-block" ng-show="errorKeyword">{{ errorKeyword }}</span>
<span class="help-block" ng-show="errorMsg">{{ errorMsg }}</span>
<br>
<div class="alignleft">
<script type='text/javascript'>
amzn_assoc_ad_type = 'banner';
amzn_assoc_tracking_id = 'tecblo035-20';
amzn_assoc_marketplace = 'amazon';
amzn_assoc_region = 'US';
amzn_assoc_placement = 'assoc_banner_placement_default';
amzn_assoc_linkid = '557YVB4OVMMBV3WN';
amzn_assoc_campaigns = 'hotnewreleases';
amzn_assoc_banner_type = 'category';
amzn_assoc_isresponsive = 'true';
</script>
<script src='//z-na.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&Operation=GetScript&ID=OneJS&WS=1'></script>
</div>
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
<th>4</th>
<th>5</th>
</tr>
</thead>
<tbody>
<tr data-ng-class="info">
<td ng-repeat="product in products.slice(0, 5)" style="text-align: center;" onMouseOver="this.style.backgroundColor='#DDDDDD';" onMouseOut="this.style.backgroundColor='';">
<a href="{{product.url}}" target='_blank'><img border='0' style="width:180px; height:240px" ng-src="{{product.imageUrl}}"></a>
<br>Cateogry: {{product.group}} <br> {{product.currency}} {{product.price}} <br> <b><a href="{{product.url}}" target='_blank'> {{product.title}} </a></b>
<br><span ng-show="product.author"> by {{ product.author }} </span>
</td>
</tr>
<tr data-ng-class="info">
<td ng-repeat="product in products.slice(5, 10)" style="text-align: center;" onMouseOver="this.style.backgroundColor='#DDDDDD';" onMouseOut="this.style.backgroundColor='';" >
<a href="{{product.url}}" target='_blank'><img border='0' style="width:180px; height:240px" ng-src="{{product.imageUrl}}"></a>
<br>Cateogry: {{product.group}} <br> {{product.currency}} {{product.price}} <br> <b><a href="{{product.url}}" target='_blank'> {{product.title}} </a></b>
<br><span ng-show="product.author"> (by {{ product.author }}) </span>
</td>
</tr>
</tbody>
</table>
<br>
<iframe src="http://rcm-na.amazon-adsystem.com/e/cm?t=techblog0d3-20&o=1&p=48&l=ur1&category=toys_games_best_of_april&banner=0QF44QE8QGAK4Q3D1WR2&f=ifr&linkID=JF6FJGSCA35RH7WJ" width="728" height="90" scrolling="no" border="0" marginwidth="0" style="border:none;max-width:900px;max-height:600px;" frameborder="0"></iframe>
<br><a href='http://github.com/paullo0106/amazonsearch' target='_blank'>Source code</a>
<br>Supported by <a href='http://aws.amazon.com/code/Product-Advertising-API/4373' target='_blank'>Amazon Search API</a>
</center>
</body>
</html>