You've already forked wp-bootstrap
feat: offcanvas mobile navigation with user avatar and admin bar fix (v1.0.11)
Switch mobile nav from collapse to offcanvas, add logged-in user avatar and My Account link to offcanvas header, move dark mode toggle to offcanvas footer. Fix admin bar overlapping offcanvas via inline CSS. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
16
CHANGELOG.md
16
CHANGELOG.md
@@ -2,6 +2,22 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [1.0.11] - 2026-02-28
|
||||
|
||||
### Changed
|
||||
|
||||
- **Offcanvas mobile navigation**: Default header now uses `header-offcanvas.html.twig` instead of `header.html.twig`. Mobile navigation slides in as an offcanvas panel from the right instead of collapsing downward.
|
||||
- **User avatar in offcanvas header**: When logged in, the offcanvas header displays the user's Gravatar and display name linking to the WooCommerce My Account page (or WP admin profile as fallback). Falls back to the site name when logged out.
|
||||
- **Dark mode toggle repositioned**: Moved from the offcanvas body to the offcanvas footer on mobile. Desktop toggle remains in the navbar.
|
||||
|
||||
### Added
|
||||
|
||||
- **User context data** (`inc/Template/ContextBuilder.php`): New `getUserData()` method exposing `user.logged_in`, `user.display_name`, `user.avatar`, and `user.account_url` to all Twig templates.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Admin bar overlapping offcanvas** (`functions.php`): Inline CSS via `wp_add_inline_style()` adds `padding-top` matching the admin bar height to `.offcanvas` when the admin bar is visible, preventing content overlap.
|
||||
|
||||
## [1.0.10] - 2026-02-25
|
||||
|
||||
### Fixed
|
||||
|
||||
Reference in New Issue
Block a user