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
10 changes: 7 additions & 3 deletions docs/features/web-distribution-hub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@
3. **Simulated macOS Terminal One-Line Installer (`TerminalInstaller.astro`)**:
- Realistic macOS Terminal window chrome with 3 colored window control dots (red, yellow, green).
- Dynamic tab toggle for developer preferences:
- **Tab 1 (`cURL`)**: `curl -fsSL https://raw.githubusercontent.com/ahauy/FlowSnap/main/install.sh | bash`
- **Tab 2 (`Homebrew`)**: `brew install --cask ahauy/tap/flowsnap`
- **Tab (`cURL`)**: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ahauy/FlowSnap/main/scripts/install.sh)"`
- **Homebrew is not shipped**: the `ahauy/homebrew-tap` repository does not exist, so advertising
`brew install --cask ahauy/tap/flowsnap` would hand visitors a command that 404s.
- The component rendered on the live page is `UnifiedInstaller.astro`; this `TerminalInstaller.astro`
is not imported by any page (see the orphan cleanup backlog).
- Accessible 1-click Copy button with dual fallback (`navigator.clipboard` -> temporary off-screen `<textarea>`).
- Visual feedback: checkmark icon, "Copied!" text, and `aria-live="polite"` announcement for exactly 2000ms.

Expand Down Expand Up @@ -77,7 +80,8 @@ web/

- **Automated Tests (`web/tests/distribution-hub.test.mjs`)**:
- `TC-DIST-001`: Direct DMG link, badges (v1.3.1, Universal Binary, macOS 14.0+, ~14.2 MB) — **PASSED**
- `TC-DIST-002`: Tabbed Terminal window with cURL and Homebrew commands — **PASSED**
- `TC-DIST-002`: Terminal panel exposes the cURL command and asserts the Homebrew tab stays absent
until the tap is published — **PASSED**
- `TC-DIST-003`: 1-click clipboard copy with 2000ms micro-interaction — **PASSED**
- `TC-DIST-004`: 3 Privacy manifesto pillars with AXUIElement & Zero Keylogging — **PASSED**
- `TC-DIST-005`: Accessible `<details>` Gatekeeper accordion & `xattr -cr` copy button — **PASSED**
Expand Down
16 changes: 5 additions & 11 deletions docs/user-guides/web-distribution-hub.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,22 @@ Khu vực **Distribution Hub** (`#download`) trên trang chủ chính thức c

---

## 2. Cài đặt tự động bằng 1 dòng lệnh Terminal (Tab cURL & Homebrew)
## 2. Cài đặt tự động bằng 1 dòng lệnh Terminal (tab cURL)

Khung cài đặt tích hợp sẵn lệnh cho 2 công cụ phổ biến của developers:
Khung cài đặt tích hợp sẵn một dòng lệnh cho developers:

### Cách 1: Sử dụng lệnh cURL (Mặc định)

1. Trong khung Terminal Installer, chọn tab **cURL**.
2. Nhấp nút **Copy** (hoặc chọn toàn bộ câu lệnh):
```bash
curl -fsSL https://raw.githubusercontent.com/ahauy/FlowSnap/main/install.sh | bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ahauy/FlowSnap/main/scripts/install.sh)"
```
3. Mở ứng dụng Terminal trên máy Mac của bạn (`Terminal`, `iTerm2` hoặc `Ghostty`), dán lệnh và nhấn **Enter**.
4. Script cài đặt sẽ tự động tải phiên bản Universal mới nhất, mount disk image, sao chép `FlowSnap.app` vào `/Applications` và dọn dẹp bộ nhớ tạm.

### Cách 2: Sử dụng Homebrew Cask

1. Trong khung Terminal Installer, chuyển sang tab **Homebrew**.
2. Nhấp nút **Copy** để sao chép câu lệnh:
```bash
brew install --cask ahauy/tap/flowsnap
```
3. Dán vào Terminal và nhấn **Enter**. Homebrew sẽ quản lý vòng đời và cập nhật phiên bản cho FlowSnap.
> **Homebrew chưa hỗ trợ.** Trang web không còn hiển thị lệnh `brew install --cask ahauy/tap/flowsnap`
> vì tap `ahauy/homebrew-tap` chưa được phát hành; chạy lệnh đó sẽ báo lỗi 404.

