#229 improvements
This commit is contained in:
parent
23ec89288e
commit
d0ce66bdde
@ -143,7 +143,7 @@
|
||||
</p>
|
||||
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="~/js/bk.js?version=6"></script>
|
||||
<script src="~/js/bk.js?version=7"></script>
|
||||
<script src="~/js/vaabd.js"></script>
|
||||
<script src="~/dist/jplayer/jquery.jplayer.min.js"></script>
|
||||
<script src="~/dist/add-on/jplayer.playlist.min.js"></script>
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
<script>
|
||||
var playerScrollLock = false;
|
||||
</script>
|
||||
<script src="/js/bk.js?version=6"></script>
|
||||
<script src="/js/bk.js?version=7"></script>
|
||||
|
||||
@if (Model.IsHomePage)
|
||||
{
|
||||
|
||||
@ -181,7 +181,7 @@
|
||||
</div>
|
||||
|
||||
<script src="/lib/jquery/dist/jquery.min.js"></script>
|
||||
<script src="/js/bk.js?version=6"></script>
|
||||
<script src="/js/bk.js?version=7"></script>
|
||||
<script src="/js/vaabd.js"></script>
|
||||
|
||||
@if (!string.IsNullOrEmpty(ViewData["GoogleAnalyticsCode"].ToString()))
|
||||
|
||||
@ -284,7 +284,7 @@
|
||||
<a href="@Html.Raw(Model.GanjoorPage.PoetOrCat.Cat.FullUrl + "/" + Model.GanjoorPage.Poem.Next.UrlSlug)">@Html.Raw(Model.GanjoorPage.Poem.Next.Title): @Html.Raw(Model.GanjoorPage.Poem.Next.Excerpt)</a><span> »</span>
|
||||
}
|
||||
else
|
||||
if (Model.GanjoorPage.Poem.Category.Cat.Next != null)
|
||||
if (Model.GanjoorPage.Poem.Category.Cat.Next != null)
|
||||
{
|
||||
<a href="@Model.GanjoorPage.Poem.Category.Cat.Next.FullUrl">@Model.GanjoorPage.Poem.Category.Cat.Next.Title</a><span> »</span>
|
||||
}
|
||||
@ -295,7 +295,7 @@
|
||||
<span>« </span><a href="@Html.Raw(Model.GanjoorPage.PoetOrCat.Cat.FullUrl + "/" +Model.GanjoorPage.Poem.Previous.UrlSlug)">@Html.Raw(Model.GanjoorPage.Poem.Previous.Title) :@Html.Raw(Model.GanjoorPage.Poem.Previous.Excerpt)</a>
|
||||
}
|
||||
else
|
||||
if (Model.GanjoorPage.Poem.Category.Cat.Previous != null)
|
||||
if (Model.GanjoorPage.Poem.Category.Cat.Previous != null)
|
||||
{
|
||||
<span>« </span><a href="@Model.GanjoorPage.Poem.Category.Cat.Previous.FullUrl">@Model.GanjoorPage.Poem.Category.Cat.Previous.Title</a>
|
||||
}
|
||||
@ -324,24 +324,52 @@
|
||||
|
||||
}
|
||||
|
||||
<div class="poem-info">
|
||||
<p>
|
||||
<small><i class="pageicons">mouse</i> با دو بار کلیک روی واژهها یا انتخاب متن و کلیک روی آنها میتوانید آنها را در لغتنامهٔ دهخدا جستجو کنید.</small>
|
||||
</p>
|
||||
<p>
|
||||
<small><i class="pageicons">format_list_numbered_rtl</i> <a role="button" onclick="btshmr(@Model.GanjoorPage.Id)" class="actionlink" id="bnum-button">حذف شمارهها</a></small>
|
||||
</p>
|
||||
@if (Model.LoggedIn)
|
||||
{
|
||||
<text> <p> <a role="button" id="bookmark" style="cursor: pointer;" onclick="switchBookmark(@Model.GanjoorPage.Id, 0)" title="نشانهگذاری / حذف نشانه"><i class="pageicons" id="bookmark-icon">star_border</i></a></p></text>
|
||||
}
|
||||
<div class="poem-info">
|
||||
<p>
|
||||
<small><i class="pageicons">mouse</i> با دو بار کلیک روی واژهها یا انتخاب متن و کلیک روی آنها میتوانید آنها را در لغتنامهٔ دهخدا جستجو کنید.</small>
|
||||
</p>
|
||||
<div class="poem-actions">
|
||||
<a role="button" onclick="btshmr(@Model.GanjoorPage.Id)" class="pagebutton" id="bnum-button">حذف شمارهها<i class="info-buttons">format_list_numbered_rtl</i></a>
|
||||
@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>
|
||||
}
|
||||
@if (Model.GanjoorPage.Poem.GanjoorMetre != null)
|
||||
{
|
||||
|
||||
@if (!string.IsNullOrEmpty(Model.GanjoorPage.Poem.RhymeLetters))
|
||||
{
|
||||
<text>
|
||||
<a role="button" class="pagebutton" href="@Html.Raw($"/simi/?v={Uri.EscapeUriString(Model.GanjoorPage.Poem.GanjoorMetre.Rhythm)}&g={Uri.EscapeUriString(Model.GanjoorPage.Poem.RhymeLetters)}")">شعرهای همآهنگ<i class="info-buttons">search</i></a>
|
||||
</text>
|
||||
}
|
||||
}
|
||||
<span id="copylink_span" class="w3tooltip">
|
||||
<a role="button" id="copylink" class="pagebutton" onclick="copyPoemLink()">رونوشت نشانی<i class="info-buttons" id="copylink-icon">link</i></a>
|
||||
<span class="w3tooltiptext" id="copylink-tooltip">رونوشت نشانی</span>
|
||||
</span>
|
||||
|
||||
<span id="copytext_span" class="w3tooltip">
|
||||
<a role="button" id="copytext" class="pagebutton" onclick="copyPoemText()">رونوشت متن<i class="info-buttons" id="copytext-icon">content_copy</i></a>
|
||||
<span class="w3tooltiptext" id="copytext-tooltip">رونوشت متن</span>
|
||||
</span>
|
||||
|
||||
<span id="share_span">
|
||||
<a role="button" id="share" class="pagebutton" onclick="webSharePoem()">همرسانی<i class="info-buttons" id="share-icon">share</i></a>
|
||||
</span>
|
||||
|
||||
@if (Model.LoggedIn)
|
||||
{
|
||||
<a role="button" class="pagebutton comments-link" href="@Html.Raw($"/trans?p={Model.GanjoorPage.Id}")" onclick="wpopen(this.href); return false" title="برگردانها و نویسشها"><i class="info-buttons">translate</i></a>
|
||||
}
|
||||
</div>
|
||||
|
||||
@if (Model.GanjoorPage.Poem.GanjoorMetre != null)
|
||||
{
|
||||
<text><p><small>وزن: <a href="@Html.Raw($"/vazn/?v={Uri.EscapeUriString(Model.GanjoorPage.Poem.GanjoorMetre.Rhythm)}&a={Model.GanjoorPage.PoetOrCat.Poet.Id}")">@Html.Raw(Model.GanjoorPage.Poem.GanjoorMetre.Rhythm)</a></small></p></text>
|
||||
@if (!string.IsNullOrEmpty(Model.GanjoorPage.Poem.RhymeLetters))
|
||||
{
|
||||
<text><p><small><i class="pageicons">search</i> <a href="@Html.Raw($"/simi/?v={Uri.EscapeUriString(Model.GanjoorPage.Poem.GanjoorMetre.Rhythm)}&g={Uri.EscapeUriString(Model.GanjoorPage.Poem.RhymeLetters)}")">شعرهای مشابه (وزن و قافیه)</a></small></p></text>
|
||||
}
|
||||
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(Model.GanjoorPage.Poem.OldTag))
|
||||
{
|
||||
@ -351,58 +379,49 @@
|
||||
{
|
||||
<text><p><small>منبع اولیه: <a href="@Html.Raw($"/sources/{Model.GanjoorPage.Poem.SourceUrlSlug}/")">@Html.Raw(Model.GanjoorPage.Poem.SourceName)</a></small></p></text>
|
||||
}
|
||||
<p>
|
||||
<span id="copylink_span" class="w3tooltip"> | <a role="button" id="copylink" style="cursor: pointer;" onclick="copyPoemLink()"><i class="pageicons" id="copylink-icon">link</i></a><span class="w3tooltiptext" id="copylink-tooltip">رونوشت نشانی</span></span>
|
||||
<span id="copytext_span" class="w3tooltip"> | <a role="button" id="copytext" style="cursor: pointer;" onclick="copyPoemText()"><i class="pageicons" id="copytext-icon">content_copy</i></a><span class="w3tooltiptext" id="copytext-tooltip">رونوشت متن</span></span>
|
||||
<span id="share_span"> | <a role="button" id="share" style="cursor: pointer;" onclick="webSharePoem()" title="همرسانی"><i class="pageicons" id="share-icon">share</i></a></span>
|
||||
|
||||
@if (Model.LoggedIn)
|
||||
|
||||
<h3>این شعر را چه کسی در کدام آهنگ خوانده است؟</h3>
|
||||
@if (Model.GanjoorPage.Poem.Songs.Length == 0)
|
||||
{
|
||||
<text> | <small><a href="@Html.Raw($"/trans?p={Model.GanjoorPage.Id}")" onclick="wpopen(this.href); return false" title="برگردانها و نویسشها" class="comments-link"><i class="pageicons">translate</i></a></small></text>
|
||||
<p><i class="pageicons">music_note</i> <small><a href="@Html.Raw($"/spotify?p={Model.GanjoorPage.Id}")" onclick="wpopen(this.href); return false" class="comments-link">معرفی آهنگهایی که در متن آنها از این شعر استفاده شده است</a> ...</small></p>
|
||||
}
|
||||
</p>
|
||||
|
||||
<h3>این شعر را چه کسی در کدام آهنگ خوانده است؟</h3>
|
||||
@if (Model.GanjoorPage.Poem.Songs.Length == 0)
|
||||
{
|
||||
<p><i class="pageicons">music_note</i> <small><a href="@Html.Raw($"/spotify?p={Model.GanjoorPage.Id}")" onclick="wpopen(this.href); return false" class="comments-link">معرفی آهنگهایی که در متن آنها از این شعر استفاده شده است</a> ...</small></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@foreach (var song in Model.GanjoorPage.Poem.Songs)
|
||||
else
|
||||
{
|
||||
<p>
|
||||
<a target="_blank" href="@Html.Raw(song.TrackUrl)">@Html.Raw($"{song}")</a>
|
||||
@if (song.TrackType == RMuseum.Models.Ganjoor.PoemMusicTrackType.Spotify)
|
||||
{
|
||||
<a target="_blank" href="@Html.Raw(song.TrackUrl)"><img style="display:inline;width:16px;" src="/image/sp16.png" alt="اسپاتیفای" height="16" /></a>
|
||||
}
|
||||
</p>
|
||||
}
|
||||
|
||||
<p><i class="pageicons">music_note</i> <small><a href="@Html.Raw($"/spotify?p={Model.GanjoorPage.Id}")" onclick="wpopen(this.href); return false" class="comments-link">معرفی آهنگهای دیگری که در متن آنها از این شعر استفاده شده است</a> ...</small></p>
|
||||
}
|
||||
|
||||
|
||||
|
||||
@if (Model.GanjoorPage.Poem.Images.Length > 0)
|
||||
{
|
||||
<h3>تصاویر مرتبط در گنجینهٔ گنجور</h3>
|
||||
<div style="display: flex;clear: both;width:auto;margin:auto;flex-flow:wrap;text-align:center">
|
||||
@foreach (var image in Model.GanjoorPage.Poem.Images)
|
||||
@foreach (var song in Model.GanjoorPage.Poem.Songs)
|
||||
{
|
||||
<a target="_blank" style="text-align:center;margin:auto" href="@Html.Raw(image.TargetPageUrl)">
|
||||
<img src="@Html.Raw(image.ThumbnailImageUrl)" alt="@Html.Raw(image.AltText)" width="200" style="width:200px;float: right;padding: 5px;">
|
||||
</a>
|
||||
<p>
|
||||
<a target="_blank" href="@Html.Raw(song.TrackUrl)">@Html.Raw($"{song}")</a>
|
||||
@if (song.TrackType == RMuseum.Models.Ganjoor.PoemMusicTrackType.Spotify)
|
||||
{
|
||||
<a target="_blank" href="@Html.Raw(song.TrackUrl)"><img style="display:inline;width:16px;" src="/image/sp16.png" alt="اسپاتیفای" height="16" /></a>
|
||||
}
|
||||
</p>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
<p>
|
||||
<small><i class="pageicons">photo_camera</i> <a href="?pinterest_url=manual" onclick="wpopen(this.href); return false" class="comments-link">پیشنهاد تصاویر مرتبط از منابع اینترنتی</a>، <i class="pageicons">support</i> <a href="http://blog.ganjoor.net/1398/07/12/mganjoor/" target="_blank">راهنمای نحوهٔ پیشنهاد تصاویر مرتبط از گنجینهٔ گنجور</a></small>
|
||||
</p>
|
||||
</div>
|
||||
<p><i class="pageicons">music_note</i> <small><a href="@Html.Raw($"/spotify?p={Model.GanjoorPage.Id}")" onclick="wpopen(this.href); return false" class="comments-link">معرفی آهنگهای دیگری که در متن آنها از این شعر استفاده شده است</a> ...</small></p>
|
||||
}
|
||||
|
||||
|
||||
|
||||
@if (Model.GanjoorPage.Poem.Images.Length > 0)
|
||||
{
|
||||
<h3>تصاویر مرتبط در گنجینهٔ گنجور</h3>
|
||||
<div style="display: flex;clear: both;width:auto;margin:auto;flex-flow:wrap;text-align:center">
|
||||
@foreach (var image in Model.GanjoorPage.Poem.Images)
|
||||
{
|
||||
<a target="_blank" style="text-align:center;margin:auto" href="@Html.Raw(image.TargetPageUrl)">
|
||||
<img src="@Html.Raw(image.ThumbnailImageUrl)" alt="@Html.Raw(image.AltText)" width="200" style="width:200px;float: right;padding: 5px;">
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
<p>
|
||||
<small><i class="pageicons">photo_camera</i> <a href="?pinterest_url=manual" onclick="wpopen(this.href); return false" class="comments-link">پیشنهاد تصاویر مرتبط از منابع اینترنتی</a>، <i class="pageicons">support</i> <a href="http://blog.ganjoor.net/1398/07/12/mganjoor/" target="_blank">راهنمای نحوهٔ پیشنهاد تصاویر مرتبط از گنجینهٔ گنجور</a></small>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -944,9 +944,8 @@ form div input.inputSubmit, #postcomment.inputSubmit, input[type="submit"] {
|
||||
}
|
||||
|
||||
|
||||
.textualbutton {
|
||||
.textualbutton, .pagebutton {
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
color: white !important;
|
||||
background-color: #300;
|
||||
display: block;
|
||||
@ -956,6 +955,16 @@ form div input.inputSubmit, #postcomment.inputSubmit, input[type="submit"] {
|
||||
box-shadow: 0 5px 0.3rem rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.textualbutton {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pagebutton{
|
||||
padding:5px;
|
||||
font-size: 0.8em;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
|
||||
.century {
|
||||
clear: both;
|
||||
@ -978,3 +987,10 @@ form div input.inputSubmit, #postcomment.inputSubmit, input[type="submit"] {
|
||||
text-align: center;
|
||||
text-indent: 0;
|
||||
}
|
||||
|
||||
.poem-actions {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
width: 100%;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
@ -90,10 +90,10 @@ function btshmr_internal(poemId) {
|
||||
for (var i = 0; i < bnumdiv.length; ++i) {
|
||||
bnumdiv[i].remove();
|
||||
}
|
||||
document.getElementById("bnum-button").innerText = "شمارهگذاری ابیات";
|
||||
document.getElementById("bnum-button").innerHTML = 'شمارهگذاری<i class="info-buttons">format_list_numbered_rtl</i>';
|
||||
return true;
|
||||
}
|
||||
document.getElementById("bnum-button").innerText = "حذف شمارهها";
|
||||
document.getElementById("bnum-button").innerHTML = 'حذف شمارهها<i class="info-buttons">format_list_numbered_rtl</i>';
|
||||
var msr1s = getElements("m1", "b2", "n", "l");
|
||||
if (msr1s.length == 0) return true;
|
||||
var j = 0;
|
||||
@ -494,7 +494,7 @@ function switchBookmark(poemId, coupletIndex) {
|
||||
}
|
||||
|
||||
if (coupletIndex == 0) {
|
||||
document.getElementById('bookmark-icon').innerHTML = 'star';
|
||||
document.getElementById('bookmark').innerHTML = 'نشان شده<i class="info-buttons" id="bookmark-icon">star</i>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -503,7 +503,7 @@ function switchBookmark(poemId, coupletIndex) {
|
||||
}
|
||||
|
||||
if (coupletIndex == 0) {
|
||||
document.getElementById('bookmark-icon').innerHTML = 'star_border';
|
||||
document.getElementById('bookmark').innerHTML = 'نشانهگذاری<i class="info-buttons" id="bookmark-icon">star_border</i>';
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -522,10 +522,10 @@ function checkIfBookmarked(poemId) {
|
||||
},
|
||||
success: function (isBookmarked) {
|
||||
if (isBookmarked) {
|
||||
document.getElementById('bookmark-icon').innerHTML = 'star';
|
||||
document.getElementById('bookmark').innerHTML = 'نشان شده<i class="info-buttons" id="bookmark-icon">star</i>';
|
||||
}
|
||||
else {
|
||||
document.getElementById('bookmark-icon').innerHTML = 'star_border';
|
||||
document.getElementById('bookmark').innerHTML = 'نشانهگذاری<i class="info-buttons" id="bookmark-icon">star_border</i>';
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user