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 --- 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 +++++++------- 8 files changed, 36 insertions(+), 30 deletions(-) (limited to 'static') 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" }} {{ .Title }} - + @@ -21,23 +21,17 @@

{{ .Title }}

-
- - +
{{ range $i, $e := .NewsItems }} -
- - +
+

{{unixtoreadable $e.Time}} - {{$e.Title}}{{ if $.Board.ModCred }} [Delete] {{end}}

+
+ +

{{$e.Content}}

+
{{ end }} -
-
- {{ if $.Board.ModCred }}[Delete] {{end}} - {{unixtoreadable $e.Time}} - {{$e.Title}} -

{{$e.Content}}

-
-
- +
{{ end }} {{ define "bottom" }}{{ end }} diff --git a/static/css/themes/default.css b/static/css/themes/default.css index 24e85e6..ac332f1 100644 --- a/static/css/themes/default.css +++ b/static/css/themes/default.css @@ -151,7 +151,6 @@ a.reply { .newsbox-news { text-align: left; - margin-left: 25px; margin-top: 25px; padding: 25px; } @@ -160,3 +159,8 @@ a.reply { .newsbox-news h3 { margin: 0; } + +#stopTablePost { + float: right; + display: none; +} diff --git a/static/css/themes/gruvbox.css b/static/css/themes/gruvbox.css index fb40267..681991c 100644 --- a/static/css/themes/gruvbox.css +++ b/static/css/themes/gruvbox.css @@ -107,6 +107,7 @@ input[type="text"] { width: min-content; z-index: 9; display: block; + min-width: 300px; } /* TODO: rename */ @@ -129,7 +130,6 @@ input[type="text"] { .newsbox-news { text-align: left; background-color: #504945; - margin-left: 25px; margin-top: 25px; padding: 25px; } @@ -138,3 +138,8 @@ input[type="text"] { .newsbox-news h3 { margin: 0; } + +#stopTablePost { + float: right; + display: none; +} diff --git a/static/index.html b/static/index.html index 8f1d53b..b5fb93c 100644 --- a/static/index.html +++ b/static/index.html @@ -54,10 +54,8 @@

{{$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" . }} +
Theme: - [X] + [X] @@ -61,9 +61,9 @@ {{ if eq (index .Posts 0).Type "Note" }} {{ if .Board.InReplyTo }} - + {{ else }} - + {{ end }} {{ $len := len .Posts }}
@@ -73,7 +73,7 @@ - [X] + [X] -- cgit v1.2.3 From 8d28fd2ad688051fe06813026d82661b76617602 Mon Sep 17 00:00:00 2001 From: KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> Date: Fri, 20 Aug 2021 16:38:18 -0300 Subject: grid theme, fix close button in table, post popup --- static/css/themes/default.css | 33 ++++++++++++++++++++++++++++++++- static/css/themes/gruvbox.css | 34 ++++++++++++++++++++++++++++++++-- static/index.html | 12 ++++++------ static/js/posts.js | 4 ++-- static/main.html | 11 +++++------ 5 files changed, 77 insertions(+), 17 deletions(-) (limited to 'static') diff --git a/static/css/themes/default.css b/static/css/themes/default.css index ac332f1..8b93e51 100644 --- a/static/css/themes/default.css +++ b/static/css/themes/default.css @@ -126,7 +126,8 @@ a.reply { } .popup-box { - position: absolute; + position: fixed; + min-width: 300px; width: min-content; z-index: 9; display: block; @@ -164,3 +165,33 @@ a.reply { float: right; display: none; } + +#boardGrid { + display: grid; + grid-auto-columns: 1fr; + border: 4px solid #820404; + background-color: #f9f9e0; +} + +#boardGridHeader { + border-bottom: 2px solid #820404; + display: inline-grid; +} + +.boardGridCell { + white-space: nowrap; + display: inline-grid; + text-align: left; + padding: 5px; + border-top: 2px solid #820404; + border-left: 2px solid #820404; +} + +/* these may or may not work. my CSS is poor so i just kinda did stuff until it worked. */ +.boardGridCell:nth-child(-n+4) { + border-top: none; +} + +.boardGridCell:nth-child(3n+2) { + border-left: none; +} diff --git a/static/css/themes/gruvbox.css b/static/css/themes/gruvbox.css index 681991c..b534bed 100644 --- a/static/css/themes/gruvbox.css +++ b/static/css/themes/gruvbox.css @@ -103,11 +103,11 @@ input[type="text"] { } .popup-box { - position: absolute; + position: fixed; + min-width: 300px; width: min-content; z-index: 9; display: block; - min-width: 300px; } /* TODO: rename */ @@ -143,3 +143,33 @@ input[type="text"] { float: right; display: none; } + +#boardGrid { + display: grid; + grid-auto-columns: 1fr; + border: 4px solid #928374; + background-color: #3c3836; +} + +#boardGridHeader { + border-bottom: 2px solid #928374; + display: inline-grid; +} + +.boardGridCell { + white-space: nowrap; + display: inline-grid; + text-align: left; + padding: 5px; + border-top: 2px solid #928374; + border-left: 2px solid #928374; +} + +/* these may or may not work. my CSS is poor so i just kinda did stuff until it worked. */ +.boardGridCell:nth-child(-n+4) { + border-top: none; +} + +.boardGridCell:nth-child(3n+2) { + border-left: none; +} diff --git a/static/index.html b/static/index.html index b5fb93c..d45dd77 100644 --- a/static/index.html +++ b/static/index.html @@ -25,20 +25,20 @@ {{ if .Boards }} {{ $l := len .Boards }}
-
+
{{ if lt $l 2 }} -
Local boards
+
Local boards
{{ else if eq $l 2 }} -
Local boards
+
Local boards
{{ else }} -
Local boards
+
Local boards
{{ end }} {{ range .Boards }} - + {{ end }} {{ if gt $l 2 }} {{ range .BoardRemainer }} -
+
{{ end }} {{ end }}
diff --git a/static/js/posts.js b/static/js/posts.js index 39808dd..29541c0 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -2,14 +2,14 @@ function startNewPost(){ var el = document.getElementById("newpostbtn"); el.style="display:none;"; el.setAttribute("state", "1"); - document.getElementById("stopTablePost").style=""; document.getElementById("newpost").style = ""; + document.getElementById("stopTablePost").style = "display:unset;"; sessionStorage.setItem("newpostState", true); } function stopNewPost(){ var el = document.getElementById("newpostbtn"); - el.style="display:block;"; + el.style="display:block;margin-bottom:100px;"; el.setAttribute("state", "0"); document.getElementById("newpost").style = "display: none;"; sessionStorage.setItem("newpostState", false); diff --git a/static/main.html b/static/main.html index 2b708e9..3e29053 100644 --- a/static/main.html +++ b/static/main.html @@ -41,7 +41,11 @@ {{ template "bottom" . }} -
+
+ [Home][Rules][FAQ] +

All trademarks and copyrights on this page are owned by their respective parties.

+
+
Theme:
-
- [Home][Rules][FAQ] -

All trademarks and copyrights on this page are owned by their respective parties.

-
- {{ template "script" . }} -- cgit v1.2.3