کتاب مقدس آنلاین: تفاوت میان نسخهها
ظاهر
بدون خلاصۀ ویرایش |
بدون خلاصۀ ویرایش |
||
خط ۱: | خط ۱: | ||
<html lang="fa" dir="rtl"> | <html lang="fa" dir="rtl"> | ||
<head> | <head> | ||
خط ۳۶۶: | خط ۳۶۵: | ||
direction: rtl; | direction: rtl; | ||
text-align: right; | text-align: right; | ||
} | |||
.content-frame { | |||
width: 100%; | |||
height: 100%; | |||
border: none; | |||
background: white; | |||
} | } | ||
</style> | </style> | ||
خط ۳۸۹: | خط ۳۹۵: | ||
'pediabible.com', | 'pediabible.com', | ||
'www.pediabible.com', | 'www.pediabible.com', | ||
'localhost', | 'localhost', | ||
'127.0.0.1' | '127.0.0.1' | ||
]; | ]; | ||
خط ۴۰۱: | خط ۴۰۷: | ||
); | ); | ||
console.log(' | if (!isAllowed) { | ||
console.log('⛔ دسترسی غیرمجاز به دامنه:', currentDomain); | |||
} | |||
} | |||
return isAllowed; | return isAllowed; | ||
خط ۴۵۵: | خط ۴۵۹: | ||
<option value="farsi">ترجمه فارسی</option> | <option value="farsi">ترجمه فارسی</option> | ||
<option value="old_farsi">ترجمه قدیم فارسی</option> | <option value="old_farsi">ترجمه قدیم فارسی</option> | ||
<option value="english">ترجمه انگلیسی</option> | |||
<option value="english">ترجمه انگلیسی | |||
</select> | </select> | ||
</div> | </div> | ||
خط ۴۹۸: | خط ۵۰۰: | ||
<a href="#" class="wiki-link" id="wiki-page-link" target="_blank" style="display: none;"> | <a href="#" class="wiki-link" id="wiki-page-link" target="_blank" style="display: none;"> | ||
<i class="fas fa-external-link-alt"></i> | <i class="fas fa-external-link-alt"></i> | ||
مشاهده در ویکی | |||
</a> | </a> | ||
خط ۵۸۵: | خط ۵۸۷: | ||
// پایگاههای داده برای ترجمههای مختلف | // پایگاههای داده برای ترجمههای مختلف | ||
const translationBases = { | const translationBases = { | ||
'farsi': 'https:// | 'farsi': 'https://fa.wikipedia.org/wiki/', | ||
'old_farsi': 'https:// | 'old_farsi': 'https://fa.wikipedia.org/wiki/', | ||
'english': 'https://en.wikipedia.org/wiki/' | |||
'english': 'https://en. | |||
}; | }; | ||
// الگوهای عنوان برای ترجمههای مختلف | // الگوهای عنوان برای ترجمههای مختلف | ||
const translationPatterns = { | const translationPatterns = { | ||
'farsi': (bookDisplayName, chapter) => `${bookDisplayName} | 'farsi': (bookDisplayName, chapter) => `${bookDisplayName}_فصل_${chapter}`, | ||
'old_farsi': (bookDisplayName, chapter) => `${bookDisplayName} | 'old_farsi': (bookDisplayName, chapter) => `${bookDisplayName}_فصل_${chapter}_(ترجمه_قدیم)`, | ||
'english': (bookDisplayName, chapter) => `${bookDisplayName}_Chapter_${chapter}` | |||
'english': (bookDisplayName, chapter) => `${bookDisplayName} | |||
}; | }; | ||
خط ۶۴۴: | خط ۶۴۲: | ||
translationSelect.addEventListener('change', function() { | translationSelect.addEventListener('change', function() { | ||
currentTranslation = this.value; | currentTranslation = this.value; | ||
if (currentBook && currentChapter) { | if (currentBook !== '' && currentChapter) { | ||
displayChapterContent(); | |||
} | } | ||
}); | }); | ||
خط ۶۸۲: | خط ۶۸۰: | ||
if (currentChapter) { | if (currentChapter) { | ||
displayChapterContent(); | |||
} else { | } else { | ||
resetContent(); | resetContent(); | ||
خط ۶۸۸: | خط ۶۸۶: | ||
}); | }); | ||
// نمایش فصل | // نمایش محتوای فصل | ||
function | function displayChapterContent() { | ||
const bookIndex = parseInt(currentBook); | const bookIndex = parseInt(currentBook); | ||
const bookData = bibleData[currentTestament][bookIndex]; | const bookData = bibleData[currentTestament][bookIndex]; | ||
خط ۶۹۷: | خط ۶۹۵: | ||
chapterTitle.textContent = `${bookName} - فصل ${currentChapter} (${getTranslationName(currentTranslation)})`; | chapterTitle.textContent = `${bookName} - فصل ${currentChapter} (${getTranslationName(currentTranslation)})`; | ||
// | // محتوای نمونه برای نمایش | ||
const | const sampleContent = generateSampleContent(bookName, currentChapter, currentTranslation); | ||
versesContainer.innerHTML = ` | versesContainer.innerHTML = ` | ||
< | <div class="content-display"> | ||
<div style="padding: 20px; line-height: 2; font-size: 1.1rem; text-align: justify;"> | |||
<h3 style="text-align: center; color: var(--primary-color); margin-bottom: 20px;"> | |||
${bookName} - فصل ${currentChapter} | |||
</h3> | |||
<div style="direction: rtl; text-align: right;"> | |||
${sampleContent} | |||
</ | </div> | ||
<div style="margin-top: 30px; padding: 15px; background: var(--light-color); border-radius: 5px; border-right: 4px solid var(--secondary-color);"> | |||
<strong>ترجمه:</strong> ${getTranslationName(currentTranslation)}<br> | |||
<strong>کتاب:</strong> ${bookName}<br> | |||
<strong>فصل:</strong> ${currentChapter} | |||
</div> | |||
</div> | |||
</div> | |||
`; | `; | ||
// لینک | // لینک ویکی (نمونه) | ||
const pageTitle = translationPatterns[currentTranslation](bookDisplayName, currentChapter); | |||
const baseUrl = translationBases[currentTranslation]; | |||
wikiPageLink.href = `${baseUrl}${encodeURIComponent(pageTitle)}`; | wikiPageLink.href = `${baseUrl}${encodeURIComponent(pageTitle)}`; | ||
wikiPageLink.style.display = 'flex'; | wikiPageLink.style.display = 'flex'; | ||
updateNavigationButtons(); | updateNavigationButtons(); | ||
} | |||
// تولید محتوای نمونه | |||
function generateSampleContent(bookName, chapter, translation) { | |||
const samples = { | |||
'farsi': [ | |||
`در ابتدا خدا آسمانها و زمین را آفرید. و زمین تهی و بایر بود، و تاریکی بر روی لجه. و روح خدا سطح آبها را فرو پوشانید.`, | |||
`خدا گفت: «نور بشود» و نور شد. و خدا نور را دید که نیکوست، و خدا نور را از تاریکی جدا کرد.`, | |||
`و خدا نور را روز نامید، و تاریکی را شب. و شام بود و صبح بود، روز اول.` | |||
], | |||
'old_farsi': [ | |||
`در ابتدا خدا آسمان و زمین را بیافرید. و زمین ویران و تهی بود، و تاریکی بر روی لجه. و روح خدا بر روی آبها حرکت میکرد.`, | |||
`و خدا گفت: «روشنی بشود» پس روشنی شد. و خدا روشنی را دید که نیکوست، و خدا روشنی را از تاریکی جدا ساخت.`, | |||
`و خدا روشنی را روز خواند، و تاریکی را شب. پس شامگاه بود و بامداد بود، روز یکم.` | |||
], | |||
'english': [ | |||
`In the beginning God created the heaven and the earth. And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters.`, | |||
`And God said, Let there be light: and there was light. And God saw the light, that it was good: and God divided the light from the darkness.`, | |||
`And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day.` | |||
] | |||
}; | |||
const content = samples[translation] || samples['farsi']; | |||
let html = ''; | |||
content.forEach((verse, index) => { | |||
html += `<p style="margin-bottom: 15px;"><strong>آیه ${index + 1}:</strong> ${verse}</p>`; | |||
}); | |||
return html; | |||
} | } | ||
خط ۷۲۵: | خط ۷۵۹: | ||
'farsi': 'فارسی', | 'farsi': 'فارسی', | ||
'old_farsi': 'فارسی قدیم', | 'old_farsi': 'فارسی قدیم', | ||
'english': 'انگلیسی' | |||
'english': 'انگلیسی | |||
}; | }; | ||
return translationNames[translationCode] || 'فارسی'; | return translationNames[translationCode] || 'فارسی'; | ||
خط ۷۴۴: | خط ۷۷۶: | ||
currentChapter--; | currentChapter--; | ||
chapterSelect.value = currentChapter; | chapterSelect.value = currentChapter; | ||
displayChapterContent(); | |||
} | } | ||
}); | }); | ||
خط ۷۵۵: | خط ۷۸۷: | ||
currentChapter++; | currentChapter++; | ||
chapterSelect.value = currentChapter; | chapterSelect.value = currentChapter; | ||
displayChapterContent(); | |||
} | } | ||
}); | }); |
نسخهٔ ۸ اکتبر ۲۰۲۵، ساعت ۰۱:۴۲
کتاب مقدس - مطالعه آنلاین
مطالعه کتاب مقدس با ترجمههای مختلف به زبان فارسی