Files
stepview/views/admin/login.ejs
T
2026-04-22 15:47:27 -05:00

67 lines
3.1 KiB
Plaintext

<%- include('../partials/head', { title: 'Sign In' }) %>
<div class="min-h-screen flex items-center justify-center px-4">
<div class="w-full max-w-sm">
<!-- Logo / Brand -->
<div class="text-center mb-8">
<% if (brand.brand_logo_path) { %>
<img src="/brand/logo" alt="<%= brand.brand_name %>" class="h-12 w-auto mx-auto mb-4 object-contain" />
<% } else { %>
<div class="inline-flex items-center justify-center w-12 h-12 rounded-xl btn-accent mb-4">
<svg class="w-6 h-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M21 7.5l-9-5.25L3 7.5m18 0l-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9" />
</svg>
</div>
<% } %>
<h1 class="text-xl font-semibold text-white"><%= brand.brand_name %></h1>
<p class="text-sm text-gray-500 mt-1">Admin</p>
</div>
<!-- Card -->
<div class="bg-surface-900 border border-gray-800 rounded-2xl p-8 shadow-2xl">
<h2 class="text-base font-semibold text-white mb-6">Sign in to continue</h2>
<% if (error) { %>
<div class="mb-5 flex items-start gap-3 bg-red-500/10 border border-red-500/30 rounded-lg px-4 py-3">
<svg class="w-4 h-4 text-red-400 mt-0.5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" />
</svg>
<p class="text-sm text-red-400"><%= error %></p>
</div>
<% } %>
<form method="POST" action="/admin/login" class="space-y-4">
<input type="hidden" name="next" value="<%= next %>" />
<div>
<label class="block text-xs font-medium text-gray-400 mb-1.5" for="username">Username</label>
<input
id="username" name="username" type="text"
autocomplete="username" required
class="w-full bg-surface-800 border border-gray-700 rounded-lg px-3.5 py-2.5 text-sm text-white placeholder-gray-600 focus:outline-none focus:border-accent focus:ring-1 ring-accent transition-colors"
placeholder="admin"
/>
</div>
<div>
<label class="block text-xs font-medium text-gray-400 mb-1.5" for="password">Password</label>
<input
id="password" name="password" type="password"
autocomplete="current-password" required
class="w-full bg-surface-800 border border-gray-700 rounded-lg px-3.5 py-2.5 text-sm text-white placeholder-gray-600 focus:outline-none focus:border-accent focus:ring-1 ring-accent transition-colors"
placeholder="••••••••"
/>
</div>
<button type="submit" class="w-full btn-accent text-white rounded-lg px-4 py-2.5 text-sm font-semibold transition-all mt-2">
Sign in
</button>
</form>
</div>
</div>
</div>
</body>
</html>