-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.html.gotemplate
52 lines (48 loc) · 1.44 KB
/
admin.html.gotemplate
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
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>comments admin</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="../static/comments.css" rel="stylesheet">
</head>
<body>
{{ if .Comments }}
<h1>comments on '{{ .DocumentTitle }}'</h1>
<div class="sqr-comments">
{{ range .Comments }}
<div class="sqr-comment">
{{ if .AvatarHash }}
<img class="sqr-avatar" src="../avatar/{{ .AvatarHash }}"></img>
{{ else }}
<img class="sqr-avatar" src="../static/anon.png"></img>
{{ end }}
<div class="post-col">
<div>
<span class="sqr-username">{{ .Username }}</span>
<span class="sqr-userid">{{ .AvatarHash }}</span>
<span class="sqr-documentId" style="display:none;">{{ .DocumentID }}</span>
<span class="sqr-date">{{ .Date }}</span>
<form style="display: inline-block; padding:" method="POST" action="#">
<input type="hidden" name="date" value="{{ .Date }}"/>
<input type="submit" name="submit" value="❌ DELETE"/>
</form>
</div>
<pre>
{{ .Body }}
</pre>
</div>
</div>
{{ end }}
</div>
{{ else }}
<h1>comments admin</h1>
<ul>
{{ range .Documents }}
<li><a href="{{ .DocumentID }}">{{ .DocumentTitle }}</a></li>
{{ end }}
</ul>
{{ end }}
</body>
</html>