From 64c53147374af510161d617d103e291f0fd1d585 Mon Sep 17 00:00:00 2001 From: Matt Stauffer Date: Wed, 8 Nov 2017 09:47:57 -0500 Subject: [PATCH 1/3] Move safari pinned tab SVG to correct location --- docs/source/{docs => }/safari-pinned-tab.svg | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/source/{docs => }/safari-pinned-tab.svg (100%) diff --git a/docs/source/docs/safari-pinned-tab.svg b/docs/source/safari-pinned-tab.svg similarity index 100% rename from docs/source/docs/safari-pinned-tab.svg rename to docs/source/safari-pinned-tab.svg From 107bc4f7fed8ca7f99cb9645af2c3b6b520d8e87 Mon Sep 17 00:00:00 2001 From: Matt Stauffer Date: Wed, 8 Nov 2017 09:48:07 -0500 Subject: [PATCH 2/3] Update documentation links to simpler array structure --- docs/source/_layouts/documentation.blade.php | 172 ++++++++++--------- docs/source/_partials/nav-links.blade.php | 7 + 2 files changed, 94 insertions(+), 85 deletions(-) create mode 100644 docs/source/_partials/nav-links.blade.php diff --git a/docs/source/_layouts/documentation.blade.php b/docs/source/_layouts/documentation.blade.php index a3210fa8fb02..77f7825e38bd 100644 --- a/docs/source/_layouts/documentation.blade.php +++ b/docs/source/_layouts/documentation.blade.php @@ -41,37 +41,15 @@

Getting Started

