-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Dropdown Items in Navbar #13
Merged
Merged
Changes from 19 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
0494566
dropdown - init
ulivz 121e6ca
add nav link component to distinguish internal and external link
ulivz 3ddca36
enhance the active state of dropdown link
ulivz 72be30c
beautify font weight for dropdown link and clean code
ulivz 4bccf3a
clean code
ulivz 5ac3c2a
update doc
ulivz dbb7a08
update README
ulivz 50689ea
address comments
ulivz 6de2efa
fix jumpy link
ulivz 7eb2563
address comments
ulivz 94c2236
use exact match mode for route link
ulivz 6c9e1a4
implement nested links in dropdown
ulivz 5ca1d02
clean dropdown type
ulivz 7c6d462
fix cursor status
ulivz 96c30c5
chore: tweaks
ulivz 3397dc2
Merge branch 'master' into dropdown
ulivz 5030421
Merge branch 'master' into dropdown
ulivz 96a6cc6
refactor: address comments and clean duplicate code due to merging.
ulivz 7f440d0
style: use more exact class selector, and clean old element selector …
ulivz 4bf15cb
add cursor: pointer to nav item.
ulivz 650089d
feat: togglable dropdown on mobile
ulivz b3e0583
chore: dropdown - remove test links, and make it collapsed by default…
ulivz bf13baa
Update README.md
yyx990803 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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<router-link | ||
class="router-link" | ||
:to="link" | ||
v-if="!isExternal(link)" | ||
:exact="link === '/'" | ||
>{{ item.text }}</router-link> | ||
<a | ||
v-else | ||
:href="link" | ||
target="_blank" | ||
class="router-link" | ||
rel="noopener noreferrer" | ||
>{{ item.text }}</a> | ||
</template> | ||
|
||
<script> | ||
import { isExternal, ensureExt } from './util' | ||
export default { | ||
props: { | ||
item: { | ||
required: true | ||
} | ||
}, | ||
computed: { | ||
link() { | ||
return ensureExt(this.item.link) | ||
} | ||
}, | ||
methods: { | ||
isExternal | ||
} | ||
} | ||
</script> |
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
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.
Some conflicts due to fixes which are also addressed in this PR. Should be easy to resolve.
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.
All conflict has been resolved.