-
Notifications
You must be signed in to change notification settings - Fork 1
/
this-file-me.html
80 lines (73 loc) · 2.29 KB
/
this-file-me.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
<head>
<title>this file (upsets|pleases) me ...</title>
</head>
<template name="home">
<body> <div id="outer"> <!-- we live in a world of divs. -->
<h1><a href="/">this file (upsets|pleases) me ...</a></h1>
<hr />
{{> submit_hash }}
<hr />
<h2>most upsetting files</h2>
{{> upsets_leaderboard }}
<hr />
<h2>most pleasing files</h2>
{{> pleases_leaderboard }}
<hr />
<p>to calculate a sha256 hash for a file named <span class="literal">foo</span> on linux</p>
<pre>sha256sum foo</pre>
<hr />
<small>source: <a href="https://github.com/silky/this-file-me/">this-file-me</a>.</small>
</div> </body>
</template>
<template name="hash_view">
<body> <div id="outer"> <!-- we live in a world of divs. -->
<h1><a href="/">this file (upsets|pleases) me ...</a></h1>
<hr />
<h2 class="hash">{{file_hash}}</h3>
<hr />
<h3><span class="upsets">{{upsets}}</span> people are upset by this file.</h3>
<h3><span class="pleases">{{pleases}}</span> people are pleased by this file.</h3>
<hr />
<small>source: <a href="https://github.com/silky/this-file-me/">this-file-me</a>.</small>
</div> </body>
</template>
<template name="submit_hash">
<h2>submit your feelings on a file</h2>
<p>the file with sha256 hash</p>
<input type="text" class="hash" name="hash" />
<p>
<input type="button" id="upsets" name="upsets" value="upsets me" />
<input type="button" id="pleases" name="pleases" value="pleases me" />
</p>
</template>
<template name="upsets_leaderboard">
<table class="leaderboard">
<tr>
<th>sha256 hash</th>
<th>upsets</th>
<th>pleases</th>
</tr>
{{#each hashes}}
{{> hash}}
{{/each}}
</table>
</template>
<template name="pleases_leaderboard">
<table class="leaderboard">
<tr>
<th>sha256 hash</th>
<th>upsets</th>
<th>pleases</th>
</tr>
{{#each hashes}}
{{> hash}}
{{/each}}
</table>
</template>
<template name="hash">
<tr>
<td class="hash"><a href="file/{{hash}}">{{hash}}</a></td>
<td class="upsets">{{upsets}}</td>
<td class="pleases">{{pleases}}</td>
</tr>
</template>