diff options
Diffstat (limited to 'static')
-rw-r--r-- | static/admin.html | 77 | ||||
-rw-r--r-- | static/faq.html | 2 | ||||
-rw-r--r-- | static/nadmin.html | 53 | ||||
-rw-r--r-- | static/ncatalog.html | 10 |
4 files changed, 45 insertions, 97 deletions
diff --git a/static/admin.html b/static/admin.html deleted file mode 100644 index f238ec0..0000000 --- a/static/admin.html +++ /dev/null @@ -1,77 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <title></title> - </head> - <body> - <div style="margin: 0 auto; width: 400px;"> - <h3>Add Board</h3> - <form id="new-board" action="/{{ .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:</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="javascript:show('following')">Subscribed</a></li> - <!-- <li style="display: inline-block;"><a href="javascript:show('followers')">Followers</a></li> --> - <li style="display: inline-block;"><a href="javascript:show('reported')">Reported</a></li> - </ul> - - </div> - - <div id="following"> - <h4>Following</h4> - <form id="follow-form" action="/{{ .Key }}/follow" method="post" enctype="application/x-www-form-urlencoded"> - <label>Subscribe:</label><br> - <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="{{ .Actor.Id }}"> - </form> - <ul style="display: inline-block; padding: 0; margin: 0;"> - {{ $actor := .Actor.Id }} - {{ $key := .Key }} - {{ range .Following }} - <li><a href="/{{ $key }}/follow?follow={{ . }}&actor={{ $actor }}">[Unfollow]</a><a href="{{ . }}">{{ . }}</a></li> - {{ end }} - </ul> - </div> - - <div id="followers" style="display: none;"> - <h4>Followers</h4> - <ul style="display: inline-block; padding: 0; margin: 0;"> - {{ range .Followers }} - <li><a href="http://localhost:3000/g">{{ . }}</a></li> - {{ end }} - </ul> - </div> - - <div id="reported" style="display: none;"> - <h4>Reported</h4> - <ul style="display: inline-block; padding: 0; margin: 0;"> - </ul> - </div> - </body> -</html> - -<script> - function show(element) - { - var following = document.getElementById("following"); - // var followers = document.getElementById("followers"); - var reported = document.getElementById("reported"); - - following.style.display = "none"; - // followers.style.display = "none"; - reported.style.display = "none"; - - document.getElementById(element).style.display = "block"; - } -</script> diff --git a/static/faq.html b/static/faq.html index 95e51c5..5d70e8e 100644 --- a/static/faq.html +++ b/static/faq.html @@ -56,7 +56,7 @@ <p>Soon™.</p> <h4 id="version">What version is this FChannel instance?</h4> - <p>v0.0.8-release</p> + <p>v0.0.9-dev</p> </div> <div style="width: 500px; margin:0 auto; margin-top: 50px; text-align: center;"> <a href="/">[Home]</a><a href="/static/rules.html">[Rules]</a><a href="/static/faq.html">[FAQ]</a> 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. (?i) for case insesitive (?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 }} diff --git a/static/ncatalog.html b/static/ncatalog.html index 4c6c589..68bb01a 100644 --- a/static/ncatalog.html +++ b/static/ncatalog.html @@ -67,7 +67,15 @@ img.style = "max-width: 180px; max-height: 180px;" img.setAttribute("id", "img") img.setAttribute("main", "1") - img.setAttribute("src", "{{ proxy (index .Attachment 0).Href }}") + img.setAttribute("enlarge", "0") + img.setAttribute("attachment", "{{ proxy (index .Attachment 0).Href }}") + {{ if .Preview.Href }} + img.setAttribute("src", "{{ proxy .Preview.Href }}") + img.setAttribute("preview", "{{ proxy .Preview.Href }}") + {{ else }} + img.setAttribute("src", "{{ proxy (index .Attachment 0).Href }}") + img.setAttribute("preview", "{{ proxy (index .Attachment 0).Href }}") + {{ end }} media.appendChild(img) } |