Fix HTML titles in admin panel

This commit is contained in:
Thomas Miceli 2023-04-17 22:13:19 +02:00
parent 4c43f1aa8a
commit c7866e18e4
No known key found for this signature in database
GPG key ID: D86C6F6390AF050F
2 changed files with 23 additions and 18 deletions

View file

@ -20,6 +20,7 @@ var (
func adminIndex(ctx echo.Context) error { func adminIndex(ctx echo.Context) error {
setData(ctx, "title", "Admin panel") setData(ctx, "title", "Admin panel")
setData(ctx, "htmlTitle", "Admin panel")
setData(ctx, "adminHeaderPage", "index") setData(ctx, "adminHeaderPage", "index")
setData(ctx, "opengistVersion", config.OpengistVersion) setData(ctx, "opengistVersion", config.OpengistVersion)
@ -55,6 +56,7 @@ func adminIndex(ctx echo.Context) error {
func adminUsers(ctx echo.Context) error { func adminUsers(ctx echo.Context) error {
setData(ctx, "title", "Users") setData(ctx, "title", "Users")
setData(ctx, "htmlTitle", "Users - Admin panel")
setData(ctx, "adminHeaderPage", "users") setData(ctx, "adminHeaderPage", "users")
pageInt := getPage(ctx) pageInt := getPage(ctx)
@ -72,7 +74,8 @@ func adminUsers(ctx echo.Context) error {
} }
func adminGists(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") setData(ctx, "adminHeaderPage", "gists")
pageInt := getPage(ctx) pageInt := getPage(ctx)

View file

@ -49,24 +49,26 @@
{{ .csrfHtml }} {{ .csrfHtml }}
</form> </form>
<div class="relative my-4"> {{ if or .githubOauth .giteaOauth }}
<div class="absolute inset-0 flex items-center" aria-hidden="true"> <div class="relative my-4">
<div class="w-full border-t border-gray-700"></div> <div class="absolute inset-0 flex items-center" aria-hidden="true">
<div class="w-full border-t border-gray-700"></div>
</div>
</div> </div>
</div> <br />
<br /> <div>
<div class=""> {{ if .githubOauth }}
{{ if .githubOauth }} <a href="/oauth/github" class="block w-full mb-2 text-center whitespace-nowrap text-slate-300{{ if .syncReposFromFS }} text-slate-500 cursor-not-allowed {{ end }}rounded border border-gray-600 bg-gray-800 px-2.5 py-2 text-xs font-medium text-white shadow-sm hover:bg-gray-700 hover:border-gray-500 hover:text-slate-300 focus:outline-none focus:ring-1 focus:border-primary-500 focus:ring-primary-500 leading-3">
<a href="/oauth/github" class="block w-full mb-2 text-center whitespace-nowrap text-slate-300{{ if .syncReposFromFS }} text-slate-500 cursor-not-allowed {{ end }}rounded border border-gray-600 bg-gray-800 px-2.5 py-2 text-xs font-medium text-white shadow-sm hover:bg-gray-700 hover:border-gray-500 hover:text-slate-300 focus:outline-none focus:ring-1 focus:border-primary-500 focus:ring-primary-500 leading-3"> Continue with GitHub account
Continue with GitHub account </a>
</a> {{ end }}
{{ end }} {{ if .giteaOauth }}
{{ if .giteaOauth }} <a href="/oauth/gitea" class="block w-full mb-2 text-center whitespace-nowrap text-slate-300{{ if .syncReposFromFS }} text-slate-500 cursor-not-allowed {{ end }}rounded border border-gray-600 bg-gray-800 px-2.5 py-2 text-xs font-medium text-white shadow-sm hover:bg-gray-700 hover:border-gray-500 hover:text-slate-300 focus:outline-none focus:ring-1 focus:border-primary-500 focus:ring-primary-500 leading-3">
<a href="/oauth/gitea" class="block w-full mb-2 text-center whitespace-nowrap text-slate-300{{ if .syncReposFromFS }} text-slate-500 cursor-not-allowed {{ end }}rounded border border-gray-600 bg-gray-800 px-2.5 py-2 text-xs font-medium text-white shadow-sm hover:bg-gray-700 hover:border-gray-500 hover:text-slate-300 focus:outline-none focus:ring-1 focus:border-primary-500 focus:ring-primary-500 leading-3"> Continue with Gitea account
Continue with Gitea account </a>
</a> {{ end }}
{{ end }} </div>
</div> {{ end }}
</div> </div>
</div> </div>
</div> </div>