Skip to content
Merged
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
29 changes: 23 additions & 6 deletions web/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ colors:
text-primary: "#f4f4f5"
text-secondary: "#a1a1aa"
text-tertiary: "#8a8a93"
accent-text: "#4aa6ff"
success-text: "#34c759"
warning-text: "#ff9f0a"
liquid-glass-tint: "rgba(10, 132, 255, 0.18)"
liquid-glass-border: "rgba(10, 132, 255, 0.5)"
light:
background: "#ffffff"
surface: "#fafafa"
Expand All @@ -26,17 +31,28 @@ colors:
border-focus: "#0071e3"
text-primary: "#09090b"
text-secondary: "#52525b"
text-tertiary: "#8a8a93"
text-tertiary: "#5c5c66"
accent-text: "#0057b8"
success-text: "#146c2e"
warning-text: "#8a5a00"
liquid-glass-tint: "rgba(0, 113, 227, 0.12)"
liquid-glass-border: "rgba(0, 113, 227, 0.4)"
brand:
apple-blue: "#0071e3"
apple-blue-vibrant: "#0a84ff"
swift-orange: "#FA7343"
liquid-glass-tint: "rgba(10, 132, 255, 0.15)"
liquid-glass-border: "rgba(10, 132, 255, 0.4)"
swift-orange: "#fa7343"
semantic:
success: "#34c759"
warning: "#ff9f0a"
chrome:
note: "Literal greens kept inside surfaces that stay dark in either page
theme (the installer console, the simulated macOS chrome, the mock
terminal illustrations). They are not theme tokens."
success: "#30d158"
warning: "#ffd60a"
danger: "#ff453a"
status-dot: "#10b981"
traffic-red: "#ff5f56"
traffic-yellow: "#ffbd2e"
traffic-green: "#27c93f"
typography:
display:
fontFamily: '-apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif'
Expand Down Expand Up @@ -112,6 +128,7 @@ FlowSnap's landing page embodies the craftsmanship of native macOS applications:
5. **Hairline Precision**: Card borders, dividers, and modal frames must strictly be `1px solid` with low opacity (`rgba(255,255,255,0.08)` on dark mode).
6. **Type Floor Is 11px**: `meta` (11px) and `label` (13px) are the documented steps under `xs`/`sm`. Nothing may render below 11px, including `rem` values that compute smaller.
7. **Mono Means Code or Data**: metadata that is a sentence (`.license-tag`, `.spec-chip`, `.pillar-badge`, `.hint-label`, `.toggle-label`, `.audit-link`) uses the body stack at the `meta` size. Mono stays on keycaps, prompts, digests and counts.
8. **Brand and status colours need a text shade**: the raw brand values (`#0a84ff`, `#34c759`, `#ff9f0a`) are tuned for dark and fail AA when used as 11-13px text on light surfaces. Text uses `var(--brand-apple-blue-vibrant)` (= `accent-text` above), `var(--color-success-text)` and `var(--color-warning-text)`; the raw tokens stay for dots, fills, glows and icons. Anything that renders its own dark chrome (`.static-preview-frame`, `.mac-desktop-frame`) pins those tokens locally instead of inheriting the page theme.

### DON'T:

Expand Down
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "astro build",
"preview": "astro preview",
"pretest": "astro build",
"test": "node tests/desktop-simulator.test.mjs && node tests/mobile-nav.test.mjs && node tests/bento-shortcuts.test.mjs && node tests/distribution-hub.test.mjs && node tests/seo-cicd.test.mjs",
"test": "node tests/desktop-simulator.test.mjs && node tests/mobile-nav.test.mjs && node tests/bento-shortcuts.test.mjs && node tests/distribution-hub.test.mjs && node tests/design-tokens.test.mjs && node tests/seo-cicd.test.mjs",
"astro": "astro"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const currentYear = new Date().getFullYear();
}

.dot {
color: var(--accent-blue);
color: var(--text-tertiary);
}

