divan/DiwanRazor/Pages/Partials/DiwanPage/_SimiPartialView.cshtml
Anas Rashid eb0a353cf2 Urdu public pages (#2); hide unconfigured semantic search; safe defaults
- translate reading-path views (poet, category, poem, search, header, login, partials)
  from Persian to Urdu (exact-run dictionary, 262 strings; AI-summary data marker kept)
- semantic search widget only when SemanticSearchAPIRoot is configured
- appsettings defaults: no Ganjoor tracking script, no Ganjoor semantic search,
  API/site roots default to the local Diwan stack instead of api.ganjoor.net

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 00:18:00 +02:00

45 lines
2.6 KiB
Plaintext

@model DiwanRazor.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="@(DiwanRazor.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>
}