-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Navbar styling rework #25343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Navbar styling rework #25343
Changes from 4 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c6a9359
Navbar styling rework
silverwind b3556e4
tweak mobile notification margin
silverwind ecb1407
Merge branch 'main' into navrework
silverwind 9344b6b
use suggested html layout and adapt css
silverwind 0f00707
remove unused mobile-notifications-item
silverwind f72b094
Update templates/base/head_navbar.tmpl
silverwind 02ce207
increase height by 1px, fix mobile padding-bottom
silverwind ab50a4d
Merge branch 'main' into navrework
silverwind 5dc8861
Merge branch 'main' into navrework
GiteaBot 04b9f31
Merge branch 'main' into navrework
GiteaBot 556bc0e
fix dropdown regression
silverwind b0ec30e
Revert "fix dropdown regression"
silverwind a47664f
better fixes
silverwind 032db8d
Merge branch 'main' into navrework
GiteaBot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
#navbar { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
background: var(--color-nav-bg); | ||
border-bottom: 1px solid var(--color-secondary); | ||
margin: 0 !important; | ||
padding: 0 10px; | ||
} | ||
|
||
#navbar, | ||
#navbar .navbar-left { | ||
min-height: 48px; | ||
} | ||
|
||
#navbar .navbar-left, | ||
#navbar .navbar-right { | ||
margin: 0; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
#navbar-logo { | ||
margin: 0; | ||
} | ||
|
||
#navbar .item { | ||
min-height: 36px; | ||
min-width: 36px; | ||
padding-top: 3px; | ||
padding-bottom: 3px; | ||
display: flex; | ||
justify-content: center; | ||
width: auto; | ||
} | ||
|
||
#navbar a.item:hover, | ||
#navbar button.item:hover { | ||
background: var(--color-nav-hover-bg); | ||
} | ||
|
||
#navbar .secondary.menu > .item > .svg, | ||
#navbar .right.menu > .item > .svg { | ||
margin-right: 0; | ||
} | ||
|
||
@media (max-width: 767.98px) { | ||
#navbar { | ||
align-items: stretch; | ||
padding-bottom: 8px; | ||
} | ||
/* hide all items */ | ||
#navbar .item { | ||
display: none; | ||
} | ||
#navbar #navbar-logo { | ||
display: flex; | ||
} | ||
/* show the first navbar item (logo and its mobile right items) */ | ||
#navbar .navbar-left { | ||
flex: 1; | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
#navbar .navbar-mobile-right { | ||
display: flex; | ||
margin-left: auto !important; | ||
} | ||
#navbar .navbar-mobile-right > .item { | ||
display: flex; | ||
} | ||
/* show items if the navbar is open */ | ||
#navbar.navbar-menu-open, | ||
#navbar.navbar-menu-open .navbar-right { | ||
flex-direction: column; | ||
} | ||
#navbar.navbar-menu-open .navbar-left { | ||
display: flex; | ||
flex-wrap: wrap; | ||
} | ||
#navbar.navbar-menu-open .item { | ||
display: flex; | ||
width: 100%; | ||
} | ||
#navbar.navbar-menu-open .navbar-left #navbar-logo { | ||
justify-content: flex-start; | ||
width: 50%; | ||
min-height: 48px; | ||
} | ||
#navbar.navbar-menu-open .navbar-left .navbar-mobile-right { | ||
justify-content: flex-end; | ||
width: 50%; | ||
min-height: 48px; | ||
} | ||
#navbar.navbar-menu-open .mobile-right-item { | ||
width: auto !important; | ||
} | ||
} | ||
|
||
@media (min-width: 767.98px) { | ||
#navbar .navbar-mobile-right, | ||
#navbar .mobile-only { | ||
display: none; | ||
} | ||
} | ||
|
||
#navbar a.item .notification_count { | ||
color: var(--color-nav-bg); | ||
padding: 0 3.75px; | ||
font-size: 12px; | ||
line-height: 12px; | ||
font-weight: var(--font-weight-bold); | ||
} | ||
|
||
#navbar a.item:hover .notification_count, | ||
#navbar a.item:hover .header-stopwatch-dot { | ||
border-color: var(--color-nav-hover-bg); | ||
} | ||
|
||
#navbar a.item .notification_count, | ||
#navbar a.item .header-stopwatch-dot { | ||
background: var(--color-primary); | ||
border: 2px solid var(--color-nav-bg); | ||
position: absolute; | ||
left: 6px; | ||
top: -9px; | ||
min-width: 17px; | ||
min-height: 17px; | ||
border-radius: 17px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
z-index: 1; /* prevent menu button background from overlaying icon */ | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.