Files
soroushasadi/Pages/Admin/Login.cshtml
T
soroush.asadi 1b3a8b493e
deploy / deploy (push) Failing after 1m21s
Rewrite: Next.js → ASP.NET Core 10 Razor Pages
Full rewrite of the portfolio site from Next.js 14 to .NET 10:

- ASP.NET Core 10 Razor Pages, no Node.js dependency
- EF Core 10 + SQLite (same schema as before — data survives upgrade)
- Cookie authentication (same single-password model)
- Resend contact form via HttpClient
- Bilingual FA/EN via locale cookie + BasePageModel
- All UI ported to Razor Pages with Tailwind CDN + custom CSS
- Vanilla JS: particles, typewriter, cursor, animations, portfolio modal
- Dockerfile: SDK 10.0-alpine → aspnet 10.0-alpine (no npm/Node needed)
- CI/CD: dropped NPM_TOKEN, ADMIN_SESSION_SECRET — pure dotnet publish

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 07:46:56 +03:30

30 lines
1.1 KiB
Plaintext

@page "/Admin/Login"
@model SoroushAsadi.Pages.Admin.LoginModel
@{
Layout = "_AdminLayout";
ViewData["Title"] = "Sign in";
}
<div class="flex min-h-[60vh] items-center justify-center">
<div class="w-full max-w-sm">
<div class="mb-8 text-center">
<img src="/logo-mark.svg" alt="" width="40" height="40" class="mx-auto mb-4" />
<h1 class="font-display text-2xl font-bold text-white">Admin sign in</h1>
</div>
@if (!string.IsNullOrEmpty(Model.Error))
{
<div class="mb-4 rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-400">@Model.Error</div>
}
<form method="post" class="glass p-6 space-y-4">
<div>
<label class="label-mono mb-2 block" for="password">Password</label>
<input id="password" name="password" type="password" required autofocus
class="w-full rounded-xl border border-white/10 bg-white/[.03] px-4 py-3 text-sm text-white outline-none focus:border-electric/60 transition-colors" />
</div>
<button type="submit" class="btn-primary w-full justify-center">Sign in</button>
</form>
</div>
</div>