@uxfront/ui 0.2.0 → 0.3.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.
- package/README.md +11 -11
- package/package.json +1 -1
- package/src/components/UxHeader.vue +26 -4
package/README.md
CHANGED
|
@@ -80,17 +80,17 @@ const scene = [
|
|
|
80
80
|
|
|
81
81
|
## Components
|
|
82
82
|
|
|
83
|
-
| Component | Role
|
|
84
|
-
| -------------------------------------------- |
|
|
85
|
-
| `UxSite` | The page root. Takes the `scene` (one formation per section), starts it on mount and brings the base styles. Slots: `header`, `hud` (defaults to `UxHud`), `anchors`, `controls`, `fallback` and the sections.
|
|
86
|
-
| `UxHero` | The first section: kicker (with an optional `badge`, like "New"), a title in `UxHeroLine`s (with `title` for assistive technology), a lead, an index of sections for small screens and a scroll cue.
|
|
87
|
-
| `UxChapter` | A pinned section: eyebrow (`index`, `role`), `title`, `lead` slot, details and a link. `align="end"` puts the copy on the right, `valign="end"` at the bottom, `steps` highlights details one by one.
|
|
88
|
-
| `UxFinale` | The closing section: a large `mark` slot, kicker, `title`, `lead`, an `actions` slot (buttons), a grid of link `cards` and a `footer`.
|
|
89
|
-
| `UxPillars`, `UxChips`, `UxTraits`, `UxSpec` | Chapter details that light up one after another (set `steps` on the chapter to their count).
|
|
90
|
-
| `UxHeader` | Brand (`mark` slot, `UxFrontMark` by default, empty for none; `brand` slot to style the name), a `byline` slot beside it for links like "by UXFront", section nav (marks the one held) and a GitHub link.
|
|
91
|
-
| `UxHud` | Particle count and fps, the chapter counter and progress, and the Motion toggle.
|
|
92
|
-
| `UxAnchor` | A label pinned to a formation anchor, like `plates:0`: `callout`, `tag` or `button` (put buttons in the `controls` slot).
|
|
93
|
-
| `UxPillLink`, `UxErrorPage`, icons | The scrambled pill link, a full error page, and `UxArrowIcon`, `UxGithubIcon`, `UxFrameworkLogo`, `UxFrontMark`.
|
|
83
|
+
| Component | Role |
|
|
84
|
+
| -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
85
|
+
| `UxSite` | The page root. Takes the `scene` (one formation per section), starts it on mount and brings the base styles. Slots: `header`, `hud` (defaults to `UxHud`), `anchors`, `controls`, `fallback` and the sections. |
|
|
86
|
+
| `UxHero` | The first section: kicker (with an optional `badge`, like "New"), a title in `UxHeroLine`s (with `title` for assistive technology), a lead, an index of sections for small screens and a scroll cue. |
|
|
87
|
+
| `UxChapter` | A pinned section: eyebrow (`index`, `role`), `title`, `lead` slot, details and a link. `align="end"` puts the copy on the right, `valign="end"` at the bottom, `steps` highlights details one by one. |
|
|
88
|
+
| `UxFinale` | The closing section: a large `mark` slot, kicker, `title`, `lead`, an `actions` slot (buttons), a grid of link `cards` and a `footer`. |
|
|
89
|
+
| `UxPillars`, `UxChips`, `UxTraits`, `UxSpec` | Chapter details that light up one after another (set `steps` on the chapter to their count). |
|
|
90
|
+
| `UxHeader` | Brand (`mark` slot, `UxFrontMark` by default, empty for none; `brand` slot to style the name), a `byline` slot beside it for links like "by UXFront", section nav (marks the one held), an `actions` slot for extra links and a GitHub link. |
|
|
91
|
+
| `UxHud` | Particle count and fps, the chapter counter and progress, and the Motion toggle. |
|
|
92
|
+
| `UxAnchor` | A label pinned to a formation anchor, like `plates:0`: `callout`, `tag` or `button` (put buttons in the `controls` slot). |
|
|
93
|
+
| `UxPillLink`, `UxErrorPage`, icons | The scrambled pill link, a full error page, and `UxArrowIcon`, `UxGithubIcon`, `UxFrameworkLogo`, `UxFrontMark`. |
|
|
94
94
|
|
|
95
95
|
Also exported: `useExperience()` (the scene's reactive state inside a `UxSite`), the `v-scramble` directive, `FRAMEWORKS` and their logos, and `uxRenderHookKey`.
|
|
96
96
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxfront/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Vue components for the uxfront.com family of homepages: a scroll-driven WebGL scene with pinned chapters, a HUD, a header and a finale, in one look.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -30,6 +30,8 @@ defineSlots<{
|
|
|
30
30
|
* like "by <a>UXFront</a>". Smaller and muted.
|
|
31
31
|
*/
|
|
32
32
|
byline?(): unknown;
|
|
33
|
+
/** Extra links at the end of the header, before the GitHub link. */
|
|
34
|
+
actions?(): unknown;
|
|
33
35
|
}>();
|
|
34
36
|
|
|
35
37
|
const { state } = useExperience();
|
|
@@ -66,10 +68,13 @@ const { state } = useExperience();
|
|
|
66
68
|
</li>
|
|
67
69
|
</ul>
|
|
68
70
|
</nav>
|
|
69
|
-
<
|
|
70
|
-
<
|
|
71
|
-
<
|
|
72
|
-
|
|
71
|
+
<div v-if="$slots.actions || github" class="ux-header__end">
|
|
72
|
+
<slot name="actions" />
|
|
73
|
+
<a v-if="github" class="ux-header__github" :href="github">
|
|
74
|
+
<UxGithubIcon />
|
|
75
|
+
<span>GitHub</span>
|
|
76
|
+
</a>
|
|
77
|
+
</div>
|
|
73
78
|
</header>
|
|
74
79
|
</template>
|
|
75
80
|
|
|
@@ -190,6 +195,23 @@ const { state } = useExperience();
|
|
|
190
195
|
color: var(--ux-fg-3);
|
|
191
196
|
}
|
|
192
197
|
|
|
198
|
+
.ux-header__end {
|
|
199
|
+
display: flex;
|
|
200
|
+
align-items: center;
|
|
201
|
+
gap: 1.5rem;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.ux-header__end :slotted(a) {
|
|
205
|
+
gap: 0.5rem;
|
|
206
|
+
font-size: 0.875rem;
|
|
207
|
+
color: var(--ux-fg-2);
|
|
208
|
+
transition: color 0.3s var(--ux-ease-out);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.ux-header__end :slotted(a:hover) {
|
|
212
|
+
color: var(--ux-fg);
|
|
213
|
+
}
|
|
214
|
+
|
|
193
215
|
.ux-header__github {
|
|
194
216
|
gap: 0.5rem;
|
|
195
217
|
font-size: 0.875rem;
|