feat: create login page
parent
9f31b09ea6
commit
8b0e6ce600
|
|
@ -0,0 +1,18 @@
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace BpsRwApp.Controllers
|
||||||
|
{
|
||||||
|
public class AuthController : Controller
|
||||||
|
{
|
||||||
|
public IActionResult Login()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public IActionResult Login(string email, string password)
|
||||||
|
{
|
||||||
|
return RedirectToAction("Index", "Dashboard");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,118 @@
|
||||||
|
@{
|
||||||
|
Layout = "~/Views/Shared/Layouts/Auth/_Layouts.cshtml";
|
||||||
|
ViewData["Title"] = "Login";
|
||||||
|
}
|
||||||
|
|
||||||
|
<div class="min-h-screen flex overflow-hidden">
|
||||||
|
<div class="w-full md:w-1/2 bg-white flex flex-col">
|
||||||
|
|
||||||
|
<!-- Images -->
|
||||||
|
<div class="px-8 pt-8">
|
||||||
|
<img src="/images/logo.png" alt="Logo" class="h-14 w-auto" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex-1 flex items-center justify-center px-8">
|
||||||
|
<div class="w-full max-w-[420px]">
|
||||||
|
<h1 class="text-3xl font-bold text-gray-900 mb-2">Selamat Datang</h1>
|
||||||
|
<p class="text-sm text-gray-600 mb-8">
|
||||||
|
Masuk dengan akun DLH untuk melanjutkan.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<form method="post" action="/Dashboard/Index">
|
||||||
|
|
||||||
|
<!-- Email Input -->
|
||||||
|
<div class="mb-5">
|
||||||
|
<label class="block text-sm font-medium text-gray-700 mb-2">
|
||||||
|
NIK (No. KTP) / Email
|
||||||
|
</label>
|
||||||
|
<div class="relative w-full">
|
||||||
|
<span class="icon icon-fill text-gray-400 absolute left-4 top-1/2 -translate-y-1/2">mail</span>
|
||||||
|
<input
|
||||||
|
name="email"
|
||||||
|
type="text"
|
||||||
|
placeholder="Masukkan NIK (No. KTP) / Email"
|
||||||
|
class="w-full h-12 pl-12 pr-4 text-sm text-gray-900 bg-white border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-transparent placeholder:text-gray-500"
|
||||||
|
required />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Password Input -->
|
||||||
|
<div class="mb-5">
|
||||||
|
<label class="block text-sm font-medium text-gray-700 mb-2">
|
||||||
|
Password
|
||||||
|
</label>
|
||||||
|
<div class="relative w-full">
|
||||||
|
<span class="icon icon-fill text-gray-400 absolute left-4 top-1/2 -translate-y-1/2">lock</span>
|
||||||
|
<input
|
||||||
|
id="passwordInput"
|
||||||
|
name="password"
|
||||||
|
type="password"
|
||||||
|
placeholder="************"
|
||||||
|
class="w-full h-12 pl-12 pr-12 text-sm text-gray-900 bg-white border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-transparent placeholder:text-gray-500"
|
||||||
|
required />
|
||||||
|
<span
|
||||||
|
id="togglePassword"
|
||||||
|
class="icon icon-fill text-gray-400 absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer">
|
||||||
|
visibility_off
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Remember Me -->
|
||||||
|
<div class="flex items-center mb-6">
|
||||||
|
<input
|
||||||
|
id="remember"
|
||||||
|
name="remember"
|
||||||
|
type="checkbox"
|
||||||
|
class="w-4 h-4 text-green-600 bg-white border-2 border-gray-300 rounded focus:ring-2 focus:ring-green-500 checked:bg-green-600 checked:border-green-600" />
|
||||||
|
<label for="remember" class="ml-2 text-sm text-gray-700 cursor-pointer">
|
||||||
|
Ingat saya
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Login Button -->
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="btn btn-primary w-full h-12 text-white font-semibold rounded-full normal-case">
|
||||||
|
Login
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<div class="py-6 text-center">
|
||||||
|
<p class="text-xs text-gray-500">
|
||||||
|
© 2025 Dinas Lingkungan Hidup DKI Jakarta
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Image -->
|
||||||
|
<div class="hidden md:block md:w-1/2 relative bg-gray-100">
|
||||||
|
<img
|
||||||
|
src="/images/truck.png"
|
||||||
|
alt="DLH Truck"
|
||||||
|
class="w-full h-full object-cover" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.getElementById('togglePassword').addEventListener('click', function() {
|
||||||
|
const passwordInput = document.getElementById('passwordInput');
|
||||||
|
const icon = this;
|
||||||
|
|
||||||
|
if (passwordInput.type === 'password') {
|
||||||
|
passwordInput.type = 'text';
|
||||||
|
icon.textContent = 'visibility';
|
||||||
|
} else {
|
||||||
|
passwordInput.type = 'password';
|
||||||
|
icon.textContent = 'visibility_off';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
|
||||||
|
<title>@ViewData["Title"] - Login</title>
|
||||||
|
|
||||||
|
<!-- Google Fonts -->
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- Material Symbols Icons -->
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
|
||||||
|
|
||||||
|
<!-- CSS -->
|
||||||
|
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="min-h-screen bg-gray-100 overflow-hidden">
|
||||||
|
@RenderBody()
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 13 MiB |
Loading…
Reference in New Issue