login.html

67 lines
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
<!DOCTYPE html>
<html lang="en" data-theme="light">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login — Congo Dev</title>
    <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect width='100' height='100' rx='20' fill='%234f46e5'/><path d='M50 20L20 35v30l30 15 30-15V35z' fill='none' stroke='white' stroke-width='6' stroke-linejoin='round'/><path d='M50 50L20 35M50 50v30M50 50l30-15' fill='none' stroke='white' stroke-width='4' stroke-linecap='round'/></svg>" />
    <link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" />
    <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
    <script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.8/dist/htmx.min.js"></script>
    <style>
        body {
            background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 25%, #f1f5f9 50%, #ede9fe 75%, #eef2ff 100%);
            background-size: 400% 400%;
            animation: gradient-shift 15s ease infinite;
        }
        @keyframes gradient-shift {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        @keyframes fade-up {
            from { opacity: 0; transform: translateY(1rem); }
            to { opacity: 1; transform: translateY(0); }
        }
        .fade-up { animation: fade-up 0.5s ease-out; }
        @keyframes logo-pulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.3); }
            50% { box-shadow: 0 0 0 8px rgba(79, 70, 229, 0); }
        }
        .logo-glow { animation: logo-pulse 3s ease-in-out infinite; }
    </style>
</head>
<body class="min-h-screen flex items-center justify-center p-4">
    <div class="w-full max-w-sm fade-up">
        <div class="bg-white/80 backdrop-blur-xl rounded-2xl border border-white/60 shadow-xl shadow-indigo-500/5 p-8">
            <div class="text-center mb-7">
                <div class="inline-flex items-center justify-center w-14 h-14 rounded-2xl bg-indigo-600 mb-4 logo-glow">
                    <svg xmlns="http://www.w3.org/2000/svg" class="w-7 h-7 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4" /></svg>
                </div>
                <h1 class="text-xl font-bold text-slate-800">Congo Dev</h1>
                <p class="text-xs text-slate-400 mt-1">Sign in to your workbench</p>
            </div>

            {{if auth.HasError}}
            <div class="rounded-lg bg-red-50 border border-red-100 px-3 py-2.5 text-[12px] text-red-600 mb-4 flex items-center gap-2">
                <svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" /></svg>
                Invalid username or password
            </div>
            {{end}}

            <form method="POST" action="/login" class="space-y-4">
                <div class="floating-label">
                    <span>Username</span>
                    <input type="text" name="username" class="input input-bordered w-full" placeholder="admin" required autocomplete="username" autofocus />
                </div>
                <div class="floating-label">
                    <span>Password</span>
                    <input type="password" name="password" class="input input-bordered w-full" placeholder="********" required autocomplete="current-password" />
                </div>
                <button type="submit" class="btn btn-primary w-full mt-2">Sign In</button>
            </form>
        </div>
        <p class="text-center text-[10px] text-slate-300 mt-4">Development Workbench</p>
    </div>
</body>
</html>