diff --git a/renderer/model.go b/renderer/model.go index 45d3117..0d89af7 100644 --- a/renderer/model.go +++ b/renderer/model.go @@ -25,6 +25,7 @@ type CommonData struct { CustomCSS string CSRFToken string AutoRefresh bool + Target string } type ErrorData struct { diff --git a/service/service.go b/service/service.go index 9e01509..4316f86 100644 --- a/service/service.go +++ b/service/service.go @@ -189,6 +189,7 @@ func (svc *service) ServeNavPage(ctx context.Context, c *model.Client) (err erro } commonData := svc.getCommonData(ctx, c, "Nav") + commonData.Target = "main" data := &renderer.NavData{ User: u, CommonData: commonData, @@ -422,6 +423,7 @@ func (svc *service) ServeNotificationPage(ctx context.Context, c *model.Client, commonData := svc.getCommonData(ctx, c, "notifications") commonData.AutoRefresh = c.Session.Settings.AutoRefreshNotifications + commonData.Target = "main" data := &renderer.NotificationData{ Notifications: notifications, UnreadCount: unreadCount, diff --git a/templates/header.tmpl b/templates/header.tmpl index 76831f2..ca2986d 100644 --- a/templates/header.tmpl +++ b/templates/header.tmpl @@ -4,6 +4,9 @@
+ {{if .Target}} +