|
1 | | -<div class="max-w-sm container"> |
2 | | - <ul role="list" class="flex-col gap-4 divide max-w-sm list"> |
3 | | - <li class="breadcrumb-type flex-row items-center"> |
| 1 | +<section class="pattern-showcase"> |
| 2 | + <header class="showcase-header"> |
| 3 | + <p class="kicker">Live Breadcrumb Gallery</p> |
| 4 | + <h2>Reference patterns for every xng-breadcrumb capability</h2> |
| 5 | + <p> |
| 6 | + Each row below is fully functional and bound to your current route. Use it as a visual regression surface while developing breadcrumb behavior. |
| 7 | + </p> |
| 8 | + </header> |
| 9 | + |
| 10 | + <ul role="list" class="pattern-list"> |
| 11 | + <li class="pattern-card"> |
4 | 12 | <div> |
5 | | - <p class="title">Default breadcrumbs</p> |
6 | | - <p class="subtitle">Just drop <b><xng-breadcrumb/></b> anywhere</p> |
| 13 | + <p class="title">Default</p> |
| 14 | + <p class="subtitle">Auto-generated route labels with zero custom template setup.</p> |
7 | 15 | </div> |
8 | 16 | <xng-breadcrumb class="default"></xng-breadcrumb> |
9 | 17 | </li> |
10 | 18 |
|
11 | | - <li class="breadcrumb-type flex-row items-center"> |
| 19 | + <li class="pattern-card"> |
12 | 20 | <div> |
13 | | - <p class="title">Title case and custom separator</p> |
14 | | - <p class="subtitle">Use pipe on breadcrumb for title case and custom text on separator</p> |
| 21 | + <p class="title">Custom text transform + separator</p> |
| 22 | + <p class="subtitle">Title case via template and a custom separator character.</p> |
15 | 23 | </div> |
16 | 24 | <xng-breadcrumb separator="~" class="title-case"> |
17 | 25 | <ng-container *xngBreadcrumbItem="let breadcrumb"> |
|
20 | 28 | </xng-breadcrumb> |
21 | 29 | </li> |
22 | 30 |
|
23 | | - <li class="breadcrumb-type flex-row items-center"> |
| 31 | + <li class="pattern-card"> |
24 | 32 | <div> |
25 | | - <p class="title">Material Icon as separator</p> |
26 | | - <p class="subtitle">Custom template for icon, background color on each item</p> |
| 33 | + <p class="title">Template separator</p> |
| 34 | + <p class="subtitle">Material icon separator and pill styling for each crumb.</p> |
27 | 35 | </div> |
28 | 36 | <xng-breadcrumb [separator]="separatorTemplate" class="custom-breadcrumb"></xng-breadcrumb> |
29 | | - |
30 | 37 | <ng-template #separatorTemplate> |
31 | | - <mat-icon class="separator-icon">arrow_right</mat-icon> |
| 38 | + <mat-icon class="separator-icon">arrow_forward_ios</mat-icon> |
32 | 39 | </ng-template> |
33 | 40 | </li> |
34 | 41 |
|
35 | | - <li class="breadcrumb-type flex-row items-center"> |
| 42 | + <li class="pattern-card"> |
36 | 43 | <div> |
37 | | - <p class="title">Advanced usage 1</p> |
38 | | - <p class="subtitle">Custom background, preserveQueryParams(false), use info from breadcrumb to show icons</p> |
| 44 | + <p class="title">Info-driven labels + preserveQueryParams false</p> |
| 45 | + <p class="subtitle">Read `info` from route metadata and customize labels with icons.</p> |
39 | 46 | </div> |
40 | | - <xng-breadcrumb separator="→" class="myapp-breadcrumb" [preserveQueryParams]="false" class="advanced1"> |
41 | | - <ng-container *xngBreadcrumbItem="let breadcrumb; let info = info; let first = first"> |
| 47 | + <xng-breadcrumb separator="→" class="advanced1" [preserveQueryParams]="false"> |
| 48 | + <ng-container *xngBreadcrumbItem="let breadcrumb; let info = info"> |
42 | 49 | @if (info) { |
43 | 50 | <mat-icon class="mat-icon-size" inline="true">{{ info }}</mat-icon> |
44 | 51 | } |
|
47 | 54 | </xng-breadcrumb> |
48 | 55 | </li> |
49 | 56 |
|
50 | | - <li class="breadcrumb-type flex-row items-center"> |
| 57 | + <li class="pattern-card"> |
51 | 58 | <div> |
52 | | - <p class="title">Advanced usage 2</p> |
53 | | - <p class="subtitle">Open breadcrumb link in new tab, different style on tail, preserveFragment(false) etc</p> |
| 59 | + <p class="title">Open in new tab + preserveFragment false</p> |
| 60 | + <p class="subtitle">Demonstrates link target and fragment behavior customization.</p> |
54 | 61 | </div> |
55 | | - <xng-breadcrumb separator="→" class="myapp-breadcrumb" [preserveFragment]="false" anchorTarget="_blank" class="advanced2"> |
| 62 | + <xng-breadcrumb separator="→" class="advanced2" [preserveFragment]="false" anchorTarget="_blank"> |
56 | 63 | <ng-container *xngBreadcrumbItem="let breadcrumb; let info = info; let first = first"> |
57 | 64 | @if (info) { |
58 | 65 | <mat-icon class="mat-icon-size" inline="true">{{ info }}</mat-icon> |
|
64 | 71 | </xng-breadcrumb> |
65 | 72 | </li> |
66 | 73 | </ul> |
| 74 | +</section> |
67 | 75 |
|
68 | | - <router-outlet></router-outlet> |
69 | | -</div> |
| 76 | +<router-outlet></router-outlet> |
0 commit comments