Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions templates/base/head_navbar.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@
</div><!-- end dropdown menu create new -->

<div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
<span class="text">
{{ctx.AvatarUtils.Avatar .SignedUser 24 "tw-mr-1"}}
<span class="text tw-flex tw-items-center">
<span class="navbar-avatar">
{{ctx.AvatarUtils.Avatar .SignedUser 24 "tw-mr-2"}}
{{if .IsAdmin}}{{svg "octicon-shield-check" 16 "navbar-admin-badge"}}{{end}}
</span>
<span class="only-mobile">{{.SignedUser.Name}}</span>
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
</span>
Expand Down
5 changes: 0 additions & 5 deletions templates/base/head_navbar_icons.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,4 @@
<span class="notification_count{{if not $notificationUnreadCount}} tw-hidden{{end}}">{{$notificationUnreadCount}}</span>
</div>
</a>
{{if $data.IsSiteAdmin}}
<a class="item {{$itemExtraClass}}" href="{{AppSubUrl}}/-/admin" data-tooltip-content="{{ctx.Locale.Tr "admin_panel"}}">
{{svg "octicon-server"}}
</a>
{{end}}
{{end}}
19 changes: 17 additions & 2 deletions web_src/css/modules/navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,14 @@
}

#navbar a.item:hover .notification_count,
#navbar a.item:hover .header-stopwatch-dot {
#navbar a.item:hover .header-stopwatch-dot,
#navbar .item.active .navbar-admin-badge {
border-color: var(--color-nav-hover-bg);
}

#navbar a.item .notification_count,
#navbar a.item .header-stopwatch-dot {
#navbar a.item .header-stopwatch-dot,
#navbar .item .navbar-admin-badge {
color: var(--color-nav-bg);
padding: 0 3.75px;
font-size: 12px;
Expand All @@ -127,6 +129,19 @@
z-index: 1; /* prevent menu button background from overlaying icon */
user-select: none;
white-space: nowrap;
overflow: visible;
}

.navbar-avatar {
position: relative;
display: inline-flex;
}

#navbar .item .navbar-admin-badge {
position: absolute;
bottom: calc(100% - 29px);
left: calc(100% - 18px);
padding: 1.5px;
}

.secondary-nav {
Expand Down