@fusion.dev/helix-templates 0.137.0 → 0.139.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/README.md +18 -6
  2. package/dist/index.js +24 -0
  3. package/package.json +1 -1
  4. package/templates/angular/angular.json +57 -0
  5. package/templates/angular/package.json +28 -0
  6. package/templates/angular/src/app/app.config.ts +8 -0
  7. package/templates/angular/src/app/app.html +19 -0
  8. package/templates/angular/src/app/app.ts +29 -0
  9. package/templates/angular/src/app/data.ts +81 -0
  10. package/templates/angular/src/app/docs.ts +29 -0
  11. package/templates/angular/src/app/landing.html +112 -0
  12. package/templates/angular/src/app/landing.ts +31 -0
  13. package/templates/angular/src/app/overview.html +49 -0
  14. package/templates/angular/src/app/overview.ts +25 -0
  15. package/templates/angular/src/app/pathname.ts +24 -0
  16. package/templates/angular/src/app/signup-form.html +91 -0
  17. package/templates/angular/src/app/signup-form.ts +65 -0
  18. package/templates/angular/src/app/site-footer.html +10 -0
  19. package/templates/angular/src/app/site-footer.ts +22 -0
  20. package/templates/angular/src/app/site-header.html +30 -0
  21. package/templates/angular/src/app/site-header.ts +58 -0
  22. package/templates/angular/src/app.css +363 -0
  23. package/templates/angular/src/diagnostics.ts +24 -0
  24. package/templates/angular/src/index.html +12 -0
  25. package/templates/angular/src/main.ts +21 -0
  26. package/templates/angular/tsconfig.app.json +9 -0
  27. package/templates/angular/tsconfig.json +34 -0
  28. package/templates/react-nextjs/app/diagnostics.ts +19 -0
  29. package/templates/react-nextjs/app/landing.tsx +2 -2
  30. package/templates/react-nextjs/app/overview.tsx +1 -1
  31. package/templates/react-nextjs/instrumentation-client.ts +6 -0
  32. package/templates/react-nextjs/package.json +1 -0
  33. package/templates/react-nextjs/tsconfig.json +1 -0
  34. package/templates/react-vite/package.json +1 -0
  35. package/templates/react-vite/src/diagnostics.ts +24 -0
  36. package/templates/react-vite/src/main.tsx +6 -0
  37. package/templates/react-vite/tsconfig.json +1 -0
  38. package/templates/solid-vite/helix-solid.d.ts +14 -0
  39. package/templates/solid-vite/index.html +12 -0
  40. package/templates/solid-vite/package.json +22 -0
  41. package/templates/solid-vite/src/App.tsx +35 -0
  42. package/templates/solid-vite/src/app.css +363 -0
  43. package/templates/solid-vite/src/data.ts +81 -0
  44. package/templates/solid-vite/src/diagnostics.ts +24 -0
  45. package/templates/solid-vite/src/docs.ts +29 -0
  46. package/templates/solid-vite/src/landing.tsx +177 -0
  47. package/templates/solid-vite/src/main.tsx +23 -0
  48. package/templates/solid-vite/src/overview.tsx +78 -0
  49. package/templates/solid-vite/src/routes.ts +22 -0
  50. package/templates/solid-vite/src/signup-form.tsx +151 -0
  51. package/templates/solid-vite/src/site-footer.tsx +34 -0
  52. package/templates/solid-vite/src/site-header.tsx +77 -0
  53. package/templates/solid-vite/tsconfig.json +27 -0
  54. package/templates/solid-vite/vite.config.ts +7 -0
  55. package/templates/svelte-vite/helix-svelte.d.ts +9 -0
  56. package/templates/svelte-vite/index.html +12 -0
  57. package/templates/svelte-vite/package.json +23 -0
  58. package/templates/svelte-vite/src/App.svelte +35 -0
  59. package/templates/svelte-vite/src/Landing.svelte +137 -0
  60. package/templates/svelte-vite/src/Overview.svelte +67 -0
  61. package/templates/svelte-vite/src/SignupForm.svelte +148 -0
  62. package/templates/svelte-vite/src/SiteFooter.svelte +26 -0
  63. package/templates/svelte-vite/src/SiteHeader.svelte +72 -0
  64. package/templates/svelte-vite/src/app.css +363 -0
  65. package/templates/svelte-vite/src/data.ts +81 -0
  66. package/templates/svelte-vite/src/diagnostics.ts +24 -0
  67. package/templates/svelte-vite/src/docs.ts +29 -0
  68. package/templates/svelte-vite/src/main.ts +23 -0
  69. package/templates/svelte-vite/src/routes.svelte.ts +19 -0
  70. package/templates/svelte-vite/tsconfig.json +28 -0
  71. package/templates/svelte-vite/vite.config.ts +7 -0
  72. package/templates/vue-vite/helix-vue.d.ts +8 -0
  73. package/templates/vue-vite/index.html +12 -0
  74. package/templates/vue-vite/package.json +23 -0
  75. package/templates/vue-vite/src/App.vue +39 -0
  76. package/templates/vue-vite/src/LandingPage.vue +139 -0
  77. package/templates/vue-vite/src/OverviewPage.vue +69 -0
  78. package/templates/vue-vite/src/SignupForm.vue +149 -0
  79. package/templates/vue-vite/src/SiteFooter.vue +28 -0
  80. package/templates/vue-vite/src/SiteHeader.vue +72 -0
  81. package/templates/vue-vite/src/app.css +363 -0
  82. package/templates/vue-vite/src/data.ts +81 -0
  83. package/templates/vue-vite/src/diagnostics.ts +24 -0
  84. package/templates/vue-vite/src/docs.ts +29 -0
  85. package/templates/vue-vite/src/main.ts +23 -0
  86. package/templates/vue-vite/src/routes.ts +26 -0
  87. package/templates/vue-vite/tsconfig.json +26 -0
  88. package/templates/vue-vite/vite.config.ts +13 -0
  89. package/templates.json +41 -0
