divan/DivanRazor/Pages/Partials/DivanPage/_SimiPartialView.cshtml
Anas Rashid 532d005cdb Rename Ganjoor -> Divan throughout the code
Projects (GanjooRazor -> DivanRazor, GanjoorService.sln -> DivanService.sln), files,
folders, classes, namespaces, settings, API routes (/api/divan) and DB tables (Divan*).
External addresses (ganjoor.net, github.com/ganjoor) unchanged. Migrations renamed
consistently (no pending model changes); requires a fresh database.
Upstream RUNNING_LOCALLY/SEMANTIC_SEARCH docs archived unmodified under docs/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:49:01 +02:00

45 lines
2.6 KiB
Plaintext

@model DivanRazor.Pages._SimiPartialViewModel
@using DNTPersianUtils.Core
@{
Layout = null;
}
@for (int i = 0; i < Math.Min(20, Model.RelatedSections.Length); i++)
{
<div class="inlinesimi">
<div class="poet-pic-wrap">
<a href="@Html.Raw(Model.RelatedSections[i].FullUrl)"><img src="@(DivanRazor.APIRoot.InternetUrl + Model.RelatedSections[i].PoetImageUrl)" alt="@Model.RelatedSections[i].PoetName" /></a>
</div>
<div class="inlinesimi-poem-title">
<a href="@Html.Raw(Model.RelatedSections[i].FullUrl)">@Model.RelatedSections[i].FullTitle</a><span></span>
</div>
<div class="simitext">
@Html.Raw(Model.RelatedSections[i].HtmlExcerpt)
</div>
@if (Model.RelatedSections[i].PoetMorePoemsLikeThisCount > 0)
{
@if (Model.RelatedSections[i].PoetMorePoemsLikeThisCount > 20)
{
<a role="button" class="pagebutton" id="@($"load-more-button-{Model.RelatedSections[i].PoetId}-{Model.SectionIndex}")" href="@Html.Raw($"/simi/?v={Uri.EscapeDataString(Model.Rhythm)}&amp;g={Uri.EscapeDataString(Model.RhymeLetters)}&amp;a={Model.RelatedSections[i].PoetId}")" target="_blank">مشاهدهٔ بیش از @Model.RelatedSections[i].PoetMorePoemsLikeThisCount.ToPersianNumbers() مورد هم آهنگ دیگر از @Model.RelatedSections[i].PoetName<i class="notranslate info-buttons autorenew"></i></a>
}
else
{
<a role="button" class="pagebutton" id="@($"load-more-button-{Model.RelatedSections[i].PoetId}-{Model.SectionIndex}")" onclick="loadMoreRelatedFromPoet(@Model.RelatedSections[i].PoetId, '@Model.Rhythm', '@Model.RhymeLetters', '@Model.PoemFullUrl', '@Model.RelatedSections[i].FullUrl', @Model.SectionIndex)">مشاهدهٔ @Model.RelatedSections[i].PoetMorePoemsLikeThisCount.ToPersianNumbers() مورد هم آهنگ دیگر از @Model.RelatedSections[i].PoetName<i class="notranslate info-buttons">autorenew</i></a>
}
}
</div>
@if (Model.RelatedSections[i].PoetMorePoemsLikeThisCount > 0)
{
<div id=@($"more-related-placeholder-{Model.RelatedSections[i].PoetId}-{Model.SectionIndex}")></div>
}
}
@if (Model.RelatedSections.Length == 21)
{
<div id="load-more-related">
<a role="button" class="pagebutton" id="load-more-button" onclick="loadMoreRelatedPoems(@Model.PoemId, @(Model.Skip + 20), '@Model.Rhythm', '@Model.RhymeLetters', '@Model.PoemFullUrl', @Model.SectionIndex)">بیشتر<i class="notranslate info-buttons">autorenew</i></a>
</div>
}