پرش به محتوا

کتاب مقدس آنلاین: تفاوت میان نسخه‌ها

از دانشنامه کتاب مقدس
بدون خلاصۀ ویرایش
بدون خلاصۀ ویرایش
خط ۱: خط ۱:
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<html lang="fa" dir="rtl">
<head>
<head>
خط ۷۴: خط ۷۵:
         .testament-selector {
         .testament-selector {
             flex: 1;
             flex: 1;
             min-width: 200px;
             min-width: 150px;
        }
       
        .translation-selector {
            flex: 1;
            min-width: 180px;
         }
         }
          
          
خط ۲۷۰: خط ۲۷۶:
             }
             }
              
              
             .testament-selector {
             .testament-selector, .translation-selector {
                 width: 100%;
                 width: 100%;
             }
             }
خط ۳۲۶: خط ۳۳۲:
                 padding: 30px 15px;
                 padding: 30px 15px;
                 font-size: 1rem;
                 font-size: 1rem;
            }
           
            .book-chapter-container {
                flex-direction: column;
             }
             }
         }
         }
خط ۳۶۵: خط ۳۷۵:
                 <i class="fas fa-bible"></i>
                 <i class="fas fa-bible"></i>
             </div>
             </div>
             <h1>کتاب مقدس</h1>
             <h1>کتاب مقدس - مطالعه آنلاین</h1>
             <p class="description">مطالعه آنلاین کتاب مقدس به زبان فارسی</p>
             <p class="description">مطالعه کتاب مقدس با ترجمه‌های مختلف به زبان فارسی</p>
         </header>
         </header>
          
          
خط ۴۳۷: خط ۴۴۷:
                             <option value="old">عهد قدیم</option>
                             <option value="old">عهد قدیم</option>
                             <option value="new">عهد جدید</option>
                             <option value="new">عهد جدید</option>
                        </select>
                    </div>
                   
                    <div class="translation-selector selector-box">
                        <h3 class="selector-title">ترجمه</h3>
                        <select id="translation-select">
                            <option value="farsi">ترجمه فارسی</option>
                            <option value="old_farsi">ترجمه قدیم فارسی</option>
                            <option value="arabic">ترجمه عربی</option>
                            <option value="english">ترجمه انگلیسی (KJV)</option>
                            <option value="french">ترجمه فرانسوی</option>
                         </select>
                         </select>
                     </div>
                     </div>
خط ۴۶۴: خط ۴۸۵:
                             <div class="placeholder">
                             <div class="placeholder">
                                 <i class="fas fa-book-open"></i>
                                 <i class="fas fa-book-open"></i>
                                 <p>برای مطالعه کتاب مقدس، لطفاً ابتدا عهد، سپس کتاب و فصل مورد نظر خود را انتخاب کنید.</p>
                                 <p>برای مطالعه کتاب مقدس، لطفاً ابتدا عهد، ترجمه، سپس کتاب و فصل مورد نظر خود را انتخاب کنید.</p>
                             </div>
                             </div>
                         </div>
                         </div>
خط ۵۶۰: خط ۵۸۱:
                     { name: "مکاشفه", chapters: 22, displayName: "مکاشفه" }
                     { name: "مکاشفه", chapters: 22, displayName: "مکاشفه" }
                 ]
                 ]
            };
            // پایگاه‌های داده برای ترجمه‌های مختلف
            const translationBases = {
                'farsi': 'https://www.pediabible.com/index.php?title=',
                'old_farsi': 'https://www.pediabible.com/index.php?title=',
                'arabic': 'https://ar.pediabible.com/index.php?title=',
                'english': 'https://en.pediabible.com/index.php?title=',
                'french': 'https://fr.pediabible.com/index.php?title='
            };
            // الگوهای عنوان برای ترجمه‌های مختلف
            const translationPatterns = {
                'farsi': (bookDisplayName, chapter) => `${bookDisplayName} فصل ${chapter}`,
                'old_farsi': (bookDisplayName, chapter) => `${bookDisplayName} فصل ${chapter} (قدیم)`,
                'arabic': (bookDisplayName, chapter) => `${bookDisplayName} الاصحاح ${chapter}`,
                'english': (bookDisplayName, chapter) => `${bookDisplayName} Chapter ${chapter}`,
                'french': (bookDisplayName, chapter) => `${bookDisplayName} Chapitre ${chapter}`
             };
             };


             // عناصر DOM
             // عناصر DOM
             const testamentSelect = document.getElementById('testament-select');
             const testamentSelect = document.getElementById('testament-select');
            const translationSelect = document.getElementById('translation-select');
             const bookSelect = document.getElementById('book-select');
             const bookSelect = document.getElementById('book-select');
             const chapterSelect = document.getElementById('chapter-select');
             const chapterSelect = document.getElementById('chapter-select');
