aboutsummaryrefslogtreecommitdiff
path: root/static/index.html
diff options
context:
space:
mode:
authorFChannel <>2021-07-03 20:27:51 -0700
committerFChannel <>2021-07-03 20:27:51 -0700
commit2d06abf5049e67e05c068461908c492f43ff4026 (patch)
tree55faa23dee742372bd79bede6eabccf9e1384e0d /static/index.html
parent978dd92272c4e4139820d575094c62a99cd9c470 (diff)
formating changes for local board grid when there is only 1 or 2 boards
Diffstat (limited to 'static/index.html')
-rw-r--r--static/index.html23
1 files changed, 16 insertions, 7 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 @@
<p style="text-align: justify">{{ .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 <a href="https://github.com/FChannel0">https://github.com/FChannel0</a>.</p>
{{ if .Boards }}
+ {{ $l := len .Boards }}
<div style="margin-top:50px;">
- <div style="display: grid;border-right: 2px solid #820404">
+ <div style="display: grid;border-right: 2px solid #820404">
+ {{ if lt $l 2 }}
+ <div style="display: inline-grid; border-bottom: 2px solid #820404;border-left: 2px solid #820404;border-top: 2px solid #820404;"><span style="font-size: 1.5em;font-weight: bold;">Local boards</span></div>
+ {{ else if eq $l 2 }}
+ <div style="display: inline-grid; grid-column: 1 / 3; border-bottom: 2px solid #820404;border-left: 2px solid #820404;border-top: 2px solid #820404;"><span style="font-size: 1.5em;font-weight: bold;">Local boards</span></div>
+ {{ else }}
<div style="display: inline-grid;grid-column: 1 / 4;border-bottom: 2px solid #820404;border-left: 2px solid #820404;border-top: 2px solid #820404;"><span style="font-size: 1.5em;font-weight: bold;">Local boards</span></div>
- {{ range .Boards }}
- <div style="whitespace: nowrap;display: inline-grid;text-align: left;padding: 5px;border-bottom: 2px solid #820404;border-left: 2px solid #820404;"><a href="{{.Location}}"><b>{{.Name}}</b> - {{.PrefName}} {{ if not .Restricted }} [NSFW] {{ end }}</a></div>
- {{ end }}
- {{ range .BoardRemainer }}
+ {{ end }}
+ {{ range .Boards }}
+ <div style="whitespace: nowrap;display: inline-grid;text-align: left;padding: 5px;border-bottom: 2px solid #820404;border-left: 2px solid #820404;"><a href="{{.Location}}"><b>/{{.Name}}/</b> - {{.PrefName}} {{ if not .Restricted }} [NSFW] {{ end }}</a></div>
+ {{ end }}
+ {{ if gt $l 2 }}
+ {{ range .BoardRemainer }}
<div style="whitespace: nowrap;display: inline-grid;text-align: left;padding: 5px;border-bottom: 2px solid #820404;border-left: 2px solid #820404;"></div>
- {{ end }}
- </div>
+ {{ end }}
+ {{ end }}
+ </div>
</div>
{{ end }}