کتاب مقدس آنلاین: تفاوت میان نسخهها
ظاهر
بدون خلاصۀ ویرایش |
بدون خلاصۀ ویرایش |
||
| (۳۳ نسخهٔ میانیِ ایجادشده توسط همین کاربر نشان داده نشد) | |||
| خط ۶۵: | خط ۶۵: | ||
gap: 8px; | gap: 8px; | ||
margin-bottom: 12px; | margin-bottom: 12px; | ||
font-size: | font-size: 1.1rem; | ||
color: var(--dark-color); | color: var(--dark-color); | ||
direction: rtl; | direction: rtl; | ||
| خط ۱۰۲: | خط ۱۰۲: | ||
.description { | .description { | ||
color: | color:#808080; | ||
font-size: 1rem; | font-size:1rem; | ||
font-style: italic; | font-style: italic; | ||
margin-top: 5px; | margin-top: 5px; | ||
| خط ۲۳۴: | خط ۲۳۴: | ||
gap: 8px; | gap: 8px; | ||
padding: 12px 20px; | padding: 12px 20px; | ||
background-color: | background-color: #87CEEB; | ||
color: | color: #000000; | ||
text-decoration: none; | text-decoration: none; | ||
border-radius: 6px; | border-radius: 6px; | ||
| خط ۲۷۷: | خط ۲۷۷: | ||
} | } | ||
.info-message { | |||
text-align: center; | |||
padding: 10px; | |||
background: #e7f3ff; | |||
border-radius: 5px; | |||
margin-top: 10px; | |||
font-size: 0.9rem; | |||
color: #0066cc; | |||
} | |||
/* استایلهای مخصوص موبایل */ | |||
@media (max-width: 768px) { | @media (max-width: 768px) { | ||
.container { | .container { | ||
padding: 8px 10px; | padding: 8px 10px; | ||
} | } | ||
.app-header { | .app-header { | ||
margin-bottom: 15px; | margin-bottom: 15px; | ||
padding: 12px 15px; | padding: 12px 15px; | ||
} | } | ||
.breadcrumb { | .breadcrumb { | ||
font-size: 0.85rem; | font-size: 0.85rem; | ||
margin-bottom: 10px; | margin-bottom: 10px; | ||
} | } | ||
.app-header h1 { | .app-header h1 { | ||
font-size: 1.5rem; | font-size: 1.5rem; | ||
margin-bottom: 6px; | margin-bottom: 6px; | ||
} | } | ||
.description { | .description { | ||
font-size: 0.9rem; | font-size: 0.9rem; | ||
} | } | ||
.selector-container { | .selector-container { | ||
grid-template-columns: 1fr; | grid-template-columns: 1fr; | ||
| خط ۳۰۲: | خط ۳۱۸: | ||
padding: 15px; | padding: 15px; | ||
} | } | ||
.bible-content { | .bible-content { | ||
padding: 15px; | padding: 15px; | ||
min-height: 450px; | min-height: 450px; | ||
} | } | ||
.chapter-title { | .chapter-title { | ||
font-size: 1.3rem; | font-size: 1.3rem; | ||
margin-bottom: 15px; | margin-bottom: 15px; | ||
} | } | ||
.content-display { | .content-display { | ||
height: 500px; | height: 500px; | ||
} | } | ||
.navigation { | .navigation { | ||
flex-direction: column; | flex-direction: column; | ||
gap: 10px; | gap: 10px; | ||
} | } | ||
.nav-btn, .wiki-link { | .nav-btn, .wiki-link { | ||
width: 100%; | width: 100%; | ||
| خط ۳۲۷: | خط ۳۴۸: | ||
height: 450px; | height: 450px; | ||
} | } | ||
.nav-btn, .wiki-link { | .nav-btn, .wiki-link { | ||
padding: 10px 15px; | padding: 10px 15px; | ||
font-size: 0.9rem; | font-size: 0.9rem; | ||
} | } | ||
.instructions { | .instructions { | ||
padding: 30px 15px; | padding: 30px 15px; | ||
font-size: 1rem; | font-size: 1rem; | ||
} | } | ||
.app-header { | .app-header { | ||
padding: 10px 12px; | padding: 10px 12px; | ||
} | } | ||
.app-header h1 { | .app-header h1 { | ||
font-size: 1.3rem; | font-size: 1.3rem; | ||
| خط ۳۴۳: | خط ۳۶۸: | ||
} | } | ||
/* استایل برای حالت انتخاب نشده */ | |||
.placeholder { | .placeholder { | ||
display: flex; | display: flex; | ||
| خط ۳۵۹: | خط ۳۸۵: | ||
} | } | ||
/* استایل برای راستچین کامل */ | |||
option { | option { | ||
direction: rtl; | direction: rtl; | ||
| خط ۳۷۳: | خط ۴۰۰: | ||
<span class="breadcrumb-current">کتاب مقدس</span> | <span class="breadcrumb-current">کتاب مقدس</span> | ||
</nav> | </nav> | ||
<h1>کتاب مقدس</h1> | <h1>کتاب مقدس آنلاین</h1> | ||
<p class="description">مطالعه | <p class="description">مطالعه ترجمههای مختلف بصورت کاربردی با واژه نامه تخصصی<br> | ||
ترجمهٔ هزارهٔ نو و مژده هماکنون قابل مطالعهاند و عهد جدید کامل شده است. واژهنامهها بهصورت روزانه و با دقت در حال اتصال و بهروزرسانی هستند تا خدمتی ماندگار برای نسل حال و آیندگان در خداوند بهجا بگذاریم.</p> | |||
</div> | </div> | ||
| خط ۳۸۳: | خط ۴۱۱: | ||
<script> | <script> | ||
// 🔒 سیستم حفاظتی - بررسی دامنه مجاز | |||
const ALLOWED_DOMAINS = [ | const ALLOWED_DOMAINS = [ | ||
'pediabible.com', | 'pediabible.com', | ||
| خط ۳۹۰: | خط ۴۱۹: | ||
]; | ]; | ||
// تابع بررسی مجاز بودن دامنه | |||
function isDomainAllowed() { | function isDomainAllowed() { | ||
const currentDomain = window.location.hostname; | const currentDomain = window.location.hostname; | ||
if (!currentDomain || currentDomain === '' || currentDomain === 'null') return true; | console.log('🔍 بررسی دامنه:', currentDomain); | ||
currentDomain === domain || currentDomain.endsWith('.' + domain) | // اگر روی فایل محلی هستیم، اجازه بده | ||
); | if (!currentDomain || currentDomain === '' || currentDomain === 'null') { | ||
console.log('✅ فایل محلی - مجاز'); | |||
return true; | |||
} | |||
const isAllowed = ALLOWED_DOMAINS.some(domain => { | |||
const match = currentDomain === domain || currentDomain.endsWith('.' + domain); | |||
if (match) { | |||
console.log(`✅ دامنه ${currentDomain} مجاز است`); | |||
} | |||
return match; | |||
}); | |||
if (!isAllowed) { | |||
console.log(`❌ دامنه ${currentDomain} غیرمجاز است`); | |||
} | |||
return isAllowed; | |||
} | } | ||
// تابع نمایش پیام دسترسی غیرمجاز | |||
function showAccessDenied() { | function showAccessDenied() { | ||
const wrapper = document.getElementById('content-wrapper'); | const wrapper = document.getElementById('content-wrapper'); | ||
| خط ۴۱۰: | خط ۴۵۸: | ||
} | } | ||
// تابع اصلی بارگذاری برنامه | |||
function loadApplication() { | |||
console.log('🚀 شروع بارگذاری با بررسی امنیتی...'); | |||
if (!isDomainAllowed()) { | |||
console.log('❌ دسترسی غیرمجاز - نمایش پیام خطا'); | |||
showAccessDenied(); | |||
return; | |||
} | |||
console.log('✅ دامنه مجاز - بارگذاری برنامه اصلی'); | |||
// اگر دامنه مجاز باشد، برنامه اصلی بارگذاری میشود | |||
initializeBibleApp(); | |||
} | |||
// دادههای کامل کتابهای مقدس | |||
const bibleBooks = { | const bibleBooks = { | ||
old: [ | old: [ | ||
| خط ۴۸۳: | خط ۵۴۷: | ||
}; | }; | ||
// | // 🔧 برنامه اصلی کتاب مقدس | ||
function initializeBibleApp() { | function initializeBibleApp() { | ||
const wrapper = document.getElementById('content-wrapper'); | const wrapper = document.getElementById('content-wrapper'); | ||
// ایجاد ساختار HTML برنامه | |||
wrapper.innerHTML = ` | wrapper.innerHTML = ` | ||
<div class="selector-container"> | <div class="selector-container"> | ||
| خط ۵۷۸: | خط ۵۹۹: | ||
</div> | </div> | ||
</div> | </div> | ||
</div> | |||
<div class="info-message"> | |||
<i class="fas fa-info-circle"></i> | |||
واژه ها در همین پنجره نمایش داده میشوند. برای تجربه بهتر مطالعه واژه در تب جدید: راست کلیک → Open in new tab | |||
</div> | </div> | ||
| خط ۵۹۹: | خط ۶۲۵: | ||
`; | `; | ||
// دادههای ترجمههای مختلف | |||
const translations = { | const translations = { | ||
'old': { | 'old': { | ||
name: 'ترجمه قدیم', | name: 'ترجمه قدیم', | ||
baseUrl: 'https://www.pediabible.com/index.php?title=', | baseUrl: 'https://www.pediabible.com/index.php?title=', | ||
getPageTitle: (bookDisplayName, chapter) | getPageTitle: function(bookDisplayName, chapter) { | ||
return `${bookDisplayName} فصل ${chapter}`; | |||
} | |||
}, | }, | ||
'hejre_nou': { | 'hejre_nou': { | ||
name: 'هزاره نو', | name: 'هزاره نو', | ||
baseUrl: 'https://www.pediabible.com/index.php?title=', | baseUrl: 'https://www.pediabible.com/index.php?title=', | ||
getPageTitle: (bookDisplayName, chapter) | getPageTitle: function(bookDisplayName, chapter) { | ||
return `${bookDisplayName} هزاره نو فصل ${chapter}`; | |||
} | |||
}, | }, | ||
'mozde': { | 'mozde': { | ||
name: 'مژده', | name: 'مژده', | ||
baseUrl: 'https://www.pediabible.com/index.php?title=', | baseUrl: 'https://www.pediabible.com/index.php?title=', | ||
getPageTitle: (bookDisplayName, chapter) | getPageTitle: function(bookDisplayName, chapter) { | ||
return `${bookDisplayName} مژده فصل ${chapter}`; | |||
} | |||
}, | }, | ||
'daneshname': { | 'daneshname': { | ||
name: 'دانشنامه', | name: 'دانشنامه', | ||
baseUrl: 'https://www.pediabible.com/index.php?title=', | baseUrl: 'https://www.pediabible.com/index.php?title=', | ||
getPageTitle: (bookDisplayName, chapter) | getPageTitle: function(bookDisplayName, chapter) { | ||
return `${bookDisplayName} دانشنامه فصل ${chapter}`; | |||
} | |||
} | } | ||
}; | }; | ||
// عناصر DOM | |||
const translationSelect = document.getElementById('translation-select'); | const translationSelect = document.getElementById('translation-select'); | ||
const testamentSelect = document.getElementById('testament-select'); | const testamentSelect = document.getElementById('testament-select'); | ||
| خط ۶۳۲: | خط ۶۶۸: | ||
const wikiPageLink = document.getElementById('wiki-page-link'); | const wikiPageLink = document.getElementById('wiki-page-link'); | ||
// متغیرهای وضعیت فعلی | |||
let currentTranslation = ''; | let currentTranslation = ''; | ||
let currentTestament = ''; | let currentTestament = ''; | ||
| خط ۶۳۷: | خط ۶۷۴: | ||
let currentChapter = 1; | let currentChapter = 1; | ||
// رویداد تغییر ترجمه | |||
translationSelect.addEventListener('change', function() { | translationSelect.addEventListener('change', function() { | ||
currentTranslation = this.value; | currentTranslation = this.value; | ||
if (currentTranslation) { | if (currentTranslation) { | ||
testamentSelect.disabled = false; | testamentSelect.disabled = false; | ||
testamentSelect.value = ''; | testamentSelect.value = ''; | ||
bookSelect.disabled = true; | |||
bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>'; | |||
chapterSelect.disabled = true; | |||
chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>'; | |||
resetContent(); | |||
} else { | } else { | ||
resetAll(); | resetAll(); | ||
| خط ۷۱۴: | خط ۶۹۱: | ||
}); | }); | ||
// رویداد تغییر عهد | |||
testamentSelect.addEventListener('change', function() { | testamentSelect.addEventListener('change', function() { | ||
currentTestament = this.value; | currentTestament = this.value; | ||
if (currentTestament) { | if (currentTestament) { | ||
bookSelect.disabled = false; | bookSelect.disabled = false; | ||
bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>'; | bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>'; | ||
bibleBooks[currentTestament].forEach((book, index) => { | bibleBooks[currentTestament].forEach((book, index) => { | ||
const option = document.createElement('option'); | const option = document.createElement('option'); | ||
| خط ۷۲۵: | خط ۷۰۵: | ||
bookSelect.appendChild(option); | bookSelect.appendChild(option); | ||
}); | }); | ||
chapterSelect.disabled = true; | chapterSelect.disabled = true; | ||
chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>'; | chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>'; | ||
resetContent(); | resetContent(); | ||
} else { | } else { | ||
bookSelect.disabled = true; | |||
bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>'; | |||
chapterSelect.disabled = true; | |||
chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>'; | |||
resetContent(); | |||
} | } | ||
}); | }); | ||
// رویداد تغییر کتاب | |||
bookSelect.addEventListener('change', function() { | bookSelect.addEventListener('change', function() { | ||
currentBook = this.value; | currentBook = this.value; | ||
if (currentBook !== '') { | if (currentBook !== '') { | ||
chapterSelect.disabled = false; | chapterSelect.disabled = false; | ||
chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>'; | chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>'; | ||
const bookIndex = parseInt(currentBook); | const bookIndex = parseInt(currentBook); | ||
const chaptersCount = bibleBooks[currentTestament][bookIndex].chapters; | const chaptersCount = bibleBooks[currentTestament][bookIndex].chapters; | ||
for (let i = 1; i <= chaptersCount; i++) { | for (let i = 1; i <= chaptersCount; i++) { | ||
const option = document.createElement('option'); | const option = document.createElement('option'); | ||
| خط ۷۴۶: | خط ۷۳۵: | ||
chapterSelect.appendChild(option); | chapterSelect.appendChild(option); | ||
} | } | ||
prevChapterBtn.disabled = true; | prevChapterBtn.disabled = true; | ||
nextChapterBtn.disabled = true; | nextChapterBtn.disabled = true; | ||
| خط ۷۵۶: | خط ۷۴۶: | ||
}); | }); | ||
// رویداد تغییر فصل | |||
chapterSelect.addEventListener('change', function() { | chapterSelect.addEventListener('change', function() { | ||
currentChapter = parseInt(this.value); | currentChapter = parseInt(this.value); | ||
if (currentChapter) { | if (currentChapter) { | ||
displayChapterWithIframe(); | displayChapterWithIframe(); | ||
| خط ۷۶۴: | خط ۷۵۶: | ||
} | } | ||
}); | }); | ||
// نمایش فصل با iframe - فقط محتوای اصلی | |||
function displayChapterWithIframe() { | |||
const bookIndex = parseInt(currentBook); | |||
const bookData = bibleBooks[currentTestament][bookIndex]; | |||
const bookName = bookData.name; | |||
const bookDisplayName = bookData.displayName; | |||
const translationName = translations[currentTranslation].name; | |||
chapterTitle.textContent = `${translationName} - ${bookName} - فصل ${currentChapter}`; | |||
const pageTitle = translations[currentTranslation].getPageTitle(bookDisplayName, currentChapter); | |||
const contentUrl = `${translations[currentTranslation].baseUrl}${encodeURIComponent(pageTitle)}&action=render`; | |||
versesContainer.innerHTML = ` | |||
<iframe | |||
id="content-iframe" | |||
src="${contentUrl}" | |||
class="content-display" | |||
frameborder="0" | |||
loading="lazy" | |||
sandbox="allow-scripts allow-same-origin allow-forms allow-popups" | |||
allowfullscreen> | |||
</iframe> | |||
`; | |||
// اضافه کردن sandbox به iframe برای امنیت بیشتر | |||
const iframe = document.getElementById('content-iframe'); | |||
wikiPageLink.href = `${translations[currentTranslation].baseUrl}${encodeURIComponent(pageTitle)}`; | |||
wikiPageLink.style.display = 'flex'; | |||
updateNavigationButtons(); | |||
} | |||
function updateNavigationButtons() { | |||
const bookIndex = parseInt(currentBook); | |||
const chaptersCount = bibleBooks[currentTestament][bookIndex].chapters; | |||
prevChapterBtn.disabled = currentChapter <= 1; | |||
nextChapterBtn.disabled = currentChapter >= chaptersCount; | |||
} | |||
prevChapterBtn.addEventListener('click', function() { | prevChapterBtn.addEventListener('click', function() { | ||
| خط ۷۷۶: | خط ۸۰۹: | ||
const bookIndex = parseInt(currentBook); | const bookIndex = parseInt(currentBook); | ||
const chaptersCount = bibleBooks[currentTestament][bookIndex].chapters; | const chaptersCount = bibleBooks[currentTestament][bookIndex].chapters; | ||
if (currentChapter < chaptersCount) { | if (currentChapter < chaptersCount) { | ||
currentChapter++; | currentChapter++; | ||
| خط ۷۸۲: | خط ۸۱۶: | ||
} | } | ||
}); | }); | ||
function resetContent() { | |||
chapterTitle.textContent = 'لطفاً ترجمه، کتاب و فصل مورد نظر را انتخاب کنید'; | |||
versesContainer.innerHTML = ` | |||
<div class="instructions"> | |||
<div class="placeholder"> | |||
<i class="fas fa-book-open"></i> | |||
<p>برای مطالعه کتاب مقدس، لطفاً ابتدا ترجمه، سپس عهد، کتاب و فصل مورد نظر خود را انتخاب کنید.</p> | |||
</div> | |||
</div> | |||
`; | |||
prevChapterBtn.disabled = true; | |||
nextChapterBtn.disabled = true; | |||
wikiPageLink.style.display = 'none'; | |||
} | |||
function resetAll() { | |||
testamentSelect.disabled = true; | |||
testamentSelect.innerHTML = '<option value="">انتخاب عهد</option>'; | |||
bookSelect.disabled = true; | |||
bookSelect.innerHTML = '<option value="">انتخاب کتاب</option>'; | |||
chapterSelect.disabled = true; | |||
chapterSelect.innerHTML = '<option value="">انتخاب فصل</option>'; | |||
resetContent(); | |||
} | } | ||
console.log('✅ برنامه کتاب مقدس روی دامنه مجاز بارگذاری شد'); | |||
} | } | ||
document.addEventListener('DOMContentLoaded', loadApplication); | // 🔒 شروع برنامه با بررسی امنیتی | ||
document.addEventListener('DOMContentLoaded', function() { | |||
console.log('🚀 شروع بارگذاری با بررسی امنیتی...'); | |||
loadApplication(); | |||
}); | |||
Object.defineProperty(window, 'translations', { value: null, writable: false, configurable: false }); | // 🔒 جلوگیری از دسترسی به توابع از کنسول | ||
Object.defineProperty(window, 'translations', { | |||
value: null, | |||
writable: false, | |||
configurable: false | |||
}); | |||
</script> | </script> | ||
</body> | </body> | ||
</html> | </html> | ||
نسخهٔ کنونی تا ۱۱ اکتبر ۲۰۲۵، ساعت ۲۲:۰۹
کتاب مقدس آنلاین
مطالعه ترجمههای مختلف بصورت کاربردی با واژه نامه تخصصی
ترجمهٔ هزارهٔ نو و مژده هماکنون قابل مطالعهاند و عهد جدید کامل شده است. واژهنامهها بهصورت روزانه و با دقت در حال اتصال و بهروزرسانی هستند تا خدمتی ماندگار برای نسل حال و آیندگان در خداوند بهجا بگذاریم.