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}} + + {{end}} {{if .CSRFToken}} {{end}} diff --git a/templates/nav.tmpl b/templates/nav.tmpl index 620643e..8922ba7 100644 --- a/templates/nav.tmpl +++ b/templates/nav.tmpl @@ -2,24 +2,24 @@ {{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
- +
{{EmojiFilter .User.DisplayName .User.Emojis}} - + {{.User.Acct}}
- home - direct - local - twkn - search - about + home + direct + local + twkn + search + about
settings diff --git a/templates/notification.tmpl b/templates/notification.tmpl index 9e1854c..02b3847 100644 --- a/templates/notification.tmpl +++ b/templates/notification.tmpl @@ -5,9 +5,9 @@ Notifications {{if gt .UnreadCount 0}}({{.UnreadCount }}){{end}}
- refresh + refresh {{if .ReadID}} -
+
@@ -19,7 +19,7 @@ {{if eq .Type "follow"}}
@@ -42,7 +42,7 @@ {{else if eq .Type "reblog"}}
- + avatar {{EmojiFilter .Account.DisplayName .Account.Emojis}} @@ -55,7 +55,7 @@ {{else if eq .Type "favourite"}}
- + avatar {{EmojiFilter .Account.DisplayName .Account.Emojis}} @@ -71,7 +71,7 @@ diff --git a/templates/postform.tmpl b/templates/postform.tmpl index d5c1fb9..9c674e9 100644 --- a/templates/postform.tmpl +++ b/templates/postform.tmpl @@ -1,5 +1,5 @@ {{with .Data}} -
+ {{if .ReplyContext}} diff --git a/templates/status.tmpl b/templates/status.tmpl index 536f515..0371a4e 100644 --- a/templates/status.tmpl +++ b/templates/status.tmpl @@ -2,7 +2,7 @@
{{if .Reblog}}
- + avatar {{EmojiFilter .Account.DisplayName .Account.Emojis}} @@ -14,14 +14,14 @@ {{with $s := .Data}}
{{EmojiFilter .Account.DisplayName .Account.Emojis}} - + {{.Account.Acct}}
@@ -33,18 +33,18 @@ source {{if .Muted}} - + {{else}} -
+
{{end}} {{if eq $.Ctx.UserID .Account.ID}} -
+
@@ -55,7 +55,7 @@
{{if .InReplyToID}} @@ -103,7 +103,7 @@ {{end}}
{{if .Poll}} -
+ {{range $i, $o := .Poll.Options}} @@ -139,58 +139,58 @@ {{end}}