Fix useless bare-divar.ir links + hide empty homepage shifts section
- Divar listings with no extractable post token were given SourceUrl «https://divar.ir» — a link that just opens Divar''s homepage, not the ad. Store null instead, and guard the contact-modal fallback to require a real path (so existing bare-domain links stop being offered too). - Homepage «جدیدترین شیفتها»: only render when there are real open shifts. Almost all aggregated ads are ongoing hiring (jobs), not dated shifts, so the section was showing a fabricated shift date (the «۱۸ خرداد» on the welcome page). Now it hides when empty. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -53,27 +53,25 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<div class="section-head">
|
||||
<h2>جدیدترین شیفتها</h2>
|
||||
<a href="/Shifts">مشاهده همه ←</a>
|
||||
</div>
|
||||
@if (Model.LatestShifts.Count == 0)
|
||||
{
|
||||
<div class="empty-state">فعلاً شیفت بازی ثبت نشده است.</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
@* Shifts are rare for aggregated content (most ads are ongoing hiring, not dated shifts) — only
|
||||
show the section when there are real open shifts, so we never display a fabricated/empty date. *@
|
||||
@if (Model.LatestShifts.Count > 0)
|
||||
{
|
||||
<section class="section">
|
||||
<div class="container">
|
||||
<div class="section-head">
|
||||
<h2>جدیدترین شیفتها</h2>
|
||||
<a href="/Shifts">مشاهده همه ←</a>
|
||||
</div>
|
||||
<div class="grid grid-3">
|
||||
@foreach (var s in Model.LatestShifts)
|
||||
{
|
||||
<partial name="_ShiftCard" model="s" />
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
}
|
||||
|
||||
@if (Model.LatestJobs.Count > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user