()))
+ {
+ LongRunningJobProgressServiceEF jobProgressServiceEF = new LongRunningJobProgressServiceEF(context);
+ var job = (await jobProgressServiceEF.NewJob("RestoreTajikPoemHtmlText", "Query data")).Result;
+
+ try
+ {
+ var tajikPoems = await context.TajikPoems.AsNoTracking().ToListAsync();
+ int done = 0;
+ foreach (var tajikPoem in tajikPoems)
+ {
+ await jobProgressServiceEF.UpdateJob(job.Id, done, $"poem: {tajikPoem.Id}");
+
+ var tajikVerses = await context.TajikVerses.AsNoTracking().Where(v => v.PoemId == tajikPoem.Id).ToListAsync();
+ if (tajikVerses.Count > 0)
+ {
+ var originalVerses = await context.GanjoorVerses.AsNoTracking().Where(v => v.PoemId == tajikPoem.Id).ToListAsync();
+ var verses = tajikVerses
+ .Select(tv =>
+ {
+ var original = originalVerses.SingleOrDefault(v => v.Id == tv.Id);
+ return new GanjoorVerse()
+ {
+ VOrder = tv.VOrder,
+ VersePosition = original != null ? original.VersePosition : VersePosition.Paragraph,
+ Text = tv.TajikText,
+ };
+ })
+ .OrderBy(v => v.VOrder)
+ .ToList();
+
+ // TajikPages.Id == the poem's own Id for poem pages (see
+ // GanjoorService-TajikSQLiteImport.cs) - no GanjoorPages lookup needed here
+ var tajikPage = await context.TajikPages.Where(p => p.Id == tajikPoem.Id).SingleOrDefaultAsync();
+ if (tajikPage != null)
+ {
+ tajikPage.TajikHtmlText = PrepareHtmlText(verses);
+ await context.SaveChangesAsync();
+ }
}
done++;
}
diff --git a/TajikGanjoor/wwwroot/css/tajik-ganjoor.css b/TajikGanjoor/wwwroot/css/tajik-ganjoor.css
index b1aefc66..7ecaf1d9 100644
--- a/TajikGanjoor/wwwroot/css/tajik-ganjoor.css
+++ b/TajikGanjoor/wwwroot/css/tajik-ganjoor.css
@@ -458,11 +458,12 @@ html, body {
.tg-cat-page p:has(> a:only-child) {
font-family: 'PT Sans', sans-serif;
font-size: 1rem;
- text-align: center;
+ text-align: start;
margin: 0;
padding: 10px 14px;
border-bottom: 1px solid var(--tg-rule);
max-width: 620px;
+ line-height: 1.6;
}
.tg-poet-page p:has(> a:only-child):first-of-type,
@@ -475,6 +476,16 @@ html, body {
.tg-cat-page p:has(> a:only-child) a {
color: var(--tg-accent-deep);
text-decoration: none;
+ font-weight: 700;
+}
+
+/* the excerpt trailing the link (": ..." from PrepareTajikCatHtmlTextAsync /
+ PrepareTajikPoetHtmlTextAsync) is plain text in the same , so it can only
+ be dimmed via the paragraph's own color - the link's explicit color above
+ still wins for the title itself */
+.tg-poet-page p:has(> a:only-child),
+.tg-cat-page p:has(> a:only-child) {
+ color: var(--tg-ink-soft);
}
.tg-poet-page p:has(> a:only-child):hover,