.footer-heading {
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/GatekeeperGuide.astro
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ const t = getI18n(lang);
.gatekeeper-badge {
font-size: var(--font-size-meta);
font-family: var(--font-body);
color: var(--color-warning);
color: var(--color-warning-text);
background: rgba(255, 214, 10, 0.1);
border: 1px solid rgba(255, 214, 10, 0.25);
padding: 1px 6px;
Expand Down
7 changes: 6 additions & 1 deletion web/src/components/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,18 @@ const viUrl = `${basePath || ''}/vi`;
top: 0;
z-index: 50;
width: 100%;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
background-color: rgba(255, 255, 255, 0.85);
border-bottom: 1px solid var(--border-color);
transition: background-color var(--duration-normal) ease, border-color var(--duration-normal) ease;
}

/* Firefox has never accepted -webkit-backdrop-filter, and the CSS
minifier deletes the unprefixed twin of a prefixed declaration. */
@supports (backdrop-filter: blur(1px)) {
.site-header { backdrop-filter: blur(20px); }
}

:global([data-theme="dark"]) .site-header,
:global(:root:not([data-theme="light"])) .site-header {
background-color: rgba(9, 9, 11, 0.82);
Expand Down
20 changes: 20 additions & 0 deletions web/src/components/UnifiedInstaller.astro
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const curlTab = TERMINAL_TABS.find((tab) => tab.id === 'curl') || TERMINAL_TABS[
class="installer-tab active"
role="tab"
aria-selected="true"
tabindex="0"
aria-controls="panel-dmg"
id="tab-dmg"
data-install-tab="dmg"
Expand All @@ -71,6 +72,7 @@ const curlTab = TERMINAL_TABS.find((tab) => tab.id === 'curl') || TERMINAL_TABS[
class="installer-tab"
role="tab"
aria-selected="false"
tabindex="-1"
aria-controls="panel-terminal"
id="tab-curl"
data-install-tab="curl"
Expand Down Expand Up @@ -245,6 +247,22 @@ const curlTab = TERMINAL_TABS.find((tab) => tab.id === 'curl') || TERMINAL_TABS[

let currentCommand = commandCode?.textContent?.trim() || '';

root.querySelector('[role="tablist"]')?.addEventListener('keydown', (event) => {
const key = (event as KeyboardEvent).key;
if (!['ArrowRight', 'ArrowLeft', 'Home', 'End'].includes(key)) return;
event.preventDefault();
const list = Array.from(tabs) as HTMLButtonElement[];
const current = list.indexOf(document.activeElement as HTMLButtonElement);
if (current === -1) return;
const next =
key === 'ArrowRight' ? (current + 1) % list.length
: key === 'ArrowLeft' ? (current - 1 + list.length) % list.length
: key === 'Home' ? 0
: list.length - 1;
list[next].focus();
list[next].click();
});

tabs.forEach((tab) => {
tab.addEventListener('click', () => {
const tabId = tab.getAttribute('data-install-tab');
Expand All @@ -256,6 +274,8 @@ const curlTab = TERMINAL_TABS.find((tab) => tab.id === 'curl') || TERMINAL_TABS[

tab.classList.add('active');
tab.setAttribute('aria-selected', 'true');
// One Tab stop for the whole strip; the arrows carry the rest.
tabs.forEach((t) => t.setAttribute('tabindex', t === tab ? '0' : '-1'));

const newDesc = tab.getAttribute('data-description') || '';
if (tabDesc && newDesc) tabDesc.textContent = newDesc;
Expand Down
4 changes: 2 additions & 2 deletions web/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const t = getI18n(lang);
}

.badge-separator {
color: var(--accent-blue);
color: var(--text-tertiary);
margin: 0 4px;
}

Expand Down Expand Up @@ -191,7 +191,7 @@ const t = getI18n(lang);

.hint-divider {
margin: 0 4px;
color: var(--border-color);
color: var(--text-tertiary);
}

/* Sections Container */
Expand Down
4 changes: 2 additions & 2 deletions web/src/pages/vi/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const t = getI18n(lang);
}

.badge-separator {
color: var(--accent-blue);
color: var(--text-tertiary);
margin: 0 4px;
}

Expand Down Expand Up @@ -191,7 +191,7 @@ const t = getI18n(lang);

.hint-divider {
margin: 0 4px;
color: var(--border-color);
color: var(--text-tertiary);
}

/* Sections Container */
Expand Down
16 changes: 13 additions & 3 deletions web/src/styles/design-tokens.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
--accent-blue-vibrant: #0a84ff;
--accent-swift: #fa7343;
--brand-apple-blue: var(--accent-blue);
--brand-apple-blue-vibrant: var(--accent-blue-vibrant);
/* -vibrant is only ever used as 11-12px text on page surfaces, so light
uses the AA-passing shade (#0a84ff measures 3.1:1 on the chip tints). */
--brand-apple-blue-vibrant: #0057b8;

/* Liquid Glass HUD */
--liquid-glass-bg: rgba(0, 113, 227, 0.12);
Expand Down Expand Up @@ -83,6 +85,10 @@
/* Status */
--color-success: #34c759;
--color-warning: #ff9f0a;
/* Status colours used as TEXT on light surfaces need the dark shade:
#34c759 is 2.0:1 and #ff9f0a is 1.9:1 on their own tinted chips. */
--color-success-text: #146c2e;
--color-warning-text: #8a5a00;

/* Radii */
--radius-sm: 6px;
Expand Down Expand Up @@ -126,7 +132,9 @@
--accent-blue: #0a84ff;
--accent-blue-vibrant: #0a84ff;
--brand-apple-blue: var(--accent-blue);
--brand-apple-blue-vibrant: var(--accent-blue-vibrant);
--brand-apple-blue-vibrant: #4aa6ff;
--color-success-text: #34c759;
--color-warning-text: #ff9f0a;
--liquid-glass-bg: rgba(10, 132, 255, 0.18);
--liquid-glass-border: rgba(10, 132, 255, 0.5);
}
Expand Down Expand Up @@ -158,7 +166,9 @@
--accent-blue: #0a84ff;
--accent-blue-vibrant: #0a84ff;
--brand-apple-blue: var(--accent-blue);
--brand-apple-blue-vibrant: var(--accent-blue-vibrant);
--brand-apple-blue-vibrant: #4aa6ff;
--color-success-text: #34c759;
--color-warning-text: #ff9f0a;
--liquid-glass-bg: rgba(10, 132, 255, 0.18);
--liquid-glass-border: rgba(10, 132, 255, 0.5);
}
Expand Down
60 changes: 47 additions & 13 deletions web/src/styles/desktop-simulator.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/* The simulated macOS chrome stays dark in either page theme, so its accent
tokens are pinned here instead of inheriting the page theme (#0a84ff and
#0071e3 both land under 4.5:1 on the chrome surfaces). */
.static-preview-frame,
.mac-desktop-frame { --accent-blue-vibrant: #4aa6ff; }

.simulator-wrapper { display: flex; flex-direction: column; gap: 14px; width: 100%; user-select: none; }

.sandbox-toolbar {
Expand Down Expand Up @@ -92,7 +98,6 @@
justify-content: space-between;
padding: 0 12px;
background: rgba(18, 18, 22, 0.86);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
font-size: 0.75rem;
Expand Down Expand Up @@ -129,7 +134,6 @@
right: 48px;
width: 250px;
background: rgba(24, 24, 30, 0.96);
backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px);
border: 1px solid rgba(255, 255, 255, 0.16);
border-radius: 12px;
Expand Down Expand Up @@ -200,7 +204,6 @@
left: 50%;
transform: translate(-50%, -120%) scale(0.95);
background: rgba(22, 22, 28, 0.94);
backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px);
border: 1px solid rgba(255, 255, 255, 0.16);
border-radius: 0 0 14px 14px;
Expand Down Expand Up @@ -237,7 +240,6 @@
.template-label { font-size: 0.6875rem; color: rgba(255, 255, 255, 0.6); font-weight: 500; } /* Liquid Glass HUD Snap Preview */ .hud-snap-preview {
position: absolute;
background: var(--liquid-glass-bg);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
border: 1.5px solid var(--accent-blue);
border-radius: 12px;
Expand All @@ -252,7 +254,6 @@
.hud-snap-preview.is-active { opacity: 1; transform: scale(1); } .hud-preview-content { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; } .hud-preview-badge { padding: 4px 12px; background: rgba(0, 88, 208, 0.92); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 20px; font-size: 0.75rem; font-weight: 600; color: #ffffff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); } /* Mock Windows (Shared Window Styling) */ .mock-window {
position: absolute;
background: rgba(22, 22, 28, 0.94);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 12px;
Expand All @@ -261,19 +262,28 @@
flex-direction: column;
overflow: hidden;
z-index: 30;
transition: left 0.22s var(--ease-spring), top 0.22s var(--ease-spring), width 0.22s var(--ease-spring), height 0.22s var(--ease-spring), box-shadow 0.2s ease, opacity 0.2s ease;
transition: left 0.22s var(--ease-spring), top 0.22s var(--ease-spring), width 0.22s var(--ease-spring), height 0.22s var(--ease-spring), box-shadow 0.2s ease, opacity 0.2s ease, visibility 0s;
}

.mock-window.active-window { z-index: 35; box-shadow: 0 25px 50px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.15); }

.mock-window.is-dragging { transition: none !important; cursor: grabbing; z-index: 40 !important; box-shadow: 0 35px 70px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(10, 132, 255, 0.5); }

.mock-window.is-hidden { opacity: 0; pointer-events: none; transform: scale(0.9); }
.mock-window.is-hidden { opacity: 0; pointer-events: none; transform: scale(0.9);
/* opacity alone keeps the three traffic-light buttons in the tab ring, so a
closed window still eats Tab presses. visibility flips after the 0.2s fade
and snaps back to visible the moment the class is removed. */
visibility: hidden;
transition-delay: 0s, 0s, 0s, 0s, 0s, 0s, 0.2s;
}

/* Specific Window Positions */
#mock-window-code { left: 8%; top: 10%; width: 54%; height: 70%; }

#mock-window-terminal { left: 48%; top: 22%; width: 46%; height: 62%; }
/* The terminal used to start at 48%, inside the code window's 8-62% span, so
its five output lines sat covered at rest. 66% clears the overlap at every
stage width without moving the code window. */
#mock-window-terminal { left: 66%; top: 22%; width: 30%; height: 62%; }

.mock-titlebar {
height: 36px;
Expand All @@ -288,9 +298,13 @@
touch-action: none;
}

.traffic-lights { display: flex; align-items: center; gap: 7px; } .traffic-light { width: 11px; height: 11px; border-radius: 50%; border: none; padding: 0; cursor: pointer; transition: opacity 0.15s ease; } .traffic-light:hover { opacity: 0.8; } .traffic-light.red { background: #ff5f56; } .traffic-light.yellow { background: #ffbd2e; } .traffic-light.green { background: #27c93f; } .titlebar-info { display: flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, 0.85); font-size: 0.75rem; font-weight: 500; } .file-icon { color: var(--accent-swift); } .terminal-mini-icon { color: #10b981; } .snap-status-badge {
.traffic-lights { display: flex; align-items: center; gap: 7px; } .traffic-light { width: 11px; height: 11px; border-radius: 50%; border: none; padding: 0; cursor: pointer; transition: opacity 0.15s ease; } .traffic-light:hover { opacity: 0.8; } .traffic-light.red { background: #ff5f56; } .traffic-light.yellow { background: #ffbd2e; } .traffic-light.green { background: #27c93f; } .titlebar-info { display: flex; align-items: center; gap: 6px; min-width: 0; color: rgba(255, 255, 255, 0.85); font-size: 0.75rem; font-weight: 500; } .file-icon { color: var(--accent-swift); } .terminal-mini-icon { color: #10b981; } /* The narrower terminal window has to give up its title before the
36px titlebar breaks onto two lines. */
.titlebar-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .snap-status-badge {
display: flex;
align-items: center;
flex-shrink: 0;
white-space: nowrap;
gap: 5px;
background: rgba(255, 255, 255, 0.08);
padding: 2px 8px;
Expand Down Expand Up @@ -319,7 +333,15 @@
text-align: right;
}

.code-content { flex: 1; padding-left: 12px; margin: 0; color: #e4e4e7; overflow-x: auto; } .token-comment { color: #6b7280; } .token-keyword { color: #f472b6; font-weight: 600; } .token-type { color: #38bdf8; } .token-attr { color: #fbbf24; } .token-func { color: #a78bfa; } .mock-terminal-body { flex-direction: column; background: #0b0c10; gap: 4px; color: #e5e7eb; }
.code-content { flex: 1; padding-left: 12px; margin: 0; color: #e4e4e7; overflow-x: auto; }
/* The Swift mock needs 449px and the window gives 335px at 768px, which cut
lines mid-token behind an overlay scrollbar that never shows a track. The
gutter goes with it: ten numbers beside twelve wrapped rows would line up
with nothing. */
@media (max-width: 1023px) {
.code-content { white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: visible; padding-left: 0; }
.code-line-numbers { display: none; }
} .token-comment { color: #a1a1aa; } .token-keyword { color: #f472b6; font-weight: 600; } .token-type { color: #38bdf8; } .token-attr { color: #fbbf24; } .token-func { color: #a78bfa; } .mock-terminal-body { flex-direction: column; background: #0b0c10; gap: 4px; color: #e5e7eb; }

.terminal-line { display: flex; align-items: center; gap: 6px; } .t-prompt { color: #10b981; font-weight: 700; } .t-dir { color: #38bdf8; } .t-cmd { color: #f3f4f6; } .t-output { font-size: 0.6875rem; color: #9ca3af; margin-left: 12px; } .t-green { color: #10b981; } .t-blue { color: #60a5fa; } .t-cursor { animation: blink 1s infinite; color: #10b981; } @keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } } .mock-window-footer {
height: 22px;
Expand Down Expand Up @@ -350,7 +372,6 @@
gap: 10px;
padding: 6px 12px;
background: rgba(24, 24, 30, 0.75);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.14);
border-radius: 18px;
Expand Down Expand Up @@ -413,7 +434,7 @@
background: rgba(24, 24, 27, 0.88);
border: 1px solid rgba(255, 255, 255, 0.28);
color: rgba(255, 255, 255, 0.7);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
transition: background var(--duration-fast) var(--ease-spring), border-color var(--duration-fast) var(--ease-spring), box-shadow var(--duration-fast) var(--ease-spring), transform var(--duration-fast) var(--ease-spring), opacity var(--duration-fast) var(--ease-spring);
}
Expand Down Expand Up @@ -495,7 +516,7 @@
.static-badge {
font-size: 0.6875rem;
font-family: var(--font-mono);
color: var(--accent-blue);
color: var(--accent-blue-vibrant);
background: rgba(10, 132, 255, 0.16);
padding: 1px 4px;
border-radius: 3px;
Expand Down Expand Up @@ -539,3 +560,16 @@
@media (min-width: 768px) and (hover: hover) {
.mobile-fallback-card { display: none !important; }
}

/* Firefox has never accepted -webkit-backdrop-filter, and the CSS minifier
deletes the unprefixed twin of a prefixed declaration, so the standard
property lives in its own block instead of next to the pairs above. */
@supports (backdrop-filter: blur(1px)) {
.mac-menubar { backdrop-filter: blur(16px); }
.fs-menubar-popover { backdrop-filter: blur(24px); }
.snap-picker { backdrop-filter: blur(24px); }
.template-label { backdrop-filter: blur(14px); }
.hud-snap-preview.is-active { backdrop-filter: blur(20px); }
.mac-dock { backdrop-filter: blur(20px); }
.divider-handle { backdrop-filter: blur(10px); }
}
Loading
Loading