-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
192 lines (175 loc) · 8.78 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta https-equiv="X-UA-Compatible" content="ie=edge">
<link href="https://fonts.googleapis.com/css?family=Amatic+SC|Oswald" rel="stylesheet">
<link rel="stylesheet" href="styles/vendors/normalize.css">
<link rel="stylesheet" href="styles/icons.css">
<link rel="stylesheet" href="styles/base.css">
<link rel="stylesheet" href="styles/modules.css">
<link rel="stylesheet" href="styles/layout.css">
<link rel="icon" type="image/png" href="assets/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="assets/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="assets/favicon-96x96.png" sizes="96x96">
<title>Secret Spots</title>
<nav class="nav-menu clearfix">
<ul>
<li><a href="/list-view" class="icon-list2"></a></li>
<li><a href="#" class="icon-plus" id="add-link"></a></li>
<li><a href="/map" class="icon-earth"></a></li>
</ul>
</nav>
<section id="new-spot-view" class="view">
<h2 class="view-title">Add Your Spot:</h2>
<div id="search-new-spot">
<input id="locationTextField" placeholder="Where's your spot?" type="text"></input>
</div>
<section id="form-view">
<form id="add-spot">
<div id="form-top">
<div class="left">
<label for="spot-name">
<h3>Name of Spot:</h3>
<input type="text" name="name" required>
</label>
<label for="address">
<h3>Address:</h3>
<input type="text" name="address" required>
</label>
<label for="marker">
<h3>Marker Loc:</h3>
<input type="text" id="address" name="address" required onkeypress="return false;">
</label>
</div>
<div class="right">
<label for="note">
<h3>Note:</h3>
<input type="text-area" name="note" placeholder="Add a note about your spot!">
</label>
</div>
</div>
<div id="share-button-div">
<input id="form-button" type="submit" value="Share">
</div>
</form>
</section>
</section>
</head>
<body>
<main class="content">
<!-- views -->
<section id="map-view" class="view">
<div id="map"></div>
</section>
<section id="list-view" class="view">
<div id="drop-down">
<form id="sort-form">
<select id="sort">
<option value="data-title">-- Sort by Title --</option>
<option value="data-popularity">-- Sort by Most Secret --</option>
<option value="data-recommended">-- Sort by Recommended --</option>
<option value="data-date">-- Sort by Date --</option>
</select>
</form>
<form id="filter">
<input type="checkbox" id="filter-authour" name="filter-by-author" value="filter-by-author">
<label for="filter-by-author">Show only my spots</label>
</form>
</section>
<section id="auth-view" class="view">
<h1>Secret Spots</h1>
<form id="auth-form">
<input type="text" id="username" name="username" placeholder="username">
<input type="password" id="password" name="password" placeholder="password">
<button type="submit">enter</button>
</form>
<a id="auth-type" href="/auth/signin">sign in</a>
<p id="user-status">you are logged in</p>
</section>
<section id="detail-view" class="view"></section>
<section id="update-view" class="view"></section>
</main>
<footer>
<p id="current-username"></p>
<p><a href="/auth/signin" class="login-options">Sign In</a></p>
<a href="https://github.com/SecretSpots"><p class="icon-github"></p></a>
<p><a href="/auth/signup" class="login-options">Sign Up</a></p>
<p id="logout">Log Out</p>
</footer>
<!-- templates -->
<template id="update-view-template">
<div class="update-div">
<h2>{{name}}</h2>
<h3>{{address}}</h3>
<form id="update-spot-form">
<label>
<textarea rows="6" cols="40" id="note" name="note">{{note}}</textarea>
</label>
<div class="update-button-div">
<button id="cancel-update">Cancel</button>
<input id="update-button" type="submit" value="Update">
</div>
</form>
<p>Added by <span class="list-user-name">{{username}}</span> on {{date}}</p>
</div>
</template>
<template id="spot-list-template">
<div class="spot-info spot {{username}}" data-spot-id="{{spot_id}}" data-title="{{name}}" data-author="{{username}}" data-date="{{date}}" data-popularity="{{beenHereCount}}" data-recommended="{{goodSpotCount}}">
<h2 class="list-view-header">{{name}}</h2>
<a href="#" class="show-more icon-circle-down" data-username="{{username}}"></a>
<div class="hide">
<h3>{{address}}</h3>
<p class="list-view-notes">{{note}}</p>
<p>Added by <span class="list-user-name">{{username}}</span> on <a href="/spots/{{spot_id}}">{{date}}</a></p>
<div class="editing-buttons">
<button class="list-delete-spot" >Delete this Spot</button>
<a href="/spots/{{spot_id}}/update"><button>Update this Spot</button></a>
</div>
<div class="voting-buttons">
<button class="list-been-spot">Mark as visited</button>
<button class="list-good-spot">Like this tip</button></a>
</div>
<p>{{beenHereCount}} {{peopleBeenGrammar}} marked this spot as visited<span class="been-you">.</span></p>
<p>{{goodSpotCount}} {{peopleGoodGrammar}} liked this recommendation<span class="good-you">.</span></p>
</div>
</div>
</template>
<template id="detail-view-template">
<h2>{{name}}</h2>
<h3>{{address}}</h3>
<p>{{note}}</p>
<h3>Added by <span class="list-user-name">{{username}}</span> on {{date}}</h3>
<div class="editing-buttons">
<button id="delete-spot">Delete this Spot</button>
<a href="/spots/{{spot_id}}/update"><button id="update-spot">Update this Spot</button></a>
</div>
<div class="voting-buttons">
<button id="been-spot">Mark as visited</button>
<button id="good-spot">Like this tip</button></a>
</div>
<p>{{beenHereCount}} {{peopleBeenGrammar}} marked this spot as visited<span class="been-you">.</span></p>
<p>{{goodSpotCount}} {{peopleGoodGrammar}} liked this recommendation<span class="good-you">.</span></p>
</template>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.11/handlebars.min.js"></script>
<script src="https://cdn.rawgit.com/visionmedia/page.js/master/page.js"></script>
<script>
const API_URL = window.location.protocol === 'https:'
? 'https://secret-spots.herokuapp.com/api/v1'
: 'http://localhost:3000/api/v1';
window.module = {};
</script>
<script src="scripts/models/spots.js"></script>
<script src="scripts/models/user.js"></script>
<script src="scripts/models/map.js"></script>
<script src='https://maps.googleapis.com/maps/api/js?key=AIzaSyBrLufX8_DAF_wPD79dBtiMgnktq6nxAt4&libraries=places&callback=module.Map.initMap'></script>
<!-- leave google call between map js and map-view -->
<script src="scripts/views/map-view.js"></script>
<script src="scripts/views/spots-view.js"></script>
<script src="scripts/views/login-view.js"></script>
<script src="scripts/app.js"></script>
</script>
</body>
</html>