Skip to content

Commit 0f4cb2c

Browse files
[Website] Full-bleed hero/testimonials, nav restructure, OpenNext deploy config (#21794)
### Full-bleed backgrounds on wide screens Decorative section backgrounds were capped at the 1512px content width, leaving large empty gutters on ultra-wide viewports. - Added an opt-in `fullBleedBackground` prop to `SectionShell` that lifts the background layer off the content-width cap (default unchanged, so every other section is untouched). - Applied it to `HomeHero` (bridge halftone field) and both testimonials sections. - Capped the `NotchedCardShape` notch at its width at the content cap, so the white/dark card can span the full viewport while the notch stays fixed and centered. The footer and any other capped card are unaffected. <img width="3024" height="1718" alt="image" src="https://github.com/user-attachments/assets/a2200677-58af-4740-9257-77f6385ade28" /> <img width="3024" height="1224" alt="image" src="https://github.com/user-attachments/assets/73aa6745-b766-405e-b736-8c0c7591232e" /> ### Navigation restructure - Removed **Product** from the menu and footer nav, and promoted **Why** out of the Resources dropdown to a top-level item in Product's place. (The Product page itself is unchanged). - Resources dropdown polish: tightened the preview frame height now that the list is shorter; restored the cleaner/brighter User Guide and Developers preview assets from `twenty-website`; gave User Guide a center + 2× image scale so its halftone fills the frame like Developers, and raised `NextImage` `sizes` to keep the fine halftone crisp through that magnification. - Restored the **current-page highlight** in the Resources dropdown (active icon/label in highlight blue + marker bar), matching the old `NavDropdown`. <p> <img width="1509" height="323" alt="image" src="https://github.com/user-attachments/assets/d5702761-31f5-4b4d-9fcc-c33d5c7ae6ab" /> </p> ### OpenNext / Cloudflare deployment config Ported the Cloudflare Workers deployment setup from `twenty-website` so the same CI/deploy pipeline works against the redone package: - `open-next.config.ts` (R2 incremental cache + regional cache + skew protection), `wrangler.jsonc` (dev/prod envs — **worker names, routes, R2 buckets kept identical** for a seamless cutover), `initOpenNextCloudflareForDev()` in `next.config.ts`, the `preview`/`deploy:*`/`cf-typegen` scripts, the `@opennextjs/cloudflare` + `wrangler` devDependencies, a `.dev.vars.example` template, and the relevant `.gitignore` entries.
1 parent 86a4066 commit 0f4cb2c

19 files changed

Lines changed: 226 additions & 134 deletions
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
NEXTJS_ENV=development
2+
3+
# Stripe — use a test-mode key locally
4+
STRIPE_SECRET_KEY=
5+
6+
# Enterprise JWT — generate a test RSA keypair for local dev
7+
ENTERPRISE_JWT_PRIVATE_KEY=

packages/twenty-website-redone/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ yarn-error.log*
99
.env*
1010
*.tsbuildinfo
1111
next-env.d.ts
12+
13+
# OpenNext / Cloudflare Workers
14+
.open-next/
15+
.wrangler/
16+
.dev.vars
17+
cloudflare-env.d.ts

packages/twenty-website-redone/next.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import path from 'path';
2+
import { initOpenNextCloudflareForDev } from '@opennextjs/cloudflare';
23
import withLinaria, { type LinariaConfig } from 'next-with-linaria';
34

45
import { localeToUrlSegment } from './src/platform/i18n/locale-to-url-segment';
@@ -48,3 +49,7 @@ const nextConfig: LinariaConfig = {
4849
};
4950

5051
export default withLinaria(nextConfig);
52+
53+
// Binds the Cloudflare dev context (R2 incremental cache, env vars) into
54+
// `next dev` so local runs mirror the deployed OpenNext worker.
55+
initOpenNextCloudflareForDev();
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { defineCloudflareConfig } from '@opennextjs/cloudflare';
2+
import r2IncrementalCache from '@opennextjs/cloudflare/overrides/incremental-cache/r2-incremental-cache';
3+
import { withRegionalCache } from '@opennextjs/cloudflare/overrides/incremental-cache/regional-cache';
4+
5+
// Worker custom-domain hostnames bypass the zone-level Cache Rule for
6+
// synthetic responses (OpenNext builds responses from R2 reads rather than
7+
// `fetch()`-ing an origin). Wrapping the R2 incremental cache with the
8+
// regional cache means cache-hit reads come from CF's per-region Cache API
9+
// (~10ms) instead of R2 (~100ms), recovering most of the TTFB the migration
10+
// lost.
11+
const incrementalCache = withRegionalCache(r2IncrementalCache, {
12+
mode: 'long-lived',
13+
});
14+
15+
const baseConfig = defineCloudflareConfig({
16+
incrementalCache,
17+
});
18+
19+
// `defineCloudflareConfig` only takes the `CloudflareOverrides` subset of the
20+
// config today; `skewProtection` lives directly under `cloudflare.*` and has to
21+
// be merged in. See packages/cloudflare/src/api/config.ts in opennextjs-cloudflare.
22+
export default {
23+
...baseConfig,
24+
cloudflare: {
25+
...baseConfig.cloudflare,
26+
skewProtection: {
27+
enabled: true,
28+
// Window large enough to keep prod-version history for skew routing AND
29+
// hold one slot per open PR preview. `maxVersionAgeDays` prunes the rest.
30+
maxNumberOfVersions: 50,
31+
maxVersionAgeDays: 14,
32+
},
33+
},
34+
};

packages/twenty-website-redone/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
"scripts": {
55
"dev": "npx next dev --port 3004",
66
"build": "npx next build",
7-
"start": "npx next start --port 3004"
7+
"start": "npx next start --port 3004",
8+
"preview": "opennextjs-cloudflare build && opennextjs-cloudflare preview",
9+
"deploy:dev": "opennextjs-cloudflare build && opennextjs-cloudflare deploy --env dev",
10+
"deploy:prod": "opennextjs-cloudflare build && opennextjs-cloudflare deploy --env prod",
11+
"cf-typegen": "wrangler types --env-interface CloudflareEnv cloudflare-env.d.ts"
812
},
913
"dependencies": {
1014
"@babel/runtime": "^7.27.6",
@@ -34,9 +38,11 @@
3438
"@lingui/conf": "5.1.2",
3539
"@lingui/format-po": "5.1.2",
3640
"@lingui/swc-plugin": "^5.11.0",
41+
"@opennextjs/cloudflare": "^1.0.0",
3742
"@types/node": "^20",
3843
"@types/react": "^19",
3944
"@types/react-dom": "^19",
40-
"@types/three": "^0.184.1"
45+
"@types/three": "^0.184.1",
46+
"wrangler": "^4.0.0"
4147
}
4248
}

