-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
145 lines (143 loc) · 5.8 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html ng-app>
<head>
<title>
trees
</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.5.2/mapbox.css' rel='stylesheet'
/>
<link href='http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css'
rel='stylesheet' />
<link href='css/app.css' rel='stylesheet' />
</head>
<body>
<div class="app-wrapper" ng-controller="TreesCtrl" ng-cloak>
<div class="container main-container">
<div class="row">
<div class="col-md-6 col-sm-8 col-xs-12">
<form ng-submit="search(searchTerm)">
<div class="row">
<div class="col-md-10 col-sm-10 col-xs-10 input-box">
<input type="search" class="form-control input-lg" ng-model="searchTerm" placeholder='Heritage Trees Search (try "Giant sequoia")'
ng-keyup="search(searchTerm)">
</div>
<div class="col-md-2 col-sm-2 col-xs-2 btn-box">
<div class="btn-group">
<!-- <a class="btn btn-default btn-lg">
<span class="glyphicon glyphicon-list-alt"></span>
</a> -->
<button type="submit" class="btn btn-primary btn-lg btn-block">
<span ng-click="showList = false" class="glyphicon glyphicon-search">
</span>
</button>
</div>
</div>
</div>
</form>
<!-- <div class="panel panel-default" ng-show="! searchResults.length && searchTerm"
ng-cloak>
<div class="panel-body">
No results found.
</div>
</div> -->
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="panel panel-default" ng-show="searchResults.length && ! showList" ng-cloak>
<div class="panel-body">
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-6" ng-click="zoomTo(searchResults[0])">
<h3>
{{ featuredResults[0].properties.common_nam }}
</h3>
<h4>
{{ featuredResults[0].properties.address }}
</h4>
</div>
<div class="col-md-6 col-sm-6 col-xs-6">
<ul class="list-unstyled">
<li ng-click="zoomTo(featuredResults[1])">
<h4>
{{ featuredResults[1].properties.common_nam }}
</h4>
<h5>
{{ featuredResults[1].properties.address }}
</h5>
</li>
<li ng-click="zoomTo(featuredResults[2])">
<h4>
{{ featuredResults[2].properties.common_nam }}
</h4>
<h5>
{{ featuredResults[2].properties.address }}
</h5>
</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-md-12" ng-show="searchResults.length > 3" >
<span class="badge" ng-click="showList = true">+{{ searchResults.length - 3 }} more</span>
<a class="pull-right" ng-click="showList = true">
<span class="glyphicon glyphicon-list"></span>
List all results
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" ng-show="showList" ng-class="{ 'active': menu.active }" ng-cloak>
<div class="col-xs-10 col-md-6 col-sm-6" role="navigation">
<a class="pull-right close-btn" ng-click="showList = false">
<span class="glyphicon glyphicon-remove-circle"></span>
</a>
<div class="list-group">
<a ng-click="zoomTo(result, $index)" ng-repeat="result in searchResults" class="list-group-item">
<h4>{{ result.properties.common_nam }}</h4>
<h5>{{ result.properties.address }}</h5>
</a>
</div>
</div>
<!--/span-->
</div>
<!--/row-->
</div>
<!-- <div class="row row-offcanvas row-offcanvas-left active" ng-show="showList"
ng-class="{ 'active': menu.active }">
<div class="col-xs-10 col-md-6 col-sm-6 sidebar-offcanvas" role="navigation">
<div class="list-group">
<a ng-repeat="result in searchResults" class="list-group-item">
<h4>{{ result.properties.common_nam }}</h4>
<h5>{{ result.properties.address }}</h5>
</a>
</div>
</div><!--/span-->
</div>
<!--/row-->
</div>
<div id="map">
</div>
</div>
<footer>
<div class="container">
<p class="pull-right">
powered by data from
<a href="http://civicapps.org">civicapps</a>
</p>
</div>
</footer>
<!-- /container -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular.min.js">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js">
</script>
<script src='http://api.tiles.mapbox.com/mapbox.js/v1.5.2/mapbox.js'>
</script>
<script src="app.js">
</script>
</body>
</html>