190 lines
6.0 KiB
Plaintext
190 lines
6.0 KiB
Plaintext
@page
|
|
@model IndexModel
|
|
@{
|
|
Layout = null;
|
|
}
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="fa-IR" dir="rtl">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>
|
|
@Html.Raw(ViewData["Title"])
|
|
</title>
|
|
@if (!string.IsNullOrEmpty(Model.PinterestUrl))
|
|
{
|
|
<meta name="robots" content="noindex, nofollow" />
|
|
}
|
|
<link href="/dist/skin/blue.monday/css/jplayer.blue.monday.min.css" rel="stylesheet" type="text/css" />
|
|
<link href="/css/p8.css?version=17" rel="stylesheet" type="text/css" />
|
|
<link href="/css/fab.css" rel="stylesheet" type="text/css" />
|
|
<link rel="shortcut icon" href="/favicon.ico" 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>
|
|
var playerScrollLock = false;
|
|
</script>
|
|
<script src="/js/bk.js?version=10"></script>
|
|
|
|
@if (Model.IsHomePage)
|
|
{
|
|
<meta name="description" content="جستجو در شعر فارسی" />
|
|
}
|
|
else
|
|
{
|
|
if (Model.IsPoemPage)
|
|
{
|
|
<script>
|
|
$(document).ready(function () {
|
|
checkWebShareSupport();
|
|
btshmr(@Model.GanjoorPage.Id);
|
|
checkIfBookmarked(@Model.GanjoorPage.Id);
|
|
});
|
|
</script>
|
|
|
|
}
|
|
<script type="application/ld+json">
|
|
{
|
|
@Html.Raw(@ViewData["BrearCrumpList"])
|
|
}
|
|
</script>
|
|
}
|
|
|
|
</head>
|
|
<body>
|
|
<script src="/js/vaabd.js"></script>
|
|
|
|
@if (Model.IsHomePage)
|
|
{
|
|
@if (!string.IsNullOrEmpty(Model.LastError))
|
|
{
|
|
<div class="poem">
|
|
@Model.LastError
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<partial name="_HomePagePartial" model="Model" />
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<partial name="_GanjoorPagePartial" model="Model" />
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@{
|
|
if (Model.IsPoemPage)
|
|
{
|
|
if (Model.GanjoorPage != null && Model.GanjoorPage.Poem.Recitations.Length > 0)
|
|
{
|
|
<script src="/dist/jplayer/jquery.jplayer.min.js"></script>
|
|
<script src="/dist/add-on/jplayer.playlist.min.js"></script>
|
|
<script>
|
|
//<![CDATA[
|
|
$(document).ready(function () {
|
|
var jlist = prepaudio(
|
|
"@Html.Raw($"{GanjooRazor.APIRoot.InternetUrl}/api/audio/file/{Model.GanjoorPage.Poem.Recitations[0].Id}.xml")",
|
|
"@Html.Raw(Model.GanjoorPage.Poem.Recitations[0].AudioTitle)",
|
|
"@Html.Raw(Model.getAudioDesc(Model.GanjoorPage.Poem.Recitations[0], true))",
|
|
"",
|
|
"@Html.Raw(Model.GanjoorPage.Poem.Recitations[0].Mp3Url)"
|
|
);
|
|
|
|
@for(int x = 1; x<Model.GanjoorPage.Poem.Recitations.Length; x++)
|
|
{
|
|
<text>
|
|
addpaudio(@x, jlist,
|
|
"@Html.Raw($"{GanjooRazor.APIRoot.InternetUrl}/api/audio/file/{Model.GanjoorPage.Poem.Recitations[x].Id}.xml")",
|
|
"@Html.Raw(Model.GanjoorPage.Poem.Recitations[x].AudioTitle)",
|
|
"@Html.Raw(Model.getAudioDesc(Model.GanjoorPage.Poem.Recitations[x], false))",
|
|
"",
|
|
"@Html.Raw(Model.GanjoorPage.Poem.Recitations[x].Mp3Url)"
|
|
);
|
|
</text>
|
|
}
|
|
|
|
if (playerScrollLock) {
|
|
$('#scroll-lock').text('🔒');
|
|
}
|
|
else {
|
|
$('#scroll-lock').text('🔓');
|
|
}
|
|
|
|
$('#scroll-lock').click(function () {
|
|
playerScrollLock = !playerScrollLock;
|
|
if (playerScrollLock) {
|
|
|
|
$('#scroll-lock').text('🔒');
|
|
}
|
|
else {
|
|
$('#scroll-lock').text('🔓');
|
|
}
|
|
});
|
|
|
|
});
|
|
//]]>
|
|
</script>
|
|
}
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(Model.PinterestUrl))
|
|
{
|
|
<script>
|
|
$(function () {
|
|
$("a").attr('href', function (i, h) {
|
|
if (h != null) {
|
|
return h + (h.indexOf('?') != -1 ? "&pinterest_url=@Html.Raw(Model.PinterestUrl)" : "?pinterest_url=@Html.Raw(Model.PinterestUrl)");
|
|
}
|
|
return h;
|
|
});
|
|
});
|
|
</script>
|
|
}
|
|
}
|
|
|
|
|
|
<script src="/lib/tinymce/tinymce.min.js"></script>
|
|
<script>
|
|
tinymce.init({
|
|
selector: 'textarea.editor',
|
|
language: 'fa_IR',
|
|
menubar: false,
|
|
plugins: 'link paste',
|
|
toolbar: 'undo redo | alignleft aligncenter alignright alignjustify | outdent indent | link',
|
|
paste_auto_cleanup_on_paste: true,
|
|
paste_remove_styles: true,
|
|
paste_remove_styles_if_webkit: true,
|
|
paste_strip_class_attributes: true,
|
|
});
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
@if (!string.IsNullOrEmpty(ViewData["GoogleAnalyticsCode"].ToString()))
|
|
{
|
|
<script>
|
|
(function (i, s, o, g, r, a, m) {
|
|
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
|
|
(i[r].q = i[r].q || []).push(arguments)
|
|
}, i[r].l = 1 * new Date(); a = s.createElement(o),
|
|
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
|
|
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
|
|
|
|
ga('create', '@ViewData["GoogleAnalyticsCode"]', 'auto');
|
|
ga('send', 'pageview');
|
|
|
|
</script>
|
|
}
|
|
|
|
</body>
|
|
</html>
|
|
|
|
|