From b3c4615bc73ea9ca6a761f2bda03df2385a042dc Mon Sep 17 00:00:00 2001 From: "soroush.asadi" Date: Tue, 2 Jun 2026 15:15:06 +0330 Subject: [PATCH] fix: replace emoji with hero image in blog sidebar doctor card - Post.cshtml.cs: load hero image, tag from SiteSettings in SetViewDataAsync - Post.cshtml: show with hero image in .doc-avatar when set, fall back to emoji only if no image is configured - .doc-avatar: circular crop with object-fit:cover, gold border - doc-title now uses HeroTag from settings (not hardcoded) Co-Authored-By: Claude Sonnet 4.5 --- DrSousan.Api/Pages/Blog/Post.cshtml | 17 ++++++++++++++--- DrSousan.Api/Pages/Blog/Post.cshtml.cs | 9 ++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/DrSousan.Api/Pages/Blog/Post.cshtml b/DrSousan.Api/Pages/Blog/Post.cshtml index b1d5bee..e34e80f 100644 --- a/DrSousan.Api/Pages/Blog/Post.cshtml +++ b/DrSousan.Api/Pages/Blog/Post.cshtml @@ -99,7 +99,9 @@ .recent-title:hover{color:var(--gold)} .recent-date{font-size:.73rem;color:var(--light);margin-top:.2rem} .doctor-card{text-align:center} - .doc-avatar{width:80px;height:80px;border-radius:50%;background:var(--gold-pale);margin:0 auto .8rem;display:flex;align-items:center;justify-content:center;font-size:2rem} + .doc-avatar{width:90px;height:90px;border-radius:50%;background:var(--gold-pale);margin:0 auto .8rem;overflow:hidden;border:3px solid var(--gold)} + .doc-avatar img{width:100%;height:100%;object-fit:cover;object-position:top} + .doc-avatar-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:2.2rem} .doc-name{font-size:.95rem;font-weight:700;color:var(--dark)} .doc-title{font-size:.78rem;color:var(--light);margin:.2rem 0 .8rem} .doc-btn{background:var(--gold);color:#fff;padding:.5rem 1.2rem;border-radius:50px;font-family:'Vazirmatn',sans-serif;font-size:.82rem;border:none;cursor:pointer;width:100%;text-decoration:none;display:block;text-align:center} @@ -254,9 +256,18 @@