blob: 34446573be3ce0cccefb8f151fe176b0e9b2bc7f (
plain)
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
|
<div style="margin: 0 auto; width: 400px;">
<h3>Add Board</h3>
<form id="new-post" action="/{{ .page.Key }}/addboard" method="post" enctype="application/x-www-form-urlencoded">
<label>Name:</label><br>
<input type="text" name="name" placeholder="g" required><br>
<label>Prefered Name:</label><br>
<input type="text" name="prefname" placeholder="Technology" required><input type="submit" value="Add"><br>
<label>Summary:</label><br>
<textarea name="summary" rows="8" cols="50"></textarea><br>
<label>Restricted (i.e SFW):</label><br>
<select name="restricted">
<option value="True">True</option>
<option value="False">False</option>
</select>
</form>
<ul style="display: inline-block; padding: 0;">
<li style="display: inline-block;">[<a href="#reported">Reported</a>]</li>
<li style="display: inline-block;">[<a href="#news">Create News</a>]</li>
<li style="display: inline-block;">[<a href="#regex">Post Blacklist</a>]</li>
<!-- <li style="display: inline-block;"><a href="javascript:show('followers')">Followers</a></li> -->
</ul>
</div>
<div id="following" class="box2" style="margin-bottom: 25px; padding: 12px;">
<h4 style="margin: 0; margin-bottom: 5px;">Subscribed</h4>
<form id="follow-form" action="/{{ .page.Key }}/follow" method="post" enctype="application/x-www-form-urlencoded">
<input id="follow" name="follow" style="margin-bottom: 12px;" placeholder="http://localhost:3000/g"></input><input type="submit" value="Subscribe"><br>
<input type="hidden" name="actor" value="{{ .page.Actor }}">
</form>
<ul style="display: inline-block; padding: 0; margin: 0; list-style-type: none;">
{{ $actor := .page.Actor }}
{{ $key := .page.Key }}
{{ range .page.Following }}
<li>[<a href="/{{ $key }}/follow?follow={{ . }}&actor={{ $actor }}">Unfollow</a>]<a href="{{ . }}">{{ . }}</a></li>
{{ end }}
</ul>
</div>
<div id="followers" class="box2" style="margin-bottom: 25px; padding: 12px; display:none;">
<h4 style="margin: 0; margin-bottom: 5px;">Followers</h4>
<ul style="display: inline-block; padding: 0; margin: 0; list-style-type: none;">
{{ range .page.Followers }}
<li><a href="http://localhost:3000/g">{{ . }}</a></li>
{{ end }}
</ul>
</div>
<div id="reported" class="box2" style="margin-bottom: 25px; padding: 12px;">
<h4 style="margin: 0; margin-bottom: 5px;">Reported</h4>
<ul style="display: inline-block; padding: 0; margin: 0; list-style-type: none;">
{{ $domain := .page.Domain }}
{{ range .reports }}
<h4 style="margin: 0;"><a href="{{ print $domain "/" (index . 0).Actor.Name }}">/{{ (index . 0).Actor.Name }}/</a></h4>
{{ range . }}
<li style="padding: 12px;">
<div style="margin-bottom: 5px;">{{ .Object.Updated | timeToReadableLong }}</div>
<a id="rpost" post="{{ .ID }}" title="{{ parseLinkTitle .Actor.Outbox .OP .Object.Content}}" href="/{{ parseLink .Actor .ID }}">{{ shortURL .Actor.Outbox .ID }}</a> - <b>{{ .Count }}</b> [<a href="/delete?id={{ .ID }}&board={{ .Actor.Name }}&manage=t">Remove Post</a>] {{ if (index .Object.Attachment 0).Id }} [<a href="/banmedia?id={{ .ID }}&board={{ .Actor.Name }}">Ban Media</a>] [<a href="/deleteattach?id={{ .ID }}&board={{ .Actor.Name }}&manage=t">Remove Attachment</a>]{{ end }} [<a href="/report?id={{ .ID }}&close=1&board={{ .Actor.Name }}">Close</a>]
<ul>
{{ range .Reason }}
<li>
<span>"{{ . }}" </span>
</li>
{{ end }}
</ul>
</li>
{{ end }}
{{ end }}
</ul>
</div>
<div class="box2" style="margin-bottom: 25px; padding: 12px;">
<h3>Create News</h3>
<form id="news" action="/{{ .page.Key }}/newspost" method="post" enctype="application/x-www-form-urlencoded">
<label>Title:</label><br>
<input type="text" name="title" placeholder="New Board" required><input type="submit" value="Post"><br>
<label>Content:</label><br>
<textarea name="summary" rows="8" cols="50"></textarea><br>
</form>
</div>
<div id="regex" class="box2" style="margin-bottom: 25px; padding: 12px;">
<h3>Regex Post Blacklist</h3>
<form id="blacklist" action="/blacklist" method="post" enctype="application/x-www-form-urlencoded">
<label>Regex:</label><br>
<input type="text" name="regex" placeholder="(?i)(?s)(.+)?stuff?(.+)to(.+)?block(.+)?https?://(.+)?" size="38" required><input style="margin-left: 5px;" type="submit" value="Post"><br>
<label>Test Case:</label><br>
<textarea name="testCase" rows="8" cols="50" placeholder="enter a test case to block, if it passes the regex will be added to the blacklist. (?i) for case insesitive (?s) to span multiple lines"></textarea><br>
</form>
{{ if .page.PostBlacklist }}
<ul style="display: inline-block; padding: 0; margin: 0; margin-top: 25px; list-style-type: none;">
{{ range .page.PostBlacklist }}
<li>{{ .Regex }} [<a href="/blacklist?remove={{ .Id }}">remove</a>]</li>
{{ end }}
</ul>
{{ end }}
</div>
{{ template "partials/footer" .page }}
{{ template "partials/general_scripts" .page }}
|