خط ۵۷۴: خط ۶۱۴:
             // متغیرهای وضعیت فعلی
             // متغیرهای وضعیت فعلی
             let currentTestament = '';
             let currentTestament = '';
            let currentTranslation = 'farsi';
             let currentBook = '';
             let currentBook = '';
             let currentChapter = 1;
             let currentChapter = 1;
خط ۵۹۷: خط ۶۳۸:
                 } else {
                 } else {
                     resetAll();
                     resetAll();
                }
            });
            // رویداد تغییر ترجمه
            translationSelect.addEventListener('change', function() {
                currentTranslation = this.value;
                if (currentBook && currentChapter) {
                    displayChapterWithIframe();
                 }
                 }
             });
             });
خط ۶۳۹: خط ۶۸۸:
             });
             });


             // نمایش فصل با iframe - فقط محتوای اصلی
             // نمایش فصل با iframe - با ترجمه انتخابی
             function displayChapterWithIframe() {
             function displayChapterWithIframe() {
                 const bookIndex = parseInt(currentBook);
                 const bookIndex = parseInt(currentBook);
خط ۶۴۶: خط ۶۹۵:
                 const bookDisplayName = bookData.displayName;
                 const bookDisplayName = bookData.displayName;
                  
                  
                 chapterTitle.textContent = `${bookName} - فصل ${currentChapter}`;
                 chapterTitle.textContent = `${bookName} - فصل ${currentChapter} (${getTranslationName(currentTranslation)})`;
                  
                  
                 const pageTitle = `${bookDisplayName} فصل ${currentChapter}`;
                // ساخت عنوان بر اساس ترجمه انتخابی
                 const pageTitle = translationPatterns[currentTranslation](bookDisplayName, currentChapter);
                const baseUrl = translationBases[currentTranslation];
                 // استفاده از action=render برای نمایش فقط محتوای اصلی
                 // استفاده از action=render برای نمایش فقط محتوای اصلی
                 const contentUrl = `https://www.pediabible.com/index.php?title=${encodeURIComponent(pageTitle)}&action=render`;
                 const contentUrl = `${baseUrl}${encodeURIComponent(pageTitle)}&action=render`;
                  
                  
                 versesContainer.innerHTML = `
                 versesContainer.innerHTML = `
خط ۶۶۴: خط ۷۱۵:
                  
                  
                 // لینک صفحه کامل برای باز کردن در تب جدید
                 // لینک صفحه کامل برای باز کردن در تب جدید
                 wikiPageLink.href = `https://www.pediabible.com/index.php?title=${encodeURIComponent(pageTitle)}`;
                 wikiPageLink.href = `${baseUrl}${encodeURIComponent(pageTitle)}`;
                 wikiPageLink.style.display = 'flex';
                 wikiPageLink.style.display = 'flex';
                 updateNavigationButtons();
                 updateNavigationButtons();
            }
            // تابع برای دریافت نام ترجمه
            function getTranslationName(translationCode) {
                const translationNames = {
                    'farsi': 'فارسی',
                    'old_farsi': 'فارسی قدیم',
                    'arabic': 'عربی',
                    'english': 'انگلیسی',
                    'french': 'فرانسوی'
                };
                return translationNames[translationCode] || 'فارسی';
             }
             }


خط ۷۰۲: خط ۷۶۵:
                         <div class="placeholder">
                         <div class="placeholder">
                             <i class="fas fa-book-open"></i>
                             <i class="fas fa-book-open"></i>
                             <p>برای مطالعه کتاب مقدس، لطفاً ابتدا عهد، سپس کتاب و فصل مورد نظر خود را انتخاب کنید.</p>
                             <p>برای مطالعه کتاب مقدس، لطفاً ابتدا عهد، ترجمه، سپس کتاب و فصل مورد نظر خود را انتخاب کنید.</p>
                         </div>
                         </div>
                     </div>
                     </div>
خط ۷۱۹: خط ۷۸۲:
             }
             }


             console.log('✅ برنامه کتاب مقدس روی دامنه مجاز بارگذاری شد');
             console.log('✅ برنامه کتاب مقدس با ترجمه‌های مختلف روی دامنه مجاز بارگذاری شد');
         }
         }



نسخهٔ ‏۸ اکتبر ۲۰۲۵، ساعت ۰۱:۳۶

<!DOCTYPE html> کتاب مقدس - مطالعه آنلاین

کتاب مقدس - مطالعه آنلاین

مطالعه کتاب مقدس با ترجمه‌های مختلف به زبان فارسی