Skip to content

Commit e6a2a1a

Browse files
committed
feat: enhance landing components with improved styling and background gradients
1 parent fc8937a commit e6a2a1a

6 files changed

Lines changed: 20 additions & 15 deletions

File tree

apps/web/src/components/header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function Header() {
2727
];
2828

2929
return (
30-
<header className="bg-background/80 sticky top-0 z-10 backdrop-blur-md">
30+
<header className="bg-background/80 sticky top-0 z-10 border-b border-border/40 backdrop-blur-md dark:border-transparent">
3131
<div className="relative mx-auto flex w-full max-w-7xl items-center justify-between px-6 py-3">
3232
<div className="relative z-10 flex items-center gap-8">
3333
<Link href="/" className="flex items-center gap-2.5">

apps/web/src/components/landing/cta-section.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ export function CTASection() {
1818
viewport={{ once: true, margin: "-100px" }}
1919
transition={{ duration: 0.7, ease: "easeOut" }}
2020
>
21-
<div className="relative overflow-hidden rounded-3xl border border-border/50 bg-muted/20 p-12 md:p-16">
21+
<div className="relative overflow-hidden rounded-3xl border border-border/50 bg-gradient-to-b from-primary/[0.03] to-transparent p-12 shadow-sm dark:bg-muted/20 dark:from-transparent dark:shadow-none md:p-16">
2222
<motion.div
23-
className="absolute -top-1/2 left-1/2 h-[400px] w-[600px] -translate-x-1/2 rounded-full bg-primary/5 blur-[100px]"
23+
className="absolute -top-1/2 left-1/2 h-[400px] w-[600px] -translate-x-1/2 rounded-full bg-primary/10 blur-[100px] dark:bg-primary/5"
2424
animate={{
2525
scale: [1, 1.3, 1],
2626
opacity: [0.3, 0.5, 0.3],

apps/web/src/components/landing/faq-section.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export function FAQSection() {
1616

1717
return (
1818
<section id="faq" className="relative px-4 py-24 md:py-32">
19+
<div className="pointer-events-none absolute inset-0 -z-10 bg-gradient-to-b from-accent/50 via-transparent to-transparent dark:from-transparent" />
1920
<div className="mx-auto max-w-3xl">
2021
<motion.div
2122
className="mb-12 text-center"
@@ -52,6 +53,7 @@ export function FAQSection() {
5253
</Accordion>
5354
</motion.div>
5455
</div>
56+
5557
</section>
5658
);
5759
}

apps/web/src/components/landing/features.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export function Features() {
5353

5454
return (
5555
<section id="features" className="relative px-4 py-24 md:py-32">
56+
<div className="pointer-events-none absolute inset-0 -z-10 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-primary/[0.03] via-transparent to-transparent dark:from-transparent" />
5657
<div className="mx-auto max-w-6xl">
5758
<motion.div
5859
className="mb-16 text-center"
@@ -75,7 +76,7 @@ export function Features() {
7576
{features.map((feature, index) => (
7677
<motion.div
7778
key={feature.title}
78-
className="group rounded-2xl border border-border/50 bg-card/50 p-6 backdrop-blur-sm transition-colors hover:border-border hover:bg-card"
79+
className="group rounded-2xl border border-border/50 bg-card/50 p-6 shadow-sm backdrop-blur-sm transition-all hover:border-border hover:bg-card hover:shadow-md dark:shadow-none dark:hover:shadow-none"
7980
initial={{ opacity: 0, y: 40 }}
8081
whileInView={{ opacity: 1, y: 0 }}
8182
viewport={{ once: true, margin: "-60px" }}
@@ -87,11 +88,11 @@ export function Features() {
8788
whileHover={{ y: -4, transition: { duration: 0.2 } }}
8889
>
8990
<motion.div
90-
className="mb-4 flex size-11 items-center justify-center rounded-xl bg-foreground/5 dark:bg-foreground/10"
91+
className="mb-4 flex size-11 items-center justify-center rounded-xl bg-primary/8 dark:bg-foreground/10"
9192
whileHover={{ scale: 1.1, rotate: 5 }}
9293
transition={{ type: "spring", stiffness: 400, damping: 15 }}
9394
>
94-
<feature.icon className="size-5 text-foreground/70" />
95+
<feature.icon className="size-5 text-primary/70 dark:text-foreground/70" />
9596
</motion.div>
9697
<h3 className="mb-2 text-lg font-semibold">{feature.title}</h3>
9798
<p className="text-muted-foreground text-sm leading-relaxed">

apps/web/src/components/landing/hero.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ export function Hero() {
2323
return (
2424
<section className="relative flex min-h-[calc(100svh-4rem)] flex-col items-center justify-center overflow-hidden px-4">
2525
<div className="pointer-events-none absolute inset-0 -z-10">
26-
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top,_var(--tw-gradient-stops))] from-muted/50 via-transparent to-transparent" />
26+
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top,_var(--tw-gradient-stops))] from-muted/50 via-transparent to-transparent dark:from-muted/50" />
27+
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top_left,_var(--tw-gradient-stops))] from-primary/[0.06] via-transparent to-transparent dark:from-primary/[0.03]" />
28+
<div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top_right,_var(--tw-gradient-stops))] from-violet-500/[0.04] via-transparent to-transparent dark:from-violet-500/[0.02]" />
2729

2830
{[600, 400, 200].map((size, index) => (
2931
<motion.div
3032
key={size}
31-
className="absolute top-1/4 left-1/2 rounded-full border border-border/20"
33+
className="absolute top-1/4 left-1/2 rounded-full border border-primary/10 dark:border-border/20"
3234
style={{
3335
width: size,
3436
height: size,
@@ -48,7 +50,7 @@ export function Hero() {
4850
))}
4951

5052
<motion.div
51-
className="absolute top-1/6 left-1/2 h-[500px] w-[800px] -translate-x-1/2 rounded-full bg-primary/5 blur-[120px]"
53+
className="absolute top-1/6 left-1/2 h-[500px] w-[800px] -translate-x-1/2 rounded-full bg-primary/8 blur-[120px] dark:bg-primary/5"
5254
animate={{
5355
scale: [1, 1.2, 1],
5456
opacity: [0.3, 0.6, 0.3],
@@ -63,7 +65,7 @@ export function Hero() {
6365
{floatingParticles.map((particle) => (
6466
<motion.div
6567
key={particle.id}
66-
className="absolute rounded-full bg-foreground/20"
68+
className="absolute rounded-full bg-primary/25 dark:bg-foreground/20"
6769
style={{
6870
width: particle.size,
6971
height: particle.size,
@@ -86,7 +88,7 @@ export function Hero() {
8688

8789
<div className="mx-auto flex max-w-4xl flex-col items-center text-center">
8890
<motion.div
89-
className="mb-8 flex items-center gap-3 rounded-full border border-border/60 bg-muted/30 px-4 py-2"
91+
className="mb-8 flex items-center gap-3 rounded-full border border-primary/15 bg-primary/[0.06] px-4 py-2 shadow-sm dark:border-border/60 dark:bg-muted/30 dark:shadow-none"
9092
initial={{ opacity: 0, y: 20, scale: 0.9 }}
9193
animate={{ opacity: 1, y: 0, scale: 1 }}
9294
transition={{ duration: 0.6, ease: "easeOut" }}
@@ -112,7 +114,7 @@ export function Hero() {
112114
{t('Edit videos,')}
113115
<br />
114116
<motion.span
115-
className="text-muted-foreground inline-block"
117+
className="inline-block bg-gradient-to-r from-muted-foreground to-muted-foreground/70 bg-clip-text text-transparent dark:from-muted-foreground dark:to-muted-foreground"
116118
initial={{ opacity: 0, y: 20 }}
117119
animate={{ opacity: 1, y: 0 }}
118120
transition={{ duration: 0.7, delay: 0.35, ease: "easeOut" }}

apps/web/src/components/landing/starfield.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ export function StarField() {
9595
({ ctx, width, height, time }: { ctx: CanvasRenderingContext2D; width: number; height: number; time: number }) => {
9696
ctx.clearRect(0, 0, width, height);
9797

98-
const globalAlpha = isDark ? 1 : 0.25;
99-
const starColor = isDark ? "255, 255, 255" : "0, 0, 0";
100-
const glowColor = isDark ? "100, 140, 255" : "80, 100, 200";
98+
const globalAlpha = isDark ? 1 : 0.45;
99+
const starColor = isDark ? "255, 255, 255" : "120, 140, 180";
100+
const glowColor = isDark ? "100, 140, 255" : "100, 130, 220";
101101

102102
ctx.save();
103103
ctx.globalAlpha = globalAlpha;

0 commit comments

Comments
 (0)