From c7866e18e49899cc94a08224cff062fe301d0b28 Mon Sep 17 00:00:00 2001 From: Thomas Miceli Date: Mon, 17 Apr 2023 22:13:19 +0200 Subject: [PATCH] Fix HTML titles in admin panel --- internal/web/admin.go | 5 ++++- templates/pages/auth_form.html | 36 ++++++++++++++++++---------------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/internal/web/admin.go b/internal/web/admin.go index 88b62b0..4b7e2b0 100644 --- a/internal/web/admin.go +++ b/internal/web/admin.go @@ -20,6 +20,7 @@ var ( func adminIndex(ctx echo.Context) error { setData(ctx, "title", "Admin panel") + setData(ctx, "htmlTitle", "Admin panel") setData(ctx, "adminHeaderPage", "index") setData(ctx, "opengistVersion", config.OpengistVersion) @@ -55,6 +56,7 @@ func adminIndex(ctx echo.Context) error { func adminUsers(ctx echo.Context) error { setData(ctx, "title", "Users") + setData(ctx, "htmlTitle", "Users - Admin panel") setData(ctx, "adminHeaderPage", "users") pageInt := getPage(ctx) @@ -72,7 +74,8 @@ func adminUsers(ctx echo.Context) error { } func adminGists(ctx echo.Context) error { - setData(ctx, "title", "Users") + setData(ctx, "title", "Gists") + setData(ctx, "htmlTitle", "Gists - Admin panel") setData(ctx, "adminHeaderPage", "gists") pageInt := getPage(ctx) diff --git a/templates/pages/auth_form.html b/templates/pages/auth_form.html index 0abae36..18cedd2 100644 --- a/templates/pages/auth_form.html +++ b/templates/pages/auth_form.html @@ -49,24 +49,26 @@ {{ .csrfHtml }} -
- -
-
- {{ if .githubOauth }} - - Continue with GitHub account - - {{ end }} - {{ if .giteaOauth }} - - Continue with Gitea account - - {{ end }} -
+
+
+ {{ if .githubOauth }} + + Continue with GitHub account + + {{ end }} + {{ if .giteaOauth }} + + Continue with Gitea account + + {{ end }} +
+ {{ end }}