پرش به محتوا

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

از دانشنامه کتاب مقدس
بدون خلاصۀ ویرایش
بدون خلاصۀ ویرایش
خط ۴۸: خط ۴۸:
             font-size: 14px;
             font-size: 14px;
             margin-top: 8px;
             margin-top: 8px;
        }
       
        .stats-bar {
            display: flex;
            justify-content: space-between;
            background: #f8f9fa;
            padding: 10px 15px;
            border-radius: 6px;
            margin-bottom: 15px;
            border: 1px solid #dee2e6;
            font-size: 13px;
        }
       
        .stat-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }
       
        .stat-value {
            font-weight: bold;
            color: #3e6f73;
         }
         }
          
          
خط ۱۱۵: خط ۹۳:
             background: white;
             background: white;
             height: 500px;
             height: 500px;
        }
       
        .content-header {
            padding: 10px 15px;
            background: #f8f9fa;
            border-bottom: 1px solid #dee2e6;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
       
        .content-title {
            font-weight: 600;
            color: #3e6f73;
            font-size: 16px;
        }
       
        .content-controls {
            display: flex;
            gap: 8px;
        }
       
        .control-btn {
            background: white;
            border: 1px solid #dee2e6;
            border-radius: 4px;
            padding: 5px 10px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 4px;
        }
       
        .control-btn:hover {
            background: #e9ecef;
         }
         }
          
          
         .iframe-container {
         .iframe-container {
             width: 100%;
             width: 100%;
             height: 100%;
             height: calc(100% - 50px);
            position: relative;
         }
         }
          
          
خط ۱۵۱: خط ۱۶۷:
         }
         }
          
          
         .wiki-link, .site-link {
         .wiki-link, .site-link, .view-link {
             background-color: #3e6f73;
             background-color: #3e6f73;
             color: white;
             color: white;
خط ۱۶۳: خط ۱۷۹:
             text-align: center;
             text-align: center;
             flex: 1;
             flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
         }
         }
          
          
         .site-link {
         .site-link {
             background-color: #6c757d;
             background-color: #6c757d;
        }
       
        .view-link {
            background-color: #4a7c59;
         }
         }
          
          
خط ۱۷۵: خط ۱۹۹:
         .wiki-link:hover {
         .wiki-link:hover {
             background-color: #2d5257;
             background-color: #2d5257;
        }
        /* استایل بخش تاریخچه */
        .recent-section {
            margin-top: 20px;
            background: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
            border: 1px solid #dee2e6;
        }
       
        .section-title {
            font-size: 16px;
            font-weight: 600;
            color: #3e6f73;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
       
        .recent-items {
            display: flex;
            gap: 10px;
            overflow-x: auto;
            padding: 5px;
         }
         }
          
          
         .recent-item {
         .view-link:hover {
             background: white;
             background-color: #3e6f4a;
            border-radius: 6px;
            padding: 12px;
            min-width: 150px;
            border: 1px solid #dee2e6;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
        }
       
        .recent-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
         }
         }
          
          
         .recent-title {
         .loading-bar {
             font-weight: 600;
             height: 3px;
             font-size: 13px;
             background: linear-gradient(90deg, #8fb996, #3e6f73);
            color: #343a40;
             width: 0%;
        }
             transition: width 0.4s ease;
       
             position: absolute;
        .recent-category {
             top: 0;
             font-size: 11px;
             right: 0;
             color: #6c757d;
            margin-top: 4px;
        }
       
        .empty-recent {
            text-align: center;
             color: #6c757d;
             padding: 15px;
             font-style: italic;
            width: 100%;
         }
         }
          
          
خط ۲۵۲: خط ۲۲۸:
             }
             }
              
              
             .wiki-link, .site-link {
             .wiki-link, .site-link, .view-link {
                 width: 100%;
                 width: 100%;
             }
             }
              
              
             .stats-bar {
             .content-header {
                 flex-direction: column;
                 flex-direction: column;
                 gap: 8px;
                 gap: 8px;
                align-items: flex-start;
             }
             }
              
              
             .recent-items {
             .content-controls {
                 flex-direction: column;
                 width: 100%;
            }
                 justify-content: space-between;
           
            .recent-item {
                 min-width: auto;
             }
             }
         }
         }
خط ۲۷۸: خط ۲۵۲:
                 در این بخش می‌توانید کتاب‌ها و مقالات مختلف را مطالعه کنید.  
                 در این بخش می‌توانید کتاب‌ها و مقالات مختلف را مطالعه کنید.  
                 برای شروع، دسته‌بندی و سپس مورد مورد نظر خود را انتخاب نمایید.
                 برای شروع، دسته‌بندی و سپس مورد مورد نظر خود را انتخاب نمایید.
            </div>
        </div>
       
        <!-- نوار آمار -->
        <div class="stats-bar">
            <div class="stat-item">
                <i class="fas fa-book"></i>
                <span>تعداد کتاب‌ها: <span class="stat-value" id="booksCount">4</span></span>
            </div>
            <div class="stat-item">
                <i class="fas fa-file-alt"></i>
                <span>تعداد مقالات: <span class="stat-value" id="articlesCount">4</span></span>
            </div>
            <div class="stat-item">
                <i class="fas fa-history"></i>
                <span>مطالب مطالعه شده: <span class="stat-value" id="readCount">0</span></span>
             </div>
             </div>
         </div>
         </div>
