|
| 1 | +import React, { useState } from "react"; |
| 2 | +import { Button } from "./Button"; |
| 3 | +import { Container } from "./Container"; |
| 4 | + |
| 5 | +export function DemoSection() { |
| 6 | + const [copiedField, setCopiedField] = useState(null); |
| 7 | + |
| 8 | + const copyToClipboard = (text, field) => { |
| 9 | + navigator.clipboard.writeText(text); |
| 10 | + setCopiedField(field); |
| 11 | + setTimeout(() => setCopiedField(null), 2000); |
| 12 | + }; |
| 13 | + |
| 14 | + return ( |
| 15 | + <section |
| 16 | + id="demo" |
| 17 | + className="relative overflow-hidden py-24 sm:py-32 bg-background-dark" |
| 18 | + > |
| 19 | + {/* Techy Background */} |
| 20 | + <div className="absolute inset-0 -z-10"> |
| 21 | + <div className="absolute inset-0 bg-[linear-gradient(to_right,#80808005_1px,transparent_1px),linear-gradient(to_bottom,#80808005_1px,transparent_1px)] bg-[size:32px_32px]" /> |
| 22 | + <div className="absolute top-0 left-1/2 -translate-x-1/2 w-full h-px bg-gradient-to-r from-transparent via-primary-default/30 to-transparent" /> |
| 23 | + </div> |
| 24 | + |
| 25 | + <Container className="relative"> |
| 26 | + <div className="mx-auto max-w-4xl"> |
| 27 | + <div className="grid grid-cols-1 lg:grid-cols-2 gap-12 items-center"> |
| 28 | + <div className="text-center lg:text-left"> |
| 29 | + |
| 30 | + <h2 className="font-display text-4xl font-black tracking-tight text-text-default sm:text-5xl uppercase"> |
| 31 | + Ready to{" "} |
| 32 | + <span className="inline-block text-transparent bg-clip-text bg-gradient-to-r from-primary-default to-primary-light pr-2"> |
| 33 | + Explore? |
| 34 | + </span> |
| 35 | + </h2> |
| 36 | + <p className="mt-6 text-lg leading-8 text-text-light opacity-80"> |
| 37 | + Experience GameVault firsthand in our public demo. No |
| 38 | + installation required. Use the credentials provided to log in |
| 39 | + and explore all the features GameVault has to offer. |
| 40 | + </p> |
| 41 | + <div className="mt-10"> |
| 42 | + <Button |
| 43 | + href="https://demo.gamevau.lt" |
| 44 | + target="_blank" |
| 45 | + className="w-full sm:w-auto px-12 py-4 text-xl shadow-xl transition-all hover:scale-105 active:scale-95 hover:shadow-primary-default/30" |
| 46 | + > |
| 47 | + Launch Demo |
| 48 | + </Button> |
| 49 | + </div> |
| 50 | + </div> |
| 51 | + |
| 52 | + <div className="relative group"> |
| 53 | + {/* Clean Tech Credential Box */} |
| 54 | + <div className="rounded-2xl border border-white/10 p-6 font-mono text-sm shadow-2xl backdrop-blur-sm relative overflow-hidden"> |
| 55 | + {/* Subtle Tech Grid Overlay */} |
| 56 | + <div className="absolute inset-0 opacity-[0.015] pointer-events-none bg-[linear-gradient(to_right,#fff_1px,transparent_1px),linear-gradient(to_bottom,#fff_1px,transparent_1px)] bg-[size:8px_8px]" /> |
| 57 | + |
| 58 | + <div className="flex items-center gap-2 mb-6 border-b border-white/5 pb-4 relative z-10"> |
| 59 | + <div className="w-2 h-2 rounded-full bg-primary-default animate-pulse" /> |
| 60 | + <div className="text-[10px] text-text-light/40 uppercase tracking-widest"> |
| 61 | + Access_Credentials |
| 62 | + </div> |
| 63 | + </div> |
| 64 | + |
| 65 | + <div className="space-y-6 relative z-10"> |
| 66 | + <div> |
| 67 | + <div className="text-[10px] text-primary-default/60 uppercase mb-2 tracking-tighter"> |
| 68 | + // Identity |
| 69 | + </div> |
| 70 | + <button |
| 71 | + onClick={() => copyToClipboard("demo", "user")} |
| 72 | + className="w-full flex items-center justify-between p-3 rounded-lg bg-white/5 border border-white/5 hover:border-primary-default/40 hover:bg-white/10 transition-all group/item" |
| 73 | + > |
| 74 | + <span className="text-text-light/50">Username</span> |
| 75 | + <div className="flex items-center gap-3"> |
| 76 | + <code className="text-primary-light text-lg font-bold px-2"> |
| 77 | + demo |
| 78 | + </code> |
| 79 | + <span |
| 80 | + className={`text-[10px] uppercase tracking-widest transition-all ${ |
| 81 | + copiedField === "user" |
| 82 | + ? "text-primary-default opacity-100" |
| 83 | + : "text-text-light/20 opacity-0 group-hover/item:opacity-100" |
| 84 | + }`} |
| 85 | + > |
| 86 | + {copiedField === "user" ? "Copied!" : "Copy"} |
| 87 | + </span> |
| 88 | + </div> |
| 89 | + </button> |
| 90 | + </div> |
| 91 | + |
| 92 | + <div> |
| 93 | + <div className="text-[10px] text-primary-default/60 uppercase mb-2 tracking-tighter"> |
| 94 | + // Security_Key |
| 95 | + </div> |
| 96 | + <button |
| 97 | + onClick={() => copyToClipboard("demodemo", "pass")} |
| 98 | + className="w-full flex items-center justify-between p-3 rounded-lg bg-white/5 border border-white/5 hover:border-primary-default/40 hover:bg-white/10 transition-all group/item" |
| 99 | + > |
| 100 | + <span className="text-text-light/50">Password</span> |
| 101 | + <div className="flex items-center gap-3"> |
| 102 | + <code className="text-primary-light text-lg font-bold px-2"> |
| 103 | + demodemo |
| 104 | + </code> |
| 105 | + <span |
| 106 | + className={`text-[10px] uppercase tracking-widest transition-all ${ |
| 107 | + copiedField === "pass" |
| 108 | + ? "text-primary-default opacity-100" |
| 109 | + : "text-text-light/20 opacity-0 group-hover/item:opacity-100" |
| 110 | + }`} |
| 111 | + > |
| 112 | + {copiedField === "pass" ? "Copied!" : "Copy"} |
| 113 | + </span> |
| 114 | + </div> |
| 115 | + </button> |
| 116 | + </div> |
| 117 | + </div> |
| 118 | + </div> |
| 119 | + |
| 120 | + {/* Subtle Glow */} |
| 121 | + <div className="absolute -inset-0.5 bg-gradient-to-r from-primary-default/20 to-primary-light/20 blur opacity-30 -z-10 rounded-2xl group-hover:opacity-50 transition-opacity" /> |
| 122 | + </div> |
| 123 | + </div> |
| 124 | + </div> |
| 125 | + </Container> |
| 126 | + </section> |
| 127 | + ); |
| 128 | +} |
0 commit comments