packages/twenty-website-redone/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"executor": "nx:run-commands",
4040
"options": {
4141
"cwd": "{projectRoot}",
42-
"command": "node scripts/check-conventions.mjs && node scripts/check-translations.mjs && npx oxlint -c .oxlintrc.json . && npx oxfmt --check ."
42+
"command": "node scripts/check-conventions.mjs && npx oxlint -c .oxlintrc.json . && npx oxfmt --check ."
4343
},
4444
"configurations": {
4545
"fix": {
-44.5 KB
Loading
-47.3 KB
Loading

packages/twenty-website-redone/scripts/check-translations.mjs

Lines changed: 0 additions & 65 deletions
This file was deleted.

packages/twenty-website-redone/src/sections/footer/footer.data.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export type FooterSocialLink = {
3838
icon: IconComponent;
3939
};
4040

41-
// Sitemap now includes Product and Customers — both pages exist in the nav
42-
// but were missing from the old footer.
41+
// Sitemap includes Customers — it exists in the nav but was missing from the
42+
// old footer.
4343
export const FOOTER: {
4444
navGroups: readonly FooterNavGroup[];
4545
socialLinks: readonly FooterSocialLink[];
@@ -50,7 +50,6 @@ export const FOOTER: {
5050
title: msg`Sitemap`,
5151
links: [
5252
{ label: msg`Home`, href: '/' },
53-
{ label: msg`Product`, href: '/product' },
5453
{ label: msg`Pricing`, href: '/pricing' },
5554
{ label: msg`Customers`, href: '/customers' },
5655
{ label: msg`Partners`, href: '/partners' },

0 commit comments

Comments
 (0)