Rewrite: Next.js → ASP.NET Core 10 Razor Pages
deploy / deploy (push) Failing after 1m21s

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>
This commit is contained in:
soroush.asadi
2026-06-01 07:46:56 +03:30
parent bcea9dc2f6
commit 1b3a8b493e
111 changed files with 2409 additions and 14062 deletions
+17
View File
@@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace SoroushAsadi.Pages;
/// <summary>Base class that reads the locale cookie and exposes Locale + IsFa helpers.</summary>
public abstract class BasePageModel : PageModel
{
public string Locale { get; private set; } = "fa";
public bool IsFa => Locale == "fa";
public override void OnPageHandlerExecuting(Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutingContext context)
{
Locale = Request.Cookies["locale"] is "en" ? "en" : "fa";
ViewData["Locale"] = Locale;
base.OnPageHandlerExecuting(context);
}
}