-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
80 lines (80 loc) · 3.55 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
<!DOCTYPE html>
<html ng-app="geocode">
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.min.js"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/js/bootstrap.min.js"></script>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css" rel="stylesheet">
<!-- <script src="live.js" type="text/javascript"></script> -->
<script src="apikey.js" type="text/javascript" charset="utf-8"></script>
<script src="script.js" type="text/javascript" charset="utf-8"></script>
<style>
body {
background-image: url("retro_intro.png");
}
table {
width: 100%;
}
</style>
</head>
<body ng-controller="Ctrl">
<a href="https://github.com/KGZM/geocoding-demo"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
<div class="container-fluid" style="background: gray; color: white;">
<h1><span>A Geocoding Demo<h3 style="display: inline;"> by KGZM</h3></span></h1>
</div>
<br>
<div class="container">
<div class="row">
<div class="span6 offset3">
<form ng-submit="search()" class="well">
<div class="alert alert-info">
<strong>This is only a test</strong> using the geonames geocoding API to get the latitude and longitude for a user supplied location in order to filter a list of people by the provided preferences.
Editing the form will produce immediate results.
</div>
I'm looking for
<select ng-model="gender" ng-options="g.noun for g in genders">
</select>
,between the ages of
<input type="text" class="input-mini" ng-model="minAge" placeholder="18">
and
<input type="text" class="input-mini" ng-model="maxAge" placeholder="75">
,who live within
<input type="text" ng-model="distance" class="input-mini" placeholder="25">
miles of <input location-complete="true" autocomplete="false" type="text" class="input-medium" ng-model="locationName">.
</form>
</div>
</div>
<div class="row">
<div class="span4 offset1 alert alert-info">
<span ng-hide='predicate'>
Click the headings to change the sorting order.
</span>
<span ng-show='predicate'>
Sorting by {{predicate || 'unsorted'}}. In {{{true: "descending", false:"asccending"}[reverse]}} order.
</span>
</div>
</div>
<div class="row">
<div class="span10 offset1">
<table class="table table-striped table-bordered table-hover">
<tr>
<th><a href='' ng-click="setPredicate('name')">Name</a></th>
<th><a href='' ng-click="setPredicate('age')">Age</a></th>
<th><a href='' ng-click="setPredicate('gender')">Gender</a></th>
<th><a href='' ng-click="setPredicate('location.name')">Location</a></th>
<th><a href='' ng-click="setPredicate('distance')">Distance</a></th>
</tr>
<tbody ng-repeat="user in users | filter:filterUsers | orderBy:predicate:reverse">
<tr>
<td>{{user.name}}</td>
<td>{{user.age}}</td>
<td>{{user.gender}}</td>
<td>{{user.location.name}}</td>
<td>{{user.distance && user.distance + " miles" || "<1 mile"}}</td>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>