/
recipeList.html
60 lines (60 loc) · 2.08 KB
/
recipeList.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
<div class="container" ng-controller="ketoHubCtrl" ng-cloak>
<div class="container">
<div class="btn-group-lg text-center"
role="group" aria-label="Recipe categories">
<button type="button"
ng-repeat="item in categories"
ng-click="selectCategory(item)"
class="btn btn-secondary recipe-categories"
ng-class="getCategoryClass(item)">
{{ item | capitalize }}s
</button>
</div>
</div>
<div class="form-group">
<label for="keywords">Search:</label>
<input type="text" class="form-control" ng-model="keywords">
</div>
<div class=container" ng-show="keywords">
<p>Found {{ (recipes | filter:categoryFilterFn | search:keywords).length }} matching recipes</p>
</div>
<pagination
ng-model="currentPage"
total-items="(recipes | filter:categoryFilterFn | search:keywords).length"
class="pagination-sm"
items-per-page="pageSize"
max-size="maxPageButtons"
boundary-links="true">
</pagination>
<div class="container recipes">
<div
class="well"
ng-repeat="recipe in recipes | filter:categoryFilterFn | orderBy:'-publishedTime' | search:keywords | range:currentPage:pageSize">
<div class="row">
<div class="col-xs-6 col-md-4">
<a ng-href="{{ recipe.url }}" target="_blank" rel="noopener">
<img ng-src="{{ recipe.thumbnailUrl }}" alt="{{ recipe.title }}" src="#" class="img-responsive">
</a>
</div>
<div class="col-xs-6 col-md-8">
<h2>
<a ng-href="{{ recipe.url }}" target="_blank" rel="noopener">
{{ recipe.title }}
</a>
</h2>
<a ng-href="{{ recipe.url }}" target="_blank" rel="noopener">
<p>{{ recipe.url | rootDomain }}</p>
</a>
</div>
</div>
</div>
</div>
<pagination
ng-model="currentPage"
total-items="(recipes | filter:categoryFilterFn | search:keywords).length"
class="pagination-sm"
items-per-page="pageSize"
max-size="maxPageButtons"
boundary-links="true">
</pagination>
</div>