Skip to content

Commit ab62a1d

Browse files
refactor(site): clean up landing page design and optimize CI (#220)
Cleans up the landing page CSS and optimizes the site deployment workflow. Landing page: removed noise overlay and gradient mesh (AI slop), simplified text gradients to solid colors, replaced pill tags with plain text separators, bumped light-mode contrast for WCAG AA, added lazy loading to feature videos, and added missing footer links. CI: replaced the duplicate build jobs in site.yml with a single matrix-based build job. Both GitHub Pages and Cloudflare builds now share checkout/setup/install and run in parallel. Cloudflare deploy downloads the pre-built artifact instead of rebuilding. Closes #219 --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 3b35efc commit ab62a1d

6 files changed

Lines changed: 59 additions & 170 deletions

File tree

.github/workflows/site.yml

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,17 @@ concurrency:
2020
cancel-in-progress: true
2121

2222
jobs:
23-
build-github-pages:
23+
build:
2424
runs-on: ubuntu-latest
25+
strategy:
26+
matrix:
27+
target:
28+
- name: github-pages
29+
deploy_target: ''
30+
site_url: ''
31+
- name: cloudflare
32+
deploy_target: cloudflare
33+
site_url: https://termbeam.pages.dev
2534
defaults:
2635
run:
2736
working-directory: packages/site
@@ -34,16 +43,26 @@ jobs:
3443
cache-dependency-path: packages/site/package-lock.json
3544
- name: Install dependencies
3645
run: npm ci
37-
- name: Build with Astro (GitHub Pages target)
46+
- name: Build with Astro
47+
env:
48+
DEPLOY_TARGET: ${{ matrix.target.deploy_target }}
49+
SITE_URL: ${{ matrix.target.site_url }}
3850
run: npm run build
3951
- name: Upload Pages artifact
52+
if: matrix.target.name == 'github-pages'
4053
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
4154
with:
4255
path: packages/site/dist
56+
- name: Upload Cloudflare artifact
57+
if: matrix.target.name == 'cloudflare'
58+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
59+
with:
60+
name: cloudflare-dist
61+
path: packages/site/dist
4362

4463
deploy-github-pages:
4564
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
46-
needs: build-github-pages
65+
needs: build
4766
runs-on: ubuntu-latest
4867
permissions:
4968
contents: read
@@ -59,30 +78,23 @@ jobs:
5978

6079
deploy-cloudflare-pages:
6180
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
81+
needs: build
6282
runs-on: ubuntu-latest
6383
permissions:
6484
contents: read
6585
deployments: write
6686
environment:
6787
name: cloudflare-pages
6888
url: https://termbeam.pages.dev
69-
defaults:
70-
run:
71-
working-directory: packages/site
7289
steps:
7390
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
74-
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
7591
with:
76-
node-version: '22'
77-
cache: npm
78-
cache-dependency-path: packages/site/package-lock.json
79-
- name: Install dependencies
80-
run: npm ci
81-
- name: Build with Astro (Cloudflare target)
82-
env:
83-
DEPLOY_TARGET: cloudflare
84-
SITE_URL: https://termbeam.pages.dev
85-
run: npm run build
92+
sparse-checkout: packages/site
93+
- name: Download Cloudflare build
94+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
95+
with:
96+
name: cloudflare-dist
97+
path: packages/site/dist
8698
- name: Deploy to Cloudflare Pages
8799
uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3
88100
with:

packages/site/src/components/FeatureSection.astro

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export interface Props {
99
device: 'browser' | 'phone';
1010
layout: 'center' | 'split' | 'split-reverse';
1111
xl?: boolean;
12+
lazy?: boolean;
1213
}
1314
1415
const {
@@ -21,6 +22,7 @@ const {
2122
device,
2223
layout,
2324
xl = true,
25+
lazy = false,
2426
} = Astro.props;
2527
2628
const base = import.meta.env.BASE_URL.replace(/\/+$/, '');
@@ -71,7 +73,8 @@ const deviceXL =
7173
playsinline
7274
width="2560"
7375
height="1440"
74-
preload="metadata"
76+
preload={lazy ? 'none' : 'metadata'}
77+
loading={lazy ? 'lazy' : undefined}
7578
aria-label={`Demo of ${title}`}
7679
/>
7780
<button class="video-replay" type="button" hidden aria-label={`Replay ${title} demo`}>
@@ -93,7 +96,8 @@ const deviceXL =
9396
playsinline
9497
width="1170"
9598
height="2532"
96-
preload="metadata"
99+
preload={lazy ? 'none' : 'metadata'}
100+
loading={lazy ? 'lazy' : undefined}
97101
aria-label={`Demo of ${title}`}
98102
/>
99103
<button class="video-replay" type="button" hidden aria-label={`Replay ${title} demo`}>

packages/site/src/layouts/MarketingLayout.astro

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,7 @@ const siteUrl = new URL(`${base}/`.replace(/\/+/g, '/'), Astro.site).toString();
7878
<body>
7979
<a href="#main-content" class="skip-nav">Skip to content</a>
8080

81-
<div class="noise-overlay" aria-hidden="true"></div>
82-
<div class="gradient-mesh" aria-hidden="true">
83-
<div class="mesh-blob mesh-blob-1"></div>
84-
<div class="mesh-blob mesh-blob-2"></div>
85-
<div class="mesh-blob mesh-blob-3"></div>
86-
</div>
81+
<div class="hero-glow" aria-hidden="true"></div>
8782

8883
<slot />
8984

packages/site/src/pages/index.astro

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const features = [
2929
posterSrc: 'showcase/agents-desktop.png',
3030
device: 'browser' as const,
3131
layout: 'split' as const,
32+
lazy: true,
3233
},
3334
{
3435
num: '03',
@@ -40,6 +41,7 @@ const features = [
4041
posterSrc: 'showcase/terminal-mobile.png',
4142
device: 'phone' as const,
4243
layout: 'split-reverse' as const,
44+
lazy: true,
4345
},
4446
{
4547
num: '04',
@@ -51,6 +53,7 @@ const features = [
5153
posterSrc: 'showcase/voice-mobile.png',
5254
device: 'phone' as const,
5355
layout: 'split' as const,
56+
lazy: true,
5457
},
5558
{
5659
num: '05',
@@ -62,6 +65,7 @@ const features = [
6265
posterSrc: 'showcase/sessions-desktop.png',
6366
device: 'browser' as const,
6467
layout: 'split-reverse' as const,
68+
lazy: true,
6569
},
6670
{
6771
num: '06',
@@ -73,6 +77,7 @@ const features = [
7377
posterSrc: 'showcase/theme-mobile.png',
7478
device: 'phone' as const,
7579
layout: 'split' as const,
80+
lazy: true,
7681
},
7782
];
7883
---
@@ -503,6 +508,8 @@ const features = [
503508
<div class="footer-brand"><span class="nav-logo-beam">▸</span> TermBeam</div>
504509
<div class="footer-links">
505510
<a href={docsLink}>Documentation</a>
511+
<a href={`${base}/use-cases/`}>Use Cases</a>
512+
<a href={`${base}/ai-agents/`}>AI Agents</a>
506513
<a href="https://github.com/dorlugasigal/TermBeam" target="_blank" rel="noopener noreferrer"
507514
>GitHub</a
508515
>

packages/site/src/styles/global.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878

7979
--color-fg: #0a0a0a;
8080
--color-fg-muted: #475569;
81-
--color-fg-dim: #64748b;
81+
--color-fg-dim: #52525b;
8282

8383
--color-accent: #1d4ed8;
8484
--color-accent-soft: rgba(29, 78, 216, 0.12);

0 commit comments

Comments
 (0)