diff options
author | FChannel <=> | 2021-02-02 23:28:35 -0800 |
---|---|---|
committer | FChannel <=> | 2021-02-02 23:28:35 -0800 |
commit | 3e42ce191ed9a72ed8aa69ee7819a20bb4d23048 (patch) | |
tree | 7c5427161376bd6e2f18ccf4b92fd6af2ae24fc9 | |
parent | ea664188aa26a55b31c5b789cb4a98e33af7fc99 (diff) |
added rules.html and faq.html change to fit your own instance specs.
-rw-r--r-- | OutboxPost.go | 2 | ||||
-rw-r--r-- | client.go | 2 | ||||
-rw-r--r-- | static/faq.html | 35 | ||||
-rw-r--r-- | static/main.html | 4 | ||||
-rw-r--r-- | static/npost.html | 8 | ||||
-rw-r--r-- | static/posts.html | 4 | ||||
-rw-r--r-- | static/rules.html | 12 |
7 files changed, 59 insertions, 8 deletions
diff --git a/OutboxPost.go b/OutboxPost.go index 9d7c004..6483a27 100644 --- a/OutboxPost.go +++ b/OutboxPost.go @@ -510,7 +510,7 @@ func GetActivityFromJson(r *http.Request, db *sql.DB) Activity { func CheckCaptcha(db *sql.DB, captcha string) bool { parts := strings.Split(captcha, ":") - if strings.Trim(parts[0], " ") == "" { + if strings.Trim(parts[0], " ") == "" || strings.Trim(parts[1], " ") == ""{ return false } @@ -202,7 +202,7 @@ func OutboxGet(w http.ResponseWriter, r *http.Request, db *sql.DB, collection Co for i := 0.0; i < pageLimit; i++ { pages = append(pages, int(i)) } - + returnData.Pages = pages returnData.TotalPage = len(returnData.Pages) - 1 diff --git a/static/faq.html b/static/faq.html new file mode 100644 index 0000000..0d929f9 --- /dev/null +++ b/static/faq.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html> + <body style="background-color:#ffffee; max-width: 800px; margin: 0 auto;"> + <a style="color: black;" href="javascript:history.back()">[Back]</a> + <h1 style="text-align: center;">FAQ</h1> + <div> + <h4>What is fchan</h4> + <p>fchan short for fchannel and is a federated image board based on activity pub. it removes the centralization aspect that so many of us have become accustom to. it is not trying to re-invent the wheel and draws likeness from other chans for ease of familiarity. you can get the source code here https://github.com/FChannel0 any help is appreciated.</p> + + <h4>Options</h4> + <p>the options field when posting can be used for special options when posting. type noko in the options field to return to the thread you posting to. use sage to ignore updating the thread bump order. nokosage will do both.</p> + + <h4>Tripcode</h4> + <p>you can identify yourself with a tripcode by adding a hash mark (#) after your name followed by your unique identifying string, example anon#myunique.</p> + + <h4>Quote</h4> + <p>use a greater than symbols (>) to quote strings of text. use double (>>) followed by the url id of the post you are referencing (this will be changed later for better use).</p> + + <h4>No. Link</h4> + <p>click on "No." next to a post to view its thread.</p> + + <h4>Uploading files</h4> + <p>max file size is 7MB. the supported file types are "image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/avif","image/apng","video/mp4","video/ogg","video/webm","audio/mpeg","audio/ogg","audio/wav", "audio/wave", "audio/x-wav". these were choosen based on browser support for embeding</p> + + <h4>JavaScript why?</h4> + <p>a version of the client with no javascript will be made eventually. current version requires it, because of basic functionality needed. no libraries or frameworks for javascript is used besides ECMAScript, just basic selection of DOM elements and modifying their styling. maybe someone would be willing to make a client that uses no javascript.</p> + + <h4>Why are the posts not sequential numbers?</h4> + <p>sequential numbers have run their course. random base 16 (now base 36) is better.</p> + + <h4>Activitypub specific examples</h4> + <p>coming soon(tm).</p> + </div> + </body> +</html> diff --git a/static/main.html b/static/main.html index 2f0cb40..59852ed 100644 --- a/static/main.html +++ b/static/main.html @@ -76,6 +76,10 @@ {{ template "content" . }} {{ template "bottom" . }} + <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> + <p>All media are copyright to their respective owners.</p> + </div> </body> </html> diff --git a/static/npost.html b/static/npost.html index dd5c898..6c837cf 100644 --- a/static/npost.html +++ b/static/npost.html @@ -23,10 +23,10 @@ <li style="display: inline"><a id="bottom" href="#top">[Top]</a></li> <li style="display: inline"><a href="javascript:location.reload()">[Refresh]</a></li> </ul> -<div style=": inline; text-align: center;"> - <span><a id="reply-content" href="javascript:quote('{{ $board.Actor }}', '{{ (index .Posts 0).Id }}', 'reply')">[Post a Reply]</a></span> - {{ $replies := (index .Posts 0).Replies }} - <span style="float: right;">{{ $replies.TotalItems }} / {{ $replies.TotalImgs }}</span> +{{ $replies := (index .Posts 0).Replies }} +<span style="float: right;">{{ $replies.TotalItems }} / {{ $replies.TotalImgs }}</span> +<div style="width: 500px; margin: 0 auto; text-align: center;"> + <span ><a id="reply-content" href="javascript:quote('{{ $board.Actor }}', '{{ (index .Posts 0).Id }}', 'reply')">[Post a Reply]</a></span> </div> <hr> {{ end }} diff --git a/static/posts.html b/static/posts.html index 086c5b5..6bdc7b5 100644 --- a/static/posts.html +++ b/static/posts.html @@ -105,7 +105,7 @@ if(getMIMEType({{ (index .Attachment 0).MediaType }}) == "audio"){ var audio = document.createElement("audio") audio.controls = 'controls' - audio.preload = 'metadata' + audio.preload = 'none' audio.src = '{{ (index .Attachment 0).Href }}' audio.type = '{{ (index .Attachment 0).MediaType }}' audio.style = "float: left; margin-right: 10px; margin-bottom: 10px; width: 250px;" @@ -116,7 +116,7 @@ if(getMIMEType({{ (index .Attachment 0).MediaType }}) == "video"){ var video = document.createElement("video") video.controls = 'controls' - video.preload = 'metadata' + video.preload = 'none' video.muted = 'muted' video.src = '{{ (index .Attachment 0).Href }}' video.type = '{{ (index .Attachment 0).MediaType }}' diff --git a/static/rules.html b/static/rules.html new file mode 100644 index 0000000..574435a --- /dev/null +++ b/static/rules.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html> + <body style="background-color:#ffffee; max-width: 800px; margin: 0 auto;"> + <a style="color: black;" href="javascript:history.back()">[Back]</a> + <h1 style="text-align: center;">Rules and Agreements:</h1> + <ol> + <li>Do not break or violate United States laws.</li> + <li>Age Restriction is 18 years and older.</li> + <li>Any blue boards are restricted to work safe posts only.</li> + </ol> + </body> +</html> |