-
Notifications
You must be signed in to change notification settings - Fork 0
feat: use Navi for primary navigation #34
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
Changes from all commits
3d6a0f8
d9f72a4
45009a4
d5553e9
a48623c
bf73810
1c85900
854bf02
c70a7a5
bc06d64
0edcb9f
d587921
88dfd26
4b970f6
65604dc
8f07a21
b959728
e2ee73d
51c5d1d
7b02c5d
a0d15f5
4d7d441
37bf307
2f77ac1
adf7d9d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace App\View\Composers; | ||
|
|
||
| use Log1x\Navi\Navi; | ||
| use Roots\Acorn\View\Composer; | ||
|
|
||
| class NaviComposer extends Composer | ||
| { | ||
| /** | ||
| * List of views served by this composer. | ||
| * | ||
| * @var array | ||
| */ | ||
| protected static $views = [ | ||
| 'components.header.*', | ||
| 'sections.footer', | ||
| ]; | ||
|
|
||
| /** | ||
| * Data to be passed to view before rendering, but after merging. | ||
| */ | ||
| public function override(): array | ||
| { | ||
| return [ | ||
| 'footerNavigation' => $this->footerNavigation(), | ||
| 'primaryNavigation' => $this->primaryNavigation(), | ||
| 'topBarNavigation' => $this->topBarNavigation(), | ||
| ]; | ||
| } | ||
|
|
||
| public function footerNavigation(): Navi | ||
| { | ||
| return Navi::make()->build('footer_navigation'); | ||
| } | ||
|
|
||
| public function primaryNavigation(): Navi | ||
| { | ||
| return Navi::make()->build('primary_navigation'); | ||
| } | ||
|
|
||
| public function topBarNavigation(): Navi | ||
| { | ||
| return Navi::make()->build('top_bar_navigation'); | ||
| } | ||
|
YvetteNikolov marked this conversation as resolved.
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,11 +5,10 @@ import A11yCookieYes from '@yardinternet/a11y-cookie-yes'; | |
| import { | ||
| A11yCards, | ||
| A11yFacetWP, | ||
| A11yMobileMenu, | ||
| Accordion, | ||
| BraveNavigationManager, | ||
|
Contributor
Author
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. Note voor mijzelf, dat de changes hiervan natuurlijk in een branch zitten in brave-frontend-kit. Vandaar dat ik het niet kon vinden toen ik global search deed. https://github.com/yardinternet/brave-frontend-kit/tree/feat/brave-nav |
||
| DialogManager, | ||
| FocusStyle, | ||
| Navigation, | ||
| WebShareApi, | ||
| } from '@yardinternet/brave-frontend-kit'; | ||
|
|
||
|
YvetteNikolov marked this conversation as resolved.
|
||
|
|
@@ -20,10 +19,9 @@ window.addEventListener( 'DOMContentLoaded', () => { | |
| new A11yCards(); | ||
| A11yCookieYes.getInstance(); | ||
| new A11yFacetWP(); | ||
| new A11yMobileMenu(); | ||
| new Accordion(); | ||
| new BraveNavigationManager(); | ||
| new DialogManager(); | ||
| new FocusStyle(); | ||
| new Navigation(); | ||
| new WebShareApi(); | ||
| } ); | ||
This file was deleted.
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.