feat(auth): registration and login
This commit is contained in:
@@ -1,41 +1,32 @@
|
||||
@extends('layouts.nova')
|
||||
|
||||
@section('content')
|
||||
<div class="px-4 py-8 md:px-6 md:py-10">
|
||||
<div class="mx-auto w-full max-w-xl rounded-2xl border border-sb-line bg-panel-dark shadow-sb p-6 md:p-8">
|
||||
<h1 class="text-2xl font-semibold text-white">Create Account</h1>
|
||||
<p class="mt-2 text-sm text-sb-muted">Start with your email. You will set your password and username after verification.</p>
|
||||
<div class="flex-1 flex items-center justify-center px-6 py-16 min-h-[calc(100vh-4rem)] box-border">
|
||||
<div class="max-w-5xl w-full">
|
||||
<div class="rounded-2xl border border-white/10 bg-slate-900/70 backdrop-blur shadow-xl p-8 auth-card">
|
||||
<h2 class="text-2xl font-semibold mb-2 text-white">Create Account</h2>
|
||||
|
||||
<form method="POST" action="{{ route('register') }}" class="mt-6 space-y-4">
|
||||
@csrf
|
||||
<p class="text-sm text-white/60 mb-6">Start with your email. You’ll choose a password and username after verification.</p>
|
||||
|
||||
<div style="position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;" aria-hidden="true">
|
||||
<label for="website">Website</label>
|
||||
<input id="website" type="text" name="website" tabindex="-1" autocomplete="off" />
|
||||
</div>
|
||||
<form method="POST" action="{{ route('register') }}" class="space-y-5">
|
||||
@csrf
|
||||
|
||||
<!-- Email Address -->
|
||||
<div>
|
||||
<x-input-label for="email" :value="__('Email')" class="text-sb-muted" />
|
||||
<x-text-input id="email" class="block mt-1 w-full bg-black/20 border-sb-line text-white" type="email" name="email" :value="old('email', $prefillEmail ?? '')" required autofocus autocomplete="email" />
|
||||
<x-input-error :messages="$errors->get('email')" class="mt-2" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm mb-1 text-white/80" for="email">Email</label>
|
||||
<input id="email" name="email" type="email" required placeholder="you@example.com" value="{{ old('email', $prefillEmail ?? '') }}" class="w-full rounded-lg bg-slate-950/70 border border-white/10 px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-cyan-500 text-white" />
|
||||
<x-input-error :messages="$errors->get('email')" class="mt-2" />
|
||||
</div>
|
||||
|
||||
@if(config('services.recaptcha.enabled'))
|
||||
<input type="hidden" name="g-recaptcha-response" value="{{ old('g-recaptcha-response') }}" />
|
||||
<x-input-error :messages="$errors->get('captcha')" class="mt-2" />
|
||||
@endif
|
||||
@if(config('services.recaptcha.enabled'))
|
||||
<input type="hidden" name="g-recaptcha-response" value="{{ old('g-recaptcha-response') }}" />
|
||||
<x-input-error :messages="$errors->get('captcha')" class="mt-2" />
|
||||
@endif
|
||||
|
||||
<div class="flex items-center justify-between pt-2">
|
||||
<a class="underline text-sm text-sb-muted hover:text-white" href="{{ route('login') }}">
|
||||
{{ __('Already registered?') }}
|
||||
</a>
|
||||
<button type="submit" class="w-full rounded-lg py-3 font-medium bg-gradient-to-r from-cyan-500 to-sky-400 hover:from-cyan-400 hover:to-sky-300 text-slate-900 transition">Continue</button>
|
||||
|
||||
<x-primary-button class="justify-center">
|
||||
{{ __('Register') }}
|
||||
</x-primary-button>
|
||||
</div>
|
||||
</form>
|
||||
<p class="text-sm text-center text-white/60">Already registered? <a href="{{ route('login') }}" class="text-cyan-400 hover:underline">Sign in</a></p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user