پرش به محتوا

تست: تفاوت میان نسخه‌ها

از دانشنامه کتاب مقدس
بدون خلاصۀ ویرایش
بدون خلاصۀ ویرایش
خط ۱۷۸: خط ۱۷۸:
             background: white;
             background: white;
             height: 600px;
             height: 600px;
            position: relative;
         }
         }
          
          
خط ۱۹۲: خط ۱۹۱:
             border: none;
             border: none;
             background: white;
             background: white;
            display: block;
         }
         }
          
          
خط ۳۴۲: خط ۳۴۰:
                 bookSelect.innerHTML = '<option value="">ابتدا دسته‌بندی را انتخاب کنید</option>';
                 bookSelect.innerHTML = '<option value="">ابتدا دسته‌بندی را انتخاب کنید</option>';
                 customSelect.textContent = 'ابتدا دسته‌بندی را انتخاب کنید';
                 customSelect.textContent = 'ابتدا دسته‌بندی را انتخاب کنید';
                 showContent('', '');
                 resetContent();
                 return;
                 return;
             }
             }
خط ۳۶۳: خط ۳۶۱:
              
              
             customSelect.textContent = 'لطفاً محتوا انتخاب کنید';
             customSelect.textContent = 'لطفاً محتوا انتخاب کنید';
             showContent('', '');
             resetContent();
         }
         }


خط ۴۴۶: خط ۴۴۴:
         // نمایش محتوا در iframe
         // نمایش محتوا در iframe
         function showContent(bookValue, bookText) {
         function showContent(bookValue, bookText) {
            console.log('نمایش محتوا:', bookValue, bookText);
           
             if (!bookValue) {
             if (!bookValue) {
                 contentFrame.style.display = 'none';
                 resetContent();
                iframePlaceholder.style.display = 'flex';
                iframePlaceholder.innerHTML = `
                    <div>
                        <i class="fas fa-book-open" style="font-size: 3rem; color: #6c757d; margin-bottom: 15px;"></i>
                        <p>لطفاً یک کتاب یا مقاله از لیست انتخاب کنید</p>
                    </div>
                `;
                wikiLink.style.display = 'none';
                 return;
                 return;
             }
             }
خط ۴۶۱: خط ۴۵۳:
             const contentUrl = `https://www.pediabible.com/index.php/${bookValue}?action=render`;
             const contentUrl = `https://www.pediabible.com/index.php/${bookValue}?action=render`;
             const wikiUrl = `https://www.pediabible.com/index.php/${bookValue}`;
             const wikiUrl = `https://www.pediabible.com/index.php/${bookValue}`;
           
            console.log('URL محتوا:', contentUrl);
              
              
             // نمایش حالت لودینگ
             // نمایش حالت لودینگ
خط ۴۶۸: خط ۴۶۲:
                 <div>
                 <div>
                     <i class="fas fa-spinner fa-spin" style="font-size: 3rem; color: #3e6f73; margin-bottom: 15px;"></i>
                     <i class="fas fa-spinner fa-spin" style="font-size: 3rem; color: #3e6f73; margin-bottom: 15px;"></i>
                     <p>در حال بارگذاری محتوا...</p>
                     <p>در حال بارگذاری "${bookText}"...</p>
                 </div>
                 </div>
             `;
             `;
خط ۴۷۷: خط ۴۷۱:
             // وقتی iframe لود شد
             // وقتی iframe لود شد
             contentFrame.onload = function() {
             contentFrame.onload = function() {
                console.log('محتوای iframe لود شد');
                 contentFrame.style.display = 'block';
                 contentFrame.style.display = 'block';
                 iframePlaceholder.style.display = 'none';
                 iframePlaceholder.style.display = 'none';
خط ۴۸۳: خط ۴۷۸:
             // اگر iframe خطا داد
             // اگر iframe خطا داد
             contentFrame.onerror = function() {
             contentFrame.onerror = function() {
                console.error('خطا در لود iframe');
                 iframePlaceholder.style.display = 'flex';
                 iframePlaceholder.style.display = 'flex';
                 iframePlaceholder.innerHTML = `
                 iframePlaceholder.innerHTML = `
                     <div>
                     <div>
                         <i class="fas fa-exclamation-triangle" style="font-size: 3rem; color: #dc3545; margin-bottom: 15px;"></i>
                         <i class="fas fa-exclamation-triangle" style="font-size: 3rem; color: #dc3545; margin-bottom: 15px;"></i>
                         <p>خطا در بارگذاری محتوا. لطفاً دوباره تلاش کنید.</p>
                         <p>خطا در بارگذاری "${bookText}". لطفاً دوباره تلاش کنید.</p>
                     </div>
                     </div>
                 `;
                 `;
خط ۴۹۷: خط ۴۹۳:
             wikiLink.textContent = `مشاهده صفحه کامل "${bookText}"`;
             wikiLink.textContent = `مشاهده صفحه کامل "${bookText}"`;
             wikiLink.style.display = 'inline-block';
             wikiLink.style.display = 'inline-block';
        }
        // بازنشانی محتوا
        function resetContent() {
            contentFrame.style.display = 'none';
            iframePlaceholder.style.display = 'flex';
            iframePlaceholder.innerHTML = `
                <div>
                    <i class="fas fa-book-open" style="font-size: 3rem; color: #6c757d; margin-bottom: 15px;"></i>
                    <p>لطفاً یک کتاب یا مقاله از لیست انتخاب کنید</p>
                </div>
            `;
            wikiLink.style.display = 'none';
            contentFrame.src = 'about:blank';
         }
         }


خط ۵۰۴: خط ۵۱۴:
         // رویداد تغییر کتاب
         // رویداد تغییر کتاب
         bookSelect.addEventListener('change', function() {
         bookSelect.addEventListener('change', function() {
             if (this.selectedIndex > 0) {
            console.log('تغییر کتاب:', this.value);
             if (this.value) {
                 const selectedOption = this.options[this.selectedIndex];
                 const selectedOption = this.options[this.selectedIndex];
                 customSelect.textContent = selectedOption.text;
                 customSelect.textContent = selectedOption.text;
خط ۵۱۰: خط ۵۲۱:
             } else {
             } else {
                 customSelect.textContent = 'لطفاً محتوا انتخاب کنید';
                 customSelect.textContent = 'لطفاً محتوا انتخاب کنید';
                 showContent('', '');
                 resetContent();
             }
             }
         });
         });

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

<!DOCTYPE html> کتابخانه پدیا بایبل - مطالعه کتاب‌ها و مقالات

کتابخانه پدیا بایبل

در این بخش می‌توانید کتاب‌ها و مقالات مختلف را مطالعه کنید. برای شروع، دسته‌بندی و سپس مورد مورد نظر خود را انتخاب نمایید.

لطفاً یک کتاب یا مقاله از لیست انتخاب کنید