خط ۳۱۸: خط ۲۷۶:
          
          
         <div class="content-frame">
         <div class="content-frame">
            <div class="content-header">
                <div class="content-title" id="contentTitle">هیچ محتوایی انتخاب نشده است</div>
                <div class="content-controls">
                    <button class="control-btn" id="zoomOut"><i class="fas fa-search-minus"></i> کوچک‌نمایی</button>
                    <button class="control-btn" id="zoomIn"><i class="fas fa-search-plus"></i> بزرگ‌نمایی</button>
                    <button class="control-btn" id="refreshBtn"><i class="fas fa-redo"></i> بارگذاری مجدد</button>
                </div>
            </div>
            <div class="loading-bar" id="loadingBar"></div>
             <div class="iframe-container">
             <div class="iframe-container">
                 <div class="iframe-placeholder" id="iframePlaceholder">
                 <div class="iframe-placeholder" id="iframePlaceholder">
خط ۳۲۹: خط ۲۹۶:
             <div class="action-buttons">
             <div class="action-buttons">
                 <a id="siteLink" href="#" class="site-link" target="_blank" style="display: none;">
                 <a id="siteLink" href="#" class="site-link" target="_blank" style="display: none;">
                    <i class="fas fa-external-link-alt"></i>
                     مشاهده صفحه در سایت اصلی
                     مشاهده صفحه در سایت اصلی
                 </a>
                 </a>
                 <a id="wikiLink" href="#" class="wiki-link" target="_blank" style="display: none;">
                 <a id="wikiLink" href="#" class="wiki-link" target="_blank" style="display: none;">
                    <i class="fab fa-wikipedia-w"></i>
                     مشاهده صفحه کامل در ویکی
                     مشاهده صفحه کامل در ویکی
                 </a>
                 </a>
            </div>
                <a id="viewLink" href="#" class="view-link" target="_blank" style="display: none;">
        </div>
                    <i class="fas fa-eye"></i>
       
                    مشاهده صفحه
        <!-- بخش تاریخچه مطالعات -->
                 </a>
        <div class="recent-section">
            <div class="section-title">
                <i class="fas fa-history"></i>
                مطالب مطالعه شده اخیر
            </div>
            <div class="recent-items" id="recentItems">
                 <div class="empty-recent">هیچ مطلبی اخیراً مطالعه نشده است</div>
             </div>
             </div>
         </div>
         </div>
خط ۳۷۳: خط ۳۳۵:
         const wikiLink = document.getElementById('wikiLink');
         const wikiLink = document.getElementById('wikiLink');
         const siteLink = document.getElementById('siteLink');
         const siteLink = document.getElementById('siteLink');
         const booksCount = document.getElementById('booksCount');
         const viewLink = document.getElementById('viewLink');
         const articlesCount = document.getElementById('articlesCount');
         const contentTitle = document.getElementById('contentTitle');
         const readCount = document.getElementById('readCount');
         const zoomIn = document.getElementById('zoomIn');
         const recentItems = document.getElementById('recentItems');
         const zoomOut = document.getElementById('zoomOut');
        const refreshBtn = document.getElementById('refreshBtn');
        const loadingBar = document.getElementById('loadingBar');


        // تاریخچه مطالعات
         let currentZoom = 100;
         let readItems = JSON.parse(localStorage.getItem('readItems')) || [];
         let currentContent = '';
 
         // به روزرسانی آمار
        function updateStats() {
            booksCount.textContent = booksData['کتاب'].length;
            articlesCount.textContent = booksData['مقاله'].length;
            readCount.textContent = readItems.length;
        }
 
        // به روزرسانی تاریخچه
        function updateRecentItems() {
            if (readItems.length === 0) {
                recentItems.innerHTML = '<div class="empty-recent">هیچ مطلبی اخیراً مطالعه نشده است</div>';
                return;
            }
           
            recentItems.innerHTML = '';
            const recentToShow = readItems.slice(-5).reverse();
           
            recentToShow.forEach(item => {
                const recentItem = document.createElement('div');
                recentItem.className = 'recent-item';
                recentItem.innerHTML = `
                    <div class="recent-title">${item.text}</div>
                    <div class="recent-category">${item.category}</div>
                `;
               
                recentItem.addEventListener('click', function() {
                    categorySelect.value = item.category;
                   
                    // پر کردن لیست محتواها
                    contentSelect.disabled = false;
                    contentSelect.innerHTML = '<option value="">لطفاً محتوا انتخاب کنید</option>';
                   
                    booksData[item.category].forEach(book => {
                        const option = document.createElement('option');
                        option.value = book.value;
                        option.textContent = book.text;
                        if (book.value === item.value) option.selected = true;
                        contentSelect.appendChild(option);
                    });
                   
                    showContent(item.value, item.text);
                });
               
                recentItems.appendChild(recentItem);
            });
        }


         // وقتی دسته‌بندی تغییر کرد
         // وقتی دسته‌بندی تغییر کرد
خط ۴۶۳: خط ۳۸۰:
             }
             }
              
              
            currentContent = selectedValue;
             showContent(selectedValue, selectedText);
             showContent(selectedValue, selectedText);
         });
         });
خط ۴۶۸: خط ۳۸۶:
         // نمایش محتوا
         // نمایش محتوا
         function showContent(bookValue, bookText) {
         function showContent(bookValue, bookText) {
            const selectedCategory = categorySelect.value;
           
            // افزودن به تاریخچه
            const newItem = {
                value: bookValue,
                text: bookText,
                category: selectedCategory,
                timestamp: new Date().toISOString()
            };
           
            // جلوگیری از تکرار
            if (!readItems.some(item => item.value === bookValue && item.category === selectedCategory)) {
                readItems.push(newItem);
                localStorage.setItem('readItems', JSON.stringify(readItems));
                updateStats();
                updateRecentItems();
            }
           
             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}`;
             const siteUrl = `https://www.pediabible.com/index.php/${bookValue}`;
             const siteUrl = `https://www.pediabible.com/index.php/${bookValue}`;
           
            contentTitle.textContent = bookText;
              
              
             // نمایش loading
             // نمایش loading
خط ۴۹۹: خط ۴۰۱:
                 </div>
                 </div>
             `;
             `;
           
            // نوار پیشرفت
            let progress = 0;
            const progressInterval = setInterval(() => {
                progress += Math.random() * 15;
                if (progress > 90) progress = 90;
                loadingBar.style.width = `${progress}%`;
            }, 200);
              
              
             // بارگذاری محتوا
             // بارگذاری محتوا
خط ۵۰۴: خط ۴۱۴:
              
              
             contentFrame.onload = function() {
             contentFrame.onload = function() {
                clearInterval(progressInterval);
                loadingBar.style.width = '100%';
                setTimeout(() => {
                    loadingBar.style.width = '0%';
                }, 500);
               
                 contentFrame.style.display = 'block';
                 contentFrame.style.display = 'block';
                 iframePlaceholder.style.display = 'none';
                 iframePlaceholder.style.display = 'none';
                applyZoom();
             };
             };
              
              
             contentFrame.onerror = function() {
             contentFrame.onerror = function() {
                clearInterval(progressInterval);
                loadingBar.style.width = '0%';
                 iframePlaceholder.style.display = 'flex';
                 iframePlaceholder.style.display = 'flex';
                 iframePlaceholder.innerHTML = `
                 iframePlaceholder.innerHTML = `
خط ۵۲۱: خط ۴۴۰:
             // به‌روزرسانی لینک‌ها
             // به‌روزرسانی لینک‌ها
             wikiLink.href = wikiUrl;
             wikiLink.href = wikiUrl;
             wikiLink.style.display = 'inline-block';
             wikiLink.style.display = 'flex';
              
              
             siteLink.href = siteUrl;
             siteLink.href = siteUrl;
             siteLink.style.display = 'inline-block';
             siteLink.style.display = 'flex';
           
            viewLink.href = contentUrl;
            viewLink.style.display = 'flex';
         }
         }
        // کنترل بزرگ‌نمایی
        function applyZoom() {
            contentFrame.style.zoom = `${currentZoom}%`;
        }
        zoomIn.addEventListener('click', function() {
            if (currentZoom < 150) {
                currentZoom += 10;
                applyZoom();
            }
        });
        zoomOut.addEventListener('click', function() {
            if (currentZoom > 50) {
                currentZoom -= 10;
                applyZoom();
            }
        });
        refreshBtn.addEventListener('click', function() {
            if (currentContent) {
                const contentText = contentSelect.options[contentSelect.selectedIndex].text;
                showContent(currentContent, contentText);
            }
        });


         function resetContent() {
         function resetContent() {
            currentContent = '';
            contentTitle.textContent = 'هیچ محتوایی انتخاب نشده است';
             contentFrame.style.display = 'none';
             contentFrame.style.display = 'none';
             iframePlaceholder.style.display = 'flex';
             iframePlaceholder.style.display = 'flex';
خط ۵۳۸: خط ۴۸۸:
             wikiLink.style.display = 'none';
             wikiLink.style.display = 'none';
             siteLink.style.display = 'none';
             siteLink.style.display = 'none';
            viewLink.style.display = 'none';
             contentFrame.src = 'about:blank';
             contentFrame.src = 'about:blank';
            loadingBar.style.width = '0%';
         }
         }
        // مقداردهی اولیه
        updateStats();
        updateRecentItems();
     </script>
     </script>
</body>
</body>
</html>
</html>

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

<!DOCTYPE html> کتابخانه پدیا بایبل

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

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

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