-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
75 lines (63 loc) · 3.69 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
<!DOCTYPE html>
<!--[if lt IE 7]> <html lang="en" ng-app="myApp" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html lang="en" ng-app="myApp" class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html lang="en" ng-app="myApp" class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html lang="en" ng-app="flickr-search"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Flickr Search</title>
<meta name="description" content="Picture search that uses Flickr API">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"/>
</head>
<body ng-controller="SearchController as search">
<div class="container">
<search-bar></search-bar>
<alert-message></alert-message>
<search-results-grid></search-results-grid>
<pagination ng-show="showNav" boundary-links="true" total-items="totalResults" ng-model="currentPage" max-size="maxNavLength" items-per-page="resultsPerPage"
previous-text="‹" next-text="›" first-text="«" last-text="»">>
</pagination>
</div>
<script src="js/angular.min.js"></script>
<script src="js/app.js"></script>
<script src="js/templates.js"></script>
<script src="js/ui-bootstrap-tpls-0.11.0.min.js"></script>
<!-- Templates will be loaded to angularJS cache. This will allow to use custom directives as templates with file:// protocol.-->
<script type="text/ng-template" id="search-bar.html">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<form name="searchForm" class="navbar-form navbar-default text-center" role="search" ng-submit="newSearch()" novalidate>
<div class="container-fluid">
<div class="form-group" ng-class="{'has-error' : emptyStringSubmitted && searchForm.keywords.$error.required }">
<input name="keywords" type="text" class="form-control" placeholder="Искать на Flickr" ng-model="typedInKeywords" ng-change="clearHighlightWarning()" required>
</div>
<button type="submit" class="btn btn-default">Найти</button>
</div>
</form>
</div>
</div>
</script>
<script type="text/ng-template" id="alert-message.html">
<div id="error" class="alert alert-danger alert-dismissable" ng-show="searchFailed" ng-model="message">
<button type="button" class="close" ng-click="searchFailed = false" aria-hidden="true">×</button>
{{message}}
</div>
</script>
<script type="text/ng-template" id="search-results-grid.html">
<div class="container-fluid">
<div class="row" ng-repeat="row in pictureRows | limitTo: 3">
<div class="thumbnail picture col-sm-3 col-xs-12" ng-repeat="picture in row">
<a href="{{picture.flickr}}" target="_blank">
<img ng-src="{{picture.img}}" alt="{{picture.title}}">
<p class="caption text-center">{{picture.title}}</p>
</a>
</div>
</div>
</div>
</script>
</body>
</html>