flounder

A simple gemini site builder
git clone git://git.alexwennerberg.com/flounder
Log | Files | Refs | README | LICENSE

commit 64f9da6778b41e22f6d231c9616e0696b06dc00a
parent 8d8f8bead8394796455588fc6c5095d808338538
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Fri, 30 Sep 2022 21:58:56 -0700

all users -> some users on home page

Diffstat:
Mdb.go | 2+-
Mtemplates/index.gmi | 2+-
Mtemplates/index.html | 4++--
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/db.go b/db.go @@ -90,7 +90,7 @@ type User struct { } func getActiveUserNames() ([]string, error) { - rows, err := DB.Query(`SELECT username from user WHERE active is true order by username`) + rows, err := DB.Query(`SELECT username from user WHERE active is true order by random() limit 10`) if err != nil { return nil, err } diff --git a/templates/index.gmi b/templates/index.gmi @@ -10,6 +10,6 @@ Welcome to {{.SiteTitle}}, a free home for Gemini capsules. {{.SiteTitle}} hosts {{range .Files}}=> gemini://{{.Creator}}.{{$host}}/{{.Name}} {{.Creator}}: {{.Name}} ({{.TimeAgo}}) {{end}} -## All Users: +## Some users: {{range .Users}}=> gemini://{{.}}.{{$host}} {{end}} diff --git a/templates/index.html b/templates/index.html @@ -3,7 +3,7 @@ {{template "nav.html" .}} <br> <p> -Welcome to {{.Config.SiteTitle}}, a <a href="/register">free</a> web interface for <a href="https://gemini.circumlunar.space/">Gemini</a> capsules. For more information and site updates, check out the <a href="//admin.{{$.Config.Host}}">admin page</a> and <a href="https://lists.flounder.online/flounder/">mailing list archive</a>.</p> +Welcome to {{.Config.SiteTitle}}, a <a href="/register">free</a> web interface for <a href="https://gemini.circumlunar.space/">Gemini</a> capsules. For more information and site updates, check out the <a href="//admin.{{$.Config.Host}}">admin page</a> and <a href="https://lists.sr.ht/~aw/flounder">list archive</a>.</p> <h2>Recently updated pages:</h2> {{ range .Files }} <div class="indent-wrap"> @@ -13,7 +13,7 @@ Welcome to {{.Config.SiteTitle}}, a <a href="/register">free</a> web interface f </div> {{end}} <br> -<h2>All users:</h2> +<h2>Some users:</h2> {{ range .Users}} <a href="//{{$.Config.Host}}/updates/{{.}}" class='person-link'>{{.}}</a> {{end}}