Skip to content

Commit b83d3b5

Browse files
committed
feat: obvious demo
1 parent 5fd2941 commit b83d3b5

File tree

1 file changed

+31
-15
lines changed

1 file changed

+31
-15
lines changed

apps/docs/components/landing/hero.tsx

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client";
22

33
import Link from "next/link";
4-
import { ArrowRight, Maximize2 } from "lucide-react";
4+
import { ArrowRight, MonitorIcon, ArrowsOutSimpleIcon, InfoIcon } from "@phosphor-icons/react";
55
import { useState, useRef } from "react";
66

77
export default function Hero() {
@@ -66,35 +66,51 @@ export default function Hero() {
6666
{/* Demo Section */}
6767
<div className="w-full max-w-[90vw] mx-auto">
6868
<div className="relative">
69-
<div className="absolute -inset-4 bg-gradient-to-r from-primary/20 via-primary/10 to-primary/20 rounded-xl blur-xl opacity-30" />
70-
<div
71-
className="relative bg-background/80 backdrop-blur-sm border border-border rounded-lg p-2 shadow-2xl group cursor-pointer"
69+
<div className="absolute top-3 left-3 z-20 flex items-center gap-2 bg-primary/90 text-primary-foreground rounded px-3 py-1 text-xs font-semibold shadow-lg">
70+
<MonitorIcon className="h-4" weight="duotone" />
71+
Demo
72+
</div>
73+
74+
<div className="absolute -inset-4 bg-gradient-to-r from-primary/20 via-primary/10 to-primary/20 rounded blur-xl opacity-30" />
75+
<button
76+
type="button"
77+
className="relative bg-background/80 backdrop-blur-sm border border-border rounded p-2 shadow-2xl group cursor-pointer w-full text-left"
7278
onMouseEnter={() => setIsHovered(true)}
7379
onMouseLeave={() => setIsHovered(false)}
7480
onClick={handleFullscreen}
75-
onKeyDown={(e) => {
76-
if (e.key === 'Enter' || e.key === ' ') {
77-
handleFullscreen();
78-
}
79-
}}
8081
aria-label="View demo dashboard fullscreen"
82+
style={{ padding: 0 }}
8183
>
8284
<iframe
8385
ref={iframeRef}
8486
src="https://app.databuddy.cc/demo/OXmNQsViBT-FOS_wZCTHc"
85-
className="w-full h-[500px] sm:h-[600px] lg:h-[700px] rounded border-0"
87+
className="w-full h-[500px] sm:h-[600px] lg:h-[700px] rounded border-0 pointer-events-none"
8688
title="Databuddy Demo Dashboard"
8789
loading="lazy"
8890
allowFullScreen
8991
/>
9092

91-
{/* Fullscreen Button & Overlay */}
92-
<div className={`absolute inset-2 bg-background/20 dark:bg-background/40 rounded transition-opacity duration-300 flex items-center justify-center ${isHovered ? 'opacity-100' : 'opacity-0'}`}>
93-
<div className="bg-card/90 backdrop-blur-sm rounded-lg px-4 py-2 flex items-center gap-2 text-sm font-medium shadow-lg border border-border hover:bg-card transition-colors">
94-
<Maximize2 className="h-4 w-4 text-foreground" />
95-
<span className="text-foreground">Click to view fullscreen</span>
93+
<div
94+
className={`absolute inset-2 bg-background/60 dark:bg-background/70 rounded flex items-center justify-center transition-opacity duration-300 z-10 ${isHovered ? 'opacity-100' : 'opacity-80'}`}
95+
style={{ pointerEvents: 'none' }}
96+
>
97+
<div className="flex flex-col items-center gap-2">
98+
<div className="bg-card/90 backdrop-blur-sm rounded px-4 py-2 flex items-center gap-2 text-base font-semibold shadow-lg border border-border">
99+
<ArrowsOutSimpleIcon className="h-6 text-foreground" />
100+
<span className="text-foreground">Click to view fullscreen</span>
101+
</div>
102+
<div className="flex items-center gap-1 mt-1 text-xs text-muted-foreground">
103+
<InfoIcon className="h-3" weight="duotone" />
104+
Live interactive demo
105+
</div>
96106
</div>
97107
</div>
108+
</button>
109+
</div>
110+
<div className="flex justify-center mt-2">
111+
<div className="inline-flex items-center gap-2 bg-muted/70 rounded px-3 py-1 text-xs text-muted-foreground">
112+
<MonitorIcon className="h-3" weight="duotone" />
113+
This is a live demo. Click above to interact or go fullscreen.
98114
</div>
99115
</div>
100116
</div>

0 commit comments

Comments
 (0)