Commit Graph

4 Commits

Author SHA1 Message Date
soroush.asadi 82d9720e25 feat(analytics): admin field for Google Analytics (GA4) ID
CI/CD / CI · dotnet build (push) Successful in 1m1s
CI/CD / Deploy · drsousan (push) Successful in 25s
Adds a "Measurement ID" input under admin → Site Identity. The value
is stored as identity/ga_id (existing bulk-settings endpoint, no API
change). When set, _Layout injects the GA4 gtag.js snippet into <head>
on every page (home, blog, gallery, posts). Empty value = disabled.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 15:33:03 +03:30
soroush.asadi 1e51df406b fix: cropper mime bug + loadSiteIdentity crash + logo|name header
CI/CD / CI · dotnet build (push) Successful in 37s
CI/CD / Deploy · drsousan (push) Successful in 29s
1. applyCrop() — mime variable was declared INSIDE toBlob callback
   but used as an argument to toBlob() (outer scope) → ReferenceError.
   Fix: declare _mime, _quality, _ext BEFORE out.toBlob() call.

2. loadSiteIdentity() — crashed when identity section had no rows
   (data was null/non-array). Fix: safe Array.isArray guard + catch.

3. Header logo: show logo image + | + site name side by side
   when logo is configured (was showing one OR the other).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-02 18:15:51 +03:30
soroush.asadi e79ccf7e8c feat: logo and favicon management in admin panel
CI/CD / CI · dotnet build (push) Successful in 41s
CI/CD / Deploy · drsousan (push) Successful in 29s
Admin panel:
- New 'هویت سایت' page under تنظیمات in sidebar
- Upload logo (PNG transparent, 200×60px recommended)
- Upload favicon (PNG/ICO, 32×32 or 64×64px)
- Live preview panel shows how logo looks in header
  and how favicon looks in a browser tab mockup
- Saved to SiteSettings with section='identity', key='logo'/'favicon'

Frontend (_Layout.cshtml):
- Injects AppDbContext to load identity settings per request
- If logo is set: shows <img> in header instead of text
- If favicon is set: uses uploaded file as <link rel="icon">
- Falls back to text / favicon.ico when not configured

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-06-02 17:47:49 +03:30
soroush.asadi 96e73bf633 first commit
CI/CD / CI · dotnet build (push) Failing after 0s
CI/CD / Deploy · drsousan (push) Has been skipped
2026-05-31 00:42:08 +03:30