diff --git a/GanjooRazor/Areas/User/Pages/VerseAdd.cshtml b/GanjooRazor/Areas/User/Pages/VerseAdd.cshtml index 2ea569f3..34fd6f64 100644 --- a/GanjooRazor/Areas/User/Pages/VerseAdd.cshtml +++ b/GanjooRazor/Areas/User/Pages/VerseAdd.cshtml @@ -14,7 +14,7 @@ پیشنهاد اضافه شدن مصرع‌های جا افتاده - + + @@ -235,7 +201,7 @@
- + مشاهدهٔ بسامد واژگان «@Model.Query» به تفکیک سخنور @@ -350,7 +316,7 @@ @if (Model.QueryIsSingleWord) { } diff --git a/GanjooRazor/Pages/Search.cshtml.cs b/GanjooRazor/Pages/Search.cshtml.cs index fb9d78b0..864f5441 100644 --- a/GanjooRazor/Pages/Search.cshtml.cs +++ b/GanjooRazor/Pages/Search.cshtml.cs @@ -164,7 +164,7 @@ namespace GanjooRazor.Pages { get { - return Request.Query["s"].ApplyCorrectYeKe().Trim(); + return Query.ApplyCorrectYeKe().Trim().Replace("\"", ""); } } @@ -456,14 +456,29 @@ namespace GanjooRazor.Pages return htmlText; } - public async Task OnGetWordCountsByPoetAsync(string term) + public async Task OnGetWordCountsByPoetAsync(string term, int poetId, int catId) { + if (term == null) return new BadRequestObjectResult("term is null"); term = term.Replace("\"", ""); if (!string.IsNullOrEmpty(term)) { term = term.Trim(); } - var wordCountsResponse = await _httpClient.GetAsync($"{APIRoot.Url}/api/ganjoor/wordcounts/bypoet?term={term}&PageNumber=1&PageSize=1000"); + else + { + if (term == null) return new BadRequestObjectResult("term is empty"); + } + string url = $"{APIRoot.Url}/api/ganjoor/wordcounts/bycat?term={term}"; + if(poetId != 0) + { + url += $"&poetId={poetId}"; + } + if (catId != 0) + { + url += $"&catId={catId}"; + } + + var wordCountsResponse = await _httpClient.GetAsync(url); if (!wordCountsResponse.IsSuccessStatusCode) { diff --git a/GanjooRazor/Pages/Shared/_AdminLayout.cshtml b/GanjooRazor/Pages/Shared/_AdminLayout.cshtml index d8a1a89e..bf0d1bdb 100644 --- a/GanjooRazor/Pages/Shared/_AdminLayout.cshtml +++ b/GanjooRazor/Pages/Shared/_AdminLayout.cshtml @@ -10,7 +10,7 @@ - + diff --git a/GanjooRazor/Pages/Shared/_UserPanelLayout.cshtml b/GanjooRazor/Pages/Shared/_UserPanelLayout.cshtml index 8c39a630..9fb7220e 100644 --- a/GanjooRazor/Pages/Shared/_UserPanelLayout.cshtml +++ b/GanjooRazor/Pages/Shared/_UserPanelLayout.cshtml @@ -9,7 +9,7 @@ - + diff --git a/GanjooRazor/Pages/SignUp.cshtml b/GanjooRazor/Pages/SignUp.cshtml index 2a2f042d..80068091 100644 --- a/GanjooRazor/Pages/SignUp.cshtml +++ b/GanjooRazor/Pages/SignUp.cshtml @@ -12,7 +12,7 @@ - +
diff --git a/GanjooRazor/Pages/Simi.cshtml b/GanjooRazor/Pages/Simi.cshtml index 9ce74a75..c1d9a5e5 100644 --- a/GanjooRazor/Pages/Simi.cshtml +++ b/GanjooRazor/Pages/Simi.cshtml @@ -14,7 +14,7 @@ @ViewData["Title"] - + @@ -27,16 +27,6 @@ var stickyEnabled = cookieValue != "false"; - @if (Model.CanEdit) { diff --git a/GanjooRazor/Pages/Spotify.cshtml b/GanjooRazor/Pages/Spotify.cshtml index e7c5cc03..be3913b3 100644 --- a/GanjooRazor/Pages/Spotify.cshtml +++ b/GanjooRazor/Pages/Spotify.cshtml @@ -12,7 +12,7 @@ - + diff --git a/GanjooRazor/Pages/Tagged.cshtml b/GanjooRazor/Pages/Tagged.cshtml index 56237df2..06d0c179 100644 --- a/GanjooRazor/Pages/Tagged.cshtml +++ b/GanjooRazor/Pages/Tagged.cshtml @@ -14,7 +14,7 @@ @ViewData["Title"] - + diff --git a/GanjooRazor/Pages/Trans.cshtml b/GanjooRazor/Pages/Trans.cshtml index bbfd9220..0267fdb0 100644 --- a/GanjooRazor/Pages/Trans.cshtml +++ b/GanjooRazor/Pages/Trans.cshtml @@ -14,7 +14,7 @@ گنجور » برگردان‌ها و نویس‌های شعر - + diff --git a/GanjooRazor/Pages/errors/404.cshtml b/GanjooRazor/Pages/errors/404.cshtml index fdf25dfa..d90f1edd 100644 --- a/GanjooRazor/Pages/errors/404.cshtml +++ b/GanjooRazor/Pages/errors/404.cshtml @@ -14,7 +14,7 @@ @ViewData["Title"] - + diff --git a/GanjooRazor/Pages/errors/503.cshtml b/GanjooRazor/Pages/errors/503.cshtml index 3173a4b9..97ed35b2 100644 --- a/GanjooRazor/Pages/errors/503.cshtml +++ b/GanjooRazor/Pages/errors/503.cshtml @@ -15,7 +15,7 @@ @ViewData["Title"] - + diff --git a/GanjooRazor/wwwroot/css/p8.css b/GanjooRazor/wwwroot/css/p8.css index 666a859c..05a68767 100644 --- a/GanjooRazor/wwwroot/css/p8.css +++ b/GanjooRazor/wwwroot/css/p8.css @@ -247,33 +247,33 @@ select { border-top: 1px dashed; } -#tab-items{ - border:none !important; +#tab-items { + border: none !important; } .poemtablinks { display: inline-table; } - .poet .caption{ - display: block; - width: 100%; - font-family: Vazir; - font-weight: 300; - font-size: 0.8em; - text-align: center; - margin-bottom: 30px; - } +.poet .caption { + display: block; + width: 100%; + font-family: Vazir; + font-weight: 300; + font-size: 0.8em; + text-align: center; + margin-bottom: 30px; +} - .poet .caption a, .poemtablinks a { - border-radius: 5px; - display: block; - box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2); - padding: 5px; - background-color: darkred; - border-radius: 5px; - margin-top: 5px; - } + .poet .caption a, .poemtablinks a { + border-radius: 5px; + display: block; + box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2); + padding: 5px; + background-color: darkred; + border-radius: 5px; + margin-top: 5px; + } .caption, .poemtablinks { @@ -293,10 +293,10 @@ select { background-color: #300; } - #fa .active a{ - font-weight: bold; - background-color: #300; - } +#fa .active a { + font-weight: bold; + background-color: #300; +} .width-100per { width: 100% !important; @@ -2180,6 +2180,7 @@ mark { .footer-icon { fill: #300; } + .tabcontent { display: none; } @@ -2207,6 +2208,29 @@ mark { background-color: rgb(51, 0, 0); } +.expandable-container-wrapper { + position: relative; +} + +.expandable-content { + width: 100%; + overflow: hidden; + transition: height 0.3s ease-out; + position: relative; +} + +/* Blurred bottom overlay effect */ +.expandable-blur-overlay { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 200px; /* Height of the blur effect */ + background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.9)); + pointer-events: none; /* Prevents interaction */ + transition: opacity 0.3s ease-out; +} + @media(prefers-color-scheme: dark) { body { background: rgba(0, 0, 0, 0.9); diff --git a/GanjooRazor/wwwroot/js/bk.js b/GanjooRazor/wwwroot/js/bk.js index 7eec4e65..c62e56fc 100644 --- a/GanjooRazor/wwwroot/js/bk.js +++ b/GanjooRazor/wwwroot/js/bk.js @@ -1695,13 +1695,13 @@ function onSearchWordCounts(catId, poetId, totalWordCount) { }, 500); } -function loadWordCountsByPoet(term) { +function loadWordCountsByPoet(term, poetId, catId) { var divParent = document.getElementById('wordcounts-placeholder'); var imgElementId = 'loadingwordcountsimg'; divParent.innerHTML = divParent.innerHTML + '
بارگذاری
'; $.ajax({ type: "GET", - url: '?Handler=WordCountsByPoet&term='+term, + url: '?Handler=WordCountsByPoet&term=' + term + '&poetId=' + poetId.toString() + '&catId=' + catId.toString(), error: function () { if (document.getElementById("remove-this-wordcounts") != null) { document.getElementById("remove-this-wordcounts").remove(); @@ -1864,5 +1864,12 @@ function plotChart(tableId) { }); } - +function deletePoetFromSearch(poetId, poetName) { + if (!confirm('آیا می‌خواهید ' + poetName + ' را از نتایج حذف کنید؟')) return; + const currentUrl = new URL(window.location.href); + const params = currentUrl.searchParams; + params.append('e', poetId.toString()); + currentUrl.search = params.toString(); + window.location.href = currentUrl.toString(); +}