-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.src.html
198 lines (170 loc) · 12.1 KB
/
index.src.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>East Bay Homeless Services</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<!-- Angular and Angular Bootstrap -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular-sanitize.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/2.5.0/ui-bootstrap-tpls.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/checklist-model/0.11.0/checklist-model.min.js"></script>
<!-- jQuery and Bootstrap -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Google Maps API -->
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3&key=AIzaSyAL9z5bBfPe2FfwUmUik-xX1_unw-7PwYA"></script>
<!-- local config -->
<link href="index.css?[hash]" rel="stylesheet" />
<link rel="stylesheet" href="materialize.css">
<script src="index.js?[hash]"></script>
</head>
<body ng-app="app" ng-controller="PageController as app">
<!-- header navbar -->
<nav class="navbar navbar-default">
<div class="container-fluid">
<a class="logoimage" target="_blank" href="http://www.greeninfo.org/"><img src="images/greeninfo.png" /></a>
<div class="navbar-header">
<a class="navbar-brand" href="/Homelessness-Project">East Bay Homeless Services</a>
</div>
</div>
</nav>
<!-- search form -->
<div ng-show="! app.search.done" class="container-fluid" id="searchform">
<h3>What Do You Need?</h3>
<span ng-repeat="option in app.services_list">
<button id="searchbutton_{{ option }}" ng-click="app.search.services.push(option); app.pickDate('today'); app.search.sortby='time'; app.performSearch();" class="waves-effect waves-light btn-large"><img src="images/{{ option }}.png" width="25px" height="25px"> {{ option }}</button>
</span>
<br><br>
<input type="input" ng-model="app.search.searchword" placeholder="Search" style="font-size:20px;">
<button class="btn" ng-click="app.pickDate('today'); app.search.sortby='time'; app.performSearch();" style="background-color: green; width: 100%;"><i class="glyphicon glyphicon-search"></i> Search</button>
</div>
<!-- search had no results -->
<div ng-show="app.search.done && ! app.search.results.length" class="container-fluid" id="noresults">
<h3>Nothing Found</h3>
<div class="searchterms">
Searching for
<span ng-repeat="searchterm in app.search.services" ng-click="app.removeSearchService(searchterm)">
{{ searchterm }} <i class="glyphicon glyphicon-remove"></i>
</span>
<span ng-show="app.search.searchword" ng-click="app.removeSearchTerm()">{{ app.search.searchword }}<i class="glyphicon glyphicon-remove"></i></span>
</div>
<p>No service providers were found matching all of your needs.</p>
<p>Try selecting fewer services. Few providers provide all of the services listed.</p>
<p>Try selecting a different day. Many providers are only open Monday through Friday.</p>
<p><button class="btn btn-block btn-primary" ng-click="app.searchBack();"><i class="glyphicon glyphicon-chevron-left"></i> Search Again</button></p>
</div>
<!-- results listing / results map -->
<div ng-show="app.search.done && app.search.results.length" id="results">
<div class="container-fluid" id="results-navbar">
<div class="row">
<div class="col-xs-6">
<a href="javascript:void(0);" ng-click="app.searchBack();" class="backbutton"><i class="glyphicon glyphicon-chevron-left"></i> Search Again</a>
</div>
<div class="col-xs-6 right">
<a href="javascript:void(0);" ng-click="app.showmap = true;" ng-class="{ 'active': app.showmap }">Map</a>
<a href="javascript:void(0);" ng-click="app.showmap = false;" ng-class="{ 'active': ! app.showmap }">List</a>
</div>
</div>
<button class="waves-effect waves-light btn-large" ng-click="app.increaseFontSize();" ng-show="app.search.done">Increase text size</button>
<button class="waves-effect waves-light btn-large" ng-click="app.decreaseFontSize();" ng-show="app.search.done">Decrease text size</button>
</div>
<!-- results map; see Google Maps setup -->
<!-- the control DIVs will be turned into true GMaps controls in code, and removed from this section of the DOM -->
<div ng-show="app.showmap" class="container-fluid" id="resultsmap">
</div>
<div id="GeolocationControl" class="map-control map-control-button map-control-button-geolocation" title="Show your location">
<a href="javascript:void(0);" ng-click="app.zoomMapToGeolocation();"><img src="images/youarehere.svg" /></a>
</div>
<div id="DetailsControl" class="map-control map-control-text map-control-text-details" ng-show="app.showmap && app.resultdetails">
<a href="javascript:void(0);" ng-click="app.resultdetails = null;"><i class="glyphicon glyphicon-remove"></i></a>
<div class="times" ng-show="app.resultdetails.StartTime && app.resultdetails.EndTime"><img src="images/location.svg" /> {{ app.resultdetails.StartTime }} - {{ app.resultdetails.EndTime }}</div>
<div class="times" ng-show="app.resultdetails.StartTime && ! app.resultdetails.EndTime"><img src="images/location.svg" /> Starting at {{ app.resultdetails.StartTime }}</div>
<div class="times" ng-show="! app.resultdetails.StartTime && app.resultdetails.EndTime"><img src="images/location.svg" /> Until {{ app.resultdetails.EndTime }}</div>
<div class="name" ng-show="app.resultdetails.AgencyName">{{ app.resultdetails.AgencyName }}</div>
<div class="address" ng-if="app.resultdetails.Address" ng-bind-html="app.makeDirectionsLink(app.resultdetails.Address, app.resultdetails.LatLng)" title="Get directions"></div>
<div class="details" ng-show="app.resultdetails.Details && app.$window.innerHeight >= 550">{{ app.resultdetails.Details }}</div>
<div class="services" ng-show="app.resultdetails.Services.length > 0 && app.$window.innerHeight >= 550">Services: {{ app.resultdetails.Services.join(", ") }}</div>
<div class="contactus">See an error? <a target="_blank" ng-href="{{ app.email_contact }}">Email us!</a></div>
</div>
<!-- results listing -->
<div ng-show="! app.showmap" class="container-fluid" id="resultslist">
<div class="contactus">
See an error? <a target="_blank" ng-href="{{ app.email_contact }}">Email us!</a>
</div>
<div class="searchterms">
Showing results for
<span ng-repeat="searchterm in app.search.services" ng-click="app.removeSearchService(searchterm)">
{{ searchterm }} <i class="glyphicon glyphicon-remove"></i>
</span>
<span ng-show="app.search.searchword" ng-click="app.removeSearchTerm()">{{ app.search.searchword }}<i class="glyphicon glyphicon-remove"></i></span>
</div>
<div class="resultslist-sorting">
<a href="javascript:void(0);" ng-click="app.search.sortby = 'time'; app.performSearch()" ng-class="{ active: app.search.sortby=='time'}">Sort by Time</a>
•
<a href="javascript:void(0);" ng-click="app.search.sortby = 'distance'; app.performSearch()" ng-class="{ active: app.search.sortby=='distance'}">Sort by Distance</a>
</div>
<ul>
<li ng-repeat="result in app.search.results">
<div class="distance" ng-show="result.IsClose"><a href="javascript:void(0);" ng-click="app.zoomMapToLatLng(result.LatLng, true); app.resultdetails = result;">{{ result.DistanceMiles.toFixed(1) }} miles from you.<br>SEE MAP</a></div>
<div class="times indent" ng-show="result.StartTime && result.EndTime">Open {{ result.StartTime }} to {{ result.EndTime }}</div>
<div class="times indent" ng-show="result.StartTime && ! result.EndTime">Starting at {{ result.StartTime }}</div>
<div class="times" ng-show="! result.StartTime && result.EndTime">Until {{ result.EndTime }}</div>
<!-- Test to see where to put services offered -->
<!-- TODO: Make services offered its own class in css/scss -->
<div class="serviceterms indent">
<span ng-repeat="service in result.Services">
{{ service }}
</span>
</div>
<div class="name indent">{{ result.AgencyName }}</div>
<div class="address indent" ng-if="result.Address" ng-bind-html="app.makeDirectionsLink(result.Address, result.LatLng)" title="Get Directions"></div>
<!--><div class="address" ng-if="app.resultdetails.Address" ng-bind-html="app.makeDirectionsLink(app.resultdetails.Address, app.resultdetails.LatLng)" title="Get directions"></div></!-->
<div class="details indent" ng-show="result.Details">{{ result.Details }}</div>
<div class="resultborder"></div>
</li>
</ul>
</div>
</div>
<!-- busy spinner -->
<div ng-show="app.busy" id="busy">
<img src="images/spinner.gif" />
</div>
<!-- footer for credits -->
<div class="container-fluid" id="footer" ng-hide="app.showmap">
<div class="row">
<div class="col-xs-12 col-sm-6">
Data provided by <a target="_blank" href="https://dorothydayhouseberkeley.org">Dorothy Day House, Berkeley</a>
</div>
<div class="col-xs-12 col-sm-6">
Application by <a href="_blank" target="http://www.greeninfo.org/">GreenInfo Network</a> and Code For Berkeley.
</div>
</div>
</div>
<!-- date picker modal -->
<div class="modal fade" tabindex="-1" role="dialog" id="modal_datepicker">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title">Pick a Date</h4>
</div>
<div class="modal-body">
<div uib-datepicker ng-model="app.search.date" datepicker-options="{ showWeeks: false, initDate: app.today, minDate: app.today }" ng-change="app.closeDatePicker();"></div>
</div>
</div>
</div>
</div>
<!-- Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-108260615-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-108260615-1');
</script>
</body>
</html>