-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwhereat.html
39 lines (35 loc) · 1.28 KB
/
whereat.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
<head>
<title>whereat</title>
</head>
<body>
</body>
<template name="layout">
<header>
{{> loginButtons}}
<h1><a href="/">whereAt</a></h1>
</header>
{{> yield}}
</template>
<template name="home">
{{#if currentUser}}
{{#if currentUser.cellyToken}}
<a href="https://cel.ly/api/authorize?client_id={{cellyAppId}}&redirect_uri={{baseUrl}}cellyAuthCallback/{{userId}}&scope=BASIC+WRITE_MSG">Get new Celly token</a><br>
<br>
<form id="shareLocation" action="/shareLocation">
<input type="hidden" name="cellyToken" value="{{currentUser.cellyToken}}">
{{#if coords}}
<input type="hidden" name="lat" value="{{coords.lat}}">
<input type="hidden" name="lng" value="{{coords.lng}}">
{{/if}}
Cell Name: <input type="text" name="cellName"><br>
<br>
Message:<br><textarea name="message" placeholder="optional" cols="30" rows="5"></textarea><br>
<button type="submit">Send</button>
</form>
{{else}}
<a href="https://cel.ly/api/authorize?client_id={{cellyAppId}}&redirect_uri={{baseUrl}}cellyAuthCallback/{{userId}}&scope=BASIC+WRITE_MSG">Authenticate with Celly to start sharing your location!</a>
{{/if}}
{{else}}
You must sign in to share your location!
{{/if}}
</template>