@@ -0,0 +1,139 @@
1
+ <script setup lang="ts">
2
+ import { roster } from './data.ts'
3
+ import { DOCS } from './docs.ts'
4
+
5
+ /* **A locale named, so the number reads the same everywhere.**
6
+ `toLocaleString()` with no argument reads the machine's locale, so the same
7
+ number is grouped two ways on two machines. */
8
+ const figure = new Intl.NumberFormat('en-US')
9
+ </script>
10
+
11
+ <!--
12
+ The first screen, and the only page here about the starter itself.
13
+
14
+ Delete it once you know your way around: nothing else imports it, and the
15
+ route it answers becomes yours.
16
+
17
+ **The heading says what this is, and the project's name stays in the bar.**
18
+
19
+ **The calls to action are anchors.** A button that navigates is a link
20
+ dressed as a button, and the two are different things to a keyboard and to
21
+ a screen reader. The base stylesheet styles an anchor that asks with
22
+ `data-button`, so a link can look like one and stay a link.
23
+ -->
24
+ <template>
25
+ <div class="stack">
26
+ <header class="first-screen">
27
+ <div class="hero">
28
+ <helix-text emphasis="muted" variant="label">Helix starter</helix-text>
29
+ <helix-text as="h1">Every tag on this page is Helix</helix-text>
30
+ <helix-text as="p" class="lede" emphasis="muted" variant="body">
31
+ Nothing here is a wrapper: the tags are the library's own elements, and every color,
32
+ size and space inside them comes from one set of tokens. Three routes are laid down, and
33
+ all of them are yours.
34
+ </helix-text>
35
+ <div class="actions">
36
+ <a data-button="solid" data-button-tone="primary" href="#/overview">See the data view</a>
37
+ <a data-button href="#/join">Open the form</a>
38
+ </div>
39
+ </div>
40
+
41
+ <!-- The figures are the roster the data view draws, read from the same
42
+ module, so the panel is the app at work. `helix-stat` sets the number
43
+ on the display face at a size the type scale does not reach. -->
44
+ <helix-card class="specimen" separation="outlined">
45
+ <helix-text as="h2" slot="header" variant="title">The roster, in three figures</helix-text>
46
+ <helix-stat-group divided>
47
+ <helix-stat>
48
+ {{ roster.people }}
49
+ <span slot="label">People</span>
50
+ </helix-stat>
51
+ <helix-stat>
52
+ {{ roster.teams }}
53
+ <span slot="label">Teams</span>
54
+ </helix-stat>
55
+ <helix-stat>
56
+ {{ figure.format(roster.reviews) }}
57
+ <span slot="label">Reviews</span>
58
+ </helix-stat>
59
+ </helix-stat-group>
60
+ <a data-link href="#/overview" slot="footer">Open the data view</a>
61
+ </helix-card>
62
+ </header>
63
+
64
+ <section class="section">
65
+ <helix-text as="h2" variant="subheading">What you have</helix-text>
66
+ <!-- Three paragraphs about one installed thing, so they take a rule each
67
+ and no box. `app.css` says why at more length. -->
68
+ <div class="facts">
69
+ <article class="fact">
70
+ <helix-text as="h3" variant="title">Elements, not wrappers</helix-text>
71
+ <helix-text as="p" emphasis="muted" variant="body">
72
+ They are custom elements, so you write the tags and there is no per-component import
73
+ to keep in step. One line in <helix-code>src/main.ts</helix-code> registers all of
74
+ them, and a subpath like <helix-code>@fusion.dev/helix/tabs</helix-code> registers
75
+ one.
76
+ </helix-text>
77
+ <a data-link :href="DOCS.elements">Using the elements</a>
78
+ </article>
79
+
80
+ <article class="fact">
81
+ <helix-text as="h3" variant="title">One set of tokens</helix-text>
82
+ <helix-text as="p" emphasis="muted" variant="body">
83
+ Every color is written once as a light and dark pair, so the control in the bar moves
84
+ the whole page by setting a single attribute on the root. Type, spacing, radii and
85
+ control sizes come from the same place.
86
+ </helix-text>
87
+ <a data-link :href="DOCS.tokens">Tokens</a>
88
+ </article>
89
+
90
+ <article class="fact">
91
+ <helix-text as="h3" variant="title">A short stylesheet</helix-text>
92
+ <helix-text as="p" emphasis="muted" variant="body">
93
+ <helix-code>src/app.css</helix-code> holds this page's measure, the rhythm between its
94
+ blocks, and nothing a component already draws. Where a component leaves a decision
95
+ open it names a part: the data view reaches one to paint the row you tick.
96
+ </helix-text>
97
+ <a data-link :href="DOCS.parts">Overriding a component</a>
98
+ </article>
99
+ </div>
100
+ </section>
101
+
102
+ <section class="section">
103
+ <helix-text as="h2" variant="subheading">Where to go next</helix-text>
104
+ <!-- **The whole card is the link, which is what `data-card` is for.** The
105
+ base layer draws the ring, moves the card's border to the brand on
106
+ hover, and leaves focus alone. Nothing inside may be interactive,
107
+ since a link inside a link is neither valid nor reachable. -->
108
+ <helix-grid :columns="2" gap="md">
109
+ <a data-card href="#/overview">
110
+ <helix-card separation="outlined">
111
+ <helix-flex align-items="baseline" gap="sm" justify-content="between" slot="header">
112
+ <helix-text as="h3" variant="title">The data view</helix-text>
113
+ <helix-text emphasis="subtle" variant="code">/overview</helix-text>
114
+ </helix-flex>
115
+ <helix-text as="p" emphasis="muted" variant="body">
116
+ Twelve people from a local module, sorted, paged and selected with nothing wired up.
117
+ The columns are markup you can read and the rows are one property, which is what
118
+ keeps the same component working at ten thousand.
119
+ </helix-text>
120
+ </helix-card>
121
+ </a>
122
+
123
+ <a data-card href="#/join">
124
+ <helix-card separation="outlined">
125
+ <helix-flex align-items="baseline" gap="sm" justify-content="between" slot="header">
126
+ <helix-text as="h3" variant="title">The form</helix-text>
127
+ <helix-text emphasis="subtle" variant="code">/join</helix-text>
128
+ </helix-flex>
129
+ <helix-text as="p" emphasis="muted" variant="body">
130
+ Five controls a <helix-code>&lt;form&gt;</helix-code> reads with
131
+ <helix-code>FormData</helix-code>, because every one of them is a real form
132
+ participant. The email field's complaint is the browser's own.
133
+ </helix-text>
134
+ </helix-card>
135
+ </a>
136
+ </helix-grid>
137
+ </section>
138
+ </div>
139
+ </template>
@@ -0,0 +1,69 @@
1
+ <script setup lang="ts">
2
+ import { members } from './data.ts'
3
+ import { DOCS } from './docs.ts'
4
+ </script>
5
+
6
+ <!--
7
+ The data view.
8
+
9
+ **The schema is markup and the data is a property.** The columns are
10
+ elements you can read in the HTML, and `rows` is the whole result handed over
11
+ at once, since a table of ten thousand rows cannot be written out as
12
+ elements. The table sorts, pages, and selects out of that array on its own.
13
+
14
+ **Selection is keyed on `row-key`, so it survives a sort and a page.**
15
+ `app.css` paints the chosen row through the parts the table names for it.
16
+ -->
17
+ <template>
18
+ <div class="stack">
19
+ <header class="hero">
20
+ <helix-text emphasis="muted" variant="label">Data view</helix-text>
21
+ <helix-text as="h1" variant="heading">Roster</helix-text>
22
+ <helix-text as="p" class="lede" emphasis="muted" variant="body">
23
+ Twelve people from a local module. Sort a column, turn a page, or tick a row and watch the
24
+ rule in <helix-code>src/app.css</helix-code> paint it.
25
+ </helix-text>
26
+ </header>
27
+
28
+ <section class="section">
29
+ <helix-data-table
30
+ default-sort="name:asc"
31
+ label="Roster"
32
+ :page-size="6"
33
+ row-key="id"
34
+ :rows="members"
35
+ selectable
36
+ >
37
+ <!-- **Every column declares what it may give up.** A floor and a share:
38
+ the floor is what the words need, and the share is how the slack is
39
+ divided. At 390 the four columns and the checkboxes fit the box, and
40
+ below 376 the table scrolls its own box. -->
41
+ <helix-table-column field="name" sortable width="minmax(5.5rem, 1.6fr)">
42
+ Name
43
+ </helix-table-column>
44
+ <helix-table-column field="team" sortable width="minmax(4.5rem, 1fr)">
45
+ Team
46
+ </helix-table-column>
47
+ <helix-table-column field="role" width="minmax(4.5rem, 1fr)">Role</helix-table-column>
48
+ <!-- `end` lines the digits up under each other. `max-content`, since a
49
+ column of numerals has one right width. -->
50
+ <helix-table-column field="reviews" sortable text-align="end" width="max-content">
51
+ Reviews
52
+ </helix-table-column>
53
+
54
+ <!-- The footer is a row across the table: anything you slot goes at the
55
+ start, and the table's own pagination sits at the end. -->
56
+ <helix-text emphasis="subtle" slot="footer" variant="caption">
57
+ {{ members.length }} people
58
+ </helix-text>
59
+ </helix-data-table>
60
+
61
+ <!-- A footnote to the table, so it takes the section's gap. -->
62
+ <helix-text as="p" emphasis="muted" variant="caption">
63
+ Filtering, column reordering, resizing, virtualized rows and a server mode that asks you
64
+ for a page are all on
65
+ <a data-link :href="DOCS.table">the component's own page</a>.
66
+ </helix-text>
67
+ </section>
68
+ </div>
69
+ </template>
@@ -0,0 +1,149 @@
1
+ <script setup lang="ts">
2
+ import type { HelixInputHelixBeforeChangeElementEvent } from '@fusion.dev/helix/vue'
3
+ import { ref } from 'vue'
4
+ import { teams } from './data.ts'
5
+ import { DOCS } from './docs.ts'
6
+
7
+ /** One message in the toast region, and what it says. */
8
+ interface Message {
9
+ readonly id: number
10
+ readonly text: string
11
+ }
12
+
13
+ const handle = ref('')
14
+ const messages = ref<readonly Message[]>([])
15
+
16
+ /**
17
+ * The page takes the submit, so nothing navigates. Remove `preventDefault()`
18
+ * and the form posts to the server like any other, with the same names.
19
+ */
20
+ const join = (event: Event) => {
21
+ event.preventDefault()
22
+ const answers = [...new FormData(event.currentTarget as HTMLFormElement).entries()]
23
+ .map(([field, value]) => `${field}=${value}`)
24
+ .join(' ')
25
+ messages.value = [...messages.value, { id: Date.now(), text: answers }]
26
+ }
27
+
28
+ /**
29
+ * **A controlled value, which is the one habit to unlearn.** A Helix element
30
+ * is not read-only: writing `value` seeds it, and the element goes on applying
31
+ * its own changes. So taking the decision means refusing the change with
32
+ * `preventDefault()`, then setting the value you want. Leaving `handle` as it
33
+ * was does not refuse anything.
34
+ */
35
+ const takeHandle = (event: HelixInputHelixBeforeChangeElementEvent) => {
36
+ event.preventDefault()
37
+ handle.value = event.detail.value.toLowerCase().replaceAll(/[^a-z0-9-]/g, '')
38
+ }
39
+
40
+ const dismiss = (id: number) => {
41
+ messages.value = messages.value.filter((one) => one.id !== id)
42
+ }
43
+ </script>
44
+
45
+ <!--
46
+ The form.
47
+
48
+ **Every control here is a form-associated custom element**, so a `<form>`
49
+ collects them, resets them, and validates them the way it does an `<input>`.
50
+ The submit proves it: it reads the answers with `new FormData(form)`, and
51
+ nothing gathers them by hand.
52
+
53
+ There is no wrapping `Field` component. A label in one shadow root cannot
54
+ name a control in another, so every control renders its own `label`, `hint`,
55
+ and `feedback`.
56
+ -->
57
+ <template>
58
+ <div class="stack">
59
+ <header class="hero">
60
+ <helix-text emphasis="muted" variant="label">Form</helix-text>
61
+ <helix-text as="h1" variant="heading">Join the roster</helix-text>
62
+ <helix-text as="p" class="lede" emphasis="muted" variant="body">
63
+ Five controls, and a <helix-code>&lt;form&gt;</helix-code> reads every one of them the way
64
+ it reads an <helix-code>input</helix-code>.
65
+ </helix-text>
66
+ </header>
67
+
68
+ <!-- The form takes a column of its own and the notes take what is left. At
69
+ 390 the two stack, and the notes read as a postscript. -->
70
+ <div class="split">
71
+ <form class="form" @submit="join">
72
+ <helix-input autocomplete="name" label="Name" name="name" required />
73
+
74
+ <!-- Validation is the platform's: `type` and `required` are set on the
75
+ real input inside, and its own message shows once the reader has
76
+ touched the field. Set `feedback` to say it in your own words. -->
77
+ <helix-input
78
+ hint="Where we send the welcome note."
79
+ label="Email"
80
+ name="email"
81
+ required
82
+ type="email"
83
+ />
84
+
85
+ <!-- `@helix-before-change` binds with `addEventListener`, so it takes
86
+ the event's own name. -->
87
+ <helix-input
88
+ hint="Lowercase and hyphens, whatever you type."
89
+ label="Handle"
90
+ name="handle"
91
+ :value="handle"
92
+ @helix-before-change="takeHandle"
93
+ />
94
+
95
+ <helix-select label="Team" name="team" placeholder="Pick one" required>
96
+ <helix-option v-for="team in teams" :key="team" :value="team">{{ team }}</helix-option>
97
+ </helix-select>
98
+
99
+ <!-- A switch is a thing happening now, which is why it says on and off.
100
+ It still submits, as `on`. -->
101
+ <helix-switch label="Send me the weekly digest" name="digest" />
102
+
103
+ <helix-button emphasis="solid" tone="primary" type="submit">Join</helix-button>
104
+ </form>
105
+
106
+ <aside class="notes">
107
+ <!-- The one fact you need before typing your name into a page you have
108
+ had for five minutes, so it is a callout. `tone` is the meaning,
109
+ and the component draws it with a tint and a bar on the inline
110
+ start, so it survives being read in grayscale. -->
111
+ <helix-callout tone="info">
112
+ Nothing is posted anywhere. Submit it and the message shows exactly what a server would
113
+ have been handed.
114
+ </helix-callout>
115
+ <helix-text as="h2" variant="title">What this is showing</helix-text>
116
+ <helix-text as="p" emphasis="muted" variant="body">
117
+ Every control is a form-associated custom element, so the submit reads them with
118
+ <helix-code>new FormData(form)</helix-code> and nothing gathers the answers by hand.
119
+ Reset the form and they all go back, the way an <helix-code>input</helix-code> does.
120
+ </helix-text>
121
+ <helix-text as="p" emphasis="muted" variant="body">
122
+ Leave the email wrong and the complaint is the browser's own, in the reader's language.
123
+ Handle is the controlled one: it refuses the change and writes back what it will accept.
124
+ </helix-text>
125
+ <a data-link :href="DOCS.forms">Forms</a>
126
+ </aside>
127
+ </div>
128
+
129
+ <!-- **The region is rendered whether or not there is anything in it.**
130
+ Assistive technology subscribes to a live region, and one that arrives
131
+ already holding its message is often never announced. A dismissed
132
+ message asks to go through `helix-dismiss`. -->
133
+ <helix-toast>
134
+ <helix-toast-item
135
+ v-for="message in messages"
136
+ :key="message.id"
137
+ dismissible
138
+ :duration="8000"
139
+ tone="success"
140
+ @helix-dismiss="dismiss(message.id)"
141
+ >
142
+ <helix-flex direction="column" gap="2xs">
143
+ <helix-text variant="body-strong">Read by the form</helix-text>
144
+ <helix-text variant="code">{{ message.text }}</helix-text>
145
+ </helix-flex>
146
+ </helix-toast-item>
147
+ </helix-toast>
148
+ </div>
149
+ </template>
@@ -0,0 +1,28 @@
1
+ <script setup lang="ts">
2
+ import { DOCS } from './docs.ts'
3
+ </script>
4
+
5
+ <!--
6
+ The bar's counterpart, on every route.
7
+
8
+ **It puts a floor under the content.** The overview is a heading, a table,
9
+ and a caption, which on a tall window left the bottom third of the screen
10
+ empty. The footer is also where the links you want once belong.
11
+
12
+ `data-link="subtle"` reads as body text until it is hovered, which suits a
13
+ row of links under a rule.
14
+ -->
15
+ <template>
16
+ <footer class="site-footer">
17
+ <div class="footer-row">
18
+ <helix-text as="p" emphasis="subtle" variant="caption">
19
+ Every component in here, with its API, its parts and its examples, has a page.
20
+ </helix-text>
21
+ <div class="footer-links">
22
+ <a data-link="subtle" :href="DOCS.gallery">Components</a>
23
+ <a data-link="subtle" :href="DOCS.elements">Documentation</a>
24
+ <a data-link="subtle" :href="DOCS.vue">Vue</a>
25
+ </div>
26
+ </div>
27
+ </footer>
28
+ </template>
@@ -0,0 +1,72 @@
1
+ <script setup lang="ts">
2
+ import { ref } from 'vue'
3
+ import { usePathname } from './routes.ts'
4
+
5
+ /** What the page can follow, in the order the control cycles them. */
6
+ const MODES = ['system', 'light', 'dark'] as const
7
+
8
+ type Mode = (typeof MODES)[number]
9
+
10
+ /** The glyph each mode is announced and drawn with. */
11
+ const MARKS: Record<Mode, string> = { dark: 'moon', light: 'sun', system: 'monitor' }
12
+
13
+ const path = usePathname()
14
+ /* `system` is the resting state, so the control draws the same glyph before and
15
+ after the reader first touches it. */
16
+ const mode = ref<Mode>('system')
17
+
18
+ /**
19
+ * One attribute, two modes, and no second stylesheet.
20
+ *
21
+ * Every Helix token is written once as a `light-dark()` pair, so `color-scheme`
22
+ * decides which half resolves. `data-color-mode` sets it, and since
23
+ * `color-scheme` inherits, the attribute works on any element: put it on a
24
+ * panel for a light preview inside a dark page.
25
+ *
26
+ * `system` removes the attribute. Writing out whichever mode is current would
27
+ * freeze the page there the moment the reader's machine changed.
28
+ */
29
+ const cycle = () => {
30
+ const next = MODES[(MODES.indexOf(mode.value) + 1) % MODES.length] ?? 'system'
31
+ mode.value = next
32
+ if (next === 'system') {
33
+ delete document.documentElement.dataset.colorMode
34
+ return
35
+ }
36
+ document.documentElement.dataset.colorMode = next
37
+ }
38
+ </script>
39
+
40
+ <!-- The bar across the top: the wordmark, the destinations, and the color mode. -->
41
+ <template>
42
+ <helix-app-header material="glass" sticky>
43
+ <!-- The wordmark is the way back to the first page, so there is no third
44
+ destination in the bar saying the same thing. It is also the only name
45
+ of the project on the screen. The mark is a placeholder for your own,
46
+ drawn in `--helix-color-brand-mark`, the token for the brand as a
47
+ graphic. -->
48
+ <a class="wordmark" data-link="quiet" href="#/" slot="start">
49
+ <helix-icon name="cube" />
50
+ <helix-text variant="body-strong">__PROJECT_NAME__</helix-text>
51
+ </a>
52
+
53
+ <!-- The links are yours. Navigation owns the marker that travels between
54
+ them and renders no anchors of its own. The base layer styles them,
55
+ `aria-current="page"` included. -->
56
+ <helix-navigation label="Pages">
57
+ <a :aria-current="path === '/overview' ? 'page' : undefined" href="#/overview">Overview</a>
58
+ <a :aria-current="path === '/join' ? 'page' : undefined" href="#/join">Join</a>
59
+ </helix-navigation>
60
+
61
+ <!-- An icon with no words has no accessible name until it is given one,
62
+ which is why this is its own element. -->
63
+ <helix-icon-button
64
+ :label="`Color mode: ${mode}`"
65
+ slot="end"
66
+ :title="`Color mode: ${mode}`"
67
+ @click="cycle"
68
+ >
69
+ <helix-icon :name="MARKS[mode]" />
70
+ </helix-icon-button>
71
+ </helix-app-header>
72
+ </template>