docs: #339 moving the bookmark button to the navbar

This commit is contained in:
Hamid Reza Mohammadi 2022-07-04 21:16:19 +04:30
parent e3b93e22c3
commit 1ec467c6c3
4 changed files with 18 additions and 16 deletions

View File

@ -316,18 +316,6 @@
}
<div class="poem-actions">
@if (Model.LoggedIn)
{
<text>
<a role="button" id="bookmark" class="pagebutton" onclick="switchBookmark(@Model.GanjoorPage.Id, 0, '')">نشان کردن / حذف نشان<i class="info-buttons" id="bookmark-icon">star_border</i></a>
</text>
}
</div>
@if (Model.LoggedIn)
{
<a role="button" class="textualbutton" href="/User/Editor?id=@Model.GanjoorPage.Id">ویرایش<i class="info-buttons edit-poem-button"></i></a>

View File

@ -181,6 +181,16 @@
<span class="w3tooltiptext">نمای چاپی</span>
</a>
@if (Model.LoggedIn)
{
<a onclick="switchBookmark(@Model.GanjoorPage.Id, 0, '')" role="button" class="w3tooltip cursor-pointer">
<div class="circled-number" id="bookmark">
<i class="noindent-info-button" id="bookmark-icon">star_border</i>
</div>
<span class="w3tooltiptext">نشان کردن</span>
</a>
}
</div>
}

View File

@ -1310,6 +1310,10 @@ ol {
color: gray !important;
}
.color-yellow {
color: yellow !important;
}
.color-disabled {
color: #a17a7a !important;
}

View File

@ -449,7 +449,7 @@ function switchBookmark(poemId, coupletIndex, divSuffix) {
}
if (coupletIndex == 0) {
document.getElementById('bookmark').innerHTML = 'نشان شده<i class="info-buttons" id="bookmark-icon">star</i>';
document.getElementById('bookmark').innerHTML = '<i class="noindent-info-button color-yellow" id="bookmark-icon">star</i>';
}
}
else {
@ -462,7 +462,7 @@ function switchBookmark(poemId, coupletIndex, divSuffix) {
}
if (coupletIndex == 0) {
document.getElementById('bookmark').innerHTML = 'نشان کردن<i class="info-buttons" id="bookmark-icon">star_border</i>';
document.getElementById('bookmark').innerHTML = '<i class="noindent-info-button color-white" id="bookmark-icon">star_border</i>';
}
}
},
@ -494,10 +494,10 @@ function checkIfBookmarked(poemId) {
}
}
if (isBookmarked) {
document.getElementById('bookmark').innerHTML = 'نشان شده<i class="info-buttons" id="bookmark-icon">star</i>';
document.getElementById('bookmark').innerHTML = '<i class="noindent-info-button color-yellow" id="bookmark-icon">star</i>';
}
else {
document.getElementById('bookmark').innerHTML = 'نشان کردن<i class="info-buttons" id="bookmark-icon">star_border</i>';
document.getElementById('bookmark').innerHTML = '<i class="noindent-info-button color-white" id="bookmark-icon">star_border</i>';
}
},
});