- home page is public: no redirect to login/admin import; flat poet list until century groups exist (upstream needed a pinned 'popular poets' group, which Divan never has, so the home page always redirected); public 'being prepared' notice when there are no poets - Naskh is the default font, Nastaliq the option (site and static reader) - poet/writer photos hidden everywhere (CSS on /poet/image/), poet page photos tab removed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
258 lines
11 KiB
Plaintext
258 lines
11 KiB
Plaintext
@page
|
||
@model IndexModel
|
||
@using DNTPersianUtils.Core
|
||
@{
|
||
Layout = "_Layout";
|
||
}
|
||
|
||
@section Head {
|
||
<meta name="description" content="اردو کی کلاسیکی شاعری اور نثر">
|
||
}
|
||
|
||
@if (Model.OfflineMode)
|
||
{
|
||
<div class="notice">
|
||
<p>
|
||
آپ دیوان کا آف لائن نسخہ دیکھ رہے ہیں.
|
||
</p>
|
||
<p>
|
||
یہ دیوان کا پرانی معلومات والا آف لائن نسخہ ہے.
|
||
</p>
|
||
<p>
|
||
انٹرنیٹ پر منحصر کچھ سہولتیں ہٹا دی گئی ہیں اور کچھ شاید ٹھیک کام نہ کریں.
|
||
</p>
|
||
<p>
|
||
رکنیت اور حاشیہ لکھنے کی سہولت بند ہے؛ یہاں درج کی گئی کوئی بھی چیز محفوظ نہیں رہے گی.
|
||
</p>
|
||
<p>
|
||
دیوان کا تازہ نسخہ انٹرنیٹ پر دستیاب ہے.
|
||
</p>
|
||
</div>
|
||
}
|
||
else if (Model.ReadOnlyMode)
|
||
{
|
||
<div class="notice">
|
||
<p>
|
||
دیوان اس وقت صرف پڑھنے کے لیے دستیاب ہے۔
|
||
</p>
|
||
<p>
|
||
رکنیت اور حاشیہ لکھنے کی سہولت فی الحال بند ہے؛ یہاں درج کی گئی کوئی بھی چیز محفوظ نہیں رہے گی۔
|
||
</p>
|
||
</div>
|
||
}
|
||
|
||
@if (!string.IsNullOrEmpty(Model.LastError))
|
||
{
|
||
<div class="poem">
|
||
@Model.LastError
|
||
</div>
|
||
}
|
||
else
|
||
{
|
||
<div id="hdr">
|
||
<h1><a href="/" title="دیوان" class="divan-wordmark">دیوان</a></h1>
|
||
</div>
|
||
|
||
<div id="fa">
|
||
|
||
<div class="actionbox">
|
||
<form action="/search" method="get" id="searchhorm">
|
||
<span class="home-search-input-wrap">
|
||
<input type="text" name="s" id="s" placeholder="تلاش" class="inputText" size="35" value="" oninput="onHomeSearchInput(this.value)">
|
||
<span id="home-search-clear" class="home-search-clear" style="display:none" title="صاف کریں" onclick="clearHomeSearch()">×</span>
|
||
</span>
|
||
<input type="hidden" name="es" id="es" value="1">
|
||
<select name="author" id="author">
|
||
<option value="0" selected>تمام شعرا کے کلام میں</option>
|
||
@{
|
||
foreach (RMuseum.Models.Divan.ViewModels.DivanPoetViewModel poet in Model.Poets ?? new())
|
||
{
|
||
<option value="@poet.Id">@poet.Nickname</option>
|
||
}
|
||
}
|
||
</select>
|
||
<input type="submit" value="تلاش کریں">
|
||
</form>
|
||
</div>
|
||
|
||
<div class="spacer" id="home-found-poets" style="display:none"></div>
|
||
<p class="up-hint" id="home-search-hint" style="display:none"><small>متن میں تلاش کے لیے «تلاش کریں» دبائیں؛ نیچے کی فہرست صرف شعرا اور کتابوں کے ناموں میں تلاش کا نتیجہ ہے۔</small></p>
|
||
|
||
<partial name="_InlineLoginPartial" model="Model" />
|
||
|
||
<div id="main">
|
||
<div id="guides">
|
||
|
||
@if (Model.PoetGroups != null && Model.PoetGroups.Any(g => g.Id == 0))
|
||
{
|
||
<div id="home-popular-poets-row">
|
||
<div class="century">
|
||
مقبول شعرا
|
||
</div>
|
||
|
||
@{
|
||
var popularGroup = Model.PoetGroups.Where(g => g.Id == 0).Single();
|
||
|
||
if (popularGroup.ShowInTimeLine)
|
||
{
|
||
<div class="century">
|
||
@popularGroup.Name
|
||
</div>
|
||
}
|
||
<div class="spacer">
|
||
@foreach (var poet in popularGroup.Poets)
|
||
{
|
||
<div class="poet" data-value="@poet.Nickname">
|
||
<a href="@poet.FullUrl" title="@poet.Name">
|
||
<img src="@(DivanRazor.APIRoot.InternetUrl+poet.ImageUrl)" alt="@poet.Name">
|
||
</a>
|
||
<div class="caption">
|
||
<a href="@poet.FullUrl">@poet.Nickname</a>
|
||
</div>
|
||
</div>
|
||
}
|
||
</div>
|
||
}
|
||
</div>
|
||
}
|
||
|
||
@if (Model.NoContentYet)
|
||
{
|
||
<div class="notice">
|
||
<p>دیوان کا مواد تیار کیا جا رہا ہے۔ براہِ کرم کچھ دیر بعد دوبارہ تشریف لائیں۔</p>
|
||
@if (Model.LoggedIn)
|
||
{
|
||
<p><a href="/Admin/PublicDataImport">مواد درآمد کریں</a></p>
|
||
}
|
||
</div>
|
||
}
|
||
else if (!Model.PoetGroups.Any(g => g.Id != 0))
|
||
{
|
||
@* century groups are rebuilt when an import finishes; until then list all poets *@
|
||
<div class="century">شعرا</div>
|
||
<div class="spacer">
|
||
@foreach (var poet in Model.Poets)
|
||
{
|
||
<div class="poet" data-value="@poet.Nickname">
|
||
<div class="caption">
|
||
<a href="@poet.FullUrl">@poet.Nickname</a>
|
||
</div>
|
||
</div>
|
||
}
|
||
</div>
|
||
}
|
||
else
|
||
{
|
||
<div class="century" id="cl">
|
||
صدیوں کے لحاظ سے
|
||
</div>
|
||
|
||
<div id="real-centuries">
|
||
<div class="circled-number-container">
|
||
@foreach (var g in Model.PoetGroups)
|
||
{
|
||
if (g.Id != 0)
|
||
{
|
||
<a href="#pg-@g.Id">
|
||
<div class="circled-number">
|
||
@((g.HalfCenturyOrder + 2).ToPersianNumbers())
|
||
</div>
|
||
</a>
|
||
}
|
||
}
|
||
<a href="#gmap">
|
||
<div class="circled-number">
|
||
<i class="notranslate noindent-info-button map-icon"></i>
|
||
</div>
|
||
</a>
|
||
</div>
|
||
|
||
@foreach (var poetGroup in Model.PoetGroups)
|
||
{
|
||
if (poetGroup.Id == 0) continue;
|
||
if (poetGroup.ShowInTimeLine)
|
||
{
|
||
<div class="century" id="pg-@poetGroup.Id">
|
||
@poetGroup.Name
|
||
</div>
|
||
}
|
||
<div class="spacer">
|
||
@foreach (var poet in poetGroup.Poets)
|
||
{
|
||
<div class="poet" data-value="@poet.Nickname">
|
||
<a href="@poet.FullUrl" title="@poet.Name">
|
||
<img src="@(DivanRazor.APIRoot.InternetUrl+poet.ImageUrl)" alt="@poet.Name">
|
||
</a>
|
||
<div class="caption">
|
||
<a href="@poet.FullUrl">@poet.Nickname</a>
|
||
</div>
|
||
</div>
|
||
}
|
||
</div>
|
||
@if (poetGroup.Id == 0)
|
||
{
|
||
<div class="century" id="cl">
|
||
صدیوں کے لحاظ سے
|
||
</div>
|
||
<div class="circled-number-container">
|
||
@foreach (var g in Model.PoetGroups)
|
||
{
|
||
if (g.Id != 0)
|
||
{
|
||
<a href="#pg-@g.Id">
|
||
<div class="circled-number">
|
||
@((g.HalfCenturyOrder + 2).ToPersianNumbers())
|
||
</div>
|
||
</a>
|
||
}
|
||
}
|
||
</div>
|
||
}
|
||
}
|
||
</div>
|
||
}
|
||
|
||
|
||
|
||
<div class="century" id="gmap">
|
||
<a href="/map">
|
||
شعرا کی جائے پیدائش کا نقشہ
|
||
</a>
|
||
</div>
|
||
<div class="spacer">
|
||
<div class="poet">
|
||
<a href="/map"><img src="/image/map.gif" alt="دیوان کا نقشہ"></a>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="century" id="books-shelf-caption">
|
||
کتابوں کی الماری
|
||
</div>
|
||
<div id="books-shelf-outer">
|
||
<button type="button" class="books-shelf-handle books-shelf-handle-right" aria-label="دائیں جانب مزید کتابیں" onclick="scrollBooksShelf(220)">‹</button>
|
||
<div id="books-shelf-wrap">
|
||
<div id="books-shelf" aria-label="کتابوں کی الماری"></div>
|
||
</div>
|
||
<button type="button" class="books-shelf-handle books-shelf-handle-left" aria-label="بائیں جانب مزید کتابیں" onclick="scrollBooksShelf(-220)">›</button>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<partial name="_FooterPartial" model=@(new _FooterPartialModel(){StickyEnabled = true}) />
|
||
|
||
</div>
|
||
}
|
||
|
||
@if (ViewData["TrackingScript"] != null && !string.IsNullOrEmpty(ViewData["TrackingScript"].ToString()))
|
||
{
|
||
@Html.Raw(ViewData["TrackingScript"])
|
||
}
|
||
|
||
@section Scripts {
|
||
<script>
|
||
initHomeBooksShelf();
|
||
</script>
|
||
}
|