restore poets page layout to make all its sections accessible while scrolling #475

This commit is contained in:
Hamid Reza Mohammadi 2025-03-12 19:57:23 +03:30
parent bcbae68d8b
commit 61aeba8558
17 changed files with 83 additions and 21 deletions

View File

@ -150,7 +150,7 @@
</p>
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/js/bk.js?version=71"></script>
<script src="~/js/bk.js?version=72"></script>
<script src="~/js/jplayersupport.js"></script>
<script src="~/js/vaabd.js?version=10"></script>
<script src="~/dist/jplayer/jquery.jplayer.min.js"></script>

View File

@ -16,7 +16,7 @@
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
<script src="/lib/jquery/dist/jquery.min.js"></script>
<script src="/js/bk.js?version=71"></script>
<script src="/js/bk.js?version=72"></script>
<script>
var cookieValue = getCookie("playerScrollLock");
var playerScrollLock = cookieValue === "true";

View File

@ -16,7 +16,7 @@
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
<script src="/lib/jquery/dist/jquery.min.js"></script>
<script src="/js/bk.js?version=71"></script>
<script src="/js/bk.js?version=72"></script>
<script>
var cookieValue = getCookie("playerScrollLock");
var playerScrollLock = cookieValue === "true";

View File

@ -18,7 +18,7 @@
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
<script src="/lib/jquery/dist/jquery.min.js"></script>
<script src="/js/bk.js?version=71"></script>
<script src="/js/bk.js?version=72"></script>
<script>
var cookieValue = getCookie("playerScrollLock");
var playerScrollLock = cookieValue === "true";

View File

@ -17,7 +17,7 @@
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml">
<script src="/lib/jquery/dist/jquery.min.js"></script>
<script src="/js/chart.js"></script>
<script src="/js/bk.js?version=71"></script>
<script src="/js/bk.js?version=72"></script>
<script src="/js/jquery.mark.min.js"></script>
<script>
var cookieValue = getCookie("playerScrollLock");

View File

@ -23,7 +23,7 @@
font-family: 'Vazir'
}
</style>
<script src="/js/bk.js?version=71"></script>
<script src="/js/bk.js?version=72"></script>
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="~/js/leaflet.js"></script>
<script src="~/js/leaflet-providers.js"></script>

View File

@ -15,7 +15,7 @@
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
<script src="/lib/jquery/dist/jquery.min.js"></script>
<script src="/js/bk.js?version=71"></script>
<script src="/js/bk.js?version=72"></script>
<script>
var cookieValue = getCookie("playerScrollLock");
var playerScrollLock = cookieValue === "true";

View File

@ -16,7 +16,7 @@
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
<script src="/lib/jquery/dist/jquery.min.js"></script>
<script src="/js/bk.js?version=71"></script>
<script src="/js/bk.js?version=72"></script>
<script>
var cookieValue = getCookie("playerScrollLock");
var playerScrollLock = cookieValue === "true";

View File

@ -238,7 +238,7 @@
<script src="~/js/bk.js?version=71"></script>
<script src="~/js/bk.js?version=72"></script>
<script src="~/js/jplayersupport.js"></script>
<script src="~/js/vaabd.js?version=10"></script>
<script src="~/dist/jplayer/jquery.jplayer.min.js"></script>

View File

@ -22,7 +22,7 @@
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
<script src="/js/chart.js"></script>
<script src="/lib/jquery/dist/jquery.min.js"></script>
<script src="/js/bk.js?version=71"></script>
<script src="/js/bk.js?version=72"></script>
<script>
var cookieValue = getCookie("playerScrollLock");
var playerScrollLock = cookieValue === "true";

View File

