Files
erahn-click/resources/views/auth/loginbackup.blade.php
T
2025-10-04 21:51:32 +08:00

116 lines
7.3 KiB
PHP

@extends('layouts.app', ['class' => 'bg-default'])
@section('content')
@include('layouts.headers.guest')
<div class="container mt--8 pb-5">
<div class="row justify-content-center">
<div class="col-lg-5 col-md-7">
<div class="card bg-secondary shadow border-0">
<div class="card-header bg-transparent pb-5">
<div class="text-muted text-center mt-2 mb-3"><small>{{ __('Sign in with') }}</small></div>
<div class="btn-wrapper text-center">
<a href="#" class="btn btn-neutral btn-icon">
<span class="btn-inner--icon"><img src="{{ asset('argon') }}/img/icons/common/github.svg"></span>
<span class="btn-inner--text">{{ __('Github') }}</span>
</a>
<a href="#" class="btn btn-neutral btn-icon">
<span class="btn-inner--icon"><img src="{{ asset('argon') }}/img/icons/common/google.svg"></span>
<span class="btn-inner--text">{{ __('Google') }}</span>
</a>
</div>
</div>
<div class="card-body px-lg-5 py-lg-5">
<div class="text-center text-muted mb-4">
<small>
Create new account OR Sign in with these credentials:
<br>
Username <strong>admin@argon.com</strong> Password: <strong>secret</strong>
</small>
</div>
<form role="form" method="POST" action="{{ route('login') }}">
@csrf
<div class="form-group{{ $errors->has('email') ? ' has-danger' : '' }} mb-3">
<div class="input-group input-group-alternative">
<div class="input-group-prepend">
<span class="input-group-text"><i class="ni ni-email-83"></i></span>
</div>
<input class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" placeholder="{{ __('Email') }}" type="email" name="email" value="{{ old('email') }}" value="admin@argon.com" required autofocus>
</div>
@if ($errors->has('email'))
<span class="invalid-feedback" style="display: block;" role="alert">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
<div class="form-group{{ $errors->has('password') ? ' has-danger' : '' }}">
<div class="input-group input-group-alternative" style="position: relative;">
<div class="input-group-prepend">
<span class="input-group-text"><i class="ni ni-lock-circle-open"></i></span>
</div>
<input class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" id="password" name="password" placeholder="{{ __('Password') }}" type="password" value="secret" required>
<span
class="input-group-text border-0 position-absolute end-0 top-0 h-100 d-flex align-items-center"
style="cursor:pointer; z-index: 3; border-radius: 0 0.375rem 0.375rem 0; border-left: none; border: 1px solid #ced4da; background: transparent; padding: 0 12px; height: 100%; display: flex; align-items: center; box-shadow: none; top: 0; bottom: 0;"
onclick="togglePasswordVisibility('password', 'eyeIcon-password')"
tabindex="0"
aria-label="Toggle password visibility"
>
<svg id="eyeIcon-password" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="#6c757d" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg>
</span>
</div>
@if ($errors->has('password'))
<span class="invalid-feedback" style="display: block;" role="alert">
<strong>{{ $errors->first('password') }}</strong>
</span>
@endif
</div>
<div class="custom-control custom-control-alternative custom-checkbox">
<input class="custom-control-input" name="remember" id="customCheckLogin" type="checkbox" {{ old('remember') ? 'checked' : '' }}>
<label class="custom-control-label" for="customCheckLogin">
<span class="text-muted">{{ __('Remember me') }}</span>
</label>
</div>
<div class="text-center">
<button type="submit" class="btn btn-primary my-4">{{ __('Sign in') }}</button>
</div>
</form>
</div>
</div>
<div class="row mt-3">
<div class="col-6">
@if (Route::has('password.request'))
<a href="{{ route('password.request') }}" class="text-light">
<small>{{ __('Forgot password?') }}</small>
</a>
@endif
</div>
<div class="col-6 text-right">
<a href="{{ route('register') }}" class="text-light">
<small>{{ __('Create new account') }}</small>
</a>
</div>
</div>
</div>
</div>
</div>
<script>
function togglePasswordVisibility(inputId, iconId) {
const passwordInput = document.getElementById(inputId);
const eyeIcon = document.getElementById(iconId);
if (passwordInput.type === 'password') {
passwordInput.type = 'text';
eyeIcon.setAttribute('fill', '#12B652');
} else {
passwordInput.type = 'password';
eyeIcon.setAttribute('fill', '#6c757d');
}
}
</script>
@endsection