|
1 | 1 | "use client"; |
2 | 2 |
|
3 | 3 | import Link from "next/link"; |
4 | | -import { ArrowRight, Maximize2 } from "lucide-react"; |
| 4 | +import { ArrowRight, MonitorIcon, ArrowsOutSimpleIcon, InfoIcon } from "@phosphor-icons/react"; |
5 | 5 | import { useState, useRef } from "react"; |
6 | 6 |
|
7 | 7 | export default function Hero() { |
@@ -66,35 +66,51 @@ export default function Hero() { |
66 | 66 | {/* Demo Section */} |
67 | 67 | <div className="w-full max-w-[90vw] mx-auto"> |
68 | 68 | <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" |
72 | 78 | onMouseEnter={() => setIsHovered(true)} |
73 | 79 | onMouseLeave={() => setIsHovered(false)} |
74 | 80 | onClick={handleFullscreen} |
75 | | - onKeyDown={(e) => { |
76 | | - if (e.key === 'Enter' || e.key === ' ') { |
77 | | - handleFullscreen(); |
78 | | - } |
79 | | - }} |
80 | 81 | aria-label="View demo dashboard fullscreen" |
| 82 | + style={{ padding: 0 }} |
81 | 83 | > |
82 | 84 | <iframe |
83 | 85 | ref={iframeRef} |
84 | 86 | 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" |
86 | 88 | title="Databuddy Demo Dashboard" |
87 | 89 | loading="lazy" |
88 | 90 | allowFullScreen |
89 | 91 | /> |
90 | 92 |
|
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> |
96 | 106 | </div> |
97 | 107 | </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. |
98 | 114 | </div> |
99 | 115 | </div> |
100 | 116 | </div> |
|
0 commit comments