---

Expand Down
22 changes: 15 additions & 7 deletions web/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ colors:
border-focus: "#0a84ff"
text-primary: "#f4f4f5"
text-secondary: "#a1a1aa"
text-tertiary: "#71717a"
text-tertiary: "#8a8a93"
light:
background: "#ffffff"
surface: "#fafafa"
Expand All @@ -26,7 +26,7 @@ colors:
border-focus: "#0071e3"
text-primary: "#09090b"
text-secondary: "#52525b"
text-tertiary: "#71717a"
text-tertiary: "#8a8a93"
brand:
apple-blue: "#0071e3"
apple-blue-vibrant: "#0a84ff"
Expand All @@ -50,18 +50,25 @@ typography:
fontFamily: '"SF Mono", "JetBrains Mono", Menlo, Consolas, monospace'
weights: "400, 500, 600"
scale:
meta: "0.6875rem" # 11px - mono metadata only: version, dates, counts, keycaps
xs: "0.75rem" # 12px
label: "0.8125rem" # 13px - secondary UI labels and short prose hints
sm: "0.875rem" # 14px
base: "1rem" # 16px
lg: "1.125rem" # 18px
xl: "1.25rem" # 20px
2xl: "1.5rem" # 24px
3xl: "2rem" # 32px
4xl: "2.5rem" # 40px
5xl: "3.5rem" # 56px
xl: "1.375rem" # 22px
2xl: "1.875rem" # 30px
3xl: "2.375rem" # 38px
4xl: "4rem" # 64px
fluid:
hero-title: clamp(38px, 6vw, 64px)
hero-subtitle: clamp(16px, 2vw, 19px)
section-title: clamp(22px, 3.5vw, 30px)
floor: 11px - nothing renders below this, including rem-based values
rounded:
sm: "6px"
md: "10px"
window: "12px" # macOS window frame and HUD snap preview
lg: "14px"
xl: "18px"
full: "9999px"
Expand Down Expand Up @@ -97,6 +104,7 @@ FlowSnap's landing page embodies the craftsmanship of native macOS applications:
3. **High Contrast & WCAG 2.2 AA**: All text must maintain a minimum contrast ratio of `4.5:1` against its background.
4. **Stable Outer Anchors for Hover**: Wrap interactive translating elements in a stable container to prevent 60Hz hover jitter.
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.

### DON'T:

Expand Down
6 changes: 0 additions & 6 deletions web/src/components/BackToTop.astro
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,6 @@ const label = t.a11y.backToTop;
.back-to-top-btn {
bottom: 20px;
right: 20px;
width: 40px;
height: 40px;
}
.progress-ring {
top: 1px;
left: 1px;
}
}

