کتاب مقدس آنلاین: تفاوت میان نسخهها
ظاهر
بدون خلاصۀ ویرایش |
بدون خلاصۀ ویرایش |
||
خط ۶: | خط ۶: | ||
<title>کتاب مقدس - مطالعه آنلاین</title> | <title>کتاب مقدس - مطالعه آنلاین</title> | ||
<style> | <style> | ||
/* استایلها مانند قبل */ | |||
:root { | :root { | ||
--primary-color: #2c3e50; | --primary-color: #2c3e50; | ||
خط ۳۱: | خط ۳۲: | ||
max-width: 1200px; | max-width: 1200px; | ||
margin: 0 auto; | margin: 0 auto; | ||
padding: | padding: 20px; | ||
} | } | ||
header { | header { | ||
text-align: center; | text-align: center; | ||
margin-bottom: | margin-bottom: 30px; | ||
padding: | padding: 20px 0; | ||
border-bottom: 1px solid #ddd; | border-bottom: 1px solid #ddd; | ||
} | } | ||
خط ۴۳: | خط ۴۴: | ||
h1 { | h1 { | ||
color: var(--primary-color); | color: var(--primary-color); | ||
margin-bottom: | margin-bottom: 10px; | ||
} | } | ||
.description { | .description { | ||
color: #7f8c8d; | color: #7f8c8d; | ||
font-size: | font-size: 1.1rem; | ||
} | } | ||
خط ۵۵: | خط ۵۵: | ||
display: flex; | display: flex; | ||
flex-wrap: wrap; | flex-wrap: wrap; | ||
gap: | gap: 20px; | ||
margin-bottom: | margin-bottom: 30px; | ||
} | } | ||
.selector-box { | .selector-box { | ||
flex: 1; | flex: 1; | ||
min-width: | min-width: 250px; | ||
background: white; | background: white; | ||
border-radius: 8px; | border-radius: 8px; | ||
box-shadow: 0 | box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | ||
padding: | padding: 20px; | ||
transition: transform 0.3s ease; | transition: transform 0.3s ease; | ||
} | } | ||
.selector-box:hover { | .selector-box:hover { | ||
transform: translateY(- | transform: translateY(-5px); | ||
} | } | ||
.selector-title { | .selector-title { | ||
font-size: 1. | font-size: 1.2rem; | ||
margin-bottom: | margin-bottom: 15px; | ||
color: var(--primary-color); | color: var(--primary-color); | ||
border-bottom: 2px solid var(--secondary-color); | border-bottom: 2px solid var(--secondary-color); | ||
padding-bottom: | padding-bottom: 8px; | ||
} | } | ||
select { | select { | ||
width: 100%; | width: 100%; | ||
padding: | padding: 12px 15px; | ||
border: 1px solid #ddd; | border: 1px solid #ddd; | ||
border-radius: 5px; | border-radius: 5px; | ||
background-color: white; | background-color: white; | ||
font-size: | font-size: 1rem; | ||
color: var(--dark-color); | color: var(--dark-color); | ||
cursor: pointer; | cursor: pointer; | ||
خط ۱۰۱: | خط ۱۰۱: | ||
background: white; | background: white; | ||
border-radius: 8px; | border-radius: 8px; | ||
box-shadow: 0 | box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | ||
padding: | padding: 30px; | ||
min-height: 300px; | min-height: 300px; | ||
} | } | ||
خط ۱۰۸: | خط ۱۰۸: | ||
.chapter-title { | .chapter-title { | ||
text-align: center; | text-align: center; | ||
margin-bottom: | margin-bottom: 20px; | ||
color: var(--primary-color); | color: var(--primary-color); | ||
font-size: 1. | font-size: 1.5rem; | ||
} | } | ||
خط ۱۱۶: | خط ۱۱۶: | ||
display: flex; | display: flex; | ||
justify-content: space-between; | justify-content: space-between; | ||
margin-top: | margin-top: 30px; | ||
} | } | ||
.nav-btn { | .nav-btn { | ||
padding: | padding: 10px 20px; | ||
background-color: var(--secondary-color); | background-color: var(--secondary-color); | ||
color: white; | color: white; | ||
خط ۱۲۹: | خط ۱۲۷: | ||
cursor: pointer; | cursor: pointer; | ||
transition: background-color 0.3s; | transition: background-color 0.3s; | ||
font-size: | font-size: 1rem; | ||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
gap: 5px; | gap: 5px; | ||
} | } | ||
خط ۱۵۱: | خط ۱۴۵: | ||
display: inline-flex; | display: inline-flex; | ||
align-items: center; | align-items: center; | ||
gap: 5px; | gap: 5px; | ||
padding: | padding: 10px 20px; | ||
background-color: var(--accent-color); | background-color: var(--accent-color); | ||
color: white; | color: white; | ||
خط ۱۵۹: | خط ۱۵۲: | ||
border-radius: 5px; | border-radius: 5px; | ||
transition: background-color 0.3s; | transition: background-color 0.3s; | ||
} | } | ||
خط ۱۷۳: | خط ۱۶۲: | ||
color: #7f8c8d; | color: #7f8c8d; | ||
font-style: italic; | font-style: italic; | ||
padding: | padding: 40px; | ||
} | } | ||
خط ۱۷۹: | خط ۱۶۸: | ||
text-align: center; | text-align: center; | ||
color: #7f8c8d; | color: #7f8c8d; | ||
padding: | padding: 20px; | ||
border: 1px dashed #ddd; | border: 1px dashed #ddd; | ||
border-radius: 5px; | border-radius: 5px; | ||
margin-top: | margin-top: 20px; | ||
} | } | ||
.iframe-container { | .iframe-container { | ||
margin-top: | margin-top: 20px; | ||
} | } | ||
. | .iframe-header { | ||
display: flex; | |||
justify-content: space-between; | |||
align-items: center; | |||
margin-bottom: 15px; | margin-bottom: 15px; | ||
padding: | padding: 15px; | ||
background: #f8f9fa; | background: #f8f9fa; | ||
border-radius: 8px; | |||
border: 1px solid #e9ecef; | |||
} | |||
.view-options { | |||
display: flex; | |||
gap: 10px; | |||
align-items: center; | |||
} | |||
.view-btn { | |||
padding: 8px 16px; | |||
border: 1px solid #ddd; | |||
background: white; | |||
border-radius: 5px; | border-radius: 5px; | ||
cursor: pointer; | |||
transition: all 0.3s; | |||
font-size: 0.9rem; | font-size: 0.9rem; | ||
display: flex; | |||
align-items: center; | |||
gap: 5px; | |||
} | |||
.view-btn.active { | |||
background-color: var(--secondary-color); | |||
color: white; | |||
border-color: var(--secondary-color); | |||
} | } | ||
.clean-iframe { | .clean-iframe { | ||
width: 100%; | width: 100%; | ||
height: | height: 600px; | ||
border: 1px solid #ddd; | border: 1px solid #ddd; | ||
border-radius: 8px; | border-radius: 8px; | ||
خط ۲۱۰: | خط ۲۲۴: | ||
.access-denied { | .access-denied { | ||
text-align: center; | text-align: center; | ||
padding: | padding: 40px; | ||
background: #fee; | background: #fee; | ||
border-radius: 8px; | border-radius: 8px; | ||
خط ۲۱۹: | خط ۲۳۳: | ||
.access-denied h3 { | .access-denied h3 { | ||
color: #721c24; | color: #721c24; | ||
margin-bottom: | margin-bottom: 15px; | ||
} | } | ||
@media (max-width: 768px) { | @media (max-width: 768px) { | ||
.bible-selector { | .bible-selector { | ||
flex-direction: column; | flex-direction: column; | ||
} | } | ||
.selector-box { | .selector-box { | ||
min-width: 100%; | min-width: 100%; | ||
} | } | ||
.navigation { | .navigation { | ||
flex-direction: | flex-direction: column; | ||
gap: | gap: 10px; | ||
} | } | ||
. | .iframe-header { | ||
flex-direction: column; | |||
flex | gap: 10px; | ||
text-align: center; | |||
} | } | ||
. | .view-options { | ||
flex-wrap: wrap; | |||
justify-content: center; | |||
} | } | ||
} | } | ||
خط ۵۵۷: | خط ۵۰۲: | ||
versesContainer.innerHTML = ` | versesContainer.innerHTML = ` | ||
<div class="iframe-container"> | <div class="iframe-container"> | ||
<div class=" | <div class="iframe-header"> | ||
📖 در حال نمایش: <strong>${bookName} فصل ${currentChapter}</strong> | <span>📖 در حال نمایش: <strong>${bookName} فصل ${currentChapter}</strong></span> | ||
<div class="view-options"> | |||
<button class="view-btn ${currentViewMode === 'render' ? 'active' : ''}" onclick="switchViewMode('render')">نمایش تمیز</button> | |||
<button class="view-btn ${currentViewMode === 'full' ? 'active' : ''}" onclick="switchViewMode('full')">صفحه کامل</button> | |||
<a href="${fullPageUrl}" class="wiki-link" target="_blank">باز کردن در تب جدید</a> | |||
</div> | |||
</div> | </div> | ||
<iframe | <iframe | ||
خط ۵۷۱: | خط ۵۲۱: | ||
`; | `; | ||
// نمایش دکمههای حالت نمایش | // نمایش دکمههای حالت نمایش در ناوبری پایین | ||
cleanViewBtn.style.display = 'inline-flex'; | cleanViewBtn.style.display = 'inline-flex'; | ||
fullViewBtn.style.display = 'inline-flex'; | fullViewBtn.style.display = 'inline-flex'; | ||
wikiPageLink.href = fullPageUrl; | wikiPageLink.href = fullPageUrl; | ||
خط ۵۹۳: | خط ۵۴۰: | ||
} | } | ||
function | function switchViewMode(mode) { | ||
currentViewMode = mode; | |||
const iframe = document.getElementById('content-iframe'); | |||
if (iframe) { | |||
iframe.src = getCurrentViewUrl(); | |||
} | } | ||
document.querySelectorAll('.view-btn').forEach(btn => { | |||
btn.classList.remove('active'); | |||
}); | |||
event.target.classList.add('active'); | |||
} | } | ||
// رویداد دکمه نمایش تمیز | // رویداد دکمه نمایش تمیز در ناوبری پایین | ||
cleanViewBtn.addEventListener('click', function() { | cleanViewBtn.addEventListener('click', function() { | ||
currentViewMode = 'render'; | currentViewMode = 'render'; | ||
خط ۶۱۰: | خط ۵۶۰: | ||
iframe.src = getCurrentViewUrl(); | iframe.src = getCurrentViewUrl(); | ||
} | } | ||
// بهروزرسانی دکمههای بالایی | |||
document.querySelectorAll('.view-btn').forEach(btn => { | |||
btn.classList.remove('active'); | |||
}); | |||
document.querySelector('.view-btn[onclick="switchViewMode(\'render\')"]').classList.add('active'); | |||
}); | }); | ||
// رویداد دکمه نمایش کامل | // رویداد دکمه نمایش کامل در ناوبری پایین | ||
fullViewBtn.addEventListener('click', function() { | fullViewBtn.addEventListener('click', function() { | ||
currentViewMode = 'full'; | currentViewMode = 'full'; | ||
خط ۶۲۰: | خط ۵۷۵: | ||
iframe.src = getCurrentViewUrl(); | iframe.src = getCurrentViewUrl(); | ||
} | } | ||
// بهروزرسانی دکمههای بالایی | |||
document.querySelectorAll('.view-btn').forEach(btn => { | |||
btn.classList.remove('active'); | |||
}); | |||
document.querySelector('.view-btn[onclick="switchViewMode(\'full\')"]').classList.add('active'); | |||
}); | }); | ||
خط ۶۷۷: | خط ۶۳۷: | ||
}); | }); | ||
// 🔒 جلوگیری از | // 🔒 جلوگیری از دستکاری از کنسول | ||
Object.defineProperty(window, 'bibleData', { | Object.defineProperty(window, 'bibleData', { | ||
value: null, | value: null, |
نسخهٔ ۷ اکتبر ۲۰۲۵، ساعت ۲۲:۵۶
<!DOCTYPE html>
کتاب مقدس
مطالعه آنلاین کتاب مقدس به زبان فارسی