From b2cab168bc7559dd07c560b12d52eb8f3f923afb Mon Sep 17 00:00:00 2001
From: Oleg Proskurin
Date: Thu, 4 Dec 2025 14:40:42 +0700
Subject: [PATCH] feat: add styles to shape section
---
apps/landing/src/app/homepage/page.tsx | 46 ++++++++++++++++++++------
1 file changed, 35 insertions(+), 11 deletions(-)
diff --git a/apps/landing/src/app/homepage/page.tsx b/apps/landing/src/app/homepage/page.tsx
index 0281aa5..f359f63 100644
--- a/apps/landing/src/app/homepage/page.tsx
+++ b/apps/landing/src/app/homepage/page.tsx
@@ -37,6 +37,29 @@ import {
} from 'lucide-react';
import GlowEffect from './_components/GlowEffect';
+// ============================================================================
+// UTILS
+// ============================================================================
+
+const ZIGZAG_POINTS = [
+ 40, 0, 20, 10, 30, 50, 20, 15, 0, 20, 25, 50, 10, 20, 0, 15, 10, 25, 20, 50, 0, 20, 40, 20, 25,
+ 10, 0, 15, 0, 20, 0, 40, 10, 0,
+];
+
+function generateZigzagClipPath(yValues: number[]): string {
+ const lastIndex = yValues.length - 1;
+ const getX = (i: number) => `${(i / lastIndex) * 100}%`;
+
+ const topEdge = yValues.map((y, i) => `${getX(i)} ${y}px`).join(', ');
+ const bottomEdge = [...yValues]
+ .map((y, i) => [getX(i), y] as const)
+ .reverse()
+ .map(([x, y]) => `${x} calc(100% - 50px + ${y}px)`)
+ .join(', ');
+
+ return `polygon(${topEdge}, ${bottomEdge})`;
+}
+
// ============================================================================
// STYLES (CSS-in-JS for custom styles not available in Tailwind)
// ============================================================================
@@ -74,12 +97,7 @@ const customStyles = `
}
.shape-future {
- clip-path: polygon(
- 0% 40px, 10% 0px, 20% 40px, 30% 0px, 40% 40px, 50% 0px, 60% 40px, 70% 0px, 80% 40px, 90% 0px, 100% 40px,
- 100% calc(100% - 40px), 90% calc(100% - 0px), 80% calc(100% - 40px), 70% calc(100% - 0px),
- 60% calc(100% - 40px), 50% calc(100% - 0px), 40% calc(100% - 40px), 30% calc(100% - 0px),
- 20% calc(100% - 40px), 10% calc(100% - 0px), 0% calc(100% - 40px)
- );
+ clip-path: ${generateZigzagClipPath(ZIGZAG_POINTS)};
}
.shape-future-title {
@@ -189,7 +207,7 @@ function HeroSection() {
{/* Email Form */}
-
+