diff options
author | FChannel <> | 2021-10-24 10:40:45 -0700 |
---|---|---|
committer | FChannel <> | 2022-06-19 12:53:29 -0700 |
commit | 48fefb76c0a908cc3fa00abc9c090ce3ac8cb560 (patch) | |
tree | a7a24aec9f43222949e1f004fd5cd8a247e5024e /views/index.html | |
parent | 65e79e6a743f447f320595dafec530212a568b9d (diff) |
gofiber conversion, index, board posts, board post hooked up
Diffstat (limited to 'views/index.html')
-rw-r--r-- | views/index.html | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/views/index.html b/views/index.html new file mode 100644 index 0000000..f426d5d --- /dev/null +++ b/views/index.html @@ -0,0 +1,53 @@ +<div style="text-align: center; max-width: 800px; margin: 0 auto;"> + <h1>{{ .page.Title }}</h1> + <p style="text-align: justify">{{ .page.PreferredUsername }} is a federated image board based on <a href="https://activitypub.rocks/">ActivityPub</a>. The current version of the code running on the server is still a work-in-progress product, expect a bumpy ride for the time being. Get the server code here: <a href="https://github.com/FChannel0">https://github.com/FChannel0</a>.</p> + + {{ if .page.Boards }} + {{ $l := len .page.Boards }} + <div style="margin-top:50px;"> + <div id="boardGrid"> + {{ if lt $l 2 }} + <div id="boardGridHeader"><span style="font-size: 1.5em;font-weight: bold;">Local boards</span></div> + {{ else if eq $l 2 }} + <div id="boardGridHeader" style="grid-column: 1 / 3;"><span style="font-size: 1.5em;font-weight: bold;">Local boards</span></div> + {{ else }} + <div id="boardGridHeader" style="grid-column: 1 / 4;"><span style="font-size: 1.5em;font-weight: bold;">Local boards</span></div> + {{ end }} + {{ range .page.Boards }} + <div class="boardGridCell"><a href="{{.Location}}"><b>/{{.Name}}/</b> - {{.PrefName}} {{ if not .Restricted }} [NSFW] {{ end }}</a></div> + {{ end }} + {{ if gt $l 2 }} + {{ range .page.BoardRemainer }} + <div class="boardGridCell"></div> + {{ end }} + {{ end }} + </div> + </div> + {{ end }} + + {{ if .page.NewsItems }} + <div class="newsbox" style="margin-top:50px;"> + <h2><a href="/news">{{ .page.PreferredUsername }} News</a></h2> + {{ range $i, $e := .page.NewsItems }} + <div class="newsbox-news"> + <h3><a href="/news/{{.Time}}">{{unixtoreadable $e.Time}} - {{$e.Title}}</a>{{ if $.Board.ModCred }} <a href="/{{ $.Key }}/newsdelete/{{ $e.Time }}">[Delete] </a>{{end}}</h3> + <br> + + <p>{{$e.Content}}</p> + </div> + {{ end }} + </div> + {{ end }} + + <div class="box2" style="margin-top:50px;"> + <h4 style="margin-bottom:5px;">Current known instances</h4> + <span>(always use a proxy)</span> + <table style="text-align: left; margin: 25px;"> + {{ range .page.InstanceIndex }} + <tr> + <td><a href="{{ .Id }}">{{ .Id }}</a></td> + </tr> + {{ end }} + </table> + </div> +</div> |