-
Notifications
You must be signed in to change notification settings - Fork 0
/
ohmygod.html
73 lines (67 loc) · 1.77 KB
/
ohmygod.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
<head>
<title>Ohm My God</title>
</head>
<body>
{{> content}}
</body>
<template name="content">
{{#with message}}
{{#if url}}
<img src="{{url}}" width="96px" height="96px"/>
{{/if}}
{{#if text}}
<div id="content" class="{{style}}">
<p id="text" class="{{style}}">{{text}}</p>
</div>
{{/if}}
{{/with}}
{{> addImage}}
<p><input type="button" id="view_history" value="Tug of war!"/></p>
{{#if view}}
{{loginButtons}}
{{> history}}
{{/if}}
</template>
<template name="addText">
<form id="addText">
Text:
<input type="text" id="message" value=""/>
<select id="style">
<option value="">Unstyled</option>
<option value="opengarage">Open Garage</option>
<option value="highcontrast">High Contrast</option>
<option value="inverted">Inverted High Contrast</option>
</select>
<input type="button" id="saveText" value="Save"/>
</form>
</template>
<template name="addImage">
<form id="addImage">
Add an image URL:
<input type="text" id="url" value=""/>
<input type="button" id="saveImage" value="Save"/>
</form>
</template>
<template name="history">
{{#each messages}}
{{> message}}
{{/each}}
</template>
<template name="message">
{{#if url}}
<p><img src="{{url}}" width="96px" height="96px"/></p>
{{/if}}
{{#if text}}
<br/>{{text}}
{{/if}}
{{#if currentUser}}
<input type="button" id="delete_{{_id}}" class="delete" value="Delete" mongo_id="{{_id}}" />
{{/if}}
{{#if currentSticky}}
{{else}}
<input type="button" id="stick_{{_id}}" class="non-sticky" value="Bump!" mongo_id="{{_id}}" />
{{/if}}
<input type="button" id="upvote_{{_id}}" class="upvote" value="Upvote" mongo_id="{{_id}}" />
{{votes}}
<input type="button" id="downvote_{{_id}}" class="downvote" value="Downvote" mongo_id="{{_id}}" />
</template>