From 8ad31db2c7486417a07e049b8113baa403e5bc88 Mon Sep 17 00:00:00 2001 From: Hamid Reza Mohammadi Date: Fri, 7 Aug 2026 18:24:32 +0330 Subject: [PATCH] tajik recitations syncing --- TajikGanjoor/Pages/Index.cshtml | 11 ++- TajikGanjoor/Pages/Shared/_Layout.cshtml | 1 + TajikGanjoor/wwwroot/css/tajik-ganjoor.css | 8 ++ TajikGanjoor/wwwroot/js/recitation-sync.js | 92 ++++++++++++++++++++++ 4 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 TajikGanjoor/wwwroot/js/recitation-sync.js diff --git a/TajikGanjoor/Pages/Index.cshtml b/TajikGanjoor/Pages/Index.cshtml index e95282e3..bd2d945a 100644 --- a/TajikGanjoor/Pages/Index.cshtml +++ b/TajikGanjoor/Pages/Index.cshtml @@ -101,7 +101,7 @@ @foreach (var recitation in Model.GanjoorPage.Poem.Recitations) {
-
} diff --git a/TajikGanjoor/Pages/Shared/_Layout.cshtml b/TajikGanjoor/Pages/Shared/_Layout.cshtml index fe0679fa..a6fe1493 100644 --- a/TajikGanjoor/Pages/Shared/_Layout.cshtml +++ b/TajikGanjoor/Pages/Shared/_Layout.cshtml @@ -10,6 +10,7 @@ +
diff --git a/TajikGanjoor/wwwroot/css/tajik-ganjoor.css b/TajikGanjoor/wwwroot/css/tajik-ganjoor.css index 23bd4a4e..4d53e7e7 100644 --- a/TajikGanjoor/wwwroot/css/tajik-ganjoor.css +++ b/TajikGanjoor/wwwroot/css/tajik-ganjoor.css @@ -668,3 +668,11 @@ html, body { width: 100%; } } + +/* verse currently being recited, highlighted by recitation-sync.js */ +.tg-verse-active { + color: var(--tg-accent-deep) !important; + background-color: var(--tg-paper-edge); + border-radius: 4px; + transition: background-color 0.2s ease; +} diff --git a/TajikGanjoor/wwwroot/js/recitation-sync.js b/TajikGanjoor/wwwroot/js/recitation-sync.js new file mode 100644 index 00000000..a60fe057 --- /dev/null +++ b/TajikGanjoor/wwwroot/js/recitation-sync.js @@ -0,0 +1,92 @@ +/* Syncs poem text highlighting to an