45 lines
2.5 KiB
Plaintext
45 lines
2.5 KiB
Plaintext
@model GanjooRazor.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="@(GanjooRazor.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)}&g={Uri.EscapeDataString(Model.RhymeLetters)}&a={Model.RelatedSections[i].PoetId}")" target="_blank">مشاهدهٔ بیش از @Model.RelatedSections[i].PoetMorePoemsLikeThisCount.ToPersianNumbers() مورد هم آهنگ دیگر از @Model.RelatedSections[i].PoetName<i class="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="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="info-buttons">autorenew</i></a>
|
|
</div>
|
|
}
|