-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature/drop menu #52
base: master
Are you sure you want to change the base?
Conversation
This pull request is automatically deployed with Now. |
@@ -28,6 +28,28 @@ module.exports = { | |||
type: 'string', | |||
description: 'Text of the menu item', | |||
}, | |||
sub_menu: { |
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.
Well done on getting this array of objects JsonSchema correct. Its one of the trickier properties to get right.
@@ -20,6 +20,15 @@ | |||
{% for item in menu_items %} | |||
<li class="main-menu__item"> | |||
<a href="{{ item.url }}" class="main-menu__link{% if item.active %} main-menu__link--active{% endif %}">{{ item.text }}</a> | |||
{% if item.sub_menu %} | |||
<ul class="main-menu__sub-menu" aria-label="submenu"> | |||
{% for sub in item.sub_menu %} |
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 hot on shorthand var names ("sub" in this case). I would suggest the variable name "item", but its being used in the scope above so its not a good choice. I think "sub" is alright here.
"There are only two hard things in Computer Science: cache invalidation and naming things."
-- Phil Karlton
@@ -0,0 +1,5 @@ | |||
# Crux, the [Basalt](https://www.basalt.io) Design System |
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.
🤦♂ We didn't have a readme? Thank you
Please hold off on merging this as well. This will need some polish. Here are two of the main issues that I see right off the bat...
|
Added a drop down menu for the main header navigation. Waiting on appropriate link urls and the go ahead to add knapsack link.