{{ .Title }}
+ + {{ with .Description }} +{{ . }}
+ {{ end }} + + {{ with .Params.author }} + + {{ end }} + + {{ if .Params.toc }} + + {{ end }} +diff --git a/TAILWIND_SETUP.md b/TAILWIND_SETUP.md new file mode 100644 index 00000000..8e0130e5 --- /dev/null +++ b/TAILWIND_SETUP.md @@ -0,0 +1,150 @@ +# Hugo Native Tailwind CSS Setup + +MiloDocs theme now supports Hugo's native Tailwind CSS v4 processing, eliminating the need for separate build tools. + +## Quick Setup + +### 1. Install Dependencies + +In your Hugo site root, install the required dependencies: + +```bash +npm install -D @tailwindcss/postcss autoprefixer postcss postcss-import tailwindcss +``` + +### 2. Create PostCSS Configuration + +Create `postcss.config.js` in your site root: + +```javascript +module.exports = { + plugins: [ + require('postcss-import')({ + path: ['themes/milodocs/assets/css'] + }), + require('@tailwindcss/postcss'), + require('autoprefixer') + ] +} +``` + +### 3. Create Tailwind Configuration + +Create `tailwind.config.js` in your site root: + +```javascript +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: [ + "content/**/*.md", + "layouts/**/*.html", + "themes/milodocs/layouts/**/*.html", + "themes/milodocs/content/**/*.md", + "assets/js/**/*.js" + ], + theme: { + extend: { + colors: { + brand: "var(--color-brand)", + "brand-1": "var(--color-brand-1)", + "brand-2": "var(--color-brand-2)", + "brand-3": "var(--color-brand-3)", + "brand-4": "var(--color-brand-4)", + "brand-5": "var(--color-brand-5)", + "brand-6": "var(--color-brand-6)", + "brand-7": "var(--color-brand-7)", + surface: "var(--color-surface)", + "surface-hover": "var(--color-surface-hover)", + "surface-active": "var(--color-surface-active)", + text: { + primary: "var(--color-text-primary)", + secondary: "var(--color-text-secondary)", + tertiary: "var(--color-text-tertiary)", + inverse: "var(--color-text-inverse)", + }, + bg: { + primary: "var(--color-bg-primary)", + secondary: "var(--color-bg-secondary)", + tertiary: "var(--color-bg-tertiary)", + inverse: "var(--color-bg-inverse)", + }, + border: { + primary: "var(--color-border-primary)", + secondary: "var(--color-border-secondary)", + focus: "var(--color-border-focus)", + }, + }, + fontFamily: { + "brand": ["NVIDIA", "Arial", "Helvetica", "sans-serif"], + "nvidia": ["NVIDIA", "Arial", "Helvetica", "sans-serif"], + "nvidia-mono": ["RobotoMono", "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", "monospace"], + }, + fontSize: { + 'xs': ['0.875rem', { lineHeight: '1.4' }], + 'sm': ['0.875rem', { lineHeight: '1.5' }], + 'base': ['1rem', { lineHeight: '1.6' }], + 'lg': ['1.125rem', { lineHeight: '1.75' }], + 'xl': ['1.25rem', { lineHeight: '1.75' }], + '2xl': ['1.5rem', { lineHeight: '2' }], + '3xl': ['1.875rem', { lineHeight: '2.25' }], + }, + }, + }, + plugins: [], +}; +``` + +### 4. Create Theme Symlink + +For the example site to work, create a symlink to the theme: + +```bash +mkdir -p themes +ln -sf ../../ themes/milodocs +``` + +## How It Works + +1. **Hugo Processing**: Hugo automatically detects the PostCSS configuration and processes CSS files through PostCSS +2. **Tailwind v4**: The `@tailwindcss/postcss` plugin handles Tailwind CSS v4 compilation +3. **Component Imports**: PostCSS Import resolves the theme's component CSS files +4. **No Build Step**: Everything happens automatically when you run `hugo server` or `hugo build` + +## Benefits + +- ✅ **No separate build tools**: Hugo handles everything natively +- ✅ **Live reload**: CSS changes are reflected immediately during development +- ✅ **Optimized output**: Hugo automatically minifies and fingerprints CSS in production +- ✅ **Tailwind v4**: Latest Tailwind CSS features and performance improvements +- ✅ **Theme integration**: Full access to theme components and design tokens + +## Troubleshooting + +### CSS Import Errors + +If you see import path errors, ensure: +1. The theme symlink exists: `themes/milodocs` → `../../` +2. PostCSS import path is configured: `path: ['themes/milodocs/assets/css']` + +### Missing Dependencies + +Ensure you have Hugo Extended version for PostCSS support: +```bash +hugo version # Should show "extended" +``` + +### Development vs Production + +- **Development**: CSS is processed but not minified for faster builds +- **Production**: CSS is automatically minified and fingerprinted by Hugo + +## Migration from PostCSS Build + +If you're migrating from the previous PostCSS build setup: + +1. Remove build scripts from `package.json` +2. Delete generated `assets/css/main.css` +3. Remove theme-level `postcss.config.js` and `tailwind.config.js` +4. Follow the setup steps above + +The theme now handles CSS processing through Hugo's native capabilities, providing a much cleaner and more maintainable setup. diff --git a/assets/css/architecture/animation-system.css b/assets/css/architecture/animation-system.css deleted file mode 100644 index 90ea00a7..00000000 --- a/assets/css/architecture/animation-system.css +++ /dev/null @@ -1,370 +0,0 @@ -/* 🎯 Universal Animation System - Single Source of Truth - * ===================================================== - * - * This file establishes consistent timing, easing, and animation patterns - * across the entire theme to eliminate timing chaos and performance issues. - */ - -:root { - /* ✨ TIMING TOKENS - Only these 4 speeds allowed site-wide */ - --timing-instant: 0.1s; /* Micro-interactions (hover, focus) */ - --timing-fast: 0.2s; /* Standard interactions (buttons, links) */ - --timing-medium: 0.3s; /* Complex interactions (collapse, expand) */ - --timing-slow: 0.5s; /* Dramatic reveals (page transitions) */ - - /* ✨ EASING TOKENS - Only these 3 curves allowed site-wide */ - --easing-standard: cubic-bezier(0.4, 0, 0.2, 1); /* Default - smooth start/end */ - --easing-emphasized: cubic-bezier(0.05, 0.7, 0.1, 1); /* Dramatic - bouncy feel */ - --easing-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Gentle - soft motion */ - - /* 🎯 COLLAPSE TOKENS - Universal collapse/expand behavior */ - --collapse-timing: var(--timing-medium); - --collapse-easing: var(--easing-standard); - --collapse-height-collapsed: 0; - --collapse-height-expanded: 2000px; /* Never use 'none' or 'auto' - breaks animation */ - --collapse-opacity-collapsed: 0; - --collapse-opacity-expanded: 1; - - /* 🎨 TRANSFORM TOKENS - 3D acceleration friendly */ - --transform-scale-down: scale(0.95); - --transform-scale-up: scale(1.05); - --transform-scale-normal: scale(1); - --transform-translate-up: translateY(-4px); - --transform-translate-down: translateY(4px); - --transform-translate-none: translateY(0); - - /* 🌟 OPACITY TOKENS - Visibility states */ - --opacity-hidden: 0; - --opacity-faded: 0.6; - --opacity-visible: 1; - - /* 🎨 COMPONENT-SPECIFIC TOKENS - From design-tokens.css merge */ - - /* Card & Tile Tokens */ - --card-shadow-rest: 0 1px 3px rgba(0,0,0,0.1); - --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.15); - --card-shadow-active: 0 8px 25px rgba(0,0,0,0.15); - --card-transform-hover: translateY(-2px); - --card-transform-active: translateY(-1px) scale(0.98); - --card-border-radius: 0.5rem; - - /* ✨ ADDITIONAL TRANSFORM PATTERNS - From component analysis */ - --transform-lift-subtle: translateY(-1px); /* Buttons, small elements */ - --transform-lift-medium: translateY(-2px); /* Cards, medium elements */ - --transform-lift-dramatic: translateY(-4px); /* Hero elements */ - --transform-slide-in-up: translateY(20px); /* Entry animations */ - --transform-slide-in-down: translateY(-20px); /* Dropdown animations */ - --transform-scale-hover: scale(1.02); /* Hover scale up */ - --transform-scale-active: scale(0.98); /* Active scale down */ - --transform-scale-entrance: scale(0.95); /* Entry scale */ - - /* ✨ COMBINED TRANSFORMS - Common combinations */ - --transform-lift-and-scale: translateY(-2px) scale(1.02); - --transform-press-down: translateY(1px) scale(0.98); - --transform-bounce-in: translateY(10px) scale(0.95); - --transform-slide-up-fade: translateY(15px); - - /* Interaction Tokens */ - --hover-scale: 1.02; - --active-scale: 0.98; - --focus-ring-width: 2px; - --focus-ring-offset: 2px; - --focus-ring-color: rgba(var(--color-brand-rgb), 0.2); - - /* Loading State Tokens */ - --loading-opacity: 0.6; - --loading-blur: blur(1px); - --loading-skeleton-bg: linear-gradient(90deg, - rgba(var(--color-brand-rgb), 0.1) 25%, - rgba(var(--color-brand-rgb), 0.2) 50%, - rgba(var(--color-brand-rgb), 0.1) 75%); - --loading-skeleton-size: 200% 100%; - - /* Feedback Tokens */ - --feedback-success: #10b981; - --feedback-warning: #f59e0b; - --feedback-error: #ef4444; - --feedback-info: #3b82f6; - --feedback-slide-in: translateY(-10px); - --feedback-slide-out: translateY(-20px); - - /* Progressive Reveal Tokens */ - --reveal-stagger-delay: 0.05s; - --reveal-batch-delay: 0.15s; - --reveal-slide-distance: 20px; -} - -/* 🌙 DARK MODE ENHANCEMENTS */ -.dark { - --focus-ring-color: rgba(var(--color-brand-rgb), 0.3); - - /* Enhanced loading states for dark mode */ - --loading-skeleton-bg: linear-gradient(90deg, - rgba(255, 255, 255, 0.05) 25%, - rgba(255, 255, 255, 0.1) 50%, - rgba(255, 255, 255, 0.05) 75%); - - /* Enhanced shadows for dark mode */ - --card-shadow-rest: 0 1px 3px rgba(0,0,0,0.3); - --card-shadow-hover: 0 4px 12px rgba(0,0,0,0.4); - --card-shadow-active: 0 8px 25px rgba(0,0,0,0.5); -} - -/* 🚨 ACCESSIBILITY - Respect user preferences */ -@media (prefers-reduced-motion: reduce) { - :root { - --timing-instant: 0.01s; - --timing-fast: 0.01s; - --timing-medium: 0.01s; - --timing-slow: 0.01s; - } - - * { - animation-duration: 0.01s !important; - animation-iteration-count: 1 !important; - transition-duration: 0.01s !important; - } -} - -/* ✅ UNIVERSAL COLLAPSE COMPONENT - * ================================ - * Use these classes on any collapsible content for consistent behavior - */ - -/* Base collapsible container */ -.collapse-container { - position: relative; - overflow: hidden; -} - -/* Collapsible content body */ -.collapse-body { - max-height: var(--collapse-height-collapsed); - opacity: var(--collapse-opacity-collapsed); - overflow: hidden; - transition: - max-height var(--collapse-timing) var(--collapse-easing), - opacity var(--collapse-timing) var(--collapse-easing); -} - -/* Expanded state */ -.collapse-body.expanded { - max-height: var(--collapse-height-expanded); - opacity: var(--collapse-opacity-expanded); -} - -/* Duplicated component/data state rules moved to architecture/component-states.css */ -/* Keeping this section intentionally empty to avoid divergence. */ - -/* ✅ PERFORMANCE-OPTIMIZED HOVER STATES - * ====================================== - * Use specific property transitions instead of "transition: all" - */ - -.interactive-element { - transition: - transform var(--timing-fast) var(--easing-standard), - opacity var(--timing-fast) var(--easing-standard), - box-shadow var(--timing-fast) var(--easing-standard); -} - -.interactive-element:hover { - transform: var(--transform-translate-up); - opacity: var(--opacity-visible); -} - -.interactive-element:active { - transform: var(--transform-scale-down); - transition-duration: var(--timing-instant); /* Instant feedback */ -} - -/* ✅ COMPONENT-SPECIFIC CUSTOMIZATION - * ==================================== - * Override tokens for specific component needs - */ - -/* OpenAPI components need larger heights for complex content */ -.openapi-response { - --collapse-height-expanded: 3000px; - --collapse-timing: var(--timing-medium); -} - -/* Notebook cells should be snappier */ -.notebook-cell { - --collapse-height-expanded: 2000px; - --collapse-timing: var(--timing-fast); -} - -/* Tutorial sections can be more dramatic */ -.tutorial-section { - --collapse-height-expanded: 2500px; - --collapse-timing: var(--timing-slow); - --collapse-easing: var(--easing-emphasized); -} - -/* Tabs need instant switching for good UX */ -.tab-content { - --collapse-height-expanded: 1500px; - --collapse-timing: var(--timing-fast); -} - -/* ✅ SIDEBAR NAVIGATION TREE - Optimized for hierarchical content */ -.nested-content { - --collapse-height-expanded: 2000px; - --collapse-timing: var(--timing-medium); - --collapse-easing: var(--easing-standard); - - /* Performance optimization for tree navigation */ - will-change: max-height, opacity; - transform: translateZ(0); /* Force hardware acceleration */ -} - -/* ✅ UTILITY CLASSES - * =================== - * Common animation patterns as reusable classes - */ - -.fade-in { - opacity: var(--opacity-hidden); - animation: fadeIn var(--timing-medium) var(--easing-standard) forwards; -} - -.fade-out { - opacity: var(--opacity-visible); - animation: fadeOut var(--timing-medium) var(--easing-standard) forwards; -} - -.slide-up { - transform: var(--transform-translate-down); - animation: slideUp var(--timing-medium) var(--easing-standard) forwards; -} - -.slide-in-up { - transform: var(--transform-slide-in-up); - opacity: var(--opacity-hidden); - animation: slideInUp var(--timing-medium) var(--easing-standard) forwards; -} - -.slide-in-down { - transform: var(--transform-slide-in-down); - opacity: var(--opacity-hidden); - animation: slideInDown var(--timing-medium) var(--easing-standard) forwards; -} - -.scale-in { - transform: var(--transform-scale-down); - opacity: var(--opacity-hidden); - animation: scaleIn var(--timing-medium) var(--easing-emphasized) forwards; -} - -.bounce-in { - transform: var(--transform-bounce-in); - opacity: var(--opacity-hidden); - animation: bounceIn var(--timing-slow) var(--easing-emphasized) forwards; -} - -.lift-on-hover { - transition: transform var(--timing-fast) var(--easing-standard); -} - -.lift-on-hover:hover { - transform: var(--transform-lift-medium); -} - -/* ✅ KEYFRAME ANIMATIONS - * ======================= - * Standard animations used across components - */ - -@keyframes fadeIn { - to { - opacity: var(--opacity-visible); - } -} - -@keyframes fadeOut { - to { - opacity: var(--opacity-hidden); - } -} - -@keyframes slideUp { - to { - transform: var(--transform-translate-none); - } -} - -@keyframes slideInUp { - to { - transform: var(--transform-translate-none); - opacity: var(--opacity-visible); - } -} - -@keyframes slideInDown { - to { - transform: var(--transform-translate-none); - opacity: var(--opacity-visible); - } -} - -@keyframes scaleIn { - to { - transform: var(--transform-scale-normal); - opacity: var(--opacity-visible); - } -} - -@keyframes bounceIn { - 0% { - transform: var(--transform-bounce-in); - opacity: var(--opacity-hidden); - } - 50% { - transform: translateY(-5px) scale(1.02); - opacity: var(--opacity-faded); - } - 100% { - transform: var(--transform-translate-none); - opacity: var(--opacity-visible); - } -} - -/* ✅ STAGGER ANIMATIONS - * ====================== - * For animating groups of elements with delays - */ - -.stagger-children > * { - animation-delay: calc(var(--reveal-stagger-delay) * var(--stagger-index, 0)); -} - -.stagger-fade-in > * { - opacity: var(--opacity-hidden); - animation: fadeIn var(--timing-medium) var(--easing-standard) forwards; -} - -.stagger-slide-up > * { - transform: var(--transform-slide-in-up); - opacity: var(--opacity-hidden); - animation: slideInUp var(--timing-medium) var(--easing-standard) forwards; -} - -/* ✅ DEBUG MODE - * ============== - * Uncomment to visualize animation timing (development only) - */ - -/* -.collapse-body { - border: 2px dashed red !important; -} - -.collapse-body.expanded { - border-color: green !important; -} - -[data-collapse-state] { - outline: 2px solid blue !important; -} -*/ \ No newline at end of file diff --git a/assets/css/architecture/component-states.css b/assets/css/architecture/component-states.css deleted file mode 100644 index 8e5a644d..00000000 --- a/assets/css/architecture/component-states.css +++ /dev/null @@ -1,304 +0,0 @@ -/* 🎯 Universal Component State Management System - * ============================================== - * - * This file establishes consistent state management patterns across all - * interactive components, replacing inconsistent class-based approaches - * with data-attribute driven state management. - */ - -/* ✅ COLLAPSE STATE MANAGEMENT - * ============================= - * Universal collapse/expand states using data attributes - */ - -/* Base collapsed state - applies to any element with data-collapse-state */ -[data-collapse-state="collapsed"] { - max-height: var(--collapse-height-collapsed, 0); - opacity: var(--collapse-opacity-collapsed, 0); - overflow: hidden; - transition: - max-height var(--collapse-timing, var(--timing-medium)) var(--collapse-easing, var(--easing-standard)), - opacity var(--collapse-timing, var(--timing-medium)) var(--collapse-easing, var(--easing-standard)); -} - -/* Transitioning state - shows element is mid-animation */ -[data-collapse-state="transitioning"] { - overflow: hidden; /* Ensure no content spillage during animation */ - pointer-events: none; /* Prevent interaction during transition */ -} - -/* Expanded state - fully visible and interactive */ -[data-collapse-state="expanded"] { - max-height: var(--collapse-height-expanded, 2000px); - opacity: var(--collapse-opacity-expanded, 1); - overflow: visible; /* Allow content to be fully visible when expanded */ - transition: - max-height var(--collapse-timing, var(--timing-medium)) var(--collapse-easing, var(--easing-standard)), - opacity var(--collapse-timing, var(--timing-medium)) var(--collapse-easing, var(--easing-standard)); -} - -/* ✅ COMPONENT LIFECYCLE STATES - * ============================== - * Standard states for component initialization and interaction - */ - -/* Loading state - component is being initialized */ -[data-component-state="loading"] { - opacity: var(--opacity-faded, 0.6); - pointer-events: none; - cursor: wait; - transition: opacity var(--timing-fast) var(--easing-standard); -} - -/* Ready state - component is initialized and interactive */ -[data-component-state="ready"] { - opacity: var(--opacity-visible, 1); - pointer-events: auto; - transition: opacity var(--timing-fast) var(--easing-standard); -} - -/* Disabled state - component is non-interactive */ -[data-component-state="disabled"] { - opacity: var(--opacity-faded, 0.6); - pointer-events: none; - cursor: not-allowed; - filter: grayscale(50%); - transition: - opacity var(--timing-fast) var(--easing-standard), - filter var(--timing-fast) var(--easing-standard); -} - -/* Error state - component has encountered an error */ -[data-component-state="error"] { - opacity: var(--opacity-visible, 1); - border-color: var(--color-danger, #ef4444); - background-color: rgba(239, 68, 68, 0.05); - transition: - border-color var(--timing-fast) var(--easing-standard), - background-color var(--timing-fast) var(--easing-standard); -} - -/* ✅ LEGACY CLASS SUPPORT (Backward Compatibility) - * ================================================= - * Bridge classes for existing components that use class-based states - */ - -/* Support for existing .expanded classes */ -.expanded { - max-height: var(--collapse-height-expanded, 2000px) !important; - opacity: var(--collapse-opacity-expanded, 1) !important; - overflow: visible !important; - transition: - max-height var(--collapse-timing, var(--timing-medium)) var(--collapse-easing, var(--easing-standard)), - opacity var(--collapse-timing, var(--timing-medium)) var(--collapse-easing, var(--easing-standard)); -} - -/* Support for existing .collapsed classes */ -.collapsed { - max-height: var(--collapse-height-collapsed, 0) !important; - opacity: var(--collapse-opacity-collapsed, 0) !important; - overflow: hidden !important; - transition: - max-height var(--collapse-timing, var(--timing-medium)) var(--collapse-easing, var(--easing-standard)), - opacity var(--collapse-timing, var(--timing-medium)) var(--collapse-easing, var(--easing-standard)); -} - -/* ✅ INTERACTIVE STATES - * ===================== - * Consistent hover, focus, and active states - */ - -/* Interactive elements with hover states */ -[data-interactive="true"]:hover, -.interactive:hover { - transform: var(--transform-translate-up, translateY(-2px)); - transition: transform var(--timing-fast) var(--easing-standard); -} - -/* Interactive elements with focus states */ -[data-interactive="true"]:focus-visible, -.interactive:focus-visible { - outline: 2px solid var(--color-brand, #3b82f6); - outline-offset: 2px; - border-radius: 0.25rem; -} - -/* Interactive elements with active states */ -[data-interactive="true"]:active, -.interactive:active { - transform: var(--transform-scale-down, scale(0.98)); - transition: transform var(--timing-instant) var(--easing-standard); -} - -/* ✅ COMPONENT-SPECIFIC STATE OVERRIDES - * ====================================== - * Customization for specific component types - */ - -/* OpenAPI Components */ -.openapi-response[data-collapse-state], -.openapi-endpoint[data-collapse-state], -.openapi-parameter[data-collapse-state] { - --collapse-height-expanded: 3000px; /* Complex API content needs more space */ - --collapse-timing: var(--timing-medium); - --collapse-easing: var(--easing-standard); -} - -/* Notebook Components */ -.notebook-cell[data-collapse-state], -.notebook-output[data-collapse-state] { - --collapse-height-expanded: 2000px; /* Code and output content */ - --collapse-timing: var(--timing-fast); /* Snappier interaction */ - --collapse-easing: var(--easing-standard); -} - -/* Tutorial Components */ -.tutorial-section[data-collapse-state], -.section-content[data-collapse-state] { - --collapse-height-expanded: 2500px; /* Text-heavy content */ - --collapse-timing: var(--timing-slow); /* More dramatic for educational content */ - --collapse-easing: var(--easing-emphasized); -} - -/* Tab Components */ -.tab-content[data-collapse-state], -[data-tabcontent][data-collapse-state] { - --collapse-height-expanded: 1500px; /* Tab content usually more compact */ - --collapse-timing: var(--timing-fast); /* Quick switching expected */ - --collapse-easing: var(--easing-standard); -} - -/* ✅ UTILITY CLASSES - * =================== - * Quick state application classes - */ - -/* Force immediate state without animation */ -.state-immediate { - transition: none !important; -} - -/* Force slow animation timing */ -.state-slow { - --collapse-timing: var(--timing-slow); - --collapse-easing: var(--easing-smooth); -} - -/* Force fast animation timing */ -.state-fast { - --collapse-timing: var(--timing-fast); - --collapse-easing: var(--easing-standard); -} - -/* Emphasized dramatic animation */ -.state-dramatic { - --collapse-timing: var(--timing-slow); - --collapse-easing: var(--easing-emphasized); -} - -/* ✅ ACCESSIBILITY ENHANCEMENTS - * ============================== - * Enhanced states for screen readers and assistive technology - */ - -/* ✅ REMOVED: Enhanced focus indicators causing ancestry tree echoing - * The :focus-within pseudo-class was applying styling to ALL ancestor elements - * with data-collapse-state attributes, creating the visual "echo" effect. - * Focus should be handled by individual interactive elements instead. - */ - -/* Screen reader friendly state announcements */ -[data-collapse-state="collapsed"][aria-label]::before { - content: "Collapsed: "; - position: absolute; - left: -10000px; - width: 1px; - height: 1px; - overflow: hidden; -} - -[data-collapse-state="expanded"][aria-label]::before { - content: "Expanded: "; - position: absolute; - left: -10000px; - width: 1px; - height: 1px; - overflow: hidden; -} - -/* ✅ MOTION REDUCTION SUPPORT - * ============================ - * Respect user motion preferences - */ - -@media (prefers-reduced-motion: reduce) { - [data-collapse-state], - [data-component-state], - .expanded, - .collapsed, - [data-interactive] { - transition: none !important; - animation: none !important; - transform: none !important; - } -} - -/* ✅ HIGH CONTRAST MODE SUPPORT - * ============================== - * Enhanced visibility for high contrast users - */ - -@media (prefers-contrast: high) { - [data-component-state="error"] { - border-width: 2px; - border-style: solid; - } - - /* ✅ REMOVED: focus-within outline for high contrast mode - * This was also contributing to the ancestry tree echo effect - */ -} - -[data-interactive="true"]:focus-visible { - outline-width: 3px; - outline-style: solid; -} - -/* ✅ DEBUG MODE (Development Only) - * ================================= - * Uncomment to visualize state management in development - */ - -/* -[data-collapse-state] { - position: relative; -} - -[data-collapse-state]::before { - content: "State: " attr(data-collapse-state); - position: absolute; - top: -1.5rem; - left: 0; - background: #000; - color: #fff; - padding: 0.25rem 0.5rem; - font-size: 0.75rem; - border-radius: 0.25rem; - z-index: 1000; - pointer-events: none; -} - -[data-component-state]::after { - content: "Component: " attr(data-component-state); - position: absolute; - top: -3rem; - left: 0; - background: #3b82f6; - color: #fff; - padding: 0.25rem 0.5rem; - font-size: 0.75rem; - border-radius: 0.25rem; - z-index: 1000; - pointer-events: none; -} -*/ \ No newline at end of file diff --git a/assets/css/architecture/elevation-system.css b/assets/css/architecture/elevation-system.css deleted file mode 100644 index 3e3a1cc1..00000000 --- a/assets/css/architecture/elevation-system.css +++ /dev/null @@ -1,347 +0,0 @@ -/* 🎯 Universal Elevation System - * ============================== - * - * This file centralizes all box-shadow patterns to create a consistent - * elevation system across the theme. Based on Material Design principles - * but adapted for our brand aesthetic. - */ - -:root { - /* ✨ ELEVATION LEVELS (0-24dp equivalent) */ - --elevation-0: none; - /* --elevation-1: 0 1px 3px rgba(0, 0, 0, 0.1); */ - --elevation-1: 0 1px 2px rgba(0, 0, 0, 0.06); - /* --elevation-2: 0 2px 4px rgba(0, 0, 0, 0.1); */ - --elevation-2: 0 1px 3px rgba(0, 0, 0, 0.08); - /* --elevation-3: 0 2px 6px rgba(0, 0, 0, 0.1); */ - --elevation-3: 0 2px 5px rgba(0, 0, 0, 0.08); - /* --elevation-4: 0 2px 8px rgba(0, 0, 0, 0.1); */ - --elevation-4: 0 2px 6px rgba(0, 0, 0, 0.1); - /* --elevation-6: 0 4px 12px rgba(0, 0, 0, 0.1); */ - --elevation-6: 0 3px 10px rgba(0, 0, 0, 0.12); - /* --elevation-8: 0 4px 16px rgba(0, 0, 0, 0.1); */ - --elevation-8: 0 4px 14px rgba(0, 0, 0, 0.12); - /* --elevation-12: 0 8px 24px rgba(0, 0, 0, 0.1); */ - --elevation-12: 0 6px 20px rgba(0, 0, 0, 0.14); - /* --elevation-16: 0 12px 28px rgba(0, 0, 0, 0.1); */ - --elevation-16: 0 8px 24px rgba(0, 0, 0, 0.14); - /* --elevation-24: 0 16px 32px rgba(0, 0, 0, 0.15); */ - --elevation-24: 0 12px 28px rgba(0, 0, 0, 0.16); - - /* ✨ INTERACTIVE ELEVATION (hover states) */ - /* --elevation-hover-1: 0 4px 8px rgba(0, 0, 0, 0.15); */ - --elevation-hover-1: 0 3px 8px rgba(0, 0, 0, 0.12); - /* --elevation-hover-2: 0 4px 12px rgba(0, 0, 0, 0.15); */ - --elevation-hover-2: 0 4px 10px rgba(0, 0, 0, 0.14); - /* --elevation-hover-3: 0 6px 16px rgba(0, 0, 0, 0.15); */ - --elevation-hover-3: 0 5px 14px rgba(0, 0, 0, 0.14); - /* --elevation-hover-4: 0 8px 20px rgba(0, 0, 0, 0.15); */ - --elevation-hover-4: 0 6px 18px rgba(0, 0, 0, 0.16); - /* --elevation-hover-6: 0 12px 28px rgba(0, 0, 0, 0.15); */ - --elevation-hover-6: 0 8px 22px rgba(0, 0, 0, 0.18); - /* --elevation-hover-8: 0 16px 32px rgba(0, 0, 0, 0.2); */ - --elevation-hover-8: 0 10px 28px rgba(0, 0, 0, 0.2); - - /* ✨ BRAND-COLORED ELEVATIONS */ - --elevation-brand-subtle: 0 2px 8px rgba(var(--color-brand-rgb), 0.1); - --elevation-brand-medium: 0 4px 16px rgba(var(--color-brand-rgb), 0.15); - --elevation-brand-strong: 0 8px 24px rgba(var(--color-brand-rgb), 0.2); - --elevation-brand-glow: 0 0 20px rgba(var(--color-brand-rgb), 0.15); - --elevation-brand-focus: 0 0 0 2px rgba(var(--color-brand-rgb), 0.2); - - /* ✨ SPECIALIZED ELEVATIONS */ - --elevation-inset: inset 0 1px 3px rgba(0, 0, 0, 0.1); - --elevation-inset-deep: inset 0 2px 6px rgba(0, 0, 0, 0.15); - --elevation-outline: 0 0 0 1px rgba(0, 0, 0, 0.1); - --elevation-outline-brand: 0 0 0 1px var(--color-brand); - - /* ✨ ERROR/WARNING/SUCCESS ELEVATIONS */ - --elevation-error: 0 4px 12px rgba(239, 68, 68, 0.2); - --elevation-warning: 0 4px 12px rgba(245, 158, 11, 0.2); - --elevation-success: 0 4px 12px rgba(16, 185, 129, 0.2); - --elevation-info: 0 4px 12px rgba(59, 130, 246, 0.2); - - /* ✨ OVERLAYS AND MODALS */ - --elevation-overlay: 0 24px 48px rgba(0, 0, 0, 0.3); - --elevation-modal: 0 32px 64px rgba(0, 0, 0, 0.4); - --elevation-dropdown: 0 8px 24px rgba(0, 0, 0, 0.15); - --elevation-tooltip: 0 4px 12px rgba(0, 0, 0, 0.2); -} - -/* 🌙 DARK MODE ELEVATION ADJUSTMENTS */ -.dark { - /* Stronger shadows for dark mode */ - /* --elevation-1: 0 1px 3px rgba(0, 0, 0, 0.3); */ - --elevation-1: 0 1px 2px rgba(0, 0, 0, 0.25); - /* --elevation-2: 0 2px 4px rgba(0, 0, 0, 0.3); */ - --elevation-2: 0 2px 4px rgba(0, 0, 0, 0.28); - /* --elevation-3: 0 2px 6px rgba(0, 0, 0, 0.4); */ - --elevation-3: 0 2px 5px rgba(0, 0, 0, 0.34); - /* --elevation-4: 0 2px 8px rgba(0, 0, 0, 0.4); */ - --elevation-4: 0 2px 6px rgba(0, 0, 0, 0.36); - /* --elevation-6: 0 4px 12px rgba(0, 0, 0, 0.4); */ - --elevation-6: 0 3px 10px rgba(0, 0, 0, 0.4); - /* --elevation-8: 0 4px 16px rgba(0, 0, 0, 0.5); */ - --elevation-8: 0 4px 14px rgba(0, 0, 0, 0.48); - /* --elevation-12: 0 8px 24px rgba(0, 0, 0, 0.5); */ - --elevation-12: 0 6px 20px rgba(0, 0, 0, 0.5); - /* --elevation-16: 0 12px 28px rgba(0, 0, 0, 0.6); */ - --elevation-16: 0 8px 24px rgba(0, 0, 0, 0.56); - /* --elevation-24: 0 16px 32px rgba(0, 0, 0, 0.7); */ - --elevation-24: 0 12px 28px rgba(0, 0, 0, 0.6); - - /* Enhanced hover states for dark mode */ - /* --elevation-hover-1: 0 4px 8px rgba(0, 0, 0, 0.5); */ - --elevation-hover-1: 0 3px 8px rgba(0, 0, 0, 0.44); - /* --elevation-hover-2: 0 4px 12px rgba(0, 0, 0, 0.5); */ - --elevation-hover-2: 0 4px 10px rgba(0, 0, 0, 0.48); - /* --elevation-hover-3: 0 6px 16px rgba(0, 0, 0, 0.6); */ - --elevation-hover-3: 0 5px 14px rgba(0, 0, 0, 0.5); - /* --elevation-hover-4: 0 8px 20px rgba(0, 0, 0, 0.6); */ - --elevation-hover-4: 0 6px 18px rgba(0, 0, 0, 0.54); - /* --elevation-hover-6: 0 12px 28px rgba(0, 0, 0, 0.7); */ - --elevation-hover-6: 0 8px 22px rgba(0, 0, 0, 0.58); - /* --elevation-hover-8: 0 16px 32px rgba(0, 0, 0, 0.8); */ - --elevation-hover-8: 0 10px 28px rgba(0, 0, 0, 0.62); - - /* Enhanced brand elevations for dark mode */ - --elevation-brand-subtle: 0 2px 8px rgba(var(--color-brand-rgb), 0.15); - --elevation-brand-medium: 0 4px 16px rgba(var(--color-brand-rgb), 0.2); - --elevation-brand-strong: 0 8px 24px rgba(var(--color-brand-rgb), 0.25); - --elevation-brand-glow: 0 0 20px rgba(var(--color-brand-rgb), 0.25); - --elevation-brand-focus: 0 0 0 2px rgba(var(--color-brand-rgb), 0.3); - - /* Enhanced overlay elevations for dark mode */ - --elevation-overlay: 0 24px 48px rgba(0, 0, 0, 0.8); - --elevation-modal: 0 32px 64px rgba(0, 0, 0, 0.9); - --elevation-dropdown: 0 8px 24px rgba(0, 0, 0, 0.6); - --elevation-tooltip: 0 4px 12px rgba(0, 0, 0, 0.7); -} - -/* ✅ ELEVATION UTILITY CLASSES - * ============================= - * Apply these classes for consistent elevation - */ - -.elevation-0 { box-shadow: var(--elevation-0); } -.elevation-1 { box-shadow: var(--elevation-1); } -.elevation-2 { box-shadow: var(--elevation-2); } -.elevation-3 { box-shadow: var(--elevation-3); } -.elevation-4 { box-shadow: var(--elevation-4); } -.elevation-6 { box-shadow: var(--elevation-6); } -.elevation-8 { box-shadow: var(--elevation-8); } -.elevation-12 { box-shadow: var(--elevation-12); } -.elevation-16 { box-shadow: var(--elevation-16); } -.elevation-24 { box-shadow: var(--elevation-24); } - -/* Hover elevation classes */ -.elevation-hover-1:hover { box-shadow: var(--elevation-hover-1); } -.elevation-hover-2:hover { box-shadow: var(--elevation-hover-2); } -.elevation-hover-3:hover { box-shadow: var(--elevation-hover-3); } -.elevation-hover-4:hover { box-shadow: var(--elevation-hover-4); } -.elevation-hover-6:hover { box-shadow: var(--elevation-hover-6); } -.elevation-hover-8:hover { box-shadow: var(--elevation-hover-8); } - -/* Brand elevation classes */ -.elevation-brand-subtle { box-shadow: var(--elevation-brand-subtle); } -.elevation-brand-medium { box-shadow: var(--elevation-brand-medium); } -.elevation-brand-strong { box-shadow: var(--elevation-brand-strong); } -.elevation-brand-glow { box-shadow: var(--elevation-brand-glow); } - -/* Focus elevation */ -.elevation-focus:focus-visible { - box-shadow: var(--elevation-brand-focus); - outline: none; -} - -/* ✅ COMPONENT-SPECIFIC ELEVATION MAPPINGS - * ========================================= - * Semantic elevation assignments for common components - */ - -/* Surface elements */ -.surface { - box-shadow: var(--elevation-0); -} - -.surface-raised { - box-shadow: var(--elevation-1); -} - -/* Cards */ -.card-flat { - box-shadow: var(--elevation-1); -} - -.card-raised { - box-shadow: var(--elevation-2); -} - -.card-elevated { - box-shadow: var(--elevation-4); -} - -.card-floating { - box-shadow: var(--elevation-8); -} - -/* Interactive cards with hover */ -.card-interactive { - box-shadow: var(--elevation-2); - transition: box-shadow var(--timing-medium) var(--easing-standard); -} - -.card-interactive:hover { - box-shadow: var(--elevation-hover-4); -} - -/* Buttons */ -.btn-flat { - box-shadow: var(--elevation-0); -} - -.btn-raised { - box-shadow: var(--elevation-1); -} - -.btn-floating { - box-shadow: var(--elevation-6); -} - -.btn-raised:hover, -.btn-floating:hover { - box-shadow: var(--elevation-hover-2); -} - -/* Navigation */ -.nav-bar { - box-shadow: var(--elevation-2); -} - -.nav-drawer { - box-shadow: var(--elevation-16); -} - -.nav-tabs { - box-shadow: var(--elevation-1); -} - -/* Overlays */ -.dropdown-menu { - box-shadow: var(--elevation-dropdown); -} - -.modal-content { - box-shadow: var(--elevation-modal); -} - -.tooltip { - box-shadow: var(--elevation-tooltip); -} - -.popover { - box-shadow: var(--elevation-8); -} - -/* Content sections */ -.content-section { - box-shadow: var(--elevation-1); -} - -.featured-content { - box-shadow: var(--elevation-4); -} - -.hero-section { - box-shadow: var(--elevation-8); -} - -/* ✅ STATE-BASED ELEVATIONS - * ========================== - * Elevation changes based on component state - */ - -/* Loading states get reduced elevation */ -[data-component-state="loading"] { - box-shadow: var(--elevation-1) !important; - opacity: var(--opacity-faded); -} - -/* Error states get error elevation */ -[data-component-state="error"] { - box-shadow: var(--elevation-error) !important; -} - -/* Focus states for accessibility */ -[data-component-state="focused"] { - box-shadow: var(--elevation-brand-focus) !important; -} - -/* ✅ COMBINED ELEVATIONS - * ======================= - * Multiple shadows for complex effects - */ - -.elevation-layered { - box-shadow: - var(--elevation-2), - var(--elevation-brand-glow); -} - -.elevation-outlined { - box-shadow: - var(--elevation-4), - var(--elevation-outline); -} - -.elevation-brand-outlined { - box-shadow: - var(--elevation-4), - var(--elevation-outline-brand); -} - -/* ✅ PERFORMANCE OPTIMIZATIONS - * ============================= - * Enable hardware acceleration for elements with elevation changes - */ - -.elevation-animated { - will-change: box-shadow; - transform: translateZ(0); /* Force hardware acceleration */ -} - -/* ✅ ACCESSIBILITY ENHANCEMENTS - * ============================== - * High contrast and reduced motion support - */ - -@media (prefers-contrast: high) { - /* Enhance shadows for better visibility */ - :root { - --elevation-1: 0 1px 3px rgba(0, 0, 0, 0.3); - --elevation-2: 0 2px 4px rgba(0, 0, 0, 0.3); - --elevation-4: 0 2px 8px rgba(0, 0, 0, 0.4); - --elevation-6: 0 4px 12px rgba(0, 0, 0, 0.4); - } -} - -@media (prefers-reduced-motion: reduce) { - /* Remove shadow transitions for reduced motion */ - .card-interactive, - .btn-raised, - .btn-floating, - .elevation-animated { - transition: none !important; - } -} - -/* ✅ PRINT STYLES - * ================ - * Remove shadows for print media - */ - -@media print { - * { - box-shadow: none !important; - } -} \ No newline at end of file diff --git a/assets/css/architecture/index.css b/assets/css/architecture/index.css deleted file mode 100644 index b72eb49b..00000000 --- a/assets/css/architecture/index.css +++ /dev/null @@ -1,162 +0,0 @@ -/* 🎯 Architecture System - Complete Import - * ========================================= - * - * This file imports all architectural foundation files in the correct order - * to ensure proper CSS cascade and prevent conflicts. - * - * Import this single file to get the complete architectural system. - */ - -/* ✅ STEP 1: ANIMATION FOUNDATION - * ================================ - * Must be first - provides timing tokens, easing curves, and base animation patterns - * that other systems depend on. - */ -@import './animation-system.css'; - -/* ✅ STEP 2: COMPONENT STATE MANAGEMENT - * ====================================== - * Depends on animation tokens. Provides state management patterns that - * interaction and loading systems build upon. - */ -@import './component-states.css'; - -/* ✅ STEP 3: LAYOUT FOUNDATIONS - * ============================== - * Independent system that provides spacing, positioning, and layout tokens. - * Can be loaded in parallel with other systems. - */ -@import './layout-foundations.css'; - -/* ✅ STEP 3.5: TYPOGRAPHY SYSTEM - * =============================== - * Global type rules and article typography. - */ -@import './typography-system.css'; - -/* ✅ STEP 4: ELEVATION SYSTEM - * ============================ - * Independent shadow system. Provides elevation tokens that interaction - * patterns will reference. - */ -@import './elevation-system.css'; - -/* ✅ STEP 5: INTERACTION PATTERNS - * ================================ - * Depends on animation tokens and elevation tokens. Provides unified - * hover, focus, and active state patterns. - */ -@import './interaction-patterns.css'; - -/* ✅ STEP 6: LOADING STATES - * ========================== - * Depends on animation tokens and layout tokens. Provides loading patterns - * and skeleton components. - */ -@import './loading-states.css'; - -/* 🎯 ARCHITECTURE SYSTEM SUMMARY - * =============================== - * - * This architecture system provides: - * - * 1. **Animation System** (animation-system.css) - * - Consistent timing tokens (--timing-*) - * - Easing curves (--easing-*) - * - Transform patterns (--transform-*) - * - Collapse/expand behaviors - * - Utility animation classes - * - * 2. **Component States** (component-states.css) - * - Data-attribute driven state management - * - Lifecycle states (loading, ready, disabled, error) - * - Collapse states (collapsed, transitioning, expanded) - * - Interactive states with accessibility support - * - * 3. **Layout Foundations** (layout-foundations.css) - * - Comprehensive spacing scale (--space-*) - * - Semantic spacing tokens (--space-xs, --space-md, etc.) - * - Border radius system (--radius-*) - * - Z-index scale (--z-*) - * - Max-width tokens (--max-width-*) - * - Layout pattern classes (.container, .stack, .cluster, etc.) - * - * 4. **Elevation System** (elevation-system.css) - * - Consistent shadow elevation levels (--elevation-*) - * - Interactive hover elevations (--elevation-hover-*) - * - Brand-colored elevations (--elevation-brand-*) - * - State-specific elevations (error, focus, etc.) - * - Semantic elevation classes (.card-elevated, .btn-floating, etc.) - * - * 5. **Interaction Patterns** (interaction-patterns.css) - * - Unified hover/focus/active behaviors - * - Interactive element classes (.interact-subtle, .interact-dramatic, etc.) - * - Consistent focus management - * - Disabled and loading state patterns - * - Touch device optimizations - * - * 6. **Loading States** (loading-states.css) - * - Loading state classes (.loading, .loading-blur, etc.) - * - Spinner components (.spinner, .spinner-dots, etc.) - * - Skeleton loading patterns (.skeleton, .skeleton-text, etc.) - * - Progressive loading behaviors - * - Async operation state management - * - * USAGE EXAMPLES: - * =============== - * - * // Use architectural tokens in components: - * .my-component { - * padding: var(--space-md); - * border-radius: var(--radius-card); - * box-shadow: var(--elevation-2); - * transition: var(--transition-interactive); - * } - * - * .my-component:hover { - * transform: var(--transform-lift-medium); - * box-shadow: var(--elevation-hover-4); - * } - * - * // Apply architectural classes: - *
{{ . }}
+ {{ end }} + + {{ with .Params.author }} + + {{ end }} + + {{ if .Params.toc }} + + {{ end }} +{{ . }}
+ {{ end }} +{{ .path }}
+ {{ .description }}
+ + {{ if .parameters }} +| Name | +Type | +Required | +Description | +
|---|---|---|---|
{{ .name }} |
+ {{ .type }} |
+ {{ if .required }}Yes{{ else }}No{{ end }} | +{{ .description }} | +
{{ .examples.curl }}
+ {{ .examples.python }}
+ {{ .examples.javascript }}
+ {{ .source }}
+ {{ .text }}
+ {{ else if eq .output_type "display_data" }}
+ {{ .data.text }}
+ {{ end }}
+