Poet/category tables of contents after import; Divan wordmark instead of Ganjoor logo
- public data import ran with empty HtmlText for poet/category pages (upstream fills it with a separate admin TOC job), so poet pages showed no works; the import now regenerates tables of contents for the importing user - replace Ganjoor's logo image (gdap/gdapk) with the Divan wordmark on all pages; delete it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5f2b779e89
commit
4a1d2e0642
@ -18,7 +18,7 @@
|
||||
</head>
|
||||
<body class="bk-background">
|
||||
<div id="hdr">
|
||||
<h1><a href="/" title="دیوان"><img src="/image/gdap.png" alt="دیوان" style="width:auto;margin:auto;" /></a></h1>
|
||||
<h1><a href="/" title="دیوان"><span class="divan-wordmark divan-wordmark--sm">دیوان</span></a></h1>
|
||||
</div>
|
||||
<div id="login">
|
||||
<div id="login-container">
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
</head>
|
||||
<body class="bk-background">
|
||||
<div id="hdr">
|
||||
<h1><a href="/" title="دیوان"><img src="/image/gdap.png" alt="دیوان" style="width:auto;margin:auto;" /></a></h1>
|
||||
<h1><a href="/" title="دیوان"><span class="divan-wordmark divan-wordmark--sm">دیوان</span></a></h1>
|
||||
</div>
|
||||
<div id="login">
|
||||
<div id="main">
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
</head>
|
||||
<body class="bk-background">
|
||||
<div id="hdr">
|
||||
<h1><a href="/" title="دیوان"><img src="/image/gdap.png" alt="دیوان" style="width:auto;margin:auto;" /></a></h1>
|
||||
<h1><a href="/" title="دیوان"><span class="divan-wordmark divan-wordmark--sm">دیوان</span></a></h1>
|
||||
</div>
|
||||
<div id="login">
|
||||
<div id="main">
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
|
||||
<body>
|
||||
<div id="hdr">
|
||||
<h1><a href="/" title="دیوان"><img src="/image/gdap.png" alt="دیوان" style="width:auto;margin:auto;" /></a></h1>
|
||||
<h1><a href="/" title="دیوان"><span class="divan-wordmark divan-wordmark--sm">دیوان</span></a></h1>
|
||||
</div>
|
||||
|
||||
<h1 class="text-danger">غیر متوقع خرابی</h1>
|
||||
|
||||
@ -108,7 +108,7 @@
|
||||
<h1>
|
||||
@if (Model.Poet == null)
|
||||
{
|
||||
<a href="/photos" title="چهرههای دیوان"><img src="/image/gdap.png" alt="@ViewData["Title"]" class="home-logo" /></a>
|
||||
<a href="/photos" title="چهرههای دیوان"><span class="divan-wordmark divan-wordmark--sm">دیوان</span></a>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -421,7 +421,7 @@
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" asp-area="" asp-page="/Index" title="دیوان"><img src="/image/gdapk.png" alt="دیوان" style="width:auto;margin:auto;" /></a>
|
||||
<a class="navbar-brand" asp-area="" asp-page="/Index" title="دیوان"><span class="divan-wordmark divan-wordmark--sm">دیوان</span></a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
|
||||
aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
@model DivanRazor.Pages._SearchHeaderPartialModel
|
||||
<div id="hdr2" class="clearfix">
|
||||
<h1><a href="/" title="دیوان"><img src="/image/gdapk.png" alt="دیوان" /></a></h1>
|
||||
<h1><a href="/" title="دیوان"><span class="divan-wordmark divan-wordmark--sm">دیوان</span></a></h1>
|
||||
<div class="actionbox">
|
||||
<form action="/search" method="get" id="searchform">
|
||||
<input type="text" name="s" id="s" class="inputText" value="@Model.SearchQuery" placeholder="تلاش" />
|
||||
|
||||
@ -87,7 +87,7 @@
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" asp-area="" asp-page="/Index" title="دیوان"><img src="/image/gdapk.png" alt="دیوان" style="width:auto;margin:auto;" /></a>
|
||||
<a class="navbar-brand" asp-area="" asp-page="/Index" title="دیوان"><span class="divan-wordmark divan-wordmark--sm">دیوان</span></a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
|
||||
aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
<body>
|
||||
<div id="hdr">
|
||||
<h1><a href="/" title="دیوان"><img src="/image/gdap.png" alt="دیوان" style="width:auto;margin:auto;" /></a></h1>
|
||||
<h1><a href="/" title="دیوان"><span class="divan-wordmark divan-wordmark--sm">دیوان</span></a></h1>
|
||||
</div>
|
||||
|
||||
<h1 class="text-danger">نہیں ملا ....</h1>
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
<body>
|
||||
<div id="hdr">
|
||||
<h1><a href="/" title="دیوان"><img src="/image/gdap.png" alt="دیوان" style="width:auto;margin:auto;" /></a></h1>
|
||||
<h1><a href="/" title="دیوان"><span class="divan-wordmark divan-wordmark--sm">دیوان</span></a></h1>
|
||||
</div>
|
||||
|
||||
<h1 class="text-danger">دیوان کی تازہ کاری جاری ہے</h1>
|
||||
|
||||
@ -56,3 +56,8 @@ h1, h2, h3, .century, .caption a {
|
||||
background: var(--card-nested);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.divan-wordmark--sm {
|
||||
font-size: 2rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
@ -2269,7 +2269,8 @@ namespace RMuseum.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
var res = _divanService.StartImportFromPublicDataRepo(request.UseHttp, request.Location, request.PoetId);
|
||||
Guid userId = new Guid(User.Claims.FirstOrDefault(c => c.Type == "UserId").Value);
|
||||
var res = _divanService.StartImportFromPublicDataRepo(request.UseHttp, request.Location, request.PoetId, userId);
|
||||
if (!string.IsNullOrEmpty(res.ExceptionString))
|
||||
return BadRequest(res.ExceptionString);
|
||||
return Ok();
|
||||
|
||||
@ -582,7 +582,7 @@ namespace RMuseum.Services
|
||||
/// <param name="location">base URL or local folder path of the exported data tree</param>
|
||||
/// <param name="poetId">0 imports every poet; a specific id imports only that poet (useful on a slow connection)</param>
|
||||
/// <returns></returns>
|
||||
RServiceResult<bool> StartImportFromPublicDataRepo(bool useHttp, string location, int poetId = 0);
|
||||
RServiceResult<bool> StartImportFromPublicDataRepo(bool useHttp, string location, int poetId = 0, Guid userId = default);
|
||||
|
||||
/// <summary>
|
||||
/// examine site pages for broken links
|
||||
|
||||
@ -45,7 +45,7 @@ namespace RMuseum.Services.Implementation
|
||||
/// <param name="useHttp">true: fetch over HTTP (location is a base URL). false: read from a local folder (location is a path).</param>
|
||||
/// <param name="location">base URL or local folder path of the exported data tree</param>
|
||||
/// <param name="poetId">0 imports every poet in the export's manifest; a specific id imports only that poet — useful on a slow connection, or when a developer only needs one poet's data for local testing</param>
|
||||
public RServiceResult<bool> StartImportFromPublicDataRepo(bool useHttp, string location, int poetId = 0)
|
||||
public RServiceResult<bool> StartImportFromPublicDataRepo(bool useHttp, string location, int poetId = 0, Guid userId = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -103,6 +103,12 @@ namespace RMuseum.Services.Implementation
|
||||
await _RegenerateHalfCenturies(context);
|
||||
_memoryCache.Remove("divan/centuries"); // same cache key GetCenturiesAsync/the "periods" endpoint use
|
||||
|
||||
// divan: poet/category pages are imported with empty HtmlText (upstream fills it
|
||||
// with a separate admin TOC job); generate the tables of contents now so poet
|
||||
// and category pages list their works. Needs a real user for the page edit records.
|
||||
if (userId != Guid.Empty)
|
||||
await _RegenerateTOCsAsync(userId, context, jobProgressServiceEF);
|
||||
|
||||
await jobProgressServiceEF.UpdateJob(job.Id, 100, "", true);
|
||||
}
|
||||
catch (Exception exp)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user