Add product category tree sidebar to archive and single product pages (v0.1.7)
All checks were successful
Create Release Package / PHP Lint (push) Successful in 1m4s
Create Release Package / PHPUnit Tests (push) Successful in 50s
Create Release Package / Build Release (push) Successful in 58s

Hierarchical category navigation with collapsible sub-levels up to 3 levels
deep, using Bootstrap 5 list-group and collapse components. Sidebar renders
on both archive/shop and single product pages with responsive offcanvas on
mobile. Active category highlighting and ancestor auto-expand for intuitive
navigation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-29 15:19:53 +02:00
parent 5e4af247fa
commit 9860a184cd
9 changed files with 332 additions and 8 deletions

View File

@@ -644,3 +644,50 @@ header.sticky-top.is-stuck {
.woocommerce-product-gallery--without-images {
opacity: 1 !important;
}
/* ==========================================================================
Category Tree Sidebar
Hierarchical product category navigation with collapsible sub-levels.
========================================================================== */
.category-tree {
font-size: 0.9rem;
}
.category-tree .list-group-item {
background-color: transparent;
}
.category-tree-link {
color: var(--bs-body-color);
transition: background-color 0.15s ease, color 0.15s ease;
}
.category-tree-link:hover {
background-color: var(--bs-tertiary-bg);
color: var(--bs-body-color);
}
.category-tree-link.active {
background-color: var(--bs-primary);
color: #fff;
}
.category-tree-link.active .badge {
background-color: rgba(255, 255, 255, 0.2) !important;
color: #fff !important;
}
/* Rotate chevron icon when collapsed/expanded */
.category-tree-toggle .bi {
transition: transform 0.2s ease;
}
.category-tree-toggle[aria-expanded="false"] .bi {
transform: rotate(-90deg);
}
/* Nested list indentation */
.category-tree .list-group-flush .list-group-flush {
padding-left: 0.75rem;
}