From 44f5dd0279b18989dda5123f582e01af6cedb810 Mon Sep 17 00:00:00 2001
From: knotteye <knotteye@airmail.cc>
Date: Fri, 2 Jul 2021 10:24:38 -0500
Subject: Alert user to bad captcha instead of changing the page

---
 static/main.html | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

(limited to 'static/main.html')

diff --git a/static/main.html b/static/main.html
index 72ed321..af9947f 100644
--- a/static/main.html
+++ b/static/main.html
@@ -7,7 +7,38 @@
     <meta name="keywords" content="Federated Imageboard based on Activtypub">    
     <meta property="og:locale" content="en_US" />
     <meta property="og:type" content="website" />
-    <link rel="icon" type="image/png"  href="/static/favicon.png">    
+    <link rel="icon" type="image/png"  href="/static/favicon.png">
+    <script>
+    window.addEventListener('DOMContentLoaded', function(){
+      var np = document.getElementById("new-post")
+      if(np){
+        np.setAttribute("onsubmit", "validatePost(this);return false;")
+      }
+      var np = document.getElementById("reply-post")
+      if(np){
+        np.setAttribute("onsubmit", "validatePost(this);return false;")
+      }
+      var np = document.getElementById("report-post")
+      if(np){
+        np.setAttribute("onsubmit", "validatePost(this);return false;")
+      }
+    })
+    function validatePost(form)
+    {
+      var data = new FormData(form)
+      fetch(form.action, {
+        method: "POST",
+        body: data
+      }).then((r) => {
+        if(r.redirected){
+          document.location = r.url
+        } else {
+          r.text().then((t) => {alert(t)})
+        }
+      })
+      return false
+    }
+    </script>
     <style>
       a, a:link, a:visited, a:hover, a:active {
           text-decoration: none
-- 
cgit v1.2.3


From 9bd4e03d926c045dc82ce844cb02b078843ce787 Mon Sep 17 00:00:00 2001
From: FChannel <>
Date: Fri, 2 Jul 2021 13:40:12 -0700
Subject: removed javascript for post validation because it broke board
 creation

---
 static/main.html | 31 -------------------------------
 1 file changed, 31 deletions(-)

(limited to 'static/main.html')

diff --git a/static/main.html b/static/main.html
index af9947f..70e3c23 100644
--- a/static/main.html
+++ b/static/main.html
@@ -8,37 +8,6 @@
     <meta property="og:locale" content="en_US" />
     <meta property="og:type" content="website" />
     <link rel="icon" type="image/png"  href="/static/favicon.png">
-    <script>
-    window.addEventListener('DOMContentLoaded', function(){
-      var np = document.getElementById("new-post")
-      if(np){
-        np.setAttribute("onsubmit", "validatePost(this);return false;")
-      }
-      var np = document.getElementById("reply-post")
-      if(np){
-        np.setAttribute("onsubmit", "validatePost(this);return false;")
-      }
-      var np = document.getElementById("report-post")
-      if(np){
-        np.setAttribute("onsubmit", "validatePost(this);return false;")
-      }
-    })
-    function validatePost(form)
-    {
-      var data = new FormData(form)
-      fetch(form.action, {
-        method: "POST",
-        body: data
-      }).then((r) => {
-        if(r.redirected){
-          document.location = r.url
-        } else {
-          r.text().then((t) => {alert(t)})
-        }
-      })
-      return false
-    }
-    </script>
     <style>
       a, a:link, a:visited, a:hover, a:active {
           text-decoration: none
-- 
cgit v1.2.3


From cf86acee94652ac7cd8e8f313e6abf6c9901c398 Mon Sep 17 00:00:00 2001
From: FChannel <>
Date: Sat, 3 Jul 2021 18:39:34 -0700
Subject: add some styling to news pull request

---
 static/main.html | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

(limited to 'static/main.html')

diff --git a/static/main.html b/static/main.html
index 70e3c23..00b395f 100644
--- a/static/main.html
+++ b/static/main.html
@@ -40,6 +40,14 @@
           background-color: #f9f9e0;
           {{ end }}
       }
+
+      .box {
+          {{ if .Board.Restricted }}
+          background-color: #eff5ff;
+          {{ else }}
+          background-color: #f9f9e0;
+          {{ end }}
+      }      
       
       .quote {
           color: #789922;
@@ -76,8 +84,15 @@
   </head>
   <body>
     <ul style="display: inline; padding:0;">
-      {{range .Boards}}
-      <li style="display: inline;"><a href="{{.Location}}">{{.Name}}</a></li>
+      {{ $l := len .Boards }}
+      {{range $i, $e := .Boards}}
+      {{ if eq $i 0 }}
+      <li style="display: inline;">[<a href="{{.Location}}">{{$e.Name}} </a>/</li>
+      {{ else if eq $i (sub $l 1) }}
+      <li style="display: inline;"><a href="{{.Location}}">{{$e.Name}}</a>]</li>
+      {{ else }}
+      <li style="display: inline;"><a href="{{.Location}}">{{$e.Name}} </a>/</li>      
+      {{ end }}
       {{end}}
     </ul>
     {{ if .Board.ModCred }}
-- 
cgit v1.2.3


From 2d06abf5049e67e05c068461908c492f43ff4026 Mon Sep 17 00:00:00 2001
From: FChannel <>
Date: Sat, 3 Jul 2021 20:27:51 -0700
Subject: formating changes for local board grid when there is only 1 or 2
 boards

---
 static/main.html | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'static/main.html')

diff --git a/static/main.html b/static/main.html
index 00b395f..ba7e7f5 100644
--- a/static/main.html
+++ b/static/main.html
@@ -86,7 +86,9 @@
     <ul style="display: inline; padding:0;">
       {{ $l := len .Boards }}
       {{range $i, $e := .Boards}}
-      {{ if eq $i 0 }}
+      {{ if eq (sub $l 1) 0 }}
+      <li style="display: inline;">[ <a href="{{.Location}}">{{$e.Name}} </a>]</li>      
+      {{ else if eq $i 0 }}
       <li style="display: inline;">[<a href="{{.Location}}">{{$e.Name}} </a>/</li>
       {{ else if eq $i (sub $l 1) }}
       <li style="display: inline;"><a href="{{.Location}}">{{$e.Name}}</a>]</li>
-- 
cgit v1.2.3