divan/DivanRazor/Pages/Shared/_Layout.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

66 lines
3.5 KiB
Plaintext

@inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Antiforgery
@{
// Shared layout for public-site pages (Pages/ folder). NOT used by Areas/Admin or Areas/User,
// which have their own separate _AdminLayout / _UserPanelLayout under their own Areas/*/Pages/Shared
// folders - see Areas/Admin/Pages/_ViewStart.cshtml and Areas/User/Pages/_ViewStart.cshtml.
//
// Individual pages opt in with `Layout = "_Layout";` (root Pages/_ViewStart.cshtml still defaults
// to Layout = null, so pages that don't opt in are completely unaffected).
//
// Extension points:
// @section Head { ... } extra <meta>/<link>/<script> tags specific to one page
// @section Scripts { ... } extra end-of-body <script> blocks specific to one page
// ViewData["Title"] page <title>
//
// NOTE: ViewData["TrackingScript"] output is intentionally NOT centralized here even though it
// looked identical across pages at first glance. Several pages (FAQ, Contribs, Quotes, Hashieha,
// Tagged, Simi) only render it inside their "no LastError" branch - i.e. analytics is
// deliberately (or at least currently) skipped on error pages. A layout can't see each page's
// own LastError state, so centralizing this would make tracking fire on error pages that
// previously suppressed it. Each page keeps rendering its own TrackingScript block as before.
//
// vaabd.js WAS centralized below (confirmed byte-identical and unconditional across every main
// page). One minor, functionally-inert reordering: it used to render right before each page's
// own TrackingScript block; now it renders right after @RenderBody() finishes, which is after
// TrackingScript on any page that has one. The two scripts are unrelated (word-tooltip widget vs
// analytics), so this shouldn't matter, but flagging it since it's a real order change.
}
<!DOCTYPE html>
<html lang="ur-PK" dir="rtl">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="csrf-token" content="@Antiforgery.GetAndStoreTokens(Context).RequestToken" />
<title>@Html.Raw(ViewData["Title"])</title>
<link href="~/css/p8.css" asp-append-version="true" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<partial name="_DivanHead" />
<script src="/lib/jquery/dist/jquery.min.js"></script>
<script src="~/js/bk.js" asp-append-version="true"></script>
@* person profile / people-explorer / family-tree inline modals - global since a person's
name can turn up almost anywhere (poem pages, family tree, suggestion forms); peoplegraph.js
and familytree.js are the shared renderers PeopleExplorer.open()/FamilyTreeWindow.open() and
the category-scoped "شخصیت‌ها" tab use *@
<script src="~/js/peoplegraph.js" asp-append-version="true"></script>
<script src="~/js/familytree.js" asp-append-version="true"></script>
<script src="~/js/personwindow.js" asp-append-version="true"></script>
<script>
var cookieValue = getCookie("playerScrollLock");
var playerScrollLock = cookieValue === "true";
cookieValue = getCookie("stickyEnabled");
var stickyEnabled = cookieValue != "false";
</script>
@await RenderSectionAsync("Head", required: false)
</head>
<body>
@RenderBody()
<script src="/js/vaabd.js?version=10"></script>
<partial name="_SemanticSearchWidgetPartial" />
@await RenderSectionAsync("Scripts", required: false)
</body>
</html>