Skip to content

Commit 76f5e50

Browse files
committed
remove 'ui secondary menu' from navbar left/right
1 parent 5331b2f commit 76f5e50

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

templates/base/head_navbar.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
{{end}}
55

66
<nav id="navbar" aria-label="{{ctx.Locale.Tr "aria.navbar"}}">
7-
<div class="navbar-left ui secondary menu">
7+
<div class="navbar-left">
88
<!-- the logo -->
99
<a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}">
1010
<img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true">
1111
</a>
1212

1313
<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
14-
<div class="ui secondary menu item navbar-mobile-right only-mobile">
14+
<div class="ui secondary menu item navbar-mobile-right only-mobile tw-my-0">
1515
{{if and .IsSigned EnableTimetracking .ActiveStopwatch}}
1616
<a id="mobile-stopwatch-icon" class="active-stopwatch item tw-mx-0" href="{{.ActiveStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}" data-seconds="{{.ActiveStopwatch.Seconds}}">
1717
<div class="tw-relative">
@@ -61,7 +61,7 @@
6161
</div>
6262

6363
<!-- the full dropdown menus -->
64-
<div class="navbar-right ui secondary menu">
64+
<div class="navbar-right">
6565
{{if and .IsSigned .MustChangePassword}}
6666
<div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}">
6767
<span class="text tw-flex tw-items-center">
@@ -104,7 +104,7 @@
104104
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span>
105105
<span class="only-mobile">{{ctx.Locale.Tr "create_new"}}</span>
106106
</span>
107-
<div class="menu">
107+
<div class="left menu">
108108
<a class="item" href="{{AppSubUrl}}/repo/create">
109109
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_repo"}}
110110
</a>

web_src/css/modules/header.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ h4.ui.header .sub.header {
136136

137137
/* open dropdown menus to the left in right-attached headers */
138138
/* this method must be used instead of "left menu" because otherwise the menu will flash on page load because of `display` CSS. */
139-
.ui.attached.header > .ui.right .ui.dropdown .menu,
140-
.navbar-right .ui.dropdown .menu {
139+
.ui.attached.header > .ui.right .ui.dropdown .menu {
141140
right: 0;
142141
left: auto;
143142
}

web_src/css/modules/navbar.css

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,26 @@
1919
margin: 0;
2020
display: flex;
2121
align-items: center;
22+
gap: 5px;
2223
}
2324

2425
#navbar-logo {
2526
margin: 0;
2627
}
2728

29+
.navbar-left > .item,
30+
.navbar-right > .item {
31+
color: var(--color-nav-text);
32+
position: relative;
33+
text-decoration: none;
34+
line-height: var(--line-height-default);
35+
flex: 0 0 auto;
36+
font-weight: var(--font-weight-normal);
37+
align-items: center;
38+
padding: .78571429em .92857143em;
39+
border-radius: .28571429rem;
40+
}
41+
2842
#navbar .item {
2943
min-height: 36px;
3044
min-width: 36px;
@@ -33,10 +47,6 @@
3347
display: flex;
3448
}
3549

36-
#navbar > .menu > .item {
37-
color: var(--color-nav-text);
38-
}
39-
4050
#navbar .dropdown .item {
4151
justify-content: stretch;
4252
}

0 commit comments

Comments
 (0)