summaryrefslogtreecommitdiffstats
path: root/templates/base
diff options
context:
space:
mode:
Diffstat (limited to 'templates/base')
-rw-r--r--templates/base/head.tmpl5
-rw-r--r--templates/base/head_navbar.tmpl11
2 files changed, 10 insertions, 6 deletions
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl
index e0765d59d3..2d7d737a00 100644
--- a/templates/base/head.tmpl
+++ b/templates/base/head.tmpl
@@ -94,6 +94,11 @@
U2F: {{if .RequireU2F}}true{{else}}false{{end}},
Heatmap: {{if .EnableHeatmap}}true{{else}}false{{end}},
heatmapUser: {{if .HeatmapUser}}'{{.HeatmapUser}}'{{else}}null{{end}},
+ NotificationSettings: {
+ MinTimeout: {{NotificationSettings.MinTimeout}},
+ TimeoutStep: {{NotificationSettings.TimeoutStep}},
+ MaxTimeout: {{NotificationSettings.MaxTimeout}},
+ },
};
</script>
<link rel="shortcut icon" href="{{StaticUrlPrefix}}/img/favicon.png">
diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl
index de02bca1f7..cedf29e2e9 100644
--- a/templates/base/head_navbar.tmpl
+++ b/templates/base/head_navbar.tmpl
@@ -46,12 +46,11 @@
<span class="text">
<span class="fitted">{{svg "octicon-bell" 16}}</span>
<span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span>
-
- {{if .NotificationUnreadCount}}
- <span class="ui red label">
- {{.NotificationUnreadCount}}
- </span>
- {{end}}
+ {{$notificationUnreadCount := 0}}
+ {{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}}
+ <span class="ui red label {{if not $notificationUnreadCount}}hidden{{end}} notification_count">
+ {{$notificationUnreadCount}}
+ </span>
</span>
</a>