Skip to content

Commit 039a602

Browse files
zeripathtyroneyeh
andauthored
Make notification bell more prominent on mobile (#20108, #20236, #20251) (#20269)
Backport #20108 Backport #20236 Backport #20251 Make notification bell more prominent on mobile Co-authored-by: Andrew Thornton <[email protected]> Co-authored-by: Tyrone Yeh <[email protected]> Signed-off-by: Andrew Thornton <[email protected]>
1 parent 654c173 commit 039a602

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

Diff for: templates/base/head_navbar.tmpl

+15-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
<div class="ui container" id="navbar">
2+
{{$notificationUnreadCount := 0}}
3+
{{if .IsSigned}}
4+
{{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}}
5+
{{end}}
26
<div class="item brand" style="justify-content: space-between;">
37
<a href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{.i18n.Tr "dashboard"}}{{else}}{{.i18n.Tr "home"}}{{end}}">
48
<img class="ui mini image" width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{.i18n.Tr "logo"}}" aria-hidden="true">
59
</a>
10+
{{if .IsSigned}}
11+
<a href="{{AppSubUrl}}/notifications" class="tooltip mobile-only" data-content='{{.i18n.Tr "notifications"}}'>
12+
<span class="text black">
13+
<span class="fitted">{{svg "octicon-bell"}}</span>
14+
<span class="ui red label mini{{if not $notificationUnreadCount}} hidden{{end}} notification_count">
15+
{{$notificationUnreadCount}}
16+
</span>
17+
</span>
18+
</a>
19+
{{end}}
620
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
721
<i class="sidebar icon"></i>
822
</div>
@@ -100,12 +114,9 @@
100114
</div>
101115
</div>
102116

103-
<a href="{{AppSubUrl}}/notifications" class="item tooltip" data-content='{{.i18n.Tr "notifications"}}'>
117+
<a href="{{AppSubUrl}}/notifications" class="item tooltip not-mobile" data-content='{{.i18n.Tr "notifications"}}'>
104118
<span class="text">
105119
<span class="fitted">{{svg "octicon-bell"}}</span>
106-
<span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span>
107-
{{$notificationUnreadCount := 0}}
108-
{{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}}
109120
<span class="ui red label {{if not $notificationUnreadCount}}hidden{{end}} notification_count">
110121
{{$notificationUnreadCount}}
111122
</span>

Diff for: web_src/less/_base.less

+2-2
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,7 @@ footer {
13291329
@media @mediaMdAndUp {
13301330
.mobile-only,
13311331
.ui.button.mobile-only {
1332-
display: none;
1332+
display: none !important;
13331333
}
13341334

13351335
// has the same behaviour of sr-only, hiding the content for
@@ -1341,7 +1341,7 @@ footer {
13411341

13421342
@media @mediaSm {
13431343
.not-mobile {
1344-
display: none;
1344+
display: none !important;
13451345
}
13461346
}
13471347

0 commit comments

Comments
 (0)