diff --git a/config/livewire-material.php b/config/livewire-material.php index 29bbdab1..77e3b26b 100644 --- a/config/livewire-material.php +++ b/config/livewire-material.php @@ -191,9 +191,14 @@ return [ |-------------------------------------------------------------------------- | | Every component in every variant, rendered in the application's own - | scheme. Off unless the application runs locally. 'vite' names the entry - | points that import this package's CSS and JavaScript; the error pages - | load them too, showcase or not. + | scheme. Off unless the application runs locally. 'vite' names the + | application's own entry points, for its JavaScript (Livewire, Alpine); + | the error pages load them too, showcase or not. A CSS entry here is + | temporary — the showcase's own chrome no longer needs one (it serves + | its own bundle, ShowcaseAssetController), but the section views + | (resources/views/showcase/sections/*) are still Tailwind until step + | 38's last batch removes it, and an application without Tailwind of + | its own may still want one here for the error pages' build. | */ diff --git a/resources/views/showcase/components/example.blade.php b/resources/views/showcase/components/example.blade.php index 3d14cd37..c33b6727 100644 --- a/resources/views/showcase/components/example.blade.php +++ b/resources/views/showcase/components/example.blade.php @@ -18,17 +18,30 @@ } @endphp -
- @if ($title) -

{{ $title }}

- @endif + + + @if ($title) +

{{ $title }}

+ @endif -
! $stack, 'space-y-4' => $stack])> - {!! \Illuminate\Support\Facades\Blade::render($code) !!} -
+ @if ($stack) + + {!! \Illuminate\Support\Facades\Blade::render($code) !!} + + @else + + {!! \Illuminate\Support\Facades\Blade::render($code) !!} + + @endif -
- Blade -
{{ trim($code) }}
-
-
+
+ Blade +
{{ trim($code) }}
+
+ + diff --git a/resources/views/showcase/index.blade.php b/resources/views/showcase/index.blade.php index 3572db97..8f0ce325 100644 --- a/resources/views/showcase/index.blade.php +++ b/resources/views/showcase/index.blade.php @@ -1,36 +1,38 @@ @extends('livewire-material::showcase.layout') @section('content') -
-
-

Livewire Material

-

Material 3 Expressive for Laravel and Livewire.

-

- Every token and component, rendered in this application's own scheme and theme. Pick a section in the - navigation, search for one above (or press /), or start below. -

-
+ + + +

Livewire Material

+

Material 3 Expressive for Laravel and Livewire.

+

+ Every token and component, rendered in this application's own scheme and theme. Pick a section in the + navigation, search for one above (or press /), or start below. +

+
- @foreach (collect($sections)->groupBy('group', preserveKeys: true) as $group => $entries) -
-

{{ $group }}

+ @foreach (collect($sections)->groupBy('group', preserveKeys: true) as $group => $entries) + +

{{ $group }}

-
- @foreach ($entries as $key => $entry) - -
- - - -
- {{ $entry['title'] }} -

{{ $entry['description'] }}

-
-
-
- @endforeach -
-
- @endforeach -
+ + @foreach ($entries as $key => $entry) + + + + + + + {{ $entry['title'] }} +

{{ $entry['description'] }}

+
+
+
+ @endforeach +
+ + @endforeach + + @endsection diff --git a/resources/views/showcase/layout.blade.php b/resources/views/showcase/layout.blade.php index 4f1dcf39..69e87ae2 100644 --- a/resources/views/showcase/layout.blade.php +++ b/resources/views/showcase/layout.blade.php @@ -38,26 +38,37 @@ + {{-- Kept only for the section views (resources/views/showcase/sections/*), still Tailwind + until the next batches of step 38, and for the Livewire/Alpine runtime; its CSS entry + goes with them. It opens the document's first @layer statement (Workbench package.css's + header explains the trick), which the link below must follow, not precede — first would + re-anchor `material` ahead of Tailwind's own layers and let its preflight's `padding: 0` + beat the search view's padding-top. --}} @vite(config('livewire-material.showcase.vite')) @livewireStyles + + {{-- The showcase's own chrome: does not depend on the build above. --}} + - + - Livewire Material + Livewire Material - + + + {{-- The search looks through every section, example and component: the index is fetched on first focus, and / or Ctrl+K (⌘K) reaches it from anywhere. Its names keep clear of 's own (`results`, `open`), which the slot also sees. --}}
-

- Type a component (datepicker), an example or a section. Press / to search from anywhere. +

+ Type a component (datepicker), an example or a section. Press / to search from anywhere.

-

+

Nothing matches “”.

- {{-- With colour profiles, a preview of each on this page; nothing is stored. --}} - @if (($profiles = \NoNameWeb\LivewireMaterial\Support\Scheme::profiles()) !== []) - - - - + + {{-- With colour profiles, a preview of each on this page; nothing is stored. --}} + @if (($profiles = \NoNameWeb\LivewireMaterial\Support\Scheme::profiles()) !== []) + + + + - @foreach ($profiles as $name => $profile) - - @endforeach - - @endif + @foreach ($profiles as $name => $profile) + + @endforeach + + @endif - - + + + + + + +
diff --git a/resources/views/showcase/section.blade.php b/resources/views/showcase/section.blade.php index 271d27df..e0c4b0a3 100644 --- a/resources/views/showcase/section.blade.php +++ b/resources/views/showcase/section.blade.php @@ -1,5 +1,6 @@ {{-- One section of the showcase on a page of its own, with the way on to the next. The page's - heading names the section, so the section's own heading is only for a screen reader. --}} + heading names the section, so the section's own heading is only for a screen reader + (`data-md-showcase-sections`'s own rule in resources/css/showcase.css). --}} @extends('livewire-material::showcase.layout') @@ -11,26 +12,32 @@ @endphp @section('content') -
-
-

{{ $sections[$section]['group'] }}

-

{{ $sections[$section]['title'] }}

-
+ + + +

{{ $sections[$section]['group'] }}

+

{{ $sections[$section]['title'] }}

+
-
- @include('livewire-material::showcase.sections.'.$section) + + @include('livewire-material::showcase.sections.'.$section) - -
-
+ + @if ($previous) + + @else + + @endif + + @if ($next) + + @endif + + + + + @endsection diff --git a/resources/views/showcase/shell.blade.php b/resources/views/showcase/shell.blade.php index 5c9c59f0..4c98682b 100644 --- a/resources/views/showcase/shell.blade.php +++ b/resources/views/showcase/shell.blade.php @@ -35,13 +35,20 @@ + {{-- Kept only for the Livewire/Alpine runtime here — this page has no Tailwind class of its + own. The next batches of step 38 leave it to the sections that still need it. It opens + the document's first @layer statement (Workbench package.css's header explains the + trick), which the link below must follow, not precede — see layout.blade.php's comment. --}} @vite(config('livewire-material.showcase.vite')) @livewireStyles + + {{-- The showcase's own chrome: does not depend on the build above. --}} + - + - Livewire Material + Livewire Material @@ -58,27 +65,35 @@ -
- -

{{ $current['title'] }}

- -
+ + + + + + + + + + +
-
-

This is the {{ strtolower($current['title']) }} page.

+ + +

This is the {{ strtolower($current['title']) }} page.

- - @foreach (range(1, 14) as $index) - - @endforeach - + + @foreach (range(1, 14) as $index) + + @endforeach + -
- - -
-
+ + + + + +
@livewireScripts