diff --git a/package.json b/package.json index c8a6ce4..95e785c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "siteforge", "private": true, - "version": "2.10.5", + "version": "2.10.6", "type": "module", "scripts": { "dev": "vite", diff --git a/src/App.css b/src/App.css index c9d8d93..2f226b3 100644 --- a/src/App.css +++ b/src/App.css @@ -4033,6 +4033,187 @@ padding: 0; } +/* ── Sign in / Create account (split layout) ── */ +.auth-page { + min-height: 70vh; + display: flex; + justify-content: center; + padding: clamp(2rem, 6vw, 4rem) 1.25rem; + background: + radial-gradient(ellipse at top, rgba(201, 168, 76, 0.12) 0%, transparent 55%), + var(--brand-black); +} + +.auth-shell { + width: min(1000px, 100%); + display: grid; + grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); + align-items: start; + gap: clamp(1.5rem, 4vw, 3rem); +} + +.auth-shell--single { + grid-template-columns: minmax(0, 520px); + justify-content: center; +} + +.auth-aside { + padding: 1rem 0.5rem; +} + +.auth-aside-title { + font-family: var(--brand-font-heading); + font-size: clamp(1.7rem, 3.4vw, 2.3rem); + line-height: 1.15; + color: var(--brand-warm-white); + margin: 0.4rem 0 1.5rem; +} + +.auth-benefits { + list-style: none; + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + gap: 1.1rem; +} + +.auth-benefits li { + display: flex; + gap: 0.9rem; + align-items: flex-start; +} + +.auth-benefits li > span { + flex-shrink: 0; + width: 2.4rem; + height: 2.4rem; + display: inline-flex; + align-items: center; + justify-content: center; + border-radius: 50%; + background: rgba(201, 168, 76, 0.12); + border: 1px solid rgba(201, 168, 76, 0.35); + font-size: 1.05rem; +} + +.auth-benefits strong { + display: block; + color: var(--brand-warm-white); + font-family: var(--brand-font-heading); + font-size: 1.1rem; + font-weight: 600; + margin-bottom: 0.15rem; +} + +.auth-benefits p { + margin: 0; + color: #b9aa86; + font-size: 0.95rem; + line-height: 1.55; +} + +.auth-card { + background: #121212; + border: 1px solid rgba(201, 168, 76, 0.24); + border-radius: 16px; + box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5); + padding: clamp(1.5rem, 4vw, 2.25rem); + text-align: left; +} + +.auth-card h1 { + font-family: var(--brand-font-heading); + font-size: clamp(1.8rem, 4vw, 2.3rem); + color: var(--brand-warm-white); + margin: 0.2rem 0 0.75rem; +} + +.auth-card p { + font-family: var(--brand-font-body); + color: var(--brand-muted); +} + +.auth-card-eyebrow { margin: 0; } + +.auth-card .study-signup-form { margin-top: 0.5rem; } + +.auth-card .study-signup-actions { margin-top: 0.75rem; } + +.auth-card .study-signup-actions .btn-primary { + width: 100%; + justify-content: center; +} + +.auth-password-wrap { + position: relative; + display: flex; +} + +.auth-password-wrap input { + width: 100%; + padding-right: 4.5rem; +} + +.auth-password-toggle { + position: absolute; + right: 0.35rem; + top: 50%; + transform: translateY(-50%); + background: none; + border: none; + color: var(--brand-gold); + font-family: var(--brand-font-body); + font-size: 0.78rem; + letter-spacing: 0.06em; + text-transform: uppercase; + padding: 0.4rem 0.6rem; + cursor: pointer; +} + +.auth-switch { + margin: 1.1rem 0 0; + text-align: center; + font-size: 0.95rem; +} + +.auth-link { + background: none; + border: none; + padding: 0; + color: var(--brand-gold); + font: inherit; + text-decoration: underline; + cursor: pointer; +} + +.auth-footer-links { + margin: 1.5rem 0 0; + text-align: center; + font-size: 0.9rem; +} + +.auth-footer-links a { + color: var(--brand-muted); + text-decoration: none; +} + +.auth-footer-links a:hover { + color: var(--brand-warm-white); + text-decoration: underline; +} + +@media (max-width: 820px) { + .auth-shell { + grid-template-columns: 1fr; + } + + /* Form first on phones; the benefits follow below it */ + .auth-aside { + order: 2; + } +} + /* ── Study Signup Page ── */ .study-signup-page-card { max-width: 680px; diff --git a/src/studyPages.tsx b/src/studyPages.tsx index 5d67d78..93ff50a 100644 --- a/src/studyPages.tsx +++ b/src/studyPages.tsx @@ -1130,6 +1130,7 @@ export function StudySignupPage() { const [resendStatus, setResendStatus] = useState<'idle' | 'sending' | 'sent'>('idle') // Forgot-password state const [forgotSent, setForgotSent] = useState(false) + const [showPassword, setShowPassword] = useState(false) useEffect(() => { readJson('/api/study-auth/status') @@ -1215,10 +1216,38 @@ export function StudySignupPage() { } }, [email]) + const showAside = !done && mode !== 'forgot' && !totpPendingToken + return ( -
-
-

Free Student Account

+
+
+ {showAside && ( + + )} +
+

{mode === 'signup' ? 'Create account' : mode === 'forgot' ? 'Account recovery' : 'Sign in'}

{mode === 'signup' ? 'Create Your Account' : mode === 'forgot' ? 'Reset Your Password' : 'Welcome Back'}

{done ? ( @@ -1317,7 +1346,7 @@ export function StudySignupPage() {
) : ( <> -
+
{ e.preventDefault(); void submit() }}> {fieldErrors.email &&

{fieldErrors.email}

} +
{ setPassword(e.target.value); if (fieldErrors.password) setFieldErrors(prev => ({ ...prev, password: undefined })) }} onBlur={() => { @@ -1349,10 +1379,13 @@ export function StudySignupPage() { setFieldErrors(prev => ({ ...prev, password: undefined })) } }} - placeholder="At least 8 characters" + placeholder={mode === 'signup' ? 'At least 8 characters' : 'Your password'} autoComplete={mode === 'signup' ? 'new-password' : 'current-password'} - onKeyDown={e => e.key === 'Enter' && submit()} /> + +
{fieldErrors.password &&

{fieldErrors.password}

} {mode === 'login' && (
-
- {mode === 'login' && ( - - )} - {mode === 'signup' && ( - - )} -
-
+

+ {mode === 'login' ? "Don't have an account? " : 'Already have an account? '} + +

+ - {mode === 'signup' && ( -
-
- -

Notes on Every Lesson

-

Save your own notes per lesson — up to 500 notes across all tracks.

-
-
- -

Space to Go Deep

-

Each note holds ~2,000 words so you can write as much as you need.

-
-
- -

Private to You

-

Your notes are tied to your account. Nobody else can read them.

-
-
- -

Free Forever

-

Just an email and password. No charge, no ads. Stay signed in 30 days.

-
-
- )} )} -
- My Account - Back to Studies +

+ ← Back to Studies +