From 683de5193680d4c8d9df2b273daa17b4c4f847d7 Mon Sep 17 00:00:00 2001 From: KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> Date: Fri, 20 Aug 2021 14:51:43 -0300 Subject: fix a couple problems --- client.go | 2 +- main.go | 2 +- static/anews.html | 24 +++++++++--------------- static/css/themes/default.css | 6 +++++- static/css/themes/gruvbox.css | 7 ++++++- static/index.html | 2 -- static/js/posts.js | 1 + static/main.html | 4 +++- static/news.html | 8 +++++--- static/top.html | 14 +++++++------- 10 files changed, 38 insertions(+), 32 deletions(-) diff --git a/client.go b/client.go index 09db0bf..8230765 100644 --- a/client.go +++ b/client.go @@ -156,7 +156,7 @@ func IndexGet(w http.ResponseWriter, r *http.Request, db *sql.DB) { func NewsGet(w http.ResponseWriter, r *http.Request, db *sql.DB, timestamp int) { t := template.Must(template.New("").Funcs(template.FuncMap{ - "sub": mod, + "sub": sub, "unixtoreadable": unixToReadable}).ParseFiles("./static/main.html", "./static/news.html")) actor := GetActorFromDB(db, Domain) diff --git a/main.go b/main.go index abce30d..922d74d 100644 --- a/main.go +++ b/main.go @@ -96,7 +96,7 @@ func main() { } for _, f := range themes { - if f.Name() == "default" { + if f.Name() == "default.css" { continue } diff --git a/static/anews.html b/static/anews.html index 5ebe1cc..355f310 100644 --- a/static/anews.html +++ b/static/anews.html @@ -1,6 +1,6 @@ {{ define "header" }}
-
- {{ if $.Board.ModCred }}[Delete] {{end}}
- {{unixtoreadable $e.Time}} - {{$e.Title}}
-
- {{$e.Content}} - |
-
{{$e.Content}}
- {{ end }} - {{ end }} diff --git a/static/js/posts.js b/static/js/posts.js index 30f4893..39808dd 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -2,6 +2,7 @@ function startNewPost(){ var el = document.getElementById("newpostbtn"); el.style="display:none;"; el.setAttribute("state", "1"); + document.getElementById("stopTablePost").style=""; document.getElementById("newpost").style = ""; sessionStorage.setItem("newpostState", true); } diff --git a/static/main.html b/static/main.html index 794a602..2b708e9 100644 --- a/static/main.html +++ b/static/main.html @@ -10,7 +10,7 @@ {{ range .Themes }} - + {{ end }} {{ template "header" . }} @@ -41,9 +41,11 @@ {{ template "bottom" . }} +