Skip to content

Commit 97b078d

Browse files
authored
Add background to dashboard navbar, fix missing padding (#29940)
Two small CSS fixes: 1. Add background and reduced padding/avatar size to dashboard navbar. We use that background already in a number of "secondary navbars", so it fits. <img width="1344" alt="Screenshot 2024-03-20 at 18 18 21" src="https://github.com/go-gitea/gitea/assets/115237/ce5ebedc-e607-42c7-b7b4-b7a4c0ee68f2"> 2. Fix padding on top of user settings and subscriptions, regressed by #29922.
1 parent 99d7ef5 commit 97b078d

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

templates/user/dashboard/navbar.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
<div class="item">
44
<div class="ui floating dropdown jump">
55
<span class="text truncated-item-container">
6-
{{ctx.AvatarUtils.Avatar .ContextUser}}
6+
{{ctx.AvatarUtils.Avatar .ContextUser 24 "tw-mr-1"}}
77
<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
88
<span class="org-visibility">
99
{{if .ContextUser.Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
1010
{{if .ContextUser.Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
1111
</span>
12-
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
12+
{{svg "octicon-triangle-down" 14 "dropdown icon tw-ml-1"}}
1313
</span>
1414
<div class="context user overflow menu">
1515
<div class="ui header">

web_src/css/base.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,8 @@ img.ui.avatar,
669669
}
670670

671671
.page-content.new:is(.repo,.migrate,.org),
672-
.page-content.profile:is(.user,.organization) {
672+
.page-content.profile:is(.user,.organization),
673+
.page-content.user:is(.settings,.notification) {
673674
padding-top: 15px;
674675
}
675676

@@ -1796,7 +1797,7 @@ table th[data-sortt-desc] .svg {
17961797

17971798
.ui.tabular.menu .item,
17981799
.ui.secondary.pointing.menu .item {
1799-
padding: 11px 12px !important;
1800+
padding: 11.55px 12px !important; /* match .dashboard-navbar in height */
18001801
color: var(--color-text-light-2);
18011802
}
18021803

web_src/css/dashboard.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@
7878
}
7979

8080
.dashboard .dashboard-navbar {
81-
padding: 4px 12px;
81+
padding: 1px 12px; /* match .overflow-menu-items in height */
82+
background: var(--color-header-wrapper);
8283
}
8384

8485
.dashboard .dashboard-navbar .org-visibility .label {

0 commit comments

Comments
 (0)