@@ -80,92 +58,116 @@
  • Backgrounds
      -
    • Color
    • -
    • Position
    • -
    • Size
    • + @include('_partials.nav-links', ['links' => [ + 'background-color' => 'Color', + 'background-position' => 'Position', + 'background-size' => 'Size', + ]])
  • Borders
      -
    • Width
    • -
    • Color
    • -
    • Style
    • + @include('_partials.nav-links', ['links' => [ + 'border-width' => 'Width', + 'border-color' => 'Color', + 'border-style' => 'Style', + ]])
  • -
  • Border Radius
  • -
  • Container
  • -
  • Display
  • + @include('_partials.nav-links', ['links' => [ + 'border-radius' => 'Border Radius', + 'container' => 'Container', + 'display' => 'Display', + ]])
  • Flexbox
      -
    • Display
    • -
    • Direction
    • -
    • Wrapping
    • -
    • Justify Content
    • -
    • Align Items
    • -
    • Align Content
    • -
    • Align Self
    • -
    • Flex, Grow, & Shrink
    • + @include('_partials.nav-links', ['links' => [ + 'flexbox-display' => 'Display', + 'flexbox-direction' => 'Direction', + 'flexbox-wrapping' => 'Wrapping', + 'flexbox-justify-content' => 'Justify Content', + 'flexbox-align-items' => 'Align Items', + 'flexbox-align-content' => 'Align Content', + 'flexbox-align-self' => 'Align Self', + 'flexbox-flex-grow-shrink' => 'Flex, Grow, & Shrink', + ]])
  • -
  • Floats
  • -
  • Forms
  • -
  • Grid
  • + @include('_partials.nav-links', ['links' => [ + 'floats' => 'Floats', + 'forms' => 'Forms', + 'grid' => 'Grid', + ]])
  • Interactivity
      -
    • Cursor
    • -
    • Resize
    • -
    • Pointer Events
    • -
    • User Select
    • + @include('_partials.nav-links', ['links' => [ + 'cursor' => 'Cursor', + 'resize' => 'Resize', + 'pointer-events' => 'Pointer Events', + 'user-select' => 'User Select', + ]])
  • -
  • Lists
  • -
  • Opacity
  • -
  • Overflow
  • -
  • Positioning
  • -
  • Shadows
  • + @include('_partials.nav-links', ['links' => [ + 'lists' => 'Lists', + 'opacity' => 'Opacity', + 'overflow' => 'Overflow', + 'positioning' => 'Positioning', + 'shadows' => 'Shadows', + ]])
  • Sizing
      -
    • Width
    • -
    • Min-Width
    • -
    • Max-Width
    • -
    • Height
    • -
    • Min-Height
    • -
    • Max-Height
    • + @include('_partials.nav-links', ['links' => [ + 'width' => 'Width', + 'min-width' => 'Min-Width', + 'max-width' => 'Max-Width', + 'height' => 'Height', + 'min-height' => 'Min-Height', + 'max-height' => 'Max-Height', + ]])
  • -
  • Spacing
  • -
  • SVG
  • + @include('_partials.nav-links', ['links' => [ + 'spacing' => 'Spacing', + 'svg' => 'SVG', + ]])
  • Typography
      -
    • Fonts
    • -
    • Color
    • -
    • Sizing
    • -
    • Weight
    • -
    • Alignment
    • -
    • Line Height
    • -
    • Letter Spacing
    • -
    • Style & Decoration
    • -
    • Whitespace & Wrapping
    • + @include('_partials.nav-links', ['links' => [ + 'fonts' => 'Fonts', + 'text-color' => 'Color', + 'text-sizing' => 'Sizing', + 'font-weight' => 'Weight', + 'text-alignment' => 'Alignment', + 'line-height' => 'Line Height', + 'letter-spacing' => 'Letter Spacing', + 'text-style' => 'Style & Decoration', + 'whitespace-and-wrapping' => 'Whitespace & Wrapping', + ]])
  • -
  • Vertical Alignment
  • -
  • Visibility
  • -
  • Z-Index
  • + @include('_partials.nav-links', ['links' => [ + 'vertical-alignment' => 'Vertical Alignment', + 'visibility' => 'Visibility', + 'z-index' => 'Z-Index', + ]])

    Examples

      -
    • Alerts
    • -
    • Buttons
    • -
    • Cards
    • -
    • Forms
    • -
    • Navigation
    • + @include('_partials.nav-links', ['links' => [ + 'examples/alerts' => 'Alerts', + 'examples/buttons' => 'Buttons', + 'examples/cards' => 'Cards', + 'examples/forms' => 'Forms', + 'examples/navigation' => 'Navigation', + ]])
    diff --git a/docs/source/_partials/nav-links.blade.php b/docs/source/_partials/nav-links.blade.php new file mode 100644 index 000000000000..d6d28257227a --- /dev/null +++ b/docs/source/_partials/nav-links.blade.php @@ -0,0 +1,7 @@ +@foreach ($links as $link => $title) +
  • + + {{ $title }} + +
  • +@endforeach From 4bdb93992b1abe71470af19624a12e07b711509b Mon Sep 17 00:00:00 2001 From: Matt Stauffer Date: Thu, 9 Nov 2017 10:41:03 -0500 Subject: [PATCH 3/3] Move navigation into config file --- docs/config.php | 6 + docs/navigation.php | 86 ++++++++++ docs/source/_layouts/documentation.blade.php | 155 +++---------------- docs/source/_partials/nav-links.blade.php | 7 - 4 files changed, 113 insertions(+), 141 deletions(-) create mode 100644 docs/navigation.php delete mode 100644 docs/source/_partials/nav-links.blade.php 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 77f7825e38bd..0eb3328ec549 100644 --- a/docs/source/_layouts/documentation.blade.php +++ b/docs/source/_layouts/documentation.blade.php @@ -32,144 +32,31 @@
    diff --git a/docs/source/_partials/nav-links.blade.php b/docs/source/_partials/nav-links.blade.php deleted file mode 100644 index d6d28257227a..000000000000 --- a/docs/source/_partials/nav-links.blade.php +++ /dev/null @@ -1,7 +0,0 @@ -@foreach ($links as $link => $title) -
  • - - {{ $title }} - -
  • -@endforeach