From 3db517715bef6a53225c5c3c06e8fc5fd0bf71e3 Mon Sep 17 00:00:00 2001
From: FChannel <>
Date: Sun, 24 Apr 2022 00:46:49 -0700
Subject: basic pass over view posts, post, catalog and manage page connections

---
 views/admin.html | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)
 create mode 100644 views/admin.html

(limited to 'views/admin.html')

diff --git a/views/admin.html b/views/admin.html
new file mode 100644
index 0000000..191444b
--- /dev/null
+++ b/views/admin.html
@@ -0,0 +1,78 @@
+<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="#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>             -->
+  </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 class="box2" style="margin-bottom: 25px; padding: 12px;">
+  <h3>Create News</h3>
+  <form id="news" action="/{{ .page.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="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.&#10;&#10;(?i) for case insesitive &#10;(?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 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> -->
-- 
cgit v1.2.3