Complex Color-Coded Index and Sidebar Pattern
This guide demonstrates an advanced implementation of color-coded grouping for complex documentation structures with multiple nested categories and sections.
Overview
The complex color-coded pattern enhances navigation by:
- Implementing a hierarchical color system for nested categories
- Using multiple visual indicators (borders, backgrounds, icons)
- Supporting both light and dark themes with sophisticated color transitions
- Providing visual hierarchy through color intensity and contrast
Important Implementation Note
Always check existing styling first: Before implementing new color schemes, check if there are already defined colors for menu items in your CSS. The colors suggested in this guide are merely recommendations and should be adapted to match any existing color scheme in your documentation site for consistency.
If you find that certain sections already have assigned colors in the menu (like HR items using red instead of purple), use those established colors rather than the ones suggested in this guide. Consistency within your documentation is the highest priority.
Implementation Steps
1. Prepare the Index Page Structure
---
title: Operations
sidebar_position: 6
sidebar_class_name: operations
---
# Operations Procedures
This section covers procedures related to operations.
## Overview
Operations procedures help maintain effective business operations, including IT setup, accounts payable, billing, PEX card management, banking, accounting, and HR functions.
## System Setup & IT
<div class="sidebar-section setup-section">
- [Add OneDrive to Computer](./add-onedrive-to-computer)
- [C2 Identity Setup Guide](./c2-identity-setup-guide)
- [Project Setup](./project-setup)
</div>
## Accounts Payable (AP)
<div class="sidebar-section ap-section">
- [AP - Pay Bills via Check](./ap-pay-bills-via-check)
- [AP - Supplier: L&W](./ap-supplier-lw)
- [AP - Supplier: AMES](./ap-supplier-ames)
- [AP - Supplier: STC](./ap-supplier-stc)
</div>
## Billing & Transactions (BT)
<div class="sidebar-section bt-section">
- [BT - Log Invoice via Email](./bt-log-invoice-via-email)
- [BT - PEX Bill to Project](./bt-pex-bill-to-project)
- [BT - Release Invoice](./bt-release-invoice)
- [GC - New Pay App (Legacy)](./gc-new-pay-app-legacy)
</div>
## PEX Card Management
<div class="sidebar-section pex-section">
- [PEX - Order Cards](./pex-order-cards)
- [PEX - Fund Cards](./pex-fund-cards)
- [PEX - Activating Expense Types](./pex-activating-expense-types)
- [PEX - Approving Transaction](./pex-approving-transaction)
- [PEX - Fuel Transactions](./pex-fuel-transactions)
- [PEX - Reconciliation](./pex-reconciliation)
- [PEX - Transaction Export](./pex-transaction-export)
- [PEX - Sync to Xero](./pex-sync-to-xero)
</div>
## Banking (BK)
<div class="sidebar-section banking-section">
- [BK - Export Statement](./bk-export-statement)
- [BK - Export OFX](./bk-export-ofx)
</div>
## Xero Accounting
<div class="sidebar-section xero-section">
- [XERO - HubDoc Receipt](./xero-hubdoc-receipt)
- [Xero - Importing Bank OFX](./xero-importing-bank-ofx)
- [XERO - Reconcile Deposits](./xero-reconcile-deposits)
- [Xero - Reconciling Gusto Payroll](./xero-reconciling-gusto-payroll)
- [XERO - Sub W9 Class](./xero-sub-w9-class)
</div>
## Payroll & HR
<div class="sidebar-section hr-section">
- [GUSTO - Onboarding](./gusto-onboarding)
- [HR - Pause Indeed Job Posting](./hr-pause-indeed-job-posting)
- [WC Audit - Payroll](./wc-audit-payroll)
- [WC Audit - Payments](./wc-audit-payments)
</div>
2. Add Advanced CSS Styling
The CSS below is a starting template with suggested colors. Modify these colors to match any existing styling in your documentation for consistency.
/* Base Operations Section Styling */
.operations .sidebar-section {
margin: 1.5rem 0;
padding: 1rem;
border-radius: 6px;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.operations .sidebar-section::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 4px;
height: 100%;
transition: all 0.3s ease;
}
.operations .sidebar-section:hover {
transform: translateX(4px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
/* Section-specific colors with gradients - Adapt these to match your existing color scheme if applicable */
.setup-section {
background: linear-gradient(to right, rgba(33, 150, 243, 0.05), transparent);
border-left: 4px solid #2196f3;
}
.ap-section {
background: linear-gradient(to right, rgba(76, 175, 80, 0.05), transparent);
border-left: 4px solid #4caf50;
}
.bt-section {
background: linear-gradient(to right, rgba(255, 152, 0, 0.05), transparent);
border-left: 4px solid #ff9800;
}
.pex-section {
background: linear-gradient(to right, rgba(156, 39, 176, 0.05), transparent);
border-left: 4px solid #9c27b0;
}
.banking-section {
background: linear-gradient(to right, rgba(0, 188, 212, 0.05), transparent);
border-left: 4px solid #00bcd4;
}
.xero-section {
background: linear-gradient(to right, rgba(244, 67, 54, 0.05), transparent);
border-left: 4px solid #f44336;
}
/* NOTE: In this example, HR section is using deep purple (#6a1b9a), but you should use whatever color is already
established in your documentation. For instance, if HR items use brick red (#f44336) in your menu,
use that instead for consistency. */
.hr-section {
background: linear-gradient(to right, rgba(244, 67, 54, 0.05), transparent);
border-left: 4px solid #f44336; /* Using brick red as an example */
}
/* Dark mode adjustments */
[data-theme='dark'] .operations .sidebar-section {
background: rgba(255, 255, 255, 0.02);
}
[data-theme='dark'] .operations .sidebar-section:hover {
background: rgba(255, 255, 255, 0.05);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
/* Section-specific dark mode colors - Again, adapt to match your existing color scheme */
[data-theme='dark'] .setup-section {
background: linear-gradient(to right, rgba(33, 150, 243, 0.1), transparent);
border-left-color: #64b5f6;
}
[data-theme='dark'] .ap-section {
background: linear-gradient(to right, rgba(76, 175, 80, 0.1), transparent);
border-left-color: #81c784;
}
[data-theme='dark'] .bt-section {
background: linear-gradient(to right, rgba(255, 152, 0, 0.1), transparent);
border-left-color: #ffb74d;
}
[data-theme='dark'] .pex-section {
background: linear-gradient(to right, rgba(156, 39, 176, 0.1), transparent);
border-left-color: #ba68c8;
}
[data-theme='dark'] .banking-section {
background: linear-gradient(to right, rgba(0, 188, 212, 0.1), transparent);
border-left-color: #4dd0e1;
}
[data-theme='dark'] .xero-section {
background: linear-gradient(to right, rgba(244, 67, 54, 0.1), transparent);
border-left-color: #e57373;
}
[data-theme='dark'] .hr-section {
background: linear-gradient(to right, rgba(244, 67, 54, 0.1), transparent);
border-left-color: #e57373; /* Using light red to match brick red in light mode */
}
/* Sidebar menu styling with advanced effects */
.menu__link {
position: relative;
transition: all 0.3s ease;
margin-left: -8px;
padding-left: 12px;
}
/* System Setup & IT items */
.menu__link[href*="add-onedrive-to-computer"],
.menu__link[href*="c2-identity-setup-guide"],
.menu__link[href*="project-setup"] {
border-left: 4px solid #2196f3;
}
/* Accounts Payable items */
.menu__link[href*="ap-pay-bills-via-check"],
.menu__link[href*="ap-supplier-lw"],
.menu__link[href*="ap-supplier-ames"],
.menu__link[href*="ap-supplier-stc"] {
border-left: 4px solid #4caf50;
}
/* Billing & Transactions items */
.menu__link[href*="bt-log-invoice-via-email"],
.menu__link[href*="bt-pex-bill-to-project"],
.menu__link[href*="bt-release-invoice"],
.menu__link[href*="gc-new-pay-app-legacy"] {
border-left: 4px solid #ff9800;
}
/* PEX Card Management items */
.menu__link[href*="pex-order-cards"],
.menu__link[href*="pex-fund-cards"],
.menu__link[href*="pex-activating-expense-types"],
.menu__link[href*="pex-approving-transaction"],
.menu__link[href*="pex-fuel-transactions"],
.menu__link[href*="pex-reconciliation"],
.menu__link[href*="pex-transaction-export"],
.menu__link[href*="pex-sync-to-xero"] {
border-left: 4px solid #9c27b0;
}
/* Banking items */
.menu__link[href*="bk-export-statement"],
.menu__link[href*="bk-export-ofx"] {
border-left: 4px solid #00bcd4;
}
/* Xero Accounting items */
.menu__link[href*="xero-hubdoc-receipt"],
.menu__link[href*="xero-importing-bank-ofx"],
.menu__link[href*="xero-reconcile-deposits"],
.menu__link[href*="xero-reconciling-gusto-payroll"],
.menu__link[href*="xero-sub-w9-class"] {
border-left: 4px solid #f44336;
}
/* Payroll & HR items - Adjusted to use brick red for consistency with existing styling */
.menu__link[href*="gusto-onboarding"],
.menu__link[href*="hr-pause-indeed-job-posting"],
.menu__link[href*="hr-run-payroll"],
.menu__link[href*="wc-audit-payroll"],
.menu__link[href*="wc-audit-payments"] {
border-left: 4px solid #f44336; /* Brick red for consistency */
}
/* Hover effects for menu items */
.menu__link:hover {
background-color: rgba(0, 0, 0, 0.05);
transform: translateX(4px);
}
[data-theme='dark'] .menu__link:hover {
background-color: rgba(255, 255, 255, 0.05);
}
/* Active state styling */
.menu__link--active {
font-weight: 600;
background-color: rgba(0, 0, 0, 0.08);
}
[data-theme='dark'] .menu__link--active {
background-color: rgba(255, 255, 255, 0.08);
}
Best Practices for Complex Implementations
-
Match Existing Color Schemes:
- Before applying new colors, check your custom.css for existing color definitions
- Inspect the current sidebar to identify any established color patterns
- Use browser developer tools to verify the actual colors being used
- Maintain consistency by matching colors of similar item types
-
Color System Design:
- Use a consistent color palette with clear visual hierarchy
- Implement gradients for depth and visual interest
- Ensure sufficient contrast in both light and dark modes
- Consider colorblind accessibility
-
Visual Hierarchy:
- Use border-left for primary category indication
- Implement subtle background gradients for section depth
- Add hover effects for interactive elements
- Maintain consistent spacing and padding
-
Performance Optimization:
- Use CSS transitions for smooth effects
- Implement efficient selectors for better rendering
- Consider using CSS custom properties for theme colors
- Optimize gradient definitions
-
Accessibility Considerations:
- Ensure sufficient color contrast ratios
- Provide alternative visual indicators
- Support keyboard navigation
- Test with screen readers
Troubleshooting Complex Implementations
Issue: Colors don't match existing menu items
- Solution: Inspect the existing menu items using browser dev tools and copy the exact color values
- Alternative: Grep your CSS files for the relevant selectors to find existing color definitions
Issue: Gradient performance issues
- Solution: Use simpler gradients or solid colors for better performance
- Alternative: Implement background-color transitions instead
Issue: Dark mode inconsistencies
- Solution: Test all color combinations in both themes
- Alternative: Use CSS custom properties for theme colors
Issue: Hover effects not working
- Solution: Check z-index and stacking context
- Alternative: Simplify hover effects for better compatibility
Color Palette Reference
These colors are suggestions only. Always prefer to match existing color schemes in your documentation.
Light Theme Colors
- System Setup & IT:
#2196f3(Blue) - Accounts Payable:
#4caf50(Green) - Billing & Transactions:
#ff9800(Orange) - PEX Card Management:
#9c27b0(Purple) - Banking:
#00bcd4(Cyan) - Xero Accounting:
#f44336(Red) - Payroll & HR:
#f44336(Brick Red) - Updated from Deep Purple to match existing styling
Dark Theme Colors
- System Setup & IT:
#64b5f6(Light Blue) - Accounts Payable:
#81c784(Light Green) - Billing & Transactions:
#ffb74d(Light Orange) - PEX Card Management:
#ba68c8(Light Purple) - Banking:
#4dd0e1(Light Cyan) - Xero Accounting:
#e57373(Light Red) - Payroll & HR:
#e57373(Light Red) - Updated from Light Deep Purple to match existing styling