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/index.html | 23 ++++++++++++++++------- static/main.html | 4 +++- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/static/index.html b/static/index.html index bd90059..d7374f1 100644 --- a/static/index.html +++ b/static/index.html @@ -23,16 +23,25 @@

{{ .PreferredUsername }} is a federated image board based on activitypub. The current version of the code running the server is still a work in progress, expect a bumpy ride for the time being. Get the server code at https://github.com/FChannel0.

{{ if .Boards }} + {{ $l := len .Boards }}
-
+
+ {{ if lt $l 2 }} +
Local boards
+ {{ else if eq $l 2 }} +
Local boards
+ {{ else }}
Local boards
- {{ range .Boards }} -
{{.Name}} - {{.PrefName}} {{ if not .Restricted }} [NSFW] {{ end }}
- {{ end }} - {{ range .BoardRemainer }} + {{ end }} + {{ range .Boards }} +
/{{.Name}}/ - {{.PrefName}} {{ if not .Restricted }} [NSFW] {{ end }}
+ {{ end }} + {{ if gt $l 2 }} + {{ range .BoardRemainer }}
- {{ end }} -
+ {{ end }} + {{ end }} +
{{ end }} 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 @@