diff --git a/docs/config.php b/docs/config.php index e58b54842848..684bee461efa 100644 --- a/docs/config.php +++ b/docs/config.php @@ -14,4 +14,10 @@ return str_contains($page->getPath(), $path); }); }, + 'anyChildrenActive' => function ($page, $children) { + return $children->contains(function ($link) use ($page) { + return $page->getPath() == '/docs/'. $link; + }); + }, + 'navigation' => require_once('navigation.php'), ]; diff --git a/docs/navigation.php b/docs/navigation.php new file mode 100644 index 000000000000..db5b7db7c266 --- /dev/null +++ b/docs/navigation.php @@ -0,0 +1,86 @@ + [ + 'What is Tailwind?' => 'what-is-tailwind', + ], + 'Getting Started' => [ + 'Installation' => 'installation', + 'Configuration' => 'configuration', + 'Colors' => 'colors', + 'Responsive Design' => 'responsive-design', + 'Adding New Utilities' => 'adding-new-utilities', + 'Extracting Components' => 'extracting-components', + 'Functions & Directives' => 'functions-and-directives', + ], + 'Styles' => [ + 'Backgrounds' => [ + 'Color' => 'background-color', + 'Position' => 'background-position', + 'Size' => 'background-size', + ], + 'Borders' => [ + 'Width' => 'border-width', + 'Color' => 'border-color', + 'Style' => 'border-style', + ], + 'Border Radius' => 'border-radius', + 'Container' => 'container', + 'Display' => 'display', + 'Flexbox' => [ + 'Display' => 'flexbox-display', + 'Direction' => 'flexbox-direction', + 'Wrapping' => 'flexbox-wrapping', + 'Justify Content' => 'flexbox-justify-content', + 'Align Items' => 'flexbox-align-items', + 'Align Content' => 'flexbox-align-content', + 'Align Self' => 'flexbox-align-self', + 'Flex, Grow, & Shrink' => 'flexbox-flex-grow-shrink', + ], + 'Floats' => 'floats', + 'Forms' => 'forms', + 'Grid' => 'grid', + 'Interactivity' => [ + 'Cursor' => 'cursor', + 'Resize' => 'resize', + 'Pointer Events' => 'pointer-events', + 'User Select' => 'user-select', + ], + 'Lists' => 'lists', + 'Opacity' => 'opacity', + 'Overflow' => 'overflow', + 'Positioning' => 'positioning', + 'Shadows' => 'shadows', + 'Sizing' => [ + 'Width' => 'width', + 'Min-Width' => 'min-width', + 'Max-Width' => 'max-width', + 'Height' => 'height', + 'Min-Height' => 'min-height', + 'Max-Height' => 'max-height', + ], + 'Spacing' => 'spacing', + 'SVG' => 'svg', + 'Typography' => [ + 'Fonts' => 'fonts', + 'Color' => 'text-color', + 'Sizing' => 'text-sizing', + 'Weight' => 'font-weight', + 'Alignment' => 'text-alignment', + 'Line Height' => 'line-height', + 'Letter Spacing' => 'letter-spacing', + 'Style & Decoration' => 'text-style', + 'Whitespace & Wrapping' => 'whitespace-and-wrapping', + ], + 'Vertical Alignment' => 'vertical-alignment', + 'Visibility' => 'visibility', + 'Z-Index' => 'z-index', + ], + 'Examples' => [ + 'Alerts' => 'examples/alerts', + 'Buttons' => 'examples/buttons', + 'Cards' => 'examples/cards', + 'Forms' => 'examples/forms', + 'Navigation' => 'examples/navigation', + ], +]; diff --git a/docs/source/_layouts/documentation.blade.php b/docs/source/_layouts/documentation.blade.php index a3210fa8fb02..0eb3328ec549 100644 --- a/docs/source/_layouts/documentation.blade.php +++ b/docs/source/_layouts/documentation.blade.php @@ -32,142 +32,31 @@