You've already forked wc-bootstrap
Add product category tree sidebar to archive and single product pages (v0.1.7)
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user