divan/DiwanRazor/Pages/Index.cshtml
Anas Rashid 020b010483 Urdu public pages, batch 2 (#2): auth, errors, map, FAQ, similar poems, people pages, page titles
- translate remaining public views and page-model strings (titles, messages, relation names)
- Urdu stopword list for word-frequency stats (replaces Persian list)
- error pages: drop list of alternative Ganjoor services

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

229 lines
9.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@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="diwan-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.Diwan.ViewModels.DiwanPoetViewModel poet in Model.Poets)
{
<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">
<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="@(DiwanRazor.APIRoot.InternetUrl+poet.ImageUrl)" alt="@poet.Name">
</a>
<div class="caption">
<a href="@poet.FullUrl">@poet.Nickname</a>
</div>
</div>
}
</div>
}
</div>
@{
<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="@(DiwanRazor.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>
}