@ -35,7 +35,7 @@
});
</script>
<script src="/js/bk.js?version=71"></script>
<script src="/js/bk.js?version=72"></script>
<script>
function editBanner(bannerId) {
var url = '?handler=Edit';

View File

@ -32,7 +32,7 @@
});
</script>
<script src="/lib/diff.js"></script>
<script src="/js/bk.js?version=71"></script>
<script src="/js/bk.js?version=72"></script>
<script>
function compareCorrectionBlocks(originalElemenyId, editedElementId, resultElementId) {
var a = document.getElementById(originalElemenyId);

View File

@ -18,7 +18,7 @@
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
<script src="/lib/jquery/dist/jquery.min.js"></script>
<script src="/js/bk.js?version=71"></script>
<script src="/js/bk.js?version=72"></script>
<script>
var cookieValue = getCookie("playerScrollLock");
var playerScrollLock = cookieValue === "true";

View File

@ -18,7 +18,7 @@
<link rel="shortcut icon" href="/favicon.ico?version=1" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="گنجور" href="https://ganjoor.net/search.xml" />
<script src="/lib/jquery/dist/jquery.min.js"></script>
<script src="/js/bk.js?version=71"></script>
<script src="/js/bk.js?version=72"></script>
<script>
var cookieValue = getCookie("playerScrollLock");
var playerScrollLock = cookieValue === "true";

View File

@ -255,7 +255,22 @@
@if (Model.IsCatPage || Model.IsPoetPage)
{
<div class="tabcontent related-images-frame" id="words">
<div class="poemtab">
<div class="poemtablinks"><a href="#stats">آمار</a></div>
@if (Model.IsPoetPage)
{
<div class="poemtablinks"><a href="#quoteds">مشق شعر</a></div>
}
<div class="poemtablinks active"><a href="#words" onclick="javascript:loadWordCounts(@Model.GanjoorPage.PoetOrCat.Cat.Id, @Model.GanjoorPage.PoetOrCat.Poet.Id, false)">واژگان</a></div>
<div class="poemtablinks"><a href="#recitations" onclick="javascript:loadCatRecitations(@Model.GanjoorPage.PoetOrCat.Cat.Id)">خوانش‌ها</a></div>
@if (Model.IsPoetPage)
{
<div class="poemtablinks"><a href="#photos">تصاویر چهره</a></div>
<div class="poemtablinks"><a href="#papersources">منابع کاغذی</a></div>
}
</div>
<div class="related-images-frame poemtabcontent" id="words">
<div class="century cursor-pointer" id="load-word-counts" onclick="loadWordCounts(@Model.GanjoorPage.PoetOrCat.Cat.Id, @Model.GanjoorPage.PoetOrCat.Poet.Id, false)">
محاسبهٔ بسامد واژٰگان.
</div>
@ -271,7 +286,22 @@
</div>
<div class="tabcontent related-images-frame" id="recitations">
<div class="poemtab">
<div class="poemtablinks"><a href="#stats">آمار</a></div>
@if (Model.IsPoetPage)
{
<div class="poemtablinks"><a href="#quoteds">مشق شعر</a></div>
}
<div class="poemtablinks"><a href="#words" onclick="javascript:loadWordCounts(@Model.GanjoorPage.PoetOrCat.Cat.Id, @Model.GanjoorPage.PoetOrCat.Poet.Id, false)">واژگان</a></div>
<div class="poemtablinks active"><a href="#recitations" onclick="javascript:loadCatRecitations(@Model.GanjoorPage.PoetOrCat.Cat.Id)">خوانش‌ها</a></div>
@if (Model.IsPoetPage)
{
<div class="poemtablinks"><a href="#photos">تصاویر چهره</a></div>
<div class="poemtablinks"><a href="#papersources">منابع کاغذی</a></div>
}
</div>
<div class="related-images-frame poemtabcontent" id="recitations">
@if (Model.CategoryHasRecitations)
{
<div class="century cursor-pointer" id="load-cat-recitations" onclick="loadCatRecitations(@Model.GanjoorPage.PoetOrCat.Cat.Id)">
@ -288,7 +318,21 @@
@if (Model.IsPoetPage)
{
<div class="tabcontent" id="photos">
<div class="poemtab">
<div class="poemtablinks"><a href="#stats">آمار</a></div>
@if (Model.IsPoetPage)
{
<div class="poemtablinks"><a href="#quoteds">مشق شعر</a></div>
}
<div class="poemtablinks"><a href="#words" onclick="javascript:loadWordCounts(@Model.GanjoorPage.PoetOrCat.Cat.Id, @Model.GanjoorPage.PoetOrCat.Poet.Id, false)">واژگان</a></div>
<div class="poemtablinks"><a href="#recitations" onclick="javascript:loadCatRecitations(@Model.GanjoorPage.PoetOrCat.Cat.Id)">خوانش‌ها</a></div>
@if (Model.IsPoetPage)
{
<div class="poemtablinks active"><a href="#photos">تصاویر چهره</a></div>
<div class="poemtablinks"><a href="#papersources">منابع کاغذی</a></div>
}
</div>
<div id="photos" class="poemtabcontent">
<div class="related-images-frame">
@if (Model.Photo != null)
{
@ -315,7 +359,22 @@
</div>
if (Model.GanjoorPage.SecondPoet == null)
{
<div class="tabcontent related-images-frame" id="papersources">
<div class="poemtab">
<div class="poemtablinks"><a href="#stats">آمار</a></div>
@if (Model.IsPoetPage)
{
<div class="poemtablinks"><a href="#quoteds">مشق شعر</a></div>
}
<div class="poemtablinks"><a href="#words" onclick="javascript:loadWordCounts(@Model.GanjoorPage.PoetOrCat.Cat.Id, @Model.GanjoorPage.PoetOrCat.Poet.Id, false)">واژگان</a></div>
<div class="poemtablinks"><a href="#recitations" onclick="javascript:loadCatRecitations(@Model.GanjoorPage.PoetOrCat.Cat.Id)">خوانش‌ها</a></div>
@if (Model.IsPoetPage)
{
<div class="poemtablinks"><a href="#photos">تصاویر چهره</a></div>
<div class="poemtablinks active"><a href="#papersources">منابع کاغذی</a></div>
}
</div>
<div class="poemtabcontent related-images-frame" id="papersources">
<div class="related-images">
@if (Model.GanjoorPage.PoetOrCat.Cat.PaperSources != null && Model.GanjoorPage.PoetOrCat.Cat.PaperSources.Any())
{

View File

@ -1653,9 +1653,9 @@ function loadWordCounts(catId, poetId, remStopWords) {
success: function (data) {
if (document.getElementById("remove-this-wordcounts") != null) {
document.getElementById("remove-this-wordcounts").remove();
if (document.getElementById("load-word-counts") != null) {
/*if (document.getElementById("load-word-counts") != null) {
document.getElementById("percent-button").style.display = 'inline-block';
}
}*/
$(data).appendTo(divParent);
plotChart('words-stats');
}

View File

@ -698,11 +698,14 @@ namespace RMuseum.Services.Implementation
html += $"<div id=\"poempretab\"></div>{Environment.NewLine}";
html += $"<div class=\"poemtab\">{Environment.NewLine}";
html += $"<div class=\"poemtablinks{(active == "stats" ? " active" : "")}\"><a href=\"#stats\">آمار</a></div>{Environment.NewLine}";
if (cat.ParentId == null)
{
html += $"<div class=\"poemtablinks{(active == "quoteds" ? " active" : "")}\"><a href=\"#quoteds\">مشق شعر</a></div>{Environment.NewLine}";
}
html += $"<div class=\"poemtablinks{(active == "words" ? " active" : "")}\"><a href=\"#words\" onclick=\"javascript:loadWordCounts({cat.Id}, {cat.PoetId}, false)\">واژگان</a></div>{Environment.NewLine}";
html += $"<div class=\"poemtablinks{(active == "recitations" ? " active" : "")}\"><a href=\"#recitations\" onclick=\"javascript:loadCatRecitations({cat.Id})\">خوانش‌ها</a></div>{Environment.NewLine}";
if (cat.ParentId == null)
{
html += $"<div class=\"poemtablinks{(active == "quoteds" ? " active" : "")}\"><a href=\"#quoteds\">مشق شعر</a></div>{Environment.NewLine}";
html += $"<div class=\"poemtablinks{(active == "photos" ? " active" : "")}\"><a href=\"#photos\">تصاویر چهره</a></div> {Environment.NewLine}";
html += $"<div class=\"poemtablinks{(active == "papersources" ? " active" : "")}\"><a href=\"#papersources\">منابع کاغذی</a></div> {Environment.NewLine}";
}