dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit b2aeb40f939608d5da981166ad1af520d562f445
parent 9056a6d5e52d5679e2c76c2c8585793c603506ee
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Thu, 22 Jun 2023 01:06:11 -0700

configurable git url

Diffstat:
Mpkg/template/templates.go | 2++
Mpkg/web/public/views/pages/index.gohtml | 2+-
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/pkg/template/templates.go b/pkg/template/templates.go @@ -59,6 +59,7 @@ type templateDataStruct struct { InboxCount int64 WallpaperImg string IsAprilFool2023 bool + GitURL string } // Render render a template @@ -86,6 +87,7 @@ func (t *Templates) Render(w io.Writer, name string, data any, c echo.Context) e d.BaseKeywords = strings.Join(getBaseKeywords(), ", ") d.Development = config.Development.Load() d.AuthUser = c.Get("authUser").(*database.User) + d.GitURL = config.DkfGitOnion d.WallpaperImg = "/public/img/login_bg.jpg" year, month, day := time.Now().UTC().Date() diff --git a/pkg/web/public/views/pages/index.gohtml b/pkg/web/public/views/pages/index.gohtml @@ -45,7 +45,7 @@ <li class="nav-item"><a class="nav-link" href="/chess">{{ t "Chess" . }}</a></li> <li class="nav-item"><a class="nav-link" href="/vip">{{ t "VIP" . }}</a></li> <li class="nav-item"><a class="nav-link" href="/club">{{ t "Club" . }}</a></li> - <li class="nav-item"><a class="nav-link" href="http://git.dkforestseeaaq2dqz2uflmlsybvnq2irzn4ygyvu53oazyorednviid.onion" rel="noopener noreferrer" target="_blank">{{ t "Git" . }}</a></li> + <li class="nav-item"><a class="nav-link" href="{{ .GitURL }}" rel="noopener noreferrer" target="_blank">{{ t "Git" . }}</a></li> {{ end }} </ul> {{ end }}