-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
comparison of usage stats of a selected word among all poets #471
- Loading branch information
Showing
3 changed files
with
50 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,49 @@ | ||
@model GanjooRazor.Pages._CategoryWordsCountByCatPartialModel | ||
@{ | ||
|
||
@if (Model.WordStats.Length == 0) | ||
{ | ||
<text> | ||
<partial name="_CategoryWordsCountByCatTablePartial" model="Model.Model"> | ||
</text> | ||
} | ||
else | ||
{ | ||
<div class="expandable-container-wrapper"> | ||
<div class="expandable-content" id="expandableContent"> | ||
<partial name="_CategoryWordsCountByCatTablePartial" model="Model.Model"> | ||
</div> | ||
<div class="expandable-blur-overlay" id="expandableBlur"></div> | ||
</div> | ||
|
||
<a id="expand-toggle-btn" href="javascript:toggleExpandableContent()" class="pagebutton comments-link"> | ||
نمایش فهرست کامل | ||
</a> | ||
|
||
<script> | ||
const expandableDiv = document.getElementById("expandableContent"); | ||
const blurOverlay = document.getElementById("expandableBlur"); | ||
const toggleButton = document.getElementById("expand-toggle-btn"); | ||
let isExpanded = false; | ||
const collapsedHeight = 200; | ||
expandableDiv.style.height = collapsedHeight + "px"; | ||
function toggleExpandableContent() { | ||
if (isExpanded) { | ||
// Collapse | ||
expandableDiv.style.height = collapsedHeight + "px"; | ||
blurOverlay.style.opacity = "1"; // Show blur | ||
toggleButton.textContent = "نمایش فهرست کامل"; | ||
} else { | ||
// Expand to full height | ||
expandableDiv.style.height = (expandableDiv.scrollHeight + 170 ) + "px"; | ||
blurOverlay.style.opacity = "0"; // Remove blur | ||
toggleButton.textContent = "جمع کردن فهرست"; | ||
} | ||
isExpanded = !isExpanded; | ||
} | ||
</script> | ||
} | ||
|
||
<partial name="_CategoryWordsCountByCatTablePartial" model="Model.Model"> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters