44 lines
2.5 KiB
PHP
44 lines
2.5 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title><?php echo APP_NAME; ?> - Login</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
|
|
<?php $themeSection = 'head'; include __DIR__ . '/partials/theme.php'; ?>
|
|
</head>
|
|
<body class="theme-page min-h-screen flex items-center justify-center">
|
|
<div class="theme-surface p-8 rounded-lg shadow-md w-full max-w-md">
|
|
<h1 class="text-3xl font-bold theme-text mb-6 text-center"><?php echo APP_NAME; ?></h1>
|
|
|
|
<?php if (isset($_SESSION['error'])): ?>
|
|
<div class="border px-4 py-3 rounded mb-4" style="background-color: #fee2e2; background-color: color-mix(in srgb, #ef4444 14%, var(--theme-surface)); border-color: #fca5a5; border-color: color-mix(in srgb, #ef4444 40%, var(--theme-border)); color: #7f1d1d; color: var(--theme-text);">
|
|
<?php echo htmlspecialchars($_SESSION['error']); unset($_SESSION['error']); ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if (isset($_SESSION['success'])): ?>
|
|
<div class="border px-4 py-3 rounded mb-4" style="background-color: #dcfce7; background-color: color-mix(in srgb, #22c55e 14%, var(--theme-surface)); border-color: #86efac; border-color: color-mix(in srgb, #22c55e 40%, var(--theme-border)); color: #14532d; color: var(--theme-text);">
|
|
<?php echo htmlspecialchars($_SESSION['success']); unset($_SESSION['success']); ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<form method="POST" action="<?php echo url('/login'); ?>" class="space-y-4">
|
|
<div>
|
|
<label for="password" class="block text-sm font-medium theme-text mb-1">Password</label>
|
|
<input type="password" id="password" name="password" required autofocus
|
|
class="w-full px-3 py-2 border border-gray-300 theme-input theme-border rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
|
|
placeholder="Enter your password">
|
|
</div>
|
|
|
|
<button type="submit"
|
|
class="w-full bg-blue-600 hover:bg-blue-700 text-white font-semibold py-2 px-4 rounded-md transition duration-200">
|
|
Login
|
|
</button>
|
|
</form>
|
|
</div>
|
|
<?php $themeSection = 'body'; include __DIR__ . '/partials/theme.php'; ?>
|
|
</body>
|
|
</html>
|