aboutsummaryrefslogtreecommitdiff
path: root/static/nadmin.html
diff options
context:
space:
mode:
Diffstat (limited to 'static/nadmin.html')
-rw-r--r--static/nadmin.html53
1 files changed, 35 insertions, 18 deletions
diff --git a/static/nadmin.html b/static/nadmin.html
index 88b92c9..5e38151 100644
--- a/static/nadmin.html
+++ b/static/nadmin.html
@@ -11,30 +11,20 @@
<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:</label><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="#following">Subscribed</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> -->
- <li style="display: inline-block;"><a href="#reported">Reported</a></li>
+ <!-- <li style="display: inline-block;"><a href="#reported">Reported</a></li> -->
</ul>
</div>
-<div class="popup-box" style="margin-bottom: 25px; padding: 12px;">
- <h3>Post News</h3>
- <form id="news" action="/{{ .Key }}/postnews" 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="following" class="popup-box" style="margin-bottom: 25px; padding: 12px;">
<h4 style="margin: 0; margin-bottom: 5px;">Subscribed</h4>
@@ -60,11 +50,38 @@
</ul>
</div>
-<div id="reported" class="popup-box" 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;">
- </ul>
+<div class="popup-box" style="margin-bottom: 25px; padding: 12px;">
+ <h3>Create News</h3>
+ <form id="news" action="/{{ .Key }}/postnews" 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="popup-box" 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.&#10;&#10;(?i) for case insesitive &#10;(?s) to span multiple lines"></textarea><br>
+ </form>
+ {{ if .PostBlacklist }}
+ <ul style="display: inline-block; padding: 0; margin: 0; margin-top: 25px; list-style-type: none;">
+ {{ range .PostBlacklist }}
+ <li>{{ .Regex }} <a href="/blacklist?remove={{ .Id }}">[remove]</a></li>
+ {{ end }}
+ </ul>
+ {{ end }}
+</div>
+
+<!-- <div id="reported" class="popup-box" 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;"> -->
+<!-- </ul> -->
+<!-- </div> -->
{{ end }}
{{ define "bottom" }}{{ end }}