517 lines
16 KiB
PHP
517 lines
16 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="id">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Login - JTI Management Portal</title>
|
|
<style>
|
|
:root {
|
|
--bg: #f5f7f4;
|
|
--panel: #ffffff;
|
|
--ink: #17211f;
|
|
--muted: #5f6d69;
|
|
--line: #d8dfdc;
|
|
--brand: #0f766e;
|
|
--brand-soft: #e7f3f1;
|
|
--primary: #4f46e5;
|
|
--primary-2: #7c3aed;
|
|
--accent: #f97316;
|
|
--ok: #16a34a;
|
|
--warn: #c2410c;
|
|
--shadow: 0 18px 42px rgba(23, 33, 31, 0.08);
|
|
--shadow-lg: 0 24px 70px rgba(31, 41, 55, 0.18);
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
html, body {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
body {
|
|
font-family: "Trebuchet MS", "Segoe UI", sans-serif;
|
|
color: var(--ink);
|
|
background:
|
|
radial-gradient(65rem 45rem at 120% -10%, #d7f0ec 0%, transparent 45%),
|
|
radial-gradient(55rem 40rem at -20% 120%, #ffe8d4 0%, transparent 38%),
|
|
var(--bg);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: 100vh;
|
|
padding: 20px;
|
|
}
|
|
|
|
.login-container {
|
|
width: 100%;
|
|
max-width: 420px;
|
|
}
|
|
|
|
.login-card {
|
|
background: var(--panel);
|
|
border: 1px solid var(--line);
|
|
border-radius: 24px;
|
|
box-shadow: var(--shadow-lg);
|
|
padding: 42px 32px;
|
|
animation: slideUp 0.6s ease;
|
|
}
|
|
|
|
@keyframes slideUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(30px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.brand-section {
|
|
text-align: center;
|
|
margin-bottom: 32px;
|
|
}
|
|
|
|
.brand-mark {
|
|
width: 56px;
|
|
height: 56px;
|
|
margin: 0 auto 16px;
|
|
border-radius: 16px;
|
|
display: grid;
|
|
place-items: center;
|
|
color: #fff;
|
|
font-weight: 800;
|
|
font-size: 1.3rem;
|
|
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
|
|
box-shadow: 0 12px 24px rgba(79, 70, 229, 0.28);
|
|
}
|
|
|
|
.brand-section h1 {
|
|
font-size: 1.5rem;
|
|
line-height: 1.1;
|
|
margin-bottom: 4px;
|
|
color: var(--ink);
|
|
}
|
|
|
|
.brand-section p {
|
|
color: var(--muted);
|
|
font-size: 0.92rem;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 18px;
|
|
}
|
|
|
|
.form-label {
|
|
display: block;
|
|
font-weight: 700;
|
|
font-size: 0.92rem;
|
|
margin-bottom: 8px;
|
|
color: var(--ink);
|
|
}
|
|
|
|
.form-input {
|
|
width: 100%;
|
|
border: 1px solid var(--line);
|
|
border-radius: 12px;
|
|
padding: 12px 14px;
|
|
font-size: 0.95rem;
|
|
transition: all 0.2s ease;
|
|
background: #ffffff;
|
|
}
|
|
|
|
.form-input:focus {
|
|
outline: none;
|
|
border-color: var(--brand);
|
|
box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
|
|
background: #ffffff;
|
|
}
|
|
|
|
.form-input::placeholder {
|
|
color: #a8b5b1;
|
|
}
|
|
|
|
.form-error {
|
|
color: var(--warn);
|
|
font-size: 0.85rem;
|
|
margin-top: 6px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.error-icon {
|
|
width: 14px;
|
|
height: 14px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.form-input.error {
|
|
border-color: var(--warn);
|
|
background: #fef2f2;
|
|
}
|
|
|
|
.checkbox-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 0.92rem;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.checkbox-group input[type="checkbox"] {
|
|
width: 18px;
|
|
height: 18px;
|
|
cursor: pointer;
|
|
accent-color: var(--brand);
|
|
}
|
|
|
|
.checkbox-group label {
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
.btn-submit {
|
|
width: 100%;
|
|
border: 0;
|
|
border-radius: 12px;
|
|
padding: 12px 16px;
|
|
font-weight: 700;
|
|
font-size: 0.95rem;
|
|
cursor: pointer;
|
|
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
|
|
color: #fff;
|
|
transition: all 0.2s ease;
|
|
box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
|
|
margin-bottom: 18px;
|
|
}
|
|
|
|
.btn-submit:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 12px 24px rgba(79, 70, 229, 0.3);
|
|
}
|
|
|
|
.btn-submit:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.btn-submit:disabled {
|
|
opacity: 0.6;
|
|
cursor: not-allowed;
|
|
transform: none;
|
|
}
|
|
|
|
.divider {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin: 24px 0;
|
|
color: var(--muted);
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.divider::before,
|
|
.divider::after {
|
|
content: '';
|
|
flex: 1;
|
|
height: 1px;
|
|
background: var(--line);
|
|
}
|
|
|
|
.signup-link {
|
|
text-align: center;
|
|
color: var(--muted);
|
|
font-size: 0.92rem;
|
|
}
|
|
|
|
.signup-link a {
|
|
color: var(--brand);
|
|
text-decoration: none;
|
|
font-weight: 700;
|
|
transition: color 0.2s ease;
|
|
}
|
|
|
|
.signup-link a:hover {
|
|
color: var(--primary);
|
|
}
|
|
|
|
.alert {
|
|
padding: 14px 16px;
|
|
border-radius: 12px;
|
|
font-size: 0.92rem;
|
|
margin-bottom: 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
animation: slideDown 0.3s ease;
|
|
}
|
|
|
|
@keyframes slideDown {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(-10px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.alert-success {
|
|
background: #ecfdf5;
|
|
border: 1px solid #a7f3d0;
|
|
color: #065f46;
|
|
}
|
|
|
|
.alert-error {
|
|
background: #fef2f2;
|
|
border: 1px solid #fecaca;
|
|
color: #7f1d1d;
|
|
}
|
|
|
|
.alert-icon {
|
|
width: 18px;
|
|
height: 18px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.password-toggle {
|
|
position: relative;
|
|
}
|
|
|
|
.password-toggle-btn {
|
|
position: absolute;
|
|
right: 12px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 4px 8px;
|
|
color: var(--muted);
|
|
font-size: 1.1rem;
|
|
transition: color 0.2s ease;
|
|
}
|
|
|
|
.password-toggle-btn:hover {
|
|
color: var(--brand);
|
|
}
|
|
|
|
.password-toggle .form-input {
|
|
padding-right: 42px;
|
|
}
|
|
|
|
.info-section {
|
|
background: var(--brand-soft);
|
|
border: 1px solid #b5ddd8;
|
|
border-radius: 12px;
|
|
padding: 14px;
|
|
margin-bottom: 24px;
|
|
font-size: 0.85rem;
|
|
color: #115e59;
|
|
}
|
|
|
|
.info-section strong {
|
|
display: block;
|
|
margin-bottom: 6px;
|
|
color: var(--brand);
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.login-card {
|
|
padding: 28px 20px;
|
|
}
|
|
|
|
.brand-section {
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.brand-section h1 {
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
.btn-submit {
|
|
padding: 11px 14px;
|
|
font-size: 0.9rem;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="login-container">
|
|
<!-- Alert Messages -->
|
|
<?php if($errors->any()): ?>
|
|
<div class="alert alert-error">
|
|
<svg class="alert-icon" fill="currentColor" viewBox="0 0 20 20">
|
|
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd" />
|
|
</svg>
|
|
<div>
|
|
<?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
<p><?php echo e($error); ?></p>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if(session('success')): ?>
|
|
<div class="alert alert-success">
|
|
<svg class="alert-icon" fill="currentColor" viewBox="0 0 20 20">
|
|
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" />
|
|
</svg>
|
|
<p><?php echo e(session('success')); ?></p>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<!-- Login Card -->
|
|
<div class="login-card">
|
|
<!-- Brand Section -->
|
|
<div class="brand-section">
|
|
<div class="brand-mark">JTI</div>
|
|
<h1>JTI Management</h1>
|
|
<p>Portal Dosen & Staff/Teknisi</p>
|
|
</div>
|
|
|
|
<!-- Info Section -->
|
|
<div class="info-section">
|
|
<strong>Demo Account:</strong>
|
|
NIP: 19801212 200501 1 001<br>
|
|
Password: password123
|
|
</div>
|
|
|
|
<!-- Login Form -->
|
|
<form method="POST" action="<?php echo e(route('auth.login')); ?>">
|
|
<?php echo csrf_field(); ?>
|
|
|
|
<!-- NIP Field -->
|
|
<div class="form-group">
|
|
<label for="nip" class="form-label">NIP (Nomor Induk Pegawai)</label>
|
|
<input
|
|
type="text"
|
|
id="nip"
|
|
name="nip"
|
|
class="form-input <?php $__errorArgs = ['nip'];
|
|
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
|
if ($__bag->has($__errorArgs[0])) :
|
|
if (isset($message)) { $__messageOriginal = $message; }
|
|
$message = $__bag->first($__errorArgs[0]); ?> error <?php unset($message);
|
|
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
|
endif;
|
|
unset($__errorArgs, $__bag); ?>"
|
|
placeholder="Masukkan NIP Anda"
|
|
value="<?php echo e(old('nip')); ?>"
|
|
required
|
|
autofocus
|
|
>
|
|
<?php $__errorArgs = ['nip'];
|
|
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
|
if ($__bag->has($__errorArgs[0])) :
|
|
if (isset($message)) { $__messageOriginal = $message; }
|
|
$message = $__bag->first($__errorArgs[0]); ?>
|
|
<div class="form-error">
|
|
<svg class="error-icon" fill="currentColor" viewBox="0 0 20 20">
|
|
<path fill-rule="evenodd" d="M18.101 12.93a1 1 0 00-1.517-1.087L10 14.989l-6.584-3.147a1 1 0 00-1.516 1.087l1.07 9.016a1 1 0 00.995.909h11.07a1 1 0 00.995-.909l1.071-9.016z" clip-rule="evenodd" />
|
|
</svg>
|
|
<span><?php echo e($message); ?></span>
|
|
</div>
|
|
<?php unset($message);
|
|
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
|
endif;
|
|
unset($__errorArgs, $__bag); ?>
|
|
</div>
|
|
|
|
<!-- Password Field -->
|
|
<div class="form-group">
|
|
<label for="password" class="form-label">Password</label>
|
|
<div class="password-toggle">
|
|
<input
|
|
type="password"
|
|
id="password"
|
|
name="password"
|
|
class="form-input <?php $__errorArgs = ['password'];
|
|
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
|
if ($__bag->has($__errorArgs[0])) :
|
|
if (isset($message)) { $__messageOriginal = $message; }
|
|
$message = $__bag->first($__errorArgs[0]); ?> error <?php unset($message);
|
|
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
|
endif;
|
|
unset($__errorArgs, $__bag); ?>"
|
|
placeholder="Masukkan password Anda"
|
|
required
|
|
>
|
|
<button type="button" class="password-toggle-btn" onclick="togglePassword()">
|
|
<span id="toggleIcon">👁</span>
|
|
</button>
|
|
</div>
|
|
<?php $__errorArgs = ['password'];
|
|
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
|
|
if ($__bag->has($__errorArgs[0])) :
|
|
if (isset($message)) { $__messageOriginal = $message; }
|
|
$message = $__bag->first($__errorArgs[0]); ?>
|
|
<div class="form-error">
|
|
<svg class="error-icon" fill="currentColor" viewBox="0 0 20 20">
|
|
<path fill-rule="evenodd" d="M18.101 12.93a1 1 0 00-1.517-1.087L10 14.989l-6.584-3.147a1 1 0 00-1.516 1.087l1.07 9.016a1 1 0 00.995.909h11.07a1 1 0 00.995-.909l1.071-9.016z" clip-rule="evenodd" />
|
|
</svg>
|
|
<span><?php echo e($message); ?></span>
|
|
</div>
|
|
<?php unset($message);
|
|
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
|
|
endif;
|
|
unset($__errorArgs, $__bag); ?>
|
|
</div>
|
|
|
|
<!-- Remember Me -->
|
|
<div class="checkbox-group">
|
|
<input
|
|
type="checkbox"
|
|
id="remember"
|
|
name="remember"
|
|
value="1"
|
|
<?php echo e(old('remember') ? 'checked' : ''); ?>
|
|
|
|
>
|
|
<label for="remember">Ingat saya di perangkat ini</label>
|
|
</div>
|
|
|
|
<!-- Submit Button -->
|
|
<button type="submit" class="btn-submit">Login</button>
|
|
|
|
<!-- Footer Links -->
|
|
<div class="divider">atau</div>
|
|
|
|
<div class="signup-link">
|
|
Belum punya akun? <a href="javascript:void(0)">Hubungi Administrator</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function togglePassword() {
|
|
const passwordInput = document.getElementById('password');
|
|
const toggleIcon = document.getElementById('toggleIcon');
|
|
|
|
if (passwordInput.type === 'password') {
|
|
passwordInput.type = 'text';
|
|
toggleIcon.textContent = '👁🗨';
|
|
} else {
|
|
passwordInput.type = 'password';
|
|
toggleIcon.textContent = '👁';
|
|
}
|
|
}
|
|
|
|
// Auto-focus NIP input
|
|
window.addEventListener('load', function() {
|
|
const nipInput = document.getElementById('nip');
|
|
if (nipInput && !nipInput.value) {
|
|
nipInput.focus();
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|
|
<?php /**PATH F:\Sempro TA\project\Laravel\TA\resources\views/auth/login.blade.php ENDPATH**/ ?>
|