Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
Binary file removed packages/docs/public/images/user-flow-mark.png
Binary file not shown.
41 changes: 41 additions & 0 deletions packages/docs/public/images/user-flow-mark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions packages/docs/src/app/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<header class="site-header">
<div class="container site-header-inner">
<a class="brand" routerLink="/" aria-label="user-flow start page">
<img
class="brand-logo"
src="images/user-flow-mark.png"
alt=""
width="32"
height="32"
/>
<svg
class="uf-mark brand-logo"
viewBox="0 0 1360 1360"
aria-hidden="true"
>
<use href="images/user-flow-mark.svg#mark" />
</svg>
<span class="brand-name">user-flow</span>
</a>
<nav class="site-nav" aria-label="Main">
Expand Down
10 changes: 3 additions & 7 deletions packages/docs/src/app/home/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,9 @@ <h1 class="hero-title">
</figure>
</div>
<div class="hero-visual" aria-hidden="true">
<img
class="hero-mark"
src="images/user-flow-mark.png"
alt=""
width="240"
height="240"
/>
<svg class="uf-mark hero-mark" viewBox="0 0 1360 1360">
<use href="images/user-flow-mark.svg#mark" />
</svg>
</div>
</section>

Expand Down
27 changes: 10 additions & 17 deletions packages/docs/src/app/home/home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,30 @@
}
}

// The header already shows the mark, so the hero only repeats it where
// there is a second column to fill.
.hero-visual {
display: flex;
justify-content: flex-start;
order: -1;
display: none;
}

@media (min-width: 900px) {
.hero-visual {
display: flex;
justify-content: center;
order: 0;
align-self: start;
}
}

.hero-mark {
width: 96px;
height: 96px;
padding: var(--space-4);
border-radius: var(--radius-2xl);
box-sizing: content-box;
width: 170px;
height: 170px;
padding: var(--space-8);
border-radius: var(--radius-3xl);
background: var(--surface-subtle);
border: 1px solid var(--border);
}

@media (min-width: 900px) {
.hero-mark {
width: 240px;
height: 240px;
padding: var(--space-8);
border-radius: var(--radius-3xl);
}
}

.hero-eyebrow {
margin: 0 0 var(--space-4);
color: var(--link);
Expand Down
11 changes: 11 additions & 0 deletions packages/docs/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
--callout-warning-bg: var(--color-warning-50);
--callout-warning-border: var(--color-warning-300);
--callout-warning-title: var(--color-warning-800);
--logo-ink: var(--color-neutral-950);
--logo-paper: var(--color-surface);
}

@mixin dark-theme {
Expand Down Expand Up @@ -90,6 +92,8 @@
--callout-warning-bg: var(--color-warning-950);
--callout-warning-border: var(--color-warning-800);
--callout-warning-title: var(--color-warning-300);
--logo-ink: var(--color-neutral-50);
--logo-paper: var(--color-neutral-800);
}

@media (prefers-color-scheme: dark) {
Expand Down Expand Up @@ -571,6 +575,13 @@ pre {
}

/* Theme toggle: the icon is picked by CSS so server and client markup match */
/* The user-flow mark, drawn with <use> so its outline (stroke) and body (color) follow the theme. */
.uf-mark {
display: block;
stroke: var(--logo-ink);
color: var(--logo-paper);
}

.theme-toggle {
display: inline-flex;
align-items: center;
Expand Down
Loading