Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 26 additions & 13 deletions resources/views/auth/login.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,33 @@ class="absolute top-0 -right-1/4 h-full max-w-[calc(70vw)] object-cover opacity-

@push('scripts')
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
const passwordInput = document.getElementById('password');
const eyeIcon = document.getElementById('password-eye');
const eyeSlashIcon = document.getElementById('password-eye-slash');
document.addEventListener('DOMContentLoaded', function() {
const passwordInput = document.getElementById('password');
const eyeIcon = document.getElementById('password-eye');
const eyeSlashIcon = document.getElementById('password-eye-slash');

const togglePasswordVisibility = () => {
const isPassword = passwordInput.type === 'password';
passwordInput.type = isPassword ? 'text' : 'password';
eyeIcon.style.display = isPassword ? 'none' : 'block';
eyeSlashIcon.style.display = isPassword ? 'block' : 'none';
};
const togglePasswordVisibility = (event) => {
event.preventDefault(); // Prevents unintended behavior

eyeIcon.addEventListener('click', togglePasswordVisibility);
eyeSlashIcon.addEventListener('click', togglePasswordVisibility);
});
if (passwordInput.type === 'password') {
passwordInput.setAttribute('type', 'text');
eyeIcon.classList.add('hidden');
eyeSlashIcon.classList.remove('hidden');
} else {
passwordInput.setAttribute('type', 'password');
eyeIcon.classList.remove('hidden');
eyeSlashIcon.classList.add('hidden');
}

// Refocus input after changing type to avoid losing cursor position
passwordInput.focus();
const val = passwordInput.value;
passwordInput.value = ''; // Temporarily clear
passwordInput.value = val; // Restore to keep cursor at the end
};

eyeIcon.addEventListener('mousedown', togglePasswordVisibility);
eyeSlashIcon.addEventListener('mousedown', togglePasswordVisibility);
});
</script>
@endpush
67 changes: 32 additions & 35 deletions resources/views/auth/passwords/email.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,39 @@

@section('content')
<section id="codeweek-forgotpassword-page">
<section class="relative flex justify-center px-5 py-10 overflow-hidden lg:p-20 bg-secondary-gradient">

<section class="bg-white pb-10 pt-6 px-6 lg:p-16 rounded-[2rem] w-full md:max-w-[760px] z-10">

<section class="codeweek-content-wrapper">

<section class="codeweek-content-wrapper-inside login-form">
<form method="POST" action="{{ route('password.email') }}">
@csrf

<div class="codeweek-form-field-wrapper">
<div class="codeweek-form-field">
<label for="email" class="text-xl font-normal">@lang('login.email')</label>
<input
class="w-full h-12 px-4 mt-3 border-2 border-solid rounded-full border-dark-blue-200"
id="email" type="email" name="email" value="{{ old('email') }}" required
autofocus>
</div>
<div class="errors">
@component('components.validation-errors', ['field' => 'email'])
@endcomponent
</div>
</div>

<div class="flex justify-center mt-6">
<input style="font-family:Blinker"
class="cursor-pointer bg-primary hover:bg-hover-orange rounded-full py-4 px-20 font-semibold text-base w-full md:w-auto text-center text-[#20262C] transition-all duration-300"
type="submit" value="@lang('login.send_password')">
</div>

</form>
</section>
<img class="absolute top-0 -right-1/4 h-full max-w-[calc(70vw)] object-cover opacity-70 hidden md:block"
loading="lazy" src="../images/login_bg.png" style="clip-path: ellipse(70% 140% at 70% 25%);" />

<section class="py-10 px-5 lg:p-20 bg-secondary-gradient flex justify-center relative overflow-hidden">

<section class="bg-white pb-10 pt-6 px-6 lg:p-16 rounded-[2rem] w-full md:max-w-[760px] z-10" >

<div class="reset_title">@lang('login.resetpage_title')</div>
<div class="reset_description">@lang('login.resetpage_description')</div>
<form method="POST" action="{{ route('password.email') }}">
@csrf

<div class="codeweek-form-field-wrapper">
<div class="codeweek-form-field">
<label for="email" class="font-normal text-xl">@lang('login.email')</label>
<input class="border-2 border-solid border-dark-blue-200 w-full rounded-full h-12 px-4 mt-3" id="email" type="email" name="email"
value="{{old('email')}}" required autofocus>
</div>
<div class="errors">
@component('components.validation-errors', ['field'=>'email'])@endcomponent
</div>
</div>

<div class="flex justify-center mt-6">
<input style="font-family: Blinker;" class="cursor-pointer bg-primary hover:bg-hover-orange rounded-full py-4 px-20 font-semibold text-base w-full md:w-auto text-center text-[#20262C] transition-all duration-300" type="submit" value="@lang('login.send_password')">
</div>

</form>
</section>
<img
class="absolute top-0 -right-1/4 h-full max-w-[calc(70vw)] object-cover opacity-70 hidden md:block"
loading="lazy"
src="../images/login_bg.png"
style="clip-path: ellipse(70% 140% at 70% 25%);"
/>

</section>
</section>
@endsection