|
| 1 | +import Link from "next/link"; |
| 2 | +import Image from "next/image"; |
| 3 | +import { Metadata } from "next/types"; |
| 4 | +import ResetPasswordForm from "@/app/components/auth/form/ResetPasswordForm"; |
| 5 | +import { Suspense } from "react"; |
| 6 | + |
| 7 | +// doesnt need description or keywords since this page is only accessible via a link in the email sent to the user, |
| 8 | +// and we dont want it indexed by search engines |
| 9 | +export const metadata: Metadata = { |
| 10 | + title: "Reset Password - Devpulse", |
| 11 | + description: "", |
| 12 | + alternates: { |
| 13 | + canonical: "https://devpulse.hallofcodes.org/reset-password", |
| 14 | + }, |
| 15 | + robots: { |
| 16 | + index: false, |
| 17 | + follow: false, |
| 18 | + }, |
| 19 | + openGraph: { |
| 20 | + title: "Reset Password - Devpulse", |
| 21 | + description: "", |
| 22 | + url: "https://devpulse.hallofcodes.org/reset-password", |
| 23 | + siteName: "Devpulse", |
| 24 | + images: [ |
| 25 | + { |
| 26 | + url: "https://devpulse.hallofcodes.org/images/devpulse.cover.png", |
| 27 | + width: 1200, |
| 28 | + height: 630, |
| 29 | + alt: "Devpulse Cover Image", |
| 30 | + }, |
| 31 | + ], |
| 32 | + locale: "en_US", |
| 33 | + type: "website", |
| 34 | + }, |
| 35 | + twitter: { |
| 36 | + card: "summary_large_image", |
| 37 | + title: "Reset Password - Devpulse", |
| 38 | + description: "", |
| 39 | + images: [ |
| 40 | + { |
| 41 | + url: "https://devpulse.hallofcodes.org/images/devpulse.cover.png", |
| 42 | + alt: "Devpulse Cover Image", |
| 43 | + }, |
| 44 | + ], |
| 45 | + }, |
| 46 | +}; |
| 47 | + |
| 48 | +export default async function ResetPassword() { |
| 49 | + return ( |
| 50 | + <div className="min-h-screen flex bg-[#0a0a1a] text-white relative"> |
| 51 | + {/* Left Side - Visual / Branding */} |
| 52 | + <div className="hidden lg:flex lg:w-1/2 relative flex-col justify-between p-12 md:p-16 xl:p-24 border-r border-white/5 bg-gradient-to-br from-[#0a0a1a] to-[#0a0a1a] overflow-hidden"> |
| 53 | + {/* Background elements */} |
| 54 | + <div className="absolute inset-0 grid-bg opacity-30" /> |
| 55 | + |
| 56 | + <div className="relative z-10"> |
| 57 | + <Link |
| 58 | + href="/" |
| 59 | + className="flex items-center gap-3 w-fit hover:opacity-80 transition" |
| 60 | + > |
| 61 | + <Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} /> |
| 62 | + <span className="text-2xl font-bold tracking-tight text-white"> |
| 63 | + Devpulse |
| 64 | + </span> |
| 65 | + </Link> |
| 66 | + </div> |
| 67 | + |
| 68 | + <div className="relative z-10 max-w-md"> |
| 69 | + <h1 className="text-4xl font-extrabold mb-5 leading-tight text-transparent bg-clip-text bg-gradient-to-r from-white to-gray-400"> |
| 70 | + Change your password and get back to tracking your coding activity! |
| 71 | + </h1> |
| 72 | + <p className="text-gray-400 text-lg leading-relaxed mb-8"> |
| 73 | + Your Devpulse dashboard is waiting for you. Enter a new password to |
| 74 | + regain access and continue your coding journey. |
| 75 | + </p> |
| 76 | + |
| 77 | + <div className="glass-card border border-white/5 rounded-2xl p-5 bg-white/5 backdrop-blur-md shadow-2xl"> |
| 78 | + <div className="flex items-center gap-2 mb-4"> |
| 79 | + <div className="w-3 h-3 rounded-full bg-red-500/80"></div> |
| 80 | + <div className="w-3 h-3 rounded-full bg-yellow-500/80"></div> |
| 81 | + <div className="w-3 h-3 rounded-full bg-green-500/80"></div> |
| 82 | + <span className="ml-2 text-xs font-mono text-gray-500"> |
| 83 | + setup.ts |
| 84 | + </span> |
| 85 | + </div> |
| 86 | + <div className="space-y-1.5 font-mono text-sm"> |
| 87 | + <div className="flex"> |
| 88 | + <span className="text-purple-400 mr-2">const</span> |
| 89 | + <span className="text-blue-400">dev</span> |
| 90 | + <span className="text-gray-200 mx-2">=</span> |
| 91 | + <span className="text-indigo-400">getAccount</span> |
| 92 | + <span className="text-gray-200">(</span> |
| 93 | + <span className="text-yellow-200">this</span> |
| 94 | + <span className="text-gray-200">);</span> |
| 95 | + </div> |
| 96 | + <div className="flex mt-2"> |
| 97 | + <span className="text-blue-400">dev</span> |
| 98 | + <span className="text-gray-200">.</span> |
| 99 | + <span className="text-yellow-200">setNewPassword</span> |
| 100 | + <span className="text-gray-200">(</span> |
| 101 | + <span className="text-gray-200"> |
| 102 | + "your-new-password" |
| 103 | + </span> |
| 104 | + <span className="text-gray-200">);</span> |
| 105 | + </div> |
| 106 | + <div className="flex mt-3"> |
| 107 | + <span className="text-emerald-400/80"> |
| 108 | + {"// And just like that, you're back in the game. 🎉"} |
| 109 | + </span> |
| 110 | + </div> |
| 111 | + </div> |
| 112 | + </div> |
| 113 | + </div> |
| 114 | + |
| 115 | + <div className="relative z-10 text-sm text-gray-500 font-medium"> |
| 116 | + © {new Date().getFullYear()} Devpulse. All rights reserved. |
| 117 | + </div> |
| 118 | + </div> |
| 119 | + |
| 120 | + {/* Right Side - Form */} |
| 121 | + <div className="w-full lg:w-1/2 flex flex-col justify-center items-center p-8 sm:p-12 xl:p-20 relative"> |
| 122 | + <div className="absolute inset-0 grid-bg opacity-20 lg:hidden" /> |
| 123 | + |
| 124 | + <div className="w-full max-w-sm relative z-10"> |
| 125 | + <Link |
| 126 | + href="/" |
| 127 | + className="lg:hidden flex items-center justify-center gap-3 mb-10" |
| 128 | + > |
| 129 | + <Image src="/logo.svg" alt="Devpulse Logo" width={40} height={40} /> |
| 130 | + <h2 className="text-3xl font-bold text-white">Devpulse</h2> |
| 131 | + </Link> |
| 132 | + |
| 133 | + <div className="mb-8 text-left"> |
| 134 | + <h2 className="text-3xl font-bold text-white mb-2"> |
| 135 | + Reset your password |
| 136 | + </h2> |
| 137 | + <p className="text-gray-400"> |
| 138 | + New password, who dis? Enter a new password to regain access to |
| 139 | + your account and get back to tracking your coding stats! |
| 140 | + </p> |
| 141 | + </div> |
| 142 | + |
| 143 | + <Suspense |
| 144 | + fallback={ |
| 145 | + <div className="text-center text-gray-500">Loading...</div> |
| 146 | + } |
| 147 | + > |
| 148 | + <ResetPasswordForm /> |
| 149 | + </Suspense> |
| 150 | + |
| 151 | + <p className="mt-8 text-center text-sm text-gray-400"> |
| 152 | + Already have an account?{" "} |
| 153 | + <Link |
| 154 | + href="/login" |
| 155 | + className="text-blue-500 hover:underline transition" |
| 156 | + > |
| 157 | + Log in |
| 158 | + </Link> |
| 159 | + </p> |
| 160 | + </div> |
| 161 | + </div> |
| 162 | + </div> |
| 163 | + ); |
| 164 | +} |
0 commit comments