Skip to content

Commit 4f10849

Browse files
committed
Change admin indicator to icon-only with title
1 parent e8d8984 commit 4f10849

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

templates/base/head_navbar.tmpl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@
130130
<span class="only-mobile">{{.SignedUser.Name}}</span>
131131
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
132132
</span>
133-
{{/* do not localize it, here it needs the fixed length (width) to make UI comfortable */}}
134-
{{if .IsAdmin}}<span class="navbar-profile-admin">admin</span>{{end}}
133+
{{if .IsAdmin}}<span class="navbar-profile-admin" title="{{ctx.Locale.Tr "repo.settings.collaboration.admin"}}">{{svg "octicon-server" 11}}</span>{{end}}
135134
<div class="menu user-menu">
136135
<div class="header">
137136
{{ctx.Locale.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>

web_src/css/modules/navbar.css

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,22 @@
101101
}
102102
}
103103

104+
#navbar .ui.dropdown.active .navbar-profile-admin {
105+
background: var(--color-nav-hover-bg);
106+
border-color: var(--color-nav-hover-bg);
107+
}
108+
104109
#navbar .ui.dropdown .navbar-profile-admin {
105110
display: block;
106111
position: absolute;
107-
font-size: 9px;
108-
font-weight: var(--font-weight-bold);
109-
color: var(--color-nav-bg);
110-
background: var(--color-primary);
111-
padding: 2px 3px;
112+
color: var(--color-text);
113+
background: var(--color-nav-bg);
114+
border: 1px solid var(--color-nav-bg);
115+
padding: 2px;
112116
border-radius: 10px;
113-
top: -1px;
114-
left: 18px;
117+
top: -0.75px;
118+
left: 28px;
119+
line-height: 0;
115120
}
116121

117122
#navbar a.item:hover .notification_count,

0 commit comments

Comments
 (0)