Mobile responsive: hamburger menu, stacked plans on phone, touch-friendly forms, compact cards
This commit is contained in:
@@ -54,12 +54,7 @@ function SignupForm() {
|
||||
if (res.ok) {
|
||||
const data = await res.json()
|
||||
|
||||
if (planId === "free") {
|
||||
router.push("/autojobs/dashboard")
|
||||
return
|
||||
}
|
||||
|
||||
if (planId === "agency_enterprise") {
|
||||
if (planId === "free" || planId === "agency_enterprise") {
|
||||
router.push("/autojobs/dashboard")
|
||||
return
|
||||
}
|
||||
@@ -94,24 +89,24 @@ function SignupForm() {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-slate-900 flex items-center justify-center px-4 py-12">
|
||||
<div className="w-full max-w-md">
|
||||
<div className="min-h-screen bg-slate-900 flex items-center justify-center px-4 py-8">
|
||||
<div className="w-full max-w-sm">
|
||||
<div className="text-center mb-6">
|
||||
<Link href="/autojobs" className="text-2xl font-bold text-white">
|
||||
Auto<span className="text-blue-400">Jobs</span>
|
||||
</Link>
|
||||
<p className="text-slate-400 mt-2">Create your account</p>
|
||||
<p className="text-slate-400 mt-2 text-sm">Create your account</p>
|
||||
</div>
|
||||
|
||||
<div className="bg-slate-800 rounded-2xl p-5 border border-blue-500/30 mb-6">
|
||||
<div className="bg-slate-800 rounded-2xl p-5 border border-blue-500/30 mb-5">
|
||||
<div className="flex justify-between items-center">
|
||||
<div>
|
||||
<div className="text-sm text-slate-400">Selected Plan</div>
|
||||
<div className="text-xl font-bold text-white">{plan.name}</div>
|
||||
<div className="text-xs text-slate-400">Selected Plan</div>
|
||||
<div className="text-lg font-bold text-white">{plan.name}</div>
|
||||
<div className="text-xs text-slate-400">{plan.apps}/month</div>
|
||||
</div>
|
||||
<div className="text-right">
|
||||
<div className="text-2xl font-bold text-blue-400">{plan.price}</div>
|
||||
<div className="text-xl font-bold text-blue-400">{plan.price}</div>
|
||||
{planId !== "free" && planId !== "agency_enterprise" && (
|
||||
<div className="text-xs text-slate-400">billed monthly</div>
|
||||
)}
|
||||
@@ -119,47 +114,47 @@ function SignupForm() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form onSubmit={handleSubmit} className="bg-slate-800 rounded-2xl p-8 border border-slate-700">
|
||||
<form onSubmit={handleSubmit} className="bg-slate-800 rounded-2xl p-6 border border-slate-700">
|
||||
{error && (
|
||||
<div className="mb-4 p-3 bg-red-500/20 border border-red-500/30 rounded-lg text-red-400 text-sm">
|
||||
<div className="mb-4 p-3 bg-red-500/20 border border-red-500/30 rounded-lg text-red-400 text-xs">
|
||||
{error}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="space-y-4">
|
||||
<div>
|
||||
<label className="block text-sm text-slate-400 mb-1">Full Name</label>
|
||||
<label className="block text-xs text-slate-400 mb-1">Full Name</label>
|
||||
<input required type="text" value={form.name} onChange={e => setForm({...form, name: e.target.value})}
|
||||
className="w-full px-4 py-3 bg-slate-700 border border-slate-600 rounded-xl text-white placeholder-slate-500 focus:outline-none focus:border-blue-500" placeholder="John Smith" />
|
||||
className="w-full px-4 py-3 bg-slate-700 border border-slate-600 rounded-xl text-white placeholder-slate-500 focus:outline-none focus:border-blue-500 text-sm" placeholder="John Smith" />
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-sm text-slate-400 mb-1">Email</label>
|
||||
<label className="block text-xs text-slate-400 mb-1">Email</label>
|
||||
<input required type="email" value={form.email} onChange={e => setForm({...form, email: e.target.value})}
|
||||
className="w-full px-4 py-3 bg-slate-700 border border-slate-600 rounded-xl text-white placeholder-slate-500 focus:outline-none focus:border-blue-500" placeholder="you@example.com" />
|
||||
className="w-full px-4 py-3 bg-slate-700 border border-slate-600 rounded-xl text-white placeholder-slate-500 focus:outline-none focus:border-blue-500 text-sm" placeholder="you@example.com" />
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-sm text-slate-400 mb-1">Password</label>
|
||||
<label className="block text-xs text-slate-400 mb-1">Password</label>
|
||||
<input required type="password" value={form.password} onChange={e => setForm({...form, password: e.target.value})}
|
||||
className="w-full px-4 py-3 bg-slate-700 border border-slate-600 rounded-xl text-white placeholder-slate-500 focus:outline-none focus:border-blue-500" placeholder="••••••••" />
|
||||
className="w-full px-4 py-3 bg-slate-700 border border-slate-600 rounded-xl text-white placeholder-slate-500 focus:outline-none focus:border-blue-500 text-sm" placeholder="••••••••" />
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-sm text-slate-400 mb-1">Confirm Password</label>
|
||||
<label className="block text-xs text-slate-400 mb-1">Confirm Password</label>
|
||||
<input required type="password" value={form.confirmPassword} onChange={e => setForm({...form, confirmPassword: e.target.value})}
|
||||
className="w-full px-4 py-3 bg-slate-700 border border-slate-600 rounded-xl text-white placeholder-slate-500 focus:outline-none focus:border-blue-500" placeholder="••••••••" />
|
||||
className="w-full px-4 py-3 bg-slate-700 border border-slate-600 rounded-xl text-white placeholder-slate-500 focus:outline-none focus:border-blue-500 text-sm" placeholder="••••••••" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" disabled={loading}
|
||||
className="w-full mt-6 py-3 bg-blue-500 hover:bg-blue-600 disabled:bg-slate-600 text-white rounded-xl font-semibold transition">
|
||||
className="w-full mt-5 py-3 bg-blue-500 hover:bg-blue-600 disabled:bg-slate-600 text-white rounded-xl font-semibold transition text-sm">
|
||||
{loading ? "Creating account..." : planId === "free" ? "Create Free Account" : `Pay ${plan.price} & Subscribe`}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<p className="text-center text-slate-400 mt-6 text-sm">
|
||||
<p className="text-center text-slate-400 mt-5 text-xs">
|
||||
Already have an account? <Link href="/autojobs/login" className="text-blue-400 hover:underline">Sign in</Link>
|
||||
</p>
|
||||
<p className="text-center text-slate-500 mt-4 text-xs">
|
||||
By signing up, you agree to our Terms of Service and Privacy Policy.
|
||||
<p className="text-center text-slate-500 mt-3 text-xs">
|
||||
By signing up, you agree to our <a href="/autojobs/terms" className="text-blue-400 hover:underline">Terms</a> and <a href="/autojobs/privacy" className="text-blue-400 hover:underline">Privacy Policy</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user