Files
livewire-material/resources/views/showcase/sections/data.blade.php
T
Andreas Reinhold / reiniandClaude Opus 5 79ca9a28b4 Stop drawing each section's title twice on its page
Plan step 38 review: the frame's structural rule that kept a section's
own <h2> for screen readers (Tailwind's [&>section>h2]:sr-only before,
a showcase.css rule during the rewrite) was removed as dead weight
once every section had a real heading, so each page drew its title
twice, the <h1> and an identical headline under it. The <h2>s are
md-visually-hidden again, the frame's comment says why, and the
section page test asserts it. The Layout section's description said
"window size classes"; M3's term is breakpoints.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
2026-09-15 06:10:01 +02:00

57 lines
2.7 KiB
PHP

@php
$examples = [
'Data table' => <<<'BLADE'
<div data-md-showcase-table-scroll>
<x-table>
<thead>
<tr>
<x-sort-header column="name" :sort-by="['column' => 'name', 'direction' => 'asc']">Name</x-sort-header>
<x-sort-header column="size" :sort-by="['column' => 'name', 'direction' => 'asc']" class="md-text-end">Size</x-sort-header>
<th>Expires</th>
<th><span class="md-visually-hidden">Actions</span></th>
</tr>
</thead>
<tbody>
<tr data-md-list-row>
<td><a href="#data" data-md-list-open>contract.pdf</a></td>
<td class="md-text-end md-tabular">1.2 MB</td>
<td>in 1 hour</td>
<td class="md-text-end"><x-button icon="more_vert" tooltip="More" /></td>
</tr>
<tr data-md-list-row aria-selected="true">
<td><a href="#data" data-md-list-open>design-review.mp4</a></td>
<td class="md-text-end md-tabular">3.4 GB</td>
<td>in 7 days</td>
<td class="md-text-end"><x-button icon="more_vert" tooltip="More" /></td>
</tr>
<tr data-md-list-row>
<td><a href="#data" data-md-list-open>holiday-photos.zip</a></td>
<td class="md-text-end md-tabular">248 MB</td>
<td>in 3 days</td>
<td class="md-text-end"><x-button icon="more_vert" tooltip="More" /></td>
</tr>
</tbody>
</x-table>
</div>
BLADE,
'Pagination' => <<<'BLADE'
<x-livewire-material::stack gap="space300">
{{ (new \Illuminate\Pagination\LengthAwarePaginator(range(1, 10), 95, 10, 3, ['path' => '#data']))->links() }}
{{ (new \Illuminate\Pagination\Paginator(range(1, 11), 10, 2, ['path' => '#data']))->links() }}
</x-livewire-material::stack>
BLADE,
];
@endphp
<x-livewire-material::stack as="section" id="data" gap="space300">
<h2 class="md-visually-hidden">Data</h2>
<p class="md-type-body-md md-ink-variant">
<code>&lt;x-table&gt;</code>, <code>&lt;x-sort-header&gt;</code>, and Laravel's and Livewire's paginators.
</p>
@foreach ($examples as $title => $code)
<x-showcase::example :$title :$code />
@endforeach
</x-livewire-material::stack>