-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlist.html
152 lines (135 loc) · 6.64 KB
/
list.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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="./css/styles.css">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
</head>
<body onload="globals.load()" style="margin-bottom: 100px">
<nav class="navbar navbar-toggleable-md navbar-light bg-faded" style="padding-bottom:0px; margin-bottom:0px;">
<div class="collapse navbar-collapse" id="navbarTogglerDemo01">
<a class="navbar-brand" href="./">YIMBY Representative Tracker</a>
<ul class="navbar-nav mr-auto mt-2 mt-lg-0">
<li class="nav-item">
<a class="nav-link" href="#"></a>
</li>
</ul>
</div>
</nav>
<div class="container" style="padding-top:20px;">
<div class="row">
<div class="col" style="padding:20px;">
<form id="address-form">
<div class="form-inline form-group row">
<div class="col">
<input type="text" class="form-control" id="addressInput" style="width: 100%">
</div>
<div>
<button type="submit" class="btn btn-primary pull-right">Find</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div id="accordion" role="tablist" aria-multiselectable="true"> <!-- START accordian -->
</div> <!-- END accordian -->
<!-- jQuery first, then Tether, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
<!-- And then other random stuff we're using directly -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.10/handlebars.min.js"></script>
<script src="https://apis.google.com/js/client.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ramda/0.24.1/ramda.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/es6-promise/4.1.0/es6-promise.auto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fetch/2.0.3/fetch.min.js"></script>
<script src="./list.js"></script>
<!-- TODO can we move this to another file? -->
<script id="row-template" type="text/x-handlebars-template">
<div class="row" style="margin-bottom: 5px">
<div class="col-1 col-md-2"></div>
<div class="col-3 col-md-2">
<a data-toggle="collapse" data-parent="#accordion" href="#collapse{{index}}" aria-expanded="{{defaultExpand}}" aria-controls="collapse{{index}}">{{officialName}}</a>
</div>
<div class="col-5 col-md-4">
{{officialTitle}}
{{#if actionNotes}}
<b> (action alert!)</b>
{{/if}}
</div>
<div class="col-3 col-md-2">
<span class="badge badge-default badge-pill">{{officialScore}}</span>
<a data-toggle="collapse" data-parent="#accordion" href="#collapse{{index}}" aria-expanded="{{defaultExpand}}" aria-controls="collapse{{index}}">
{{#if officialScore}}
Score Card
{{else}}
Details
{{/if}}
</a>
</div>
</div>
<div id="collapse{{index}}" class="collapse {{#if defaultExpand}}show{{/if}}" role="tabpanel" aria-labelledby="headingOne">
<div class="card" style="border:none; box-shadow:none;">
<div class="card-block">
<div class="row" style="padding:10px">
<div class="col-0 col-md-2"></div>
<div class="col-12 col-md-8">
<div class="card">
<div class="card-header">
<div class="row">
<div class="col-8"><h4>{{officialName}}</h4></div>
{{#if officialScore}}
<div class="col-4" style="text-align:right;"><h4>YIMBY Score: {{officialScore}}</h4></div>
{{/if}}
</div>
</div>
<div class="card-block">
<p class="card-text">
{{#if photoUrl}}
<img style="width:150px; padding: 0px 15px 0px 0px" align="left" src="{{photoUrl}}" alt="Card image cap">
{{/if}}
<p><b>{{actionNotes}}</b></p>
{{#if yimbyMailerLink}}
<a class="btn btn-primary" target="_blank" href="{{yimbyMailerLink}}">
YIMBY Mailer
</a>
{{/if}}
<p>{{notes}}</p>
</p>
</div>
<div class="card-block row">
<div class="col-md-12 col-lg">Contact:</div>
{{#each emails as |email emailId|}}
<div class="card-block-item col-12 col-md">
<a href="mailto:{{email}}">{{email}}</a>
</div>
{{/each}}
{{#each phones as |phone phoneId|}}
<div class="card-block-item col-12 col-md">
<a href="tel:{{phone}}" class="card-link">{{phone}}</a>
</div>
{{/each}}
{{#if twitter}}
<div class="card-block-item col-12 col-md">
<a href="https://twitter.com/{{twitter}}" target="_blank" class="card-link">@{{twitter}}</a>
</div>
{{/if}}
</div>
{{#if url}}
<div class="card-block">
<a href="{{url}}" target="_blank" class="card-link">{{url}}</a>
</div>
{{/if}}
</div>
<div class="col-2"></div>
</div>
</div>
</div>
</div>
</script>
</body>
</html>