Expand Down
35 changes: 18 additions & 17 deletions web/src/components/BentoGrid.astro
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ const localizedCards = bentoFeatures.map((card) => {
<rect x="10" y="10" width="240" height="26" rx="8" class="svg-menubar" />
<!-- Active Space 1 Pill -->
<rect x="20" y="14" width="56" height="18" rx="4" fill="var(--brand-apple-blue, #0071e3)" />
<text x="48" y="27" text-anchor="middle" font-size="9" font-weight="600" fill="#ffffff">Space 1</text>
<text x="48" y="27" text-anchor="middle" font-size="11" font-weight="600" fill="#ffffff">Space 1</text>
<!-- Inactive Space 2 -->
<rect x="82" y="14" width="56" height="18" rx="4" class="svg-zone" />
<text x="110" y="27" text-anchor="middle" font-size="9" fill="var(--color-text-tertiary, #94a3b8)">Space 2</text>
<text x="110" y="27" text-anchor="middle" font-size="11" fill="var(--color-text-tertiary, #94a3b8)">Space 2</text>
<!-- Anchored Window -->
<rect x="40" y="52" width="180" height="100" rx="6" class="svg-window-box" />
<rect x="40" y="52" width="180" height="20" rx="6" class="svg-window-header" />
Expand All @@ -136,7 +136,7 @@ const localizedCards = bentoFeatures.map((card) => {
<rect width="80" height="24" rx="12" fill="var(--color-surface, #ffffff)" stroke="var(--brand-apple-blue, #0071e3)" stroke-width="1.2" />
<circle cx="16" cy="12" r="5" fill="#30d158" />
<path d="M14 12l1.5 1.5 3 -3" stroke="#fff" stroke-width="1.2" stroke-linecap="round" />
<text x="46" y="15" text-anchor="middle" font-size="9" font-weight="600" fill="var(--color-text-primary, #09090b)">Anchored</text>
<text x="46" y="15" text-anchor="middle" font-size="11" font-weight="600" fill="var(--color-text-primary, #09090b)">Anchored</text>
</g>
</svg>
</div>
Expand All @@ -150,27 +150,27 @@ const localizedCards = bentoFeatures.map((card) => {
<!-- Top Menu Bar -->
<rect x="10" y="10" width="420" height="22" rx="8" class="svg-menubar" />
<circle cx="28" cy="21" r="3" class="svg-traffic-dot" />
<text x="56" y="24" font-size="9" font-weight="600" fill="var(--color-text-tertiary, #71717a)">Coding Flow</text>
<text x="56" y="24" font-size="11" font-weight="600" fill="var(--color-text-tertiary, #71717a)">Coding Flow</text>
<!-- Tri-Split Preset (Coding Flow) -->
<!-- 1. VS Code (Left 60%) -->
<rect x="22" y="40" width="240" height="138" rx="6" class="svg-window-box" />
<rect x="22" y="40" width="240" height="20" rx="6" class="svg-window-header" />
<circle cx="34" cy="50" r="2.5" fill="#ff5f56" />
<circle cx="41" cy="50" r="2.5" fill="#ffbd2e" />
<circle cx="48" cy="50" r="2.5" fill="#27c93f" />
<text x="142" y="54" text-anchor="middle" font-size="9" font-weight="600" fill="var(--color-text-secondary, #52525b)">VS Code (60%)</text>
<text x="142" y="54" text-anchor="middle" font-size="11" font-weight="600" fill="var(--color-text-secondary, #52525b)">VS Code (60%)</text>
<!-- 2. Chrome DevTools (Top Right 25%) -->
<rect x="272" y="40" width="146" height="70" rx="6" class="svg-window-box" />
<rect x="272" y="40" width="146" height="18" rx="6" class="svg-window-header" />
<text x="345" y="52" text-anchor="middle" font-size="9" font-weight="600" fill="var(--color-text-secondary, #52525b)">Chrome DevTools</text>
<text x="345" y="52" text-anchor="middle" font-size="11" font-weight="600" fill="var(--color-text-secondary, #52525b)">Chrome DevTools</text>
<!-- 3. Terminal (Bottom Right 15%) -->
<rect x="272" y="118" width="146" height="60" rx="6" class="svg-window-box" />
<rect x="272" y="118" width="146" height="18" rx="6" class="svg-window-header" />
<text x="345" y="130" text-anchor="middle" font-size="9" font-weight="600" fill="var(--color-text-secondary, #52525b)">Terminal</text>
<text x="345" y="130" text-anchor="middle" font-size="11" font-weight="600" fill="var(--color-text-secondary, #52525b)">Terminal</text>
<!-- Preset Hotkey Chip -->
<g transform="translate(112, 142)">
<rect width="64" height="20" rx="10" fill="var(--color-surface, #ffffff)" stroke="var(--color-border, #e4e4e7)" stroke-width="1" />
<text x="32" y="14" text-anchor="middle" font-family="var(--font-mono)" font-size="9" font-weight="600" fill="var(--brand-apple-blue, #0071e3)">⌃⌥⌘1</text>
<text x="32" y="14" text-anchor="middle" font-family="var(--font-mono)" font-size="11" font-weight="600" fill="var(--brand-apple-blue, #0071e3)">⌃⌥⌘1</text>
</g>
</svg>
</div>
Expand All @@ -191,14 +191,14 @@ const localizedCards = bentoFeatures.map((card) => {
<circle cx="104" cy="32" r="3" fill="#ff5f56" />
<circle cx="113" cy="32" r="3" fill="#ffbd2e" />
<circle cx="122" cy="32" r="3" fill="#27c93f" />
<text x="220" y="36" text-anchor="middle" font-size="10" font-weight="600" fill="#f4f4f5">iTerm2 — Quick Scratchpad</text>
<text x="220" y="36" text-anchor="middle" font-size="11" font-weight="600" fill="#f4f4f5">iTerm2 — Quick Scratchpad</text>
<!-- Terminal Prompt -->
<text x="106" y="64" font-family="var(--font-mono)" font-size="10" fill="#30d158">$ git status</text>
<text x="106" y="80" font-family="var(--font-mono)" font-size="9" fill="#a1a1aa">On branch main</text>
<text x="106" y="96" font-family="var(--font-mono)" font-size="10" fill="#0a84ff">$ █</text>
<text x="106" y="64" font-family="var(--font-mono)" font-size="11" fill="#30d158">$ git status</text>
<text x="106" y="80" font-family="var(--font-mono)" font-size="11" fill="#a1a1aa">On branch main</text>
<text x="106" y="96" font-family="var(--font-mono)" font-size="11" fill="#0a84ff">$ █</text>
<!-- Summon & Dismiss Badges -->
<rect x="238" y="108" width="102" height="20" rx="4" fill="#18181b" stroke="rgba(255,255,255,0.15)" stroke-width="1" />
<text x="289" y="122" text-anchor="middle" font-family="var(--font-mono)" font-size="9" font-weight="600" fill="#0a84ff">⌥Space / ESC</text>
<text x="289" y="122" text-anchor="middle" font-family="var(--font-mono)" font-size="11" font-weight="600" fill="#0a84ff">⌥Space / ESC</text>
</g>
</svg>
</div>
Expand All @@ -212,20 +212,20 @@ const localizedCards = bentoFeatures.map((card) => {
<rect x="12" y="36" width="104" height="14" rx="5" class="svg-menubar" />
<rect x="48" y="110" width="32" height="16" class="svg-monitor-stand" />
<rect x="36" y="126" width="56" height="5" rx="2" class="svg-monitor-base" />
<text x="64" y="80" text-anchor="middle" font-size="8" font-weight="600" fill="var(--color-text-tertiary, #71717a)">Retina 16"</text>
<text x="64" y="80" text-anchor="middle" font-size="11" font-weight="600" fill="var(--color-text-tertiary, #71717a)">Retina 16"</text>
<!-- Monitor Right (4K Display 3840x2160) -->
<rect x="136" y="20" width="112" height="96" rx="6" class="svg-bezel" />
<rect x="136" y="20" width="112" height="16" rx="6" class="svg-menubar" />
<rect x="176" y="116" width="32" height="20" class="svg-monitor-stand" />
<rect x="160" y="136" width="64" height="5" rx="2" class="svg-monitor-base" />
<text x="192" y="72" text-anchor="middle" font-size="8" font-weight="600" fill="var(--color-text-tertiary, #71717a)">Pro 4K 27"</text>
<text x="192" y="72" text-anchor="middle" font-size="11" font-weight="600" fill="var(--color-text-tertiary, #71717a)">Pro 4K 27"</text>
<!-- Trajectory Throw Arrow from Left to Right -->
<path d="M72 58 Q 124 16, 170 54" stroke="var(--brand-apple-blue, #0071e3)" stroke-width="2" stroke-linecap="round" stroke-dasharray="3 3" fill="none" />
<polygon points="174,56 166,50 170,60" fill="var(--brand-apple-blue, #0071e3)" />
<!-- Throw Hotkey Pill -->
<g transform="translate(100, 72)">
<rect width="60" height="20" rx="10" fill="var(--color-surface, #ffffff)" stroke="var(--brand-apple-blue, #0071e3)" stroke-width="1" />
<text x="30" y="14" text-anchor="middle" font-family="var(--font-mono)" font-size="9" font-weight="600" fill="var(--color-text-primary, #09090b)">⌃⌥⇧→</text>
<text x="30" y="14" text-anchor="middle" font-family="var(--font-mono)" font-size="11" font-weight="600" fill="var(--color-text-primary, #09090b)">⌃⌥⇧→</text>
</g>
</svg>
</div>
Expand Down Expand Up @@ -328,6 +328,7 @@ const localizedCards = bentoFeatures.map((card) => {
}

.card-desc {
max-width: 34em;
font-family: var(--font-body);
font-size: var(--font-size-sm, 14px);
color: var(--color-text-secondary, #52525b);
Expand Down Expand Up @@ -433,7 +434,7 @@ const localizedCards = bentoFeatures.map((card) => {

.svg-hud-text {
font-family: var(--font-display);
font-size: 11px;
font-size: var(--font-size-meta);
font-weight: 600;
fill: var(--brand-apple-blue, #0071e3);
}
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/DistributionHub.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const { lang = 'en' } = Astro.props;
---

<div id="distribution-hub-root" class="distribution-hub" data-component="distribution-hub">
<!-- Tier 1: Unified 3-Tab Distribution Hub (DMG, cURL, Homebrew) -->
<!-- Tier 1: Unified 2-Tab Distribution Hub (DMG, cURL) -->
<div class="hub-hero-section">
<UnifiedInstaller lang={lang} />
</div>
Expand Down
12 changes: 6 additions & 6 deletions web/src/components/DmgCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ const t = getI18n(lang);
background: rgba(48, 209, 88, 0.12);
border: 1px solid rgba(48, 209, 88, 0.3);
color: var(--color-success);
font-size: 11px;
font-size: var(--font-size-meta);
font-weight: 600;
font-family: var(--font-mono);
}
Expand All @@ -235,12 +235,12 @@ const t = getI18n(lang);
}

.release-date {
font-size: 11px;
font-size: var(--font-size-meta);
color: var(--color-text-tertiary);
}

.license-tag {
font-size: 11px;
font-size: var(--font-size-meta);
color: var(--color-text-tertiary);
font-family: var(--font-mono);
padding: 3px 8px;
Expand Down Expand Up @@ -332,7 +332,7 @@ const t = getI18n(lang);
}

.btn-specs {
font-size: 11px;
font-size: var(--font-size-meta);
opacity: 0.8;
font-family: var(--font-mono);
}
Expand Down Expand Up @@ -363,7 +363,7 @@ const t = getI18n(lang);
border-radius: var(--radius-sm);
background: var(--color-surface-elevated);
border: 1px solid var(--color-border);
font-size: 11px;
font-size: var(--font-size-meta);
color: var(--color-text-secondary);
font-family: var(--font-mono);
}
Expand All @@ -379,7 +379,7 @@ const t = getI18n(lang);
justify-content: space-between;
padding-top: 16px;
border-top: 1px solid var(--color-border);
font-size: 11px;
font-size: var(--font-size-meta);
}

.checksum-hint {
Expand Down
22 changes: 18 additions & 4 deletions web/src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const currentYear = new Date().getFullYear();
}

.footer-desc {
font-size: 13px;
font-size: var(--font-size-label);
line-height: 1.6;
color: var(--text-secondary);
}
Expand All @@ -152,7 +152,7 @@ const currentYear = new Date().getFullYear();
flex-wrap: wrap;
gap: 6px;
font-family: var(--font-mono);
font-size: 11px;
font-size: var(--font-size-meta);
color: var(--text-tertiary);
background-color: var(--surface-elevated);
padding: 6px 10px;
Expand All @@ -166,7 +166,7 @@ const currentYear = new Date().getFullYear();
}

.footer-heading {
font-size: 13px;
font-size: var(--font-size-label);
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
Expand All @@ -181,7 +181,7 @@ const currentYear = new Date().getFullYear();
}

.footer-link {
font-size: 13px;
font-size: var(--font-size-label);
color: var(--text-secondary);
text-decoration: none;
transition: color var(--duration-fast) ease;
Expand All @@ -191,6 +191,20 @@ const currentYear = new Date().getFullYear();
color: var(--text-primary);
}

/* 13px links stacked on a 10px gap give a ~16px hit area. On touch the rows
become the target instead of the text. */
@media (max-width: 768px), (pointer: coarse) {
.footer-links {
gap: 0;
}

.footer-link {
display: flex;
align-items: center;
min-height: 44px;
}
}

/* Bottom Bar */
.footer-bottom {
display: flex;
Expand Down
Loading
Loading