aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-03-20 19:33:00 +0100
committerGitHub <noreply@github.com>2024-03-20 18:33:00 +0000
commit97b078d2260c0e9aee53c5b9e73c70e29f736363 (patch)
treec838c115eed92e7535dc635b0b9a2987ccc09615
parent99d7ef50917e8d61798715e1b0b3dc1a99709f27 (diff)
downloadgitea-97b078d2260c0e9aee53c5b9e73c70e29f736363.tar.gz
gitea-97b078d2260c0e9aee53c5b9e73c70e29f736363.zip
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 https://github.com/go-gitea/gitea/pull/29922.
-rw-r--r--templates/user/dashboard/navbar.tmpl4
-rw-r--r--web_src/css/base.css5
-rw-r--r--web_src/css/dashboard.css3
3 files changed, 7 insertions, 5 deletions
diff --git a/templates/user/dashboard/navbar.tmpl b/templates/user/dashboard/navbar.tmpl
index 480c39e8bf..917e024a6f 100644
--- a/templates/user/dashboard/navbar.tmpl
+++ b/templates/user/dashboard/navbar.tmpl
@@ -3,13 +3,13 @@
<div class="item">
<div class="ui floating dropdown jump">
<span class="text truncated-item-container">
- {{ctx.AvatarUtils.Avatar .ContextUser}}
+ {{ctx.AvatarUtils.Avatar .ContextUser 24 "tw-mr-1"}}
<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
<span class="org-visibility">
{{if .ContextUser.Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
{{if .ContextUser.Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
</span>
- {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ {{svg "octicon-triangle-down" 14 "dropdown icon tw-ml-1"}}
</span>
<div class="context user overflow menu">
<div class="ui header">
diff --git a/web_src/css/base.css b/web_src/css/base.css
index fdfbea610b..58332fb21c 100644
--- a/web_src/css/base.css
+++ b/web_src/css/base.css
@@ -669,7 +669,8 @@ img.ui.avatar,
}
.page-content.new:is(.repo,.migrate,.org),
-.page-content.profile:is(.user,.organization) {
+.page-content.profile:is(.user,.organization),
+.page-content.user:is(.settings,.notification) {
padding-top: 15px;
}
@@ -1796,7 +1797,7 @@ table th[data-sortt-desc] .svg {
.ui.tabular.menu .item,
.ui.secondary.pointing.menu .item {
- padding: 11px 12px !important;
+ padding: 11.55px 12px !important; /* match .dashboard-navbar in height */
color: var(--color-text-light-2);
}
diff --git a/web_src/css/dashboard.css b/web_src/css/dashboard.css
index 140cd2e4bf..0fa81b1c2a 100644
--- a/web_src/css/dashboard.css
+++ b/web_src/css/dashboard.css
@@ -78,7 +78,8 @@
}
.dashboard .dashboard-navbar {
- padding: 4px 12px;
+ padding: 1px 12px; /* match .overflow-menu-items in height */
+ background: var(--color-header-wrapper);
}
.dashboard .dashboard-navbar .org-visibility .label {