-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat(ui): add a sticky navbar #282
Open
Dobrunia
wants to merge
5
commits into
main
Choose a base branch
from
feature/layout-navbar
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+96
−20
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a5bb3ea
feat(navbar): add a sticky navbar with a right slot for additional co…
Dobrunia 45f8564
Merge branch 'main' into feature/layout-navbar
Dobrunia 478a428
unhardcode header height, renamed #navbar__right to #right
Dobrunia 94294c0
Merge branch 'feature/layout-navbar' of https://github.com/codex-team…
Dobrunia 03ba2ce
fixed 1 space indentation
Dobrunia 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 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 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,32 @@ | ||
<template> | ||
<div class="navbar-wrapper"> | ||
<Navbar> | ||
Left | ||
<template #right> | ||
Right | ||
</template> | ||
</Navbar> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { Navbar } from '../../../src/vue'; | ||
</script> | ||
|
||
<style scoped> | ||
.navbar-wrapper { | ||
min-height: 400px; | ||
position: relative; | ||
background-color: var(--base--bg-secondary); | ||
border-radius: var(--radius-m); | ||
border: 1px solid var(--base--border); | ||
overflow-x: clip; | ||
|
||
.navbar { | ||
z-index: 1; | ||
top: var(--layout-navbar-height); | ||
border-radius: var(--radius-m) var(--radius-m) 0 0; | ||
padding: 0 var(--spacing-ms); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
} | ||
</style> |
This file contains 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 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 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
:root { | ||
--z-popover: 3; | ||
--z-popup: calc(var(--z-popover) + 1); | ||
--z-navbar: calc(var(--z-popover) + 1); | ||
--z-popup: calc(var(--z-navbar) + 1); | ||
} |
This file contains 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 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,28 @@ | ||
<template> | ||
<div class="navbar"> | ||
<slot /> | ||
<div class="navbar__right"> | ||
<slot name="right" /> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style scoped lang="postcss"> | ||
.navbar { | ||
position: sticky; | ||
top: 0; | ||
z-index: var(--z-navbar); | ||
background-color: var(--base--bg-primary); | ||
display: flex; | ||
align-items: center; | ||
width: 100%; | ||
max-width: 100%; | ||
height: var(--layout-navbar-height); | ||
border-bottom: 1px solid var(--base--border); | ||
box-sizing: border-box; | ||
|
||
&__right { | ||
margin-left: auto; | ||
} | ||
} | ||
</style> |
This file contains 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,3 @@ | ||
import Navbar from './Navbar.vue'; | ||
|
||
export { Navbar }; |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, for demo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that it is used. Explain what will happen without it.