Add support for configurable navbar title links. #1704
Merged
Conversation
Will let @kwm4385 and the more-UI-inclined take a look at the react bits, but I agree on making this and the admin dropdown match |
Made a few changes to get everything working right and for styling. Highlights below |
@@ -35,6 +35,26 @@ function isActive(navbarPath, fragment) { | |||
// put into page wrapper, render children | |||
const Navigation = (props) => { | |||
const fragment = props.location.pathname.split('/')[1]; | |||
const navTitle = config.navTitleLinks | |||
? ( | |||
<ul className="nav navbar-nav"> |
kwm4385
Feb 5, 2018
Contributor
Wrapping this in the same ul
structure will give the consistent menu look you seek.
Wrapping this in the same ul
structure will give the consistent menu look you seek.
@@ -35,6 +35,26 @@ function isActive(navbarPath, fragment) { | |||
// put into page wrapper, render children | |||
const Navigation = (props) => { | |||
const fragment = props.location.pathname.split('/')[1]; | |||
const navTitle = config.navTitleLinks |
kwm4385
Feb 5, 2018
Contributor
Needed a null check for the config field itself somewhere, otherwise it would break if it wasn't set.
Needed a null check for the config field itself somewhere, otherwise it would break if it wasn't set.
{config.title} <span className="caret" /> | ||
</a> | ||
<ul className="dropdown-menu"> | ||
{Object.keys(config.navTitleLinks).map((linkTitle, index) => |
kwm4385
Feb 5, 2018
Contributor
These links can be inlined
These links can be inlined
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Looks like

This setup defaults to having the nav header title link back to the Dashboard (as is the case today) if no links are configured.
Might have to tweak the CSS class setup slightly, since the
Admin
dropdown has squared corners, but this one's got rounded corners.