mirror of
https://github.com/eduardolat/pgbackweb.git
synced 2026-01-26 06:29:03 -06:00
Fix html title between pages
This commit is contained in:
@@ -15,15 +15,16 @@ type DashboardParams struct {
|
||||
}
|
||||
|
||||
func Dashboard(reqCtx reqctx.Ctx, params DashboardParams) gomponents.Node {
|
||||
if reqCtx.IsHTMXBoosted {
|
||||
return component.RenderableGroup(params.Body)
|
||||
}
|
||||
|
||||
title := "PG Back Web"
|
||||
if params.Title != "" {
|
||||
title = params.Title + " - " + title
|
||||
}
|
||||
|
||||
if reqCtx.IsHTMXBoosted {
|
||||
body := append(params.Body, html.TitleEl(gomponents.Text(title)))
|
||||
return component.RenderableGroup(body)
|
||||
}
|
||||
|
||||
return components.HTML5(components.HTML5Props{
|
||||
Language: "en",
|
||||
Title: title,
|
||||
|
||||
Reference in New Issue
Block a user