Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
36a6c24
feat: use Navi for primary navigation
WybeBosch Jan 29, 2026
df0fe0a
feat: update primary navigation initialization
Yannicvanveen Feb 18, 2026
c033729
feat: replace arbitrary group classes
Yannicvanveen Feb 18, 2026
9744c47
feat: clearer group name / replace padding with gap / move list reset…
Yannicvanveen Feb 18, 2026
e9d3670
feat: implement Navi in footer
Yannicvanveen Feb 18, 2026
4fdec3a
feat: implement Navi in top bar
Yannicvanveen Feb 18, 2026
83c2999
feat: remove top-bar.css
Yannicvanveen Feb 18, 2026
8f3184b
fix: use correct values and selectors for updating --top-bar-height
Yannicvanveen Feb 18, 2026
fb2733d
feat: add NaviComposer
Yannicvanveen Feb 18, 2026
cb1b91d
feat: implement Navi top bar navigation in mobile menu
Yannicvanveen Feb 18, 2026
ee76f80
feat: implement Navi primary navigation in mobile menu
Yannicvanveen Feb 18, 2026
c758ddb
fix: aria-current conditions
Yannicvanveen Feb 18, 2026
efc8922
feat: use gap for primary nav list
Yannicvanveen Feb 18, 2026
e678b13
chore: regenerate lockfile after rebase
YvetteNikolov Mar 3, 2026
b947ea5
refactor: move mobile-menu.css into blade template
YvetteNikolov Mar 3, 2026
7ba1b0b
style: small styling changes
YvetteNikolov Mar 3, 2026
749af8a
fix: add ->classes to all navigation items
YvetteNikolov Mar 3, 2026
c128bcc
refactor: text-primary-* to text-primary
YvetteNikolov Mar 4, 2026
207f956
feat: first step of integrating the components and optimized frontend js
YvetteNikolov Mar 4, 2026
cbd2c25
feat: refactor to using item only on link, and using data-mode attribute
YvetteNikolov Mar 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"php": ">=8.2",
"composer/installers": "^2.2",
"johnbillion/user-switching": "^1.11",
"log1x/navi": "^3.1",
"log1x/poet": "^2.0",
"lukasbesch/bedrock-plugin-disabler": "^1.4",
"oscarotero/env": "^2.1",
Expand Down
263 changes: 164 additions & 99 deletions composer.lock

Large diffs are not rendered by default.

34 changes: 5 additions & 29 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 9 additions & 7 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Hoist these packages to the node_modules root for formatting and linting
overrides:
'@yardinternet/brave-frontend-kit': link:../../../../Packages/brave-frontend-kit

publicHoistPattern:
- prettier
- stylelint
- eslint
- stylelint-config-recommended
- stylelint-config-idiomatic-order
- '@babel/preset-react'
- prettier
- stylelint
- eslint
- stylelint-config-recommended
- stylelint-config-idiomatic-order
- '@babel/preset-react'
48 changes: 48 additions & 0 deletions web/app/themes/sage/app/View/Composers/NaviComposer.php
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');
}
}
1 change: 1 addition & 0 deletions web/app/themes/sage/config/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
'app' => App\View\Composers\App::class,
'postDataCollection' => App\View\Composers\PostDataCollectionComposer::class,
'postData' => App\View\Composers\PostDataComposer::class,
'navi' => App\View\Composers\NaviComposer::class,
],

/*
Expand Down
6 changes: 2 additions & 4 deletions web/app/themes/sage/resources/scripts/frontend/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ import A11yCookieYes from '@yardinternet/a11y-cookie-yes';
import {
A11yCards,
A11yFacetWP,
A11yMobileMenu,
Accordion,
BraveNavigationManager,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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';

Expand All @@ -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();
} );
4 changes: 2 additions & 2 deletions web/app/themes/sage/resources/styles/base/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ p {
}

a {
@apply text-primary-600 underline;
@apply text-primary underline;

@variant hocus {
@apply text-primary-700;
@apply text-primary-600;
}

/* Hide links if they are empty. Easy fix for some Gutenberg and a11y issues. */
Expand Down
4 changes: 4 additions & 0 deletions web/app/themes/sage/resources/styles/base/utilities.css
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,7 @@
minmax( min( 100%, var( --min, 30ch ) ), 1fr )
);
}

@utility list-reset {
@apply mb-0 list-none pl-0;
}
12 changes: 10 additions & 2 deletions web/app/themes/sage/resources/styles/base/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,16 @@
/* Navigation */
--wp-admin-bar-height: var( --wp-admin--admin-bar--height, 0px );
--nav-bar-height: 80px;
--top-bar-height: 40px;
--combined-bar-height: var( --nav-bar-height ); /* Altered in top-bar.css */
--top-bar-height: 0px;
--combined-bar-height: calc(
var( --nav-bar-height ) + var( --top-bar-height )
);

@variant lg {
&:has( .top-bar ) {
--top-bar-height: 40px;
}
}

/* Container size */
--container-padding: 1rem;
Expand Down
53 changes: 0 additions & 53 deletions web/app/themes/sage/resources/styles/components/mobile-menu.css

This file was deleted.

73 changes: 0 additions & 73 deletions web/app/themes/sage/resources/styles/components/nav.css

This file was deleted.

Loading