Files
livewire-material/routes/showcase.php
T
Andreas Reinhold / reiniandClaude Sonnet 5 487176d345 Give each canonical layout a page of its own in the Layout section
Plan step 38: the Layout section's Overview keeps its breakpoint
table and live "This window" readout (now a shared
<x-showcase::breakpoint-readout> partial, and the five breakpoint
cards a real range-queried data-md-showcase-breakpoint-card instead
of Tailwind's max-medium:/medium:max-expanded: variants), but the
three canonical layouts move off it onto a page of their own:
/material/layout/{list-detail,supporting-pane,feed}
(ShowcaseController::layout(), routes/showcase.php), each built on
the real component, sharing one <x-section-nav> Sections::
layoutPages() feeds. The search index gains an entry per page with
its own URL, and the component-homes scan now also reads the three
pages' own source so <x-list-detail>, <x-supporting-pane> and
<x-feed> keep a home.

The whole section moves onto the layout components and md-* classes:
no bespoke Tailwind grid or table styling remains.

LayoutTest's browser test now visits the three dedicated pages
instead of one shared /material/layout; a new Feature test asserts
each page renders and is linked from the Layout section.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
2026-09-15 04:22:38 +02:00

44 lines
2.0 KiB
PHP

<?php
use Illuminate\Support\Facades\Route;
use NoNameWeb\LivewireMaterial\Http\Controllers\ShowcaseAssetController;
use NoNameWeb\LivewireMaterial\Http\Controllers\ShowcaseController;
use NoNameWeb\LivewireMaterial\Http\Controllers\ShowcasePageController;
use NoNameWeb\LivewireMaterial\Http\Controllers\ShowcaseSymbolController;
use NoNameWeb\LivewireMaterial\Showcase\Sections;
Route::get('/', [ShowcaseController::class, 'index'])->name('showcase');
Route::get('symbols.json', [ShowcaseSymbolController::class, 'index'])->name('symbols');
Route::get('symbols/{style}/{name}.svg', [ShowcaseSymbolController::class, 'show'])->name('symbol');
// The showcase's own bundle (all.css, showcase.css, the application's scheme), long-cached under
// the hash of its own content, and the two package folders its relative url()s may point into.
Route::get('showcase.{hash}.css', [ShowcaseAssetController::class, 'stylesheet'])
->where('hash', '[0-9a-f]+')
->name('stylesheet');
Route::get('assets/{path}', [ShowcaseAssetController::class, 'file'])
->where('path', '.*')
->name('asset');
Route::view('shell/{page?}', 'livewire-material::showcase.shell')
->whereIn('page', ['inbox', 'starred', 'sent', 'drafts', 'travel', 'receipts'])
->name('shell');
Route::get('errors/{code}', [ShowcasePageController::class, 'error'])
->whereIn('code', ['401', '402', '403', '404', '419', '429', '500', '503'])
->name('error');
Route::get('mail', [ShowcasePageController::class, 'mail'])->name('mail');
Route::get('search.json', [ShowcaseController::class, 'search'])->name('search');
// The Layout section's three canonical layouts (plan step 38), each a page of its own rather
// than an anchor on the Layout section's Overview (`{section}` below).
Route::get('layout/{page}', [ShowcaseController::class, 'layout'])
->whereIn('page', ['list-detail', 'supporting-pane', 'feed'])
->name('layout');
Route::get('{section}', [ShowcaseController::class, 'section'])
->whereIn('section', array_keys(Sections::all()))
->name('section');