پرش به محتوا

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

از دانشنامه کتاب مقدس
بدون خلاصۀ ویرایش
بدون خلاصۀ ویرایش
 
(۷ نسخهٔ میانیِ ایجادشده توسط همین کاربر نشان داده نشد)
خط ۱: خط ۱:
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<html lang="fa" dir="rtl">
<head>
<head>
خط ۲۱۰: خط ۲۰۹:
             text-align: center;
             text-align: center;
             padding: 15px;
             padding: 15px;
        }
       
        .pagination {
            display: flex;
            justify-content: center;
            padding: 10px;
            border-top: 1px solid #e9ecef;
            background: #f8f9fa;
            gap: 5px;
        }
       
        .pagination button {
            padding: 5px 10px;
            border: 1px solid #dee2e6;
            background: white;
            cursor: pointer;
            border-radius: 4px;
            font-size: 12px;
        }
       
        .pagination button.active {
            background: #3e6f73;
            color: white;
        }
       
        .page-info {
            font-size: 12px;
            color: #6c757d;
            margin: 0 10px;
            display: flex;
            align-items: center;
         }
         }
          
          
خط ۳۹۶: خط ۳۶۴:
                 <div class="content-item">
                 <div class="content-item">
                     <h3>کتاب‌ها</h3>
                     <h3>کتاب‌ها</h3>
                     <p>انتشار همهٔ کتاب‌ها در دانشنامه با اجازهٔ رسمی نویسندگان یا ناشران انجام شده است.</p>
                     <p>انتشار همهٔ کتاب‌ها در دانشنامه با اجازهٔ رسمی نویسندگان یا ناشران انجام شده است، و برای برخی آثار، مجوز چاپ مجدد نیز دریافت گردیده است. تمامی حقوق برای انتشارات دانشنامهٔ کتاب مقدس محفوظ است.
نویسندگان و ناشران مسیحی می‌توانند برای همکاری و انتشار آثار خود با ما در ارتباط باشند.</p>
                 </div>
                 </div>
                 <div class="content-item">
                 <div class="content-item">
                     <h3>مقالات</h3>
                     <h3>مقالات</h3>
                     <p>مقالات دانشنامه با اجازهٔ نویسندگان یا بر اساس منابع عمومی منتشر می‌شوند.</p>
                     <p>مقالات دانشنامه با اجازهٔ نویسندگان یا بر اساس منابع عمومی و بدون حق کپی‌رایت منتشر می‌شوند. در همهٔ موارد، اصول امانت‌داری و احترام به منبع اصلی رعایت شده است.
پژوهشگران و نویسندگان مسیحی می‌توانند برای انتشار مقالات خود با ما همکاری کنند</p>
                 </div>
                 </div>
                 <div class="content-item">
                 <div class="content-item">
خط ۴۳۰: خط ۴۰۰:
                             </div>
                             </div>
                             <div class="options-container" id="optionsContainer">
                             <div class="options-container" id="optionsContainer">
                                 <div class="no-results">لطفاً در کادر بالا جستجو کنید</div>
                                 <div class="no-results">لطفاً ابتدا یک دسته‌بندی انتخاب کنید</div>
                             </div>
                             </div>
                            <div class="pagination" id="paginationContainer" style="display: none;"></div>
                         </div>
                         </div>
                     </div>
                     </div>
خط ۴۷۷: خط ۴۴۶:


     <script>
     <script>
         const ITEMS_PER_PAGE = 20;
         // داده‌های واقعی
         let currentPage = 1;
         const booksData = {
        let totalPages = 1;
            'کتاب': [
        let currentItems = [];
                { value: 'کتاب_مسیحیت_در_ایران_تا_صدر_اسلام', text: 'کتاب مسیحیت در ایران تا صدر اسلام' },
        let currentCategory = '';
                { value: '...', text: 'بزودی' },
        let currentSearchTerm = '';
                { value: '...', text: 'بزودی' }
        let searchTimeout = null;
             ],
 
            'مقاله': [
        function generateLargeDataset() {
                 { value: 'مقاله_۸_تفاوت_کلیدی_بین_کاتولیک‌ها_و_پروتستان‌ها_نویسنده', text: 'مقاله: ۸ تفاوت کلیدی بین کاتولیک‌ها و پروتستان‌ها' },
             const categories = {
                 { value: 'مقاله_برادران،_ما_تحلیل%E2%80%8Cگران_سیاسی_نیستیم', text: 'مقاله: برادران، ما تحلیل‌گران سیاسی نیستیم' },
                'کتاب': [],
                { value: 'مقاله_گناه_آدمی_را_نادان_می‌کند', text: 'مقاله: گناه آدمی را نادان می‌کند' },
                 'مقاله': [],
                 { value: 'مقاله_۴_دلیل_که_چرا_کتاب_مقدس_از_تراجنسیتی_بودن_حمایت_نمی%E2%80%8Cکند', text: 'مقاله: ۴ دلیل که چرا کتاب مقدس از تراجنسیتی بودن حمایت نمی‌کند' },
                 'فروشگاه کتاب': []
                { value: '۱۰_معنای_یهوه', text: 'مقاله: ۱۰ معنای یهوه' },
            };
                { value: 'تدریس،_آموزش_و_مطالعه', text: 'مقاله: تدریس، آموزش و مطالعه' },
           
                { value: 'خدمت_به_خدا_یعنی_چه', text: 'مقاله: خدمت به خدا یعنی چه' },
            for (let i = 1; i <= 450; i++) {
                { value: '...', text: 'بزودی' },
                 categories['کتاب'].push({
                 { value: '...', text: 'بزودی' },
                    value: `کتاب_${i}`,
                { value: '...', text: 'بزودی' }
                    text: `کتاب مسیحی شماره ${i}`
             ],
                 });
             'فروشگاه کتاب': [
            }
                 { value: 'کتاب_اسلحه_هایی_در_جنگ_علیه_نیروهای_شیطانی', text: 'اسلحه هایی در جنگ علیه نیروهای شیطانی' },
              
                { value: 'کتاب_شناخت_عطیه_های_روح_القدس_در_تعلیم_و_عمل', text: 'شناخت عطیه های روح القدس در تعلیم و عمل' },
             for (let i = 1; i <= 680; i++) {
                { value: 'کتاب_کشف_عطیه_های_روح_القدس_در_خود', text: 'کشف عطیه های روح القدس در خود' },
                 categories['مقاله'].push({
                 { value: 'کتاب_اسلحه_هایی_در_جنگ_علیه_نیروهای_شیطانی', text: 'اسلحه هایی در جنگ علیه نیروهای شیطانی' },
                    value: `مقاله_${i}`,
                { value: 'کتاب_گشودن_وعده_های_ابراهیم', text: 'گشودن وعده های ابراهیم' },
                    text: `مقاله مسیحی شماره ${i}`
                { value: 'کتاب_رهبری_روحانی', text: 'کتاب رهبری روحانی' },
                 });
                { value: 'کتاب_ژنرالهای_خدا', text: 'ژنرال های خدا' },
            }
                { value: 'بزودی', text: 'بزودی' },
           
                 { value: 'بزودی', text: 'بزودی' },
            for (let i = 1; i <= 120; i++) {
                { value: 'بزودی', text: 'بزودی' }
                categories['فروشگاه کتاب'].push({
             ]
                    value: `فروشگاه_${i}`,
         };
                    text: `کتاب قابل خرید شماره ${i}`
                 });
            }
              
            return categories;
         }
 
        const largeBooksData = generateLargeDataset();


        // عناصر DOM
         const categorySelect = document.getElementById('categorySelect');
         const categorySelect = document.getElementById('categorySelect');
         const selectDisplay = document.getElementById('selectDisplay');
         const selectDisplay = document.getElementById('selectDisplay');
خط ۵۲۳: خط ۴۸۵:
         const optionsList = document.getElementById('optionsList');
         const optionsList = document.getElementById('optionsList');
         const optionsContainer = document.getElementById('optionsContainer');
         const optionsContainer = document.getElementById('optionsContainer');
        const paginationContainer = document.getElementById('paginationContainer');
         const selectedContentValue = document.getElementById('selectedContentValue');
         const selectedContentValue = document.getElementById('selectedContentValue');
         const contentFrame = document.getElementById('contentFrame');
         const contentFrame = document.getElementById('contentFrame');
         const iframePlaceholder = document.getElementById('iframePlaceholder');
         const iframePlaceholder = document.getElementById('iframePlaceholder');
خط ۵۳۸: خط ۵۰۰:
         let currentZoom = 100;
         let currentZoom = 100;
         let currentContent = '';
         let currentContent = '';
        let currentItems = [];


        // وقتی دسته‌بندی تغییر کرد
         categorySelect.addEventListener('change', function() {
         categorySelect.addEventListener('change', function() {
             const selectedCategory = this.value;
             const selectedCategory = this.value;
خط ۵۵۱: خط ۵۱۵:
             }
             }
              
              
             currentCategory = selectedCategory;
             // فعال کردن نمایش
            currentItems = largeBooksData[selectedCategory];
             selectDisplay.textContent = 'برای مشاهده محتوا کلیک کنید';
            totalPages = Math.ceil(currentItems.length / ITEMS_PER_PAGE);
            currentPage = 1;
            currentSearchTerm = '';
           
             selectDisplay.textContent = `آماده برای جستجو`;
             selectDisplay.style.color = '#333';
             selectDisplay.style.color = '#333';
             selectedContentValue.value = '';
             selectedContentValue.value = '';
            currentItems = booksData[selectedCategory];
              
              
             resetContent();
             resetContent();
         });
         });


        // وقتی روی نمایش کلیک می‌شود
         selectDisplay.addEventListener('click', function() {
         selectDisplay.addEventListener('click', function() {
             if (!currentCategory) return;
             if (!categorySelect.value) {
                alert('لطفاً ابتدا یک دسته‌بندی انتخاب کنید');
                categorySelect.focus();
                return;
            }
              
              
             if (optionsList.style.display === 'block') {
             if (optionsList.style.display === 'block') {
خط ۵۷۲: خط ۵۳۷:
                 optionsList.style.display = 'block';
                 optionsList.style.display = 'block';
                 searchInput.value = '';
                 searchInput.value = '';
                 currentSearchTerm = '';
                  
                 showPage(1);
                 // در اینجا تابع populateOptions فراخوانی می‌شود
                populateOptions(currentItems);
               
                 setTimeout(() => {
                 setTimeout(() => {
                     searchInput.focus();
                     searchInput.focus();
خط ۵۸۰: خط ۵۴۷:
         });
         });


        // وقتی کاربر در فیلد جستجو تایپ می‌کند
         searchInput.addEventListener('input', function() {
         searchInput.addEventListener('input', function() {
             clearTimeout(searchTimeout);
             const searchTerm = this.value.toLowerCase();
            currentSearchTerm = this.value.toLowerCase();
             const filteredItems = currentItems.filter(item =>  
              
                 item.text.toLowerCase().includes(searchTerm)
            searchTimeout = setTimeout(() => {
            );
                 currentPage = 1;
             populateOptions(filteredItems, searchTerm);
                showPage(1);
             }, 300);
         });
         });


         function showPage(page) {
        // پر کردن لیست گزینه‌ها - این تابع اکنون به درستی فراخوانی می‌شود
            currentPage = page;
         function populateOptions(itemsList, searchTerm = '') {
           
             console.log('populateOptions فراخوانی شد با', itemsList.length, 'آیتم');
            let filteredItems = currentItems;
            if (currentSearchTerm) {
                filteredItems = currentItems.filter(item =>
                    item.text.toLowerCase().includes(currentSearchTerm)
                );
            }
           
            totalPages = Math.ceil(filteredItems.length / ITEMS_PER_PAGE);
            if (totalPages === 0) totalPages = 1;
              
            const startIndex = (page - 1) * ITEMS_PER_PAGE;
            const endIndex = Math.min(startIndex + ITEMS_PER_PAGE, filteredItems.length);
            const pageItems = filteredItems.slice(startIndex, endIndex);
              
              
            populateOptions(pageItems);
            showPagination(filteredItems.length);
        }
        function populateOptions(itemsList) {
             optionsContainer.innerHTML = '';
             optionsContainer.innerHTML = '';
              
              
خط ۶۲۱: خط ۵۶۹:
                 return;
                 return;
             }
             }
           
            const fragment = document.createDocumentFragment();
              
              
             itemsList.forEach(item => {
             itemsList.forEach(item => {
خط ۶۲۸: خط ۵۷۴:
                 option.className = 'option-item';
                 option.className = 'option-item';
                  
                  
                 if (currentSearchTerm) {
                 if (searchTerm) {
                     const regex = new RegExp(`(${currentSearchTerm})`, 'gi');
                    // هایلایت کردن متن جستجو شده
                     const regex = new RegExp(`(${searchTerm})`, 'gi');
                     const highlightedText = item.text.replace(regex, '<span class="highlight">$1</span>');
                     const highlightedText = item.text.replace(regex, '<span class="highlight">$1</span>');
                     option.innerHTML = highlightedText;
                     option.innerHTML = highlightedText;
خط ۶۴۲: خط ۵۸۹:
                     optionsList.style.display = 'none';
                     optionsList.style.display = 'none';
                      
                      
                    // نمایش محتوا
                     currentContent = item.value;
                     currentContent = item.value;
                     showContent(item.value, item.text);
                     showContent(item.value, item.text);
                 });
                 });
                  
                  
                 fragment.appendChild(option);
                 optionsContainer.appendChild(option);
             });
             });
           
            optionsContainer.appendChild(fragment);
        }
        function showPagination(totalItems) {
            paginationContainer.innerHTML = '';
           
            if (totalPages <= 1) {
                paginationContainer.style.display = 'none';
                return;
            }
           
            paginationContainer.style.display = 'flex';
           
            const prevButton = document.createElement('button');
            prevButton.innerHTML = '&laquo; قبلی';
            prevButton.disabled = currentPage === 1;
            prevButton.addEventListener('click', () => showPage(currentPage - 1));
            paginationContainer.appendChild(prevButton);
           
            const startPage = Math.max(1, currentPage - 2);
            const endPage = Math.min(totalPages, currentPage + 2);
           
            if (startPage > 1) {
                const firstButton = document.createElement('button');
                firstButton.textContent = '1';
                firstButton.addEventListener('click', () => showPage(1));
                paginationContainer.appendChild(firstButton);
            }
           
            for (let i = startPage; i <= endPage; i++) {
                const pageButton = document.createElement('button');
                pageButton.textContent = i;
                if (i === currentPage) {
                    pageButton.classList.add('active');
                }
                pageButton.addEventListener('click', () => showPage(i));
                paginationContainer.appendChild(pageButton);
            }
           
            if (endPage < totalPages) {
                const lastButton = document.createElement('button');
                lastButton.textContent = totalPages;
                lastButton.addEventListener('click', () => showPage(totalPages));
                paginationContainer.appendChild(lastButton);
            }
           
            const nextButton = document.createElement('button');
            nextButton.innerHTML = 'بعدی &raquo;';
            nextButton.disabled = currentPage === totalPages;
            nextButton.addEventListener('click', () => showPage(currentPage + 1));
            paginationContainer.appendChild(nextButton);
           
            const infoText = document.createElement('div');
            infoText.className = 'page-info';
            infoText.textContent = `صفحه ${currentPage} از ${totalPages}`;
            paginationContainer.appendChild(infoText);
         }
         }


        // نمایش محتوا
         function showContent(bookValue, bookText) {
         function showContent(bookValue, bookText) {
             const contentUrl = `https://www.pediabible.com/index.php/${bookValue}?action=render`;
             const contentUrl = `https://www.pediabible.com/index.php/${bookValue}?action=render`;
خط ۷۱۴: خط ۶۰۶:
             contentTitle.textContent = bookText;
             contentTitle.textContent = bookText;
              
              
            // نمایش loading
             contentFrame.style.display = 'none';
             contentFrame.style.display = 'none';
             iframePlaceholder.style.display = 'flex';
             iframePlaceholder.style.display = 'flex';
خط ۷۲۳: خط ۶۱۶:
             `;
             `;
              
              
            // نوار پیشرفت
             let progress = 0;
             let progress = 0;
             const progressInterval = setInterval(() => {
             const progressInterval = setInterval(() => {
                 progress += Math.random() * 10;
                 progress += Math.random() * 15;
                 if (progress > 80) progress = 80;
                 if (progress > 90) progress = 90;
                 loadingBar.style.width = `${progress}%`;
                 loadingBar.style.width = `${progress}%`;
             }, 200);
             }, 200);
              
              
             setTimeout(() => {
             // بارگذاری محتوا
            contentFrame.src = contentUrl;
           
            contentFrame.onload = function() {
                 clearInterval(progressInterval);
                 clearInterval(progressInterval);
                 loadingBar.style.width = '100%';
                 loadingBar.style.width = '100%';
خط ۷۴۰: خط ۶۳۷:
                 iframePlaceholder.style.display = 'none';
                 iframePlaceholder.style.display = 'none';
                 applyZoom();
                 applyZoom();
                  
            };
                 contentFrame.contentDocument.write(`
           
                    <html dir="rtl">
            contentFrame.onerror = function() {
                     <head><title>${bookText}</title></head>
                clearInterval(progressInterval);
                    <body style="padding: 20px; font-family: Tahoma;">
                 loadingBar.style.width = '0%';
                        <h1>${bookText}</h1>
                 iframePlaceholder.style.display = 'flex';
                         <p>این یک نمایش نمونه از محتوای "${bookText}" است.</p>
                iframePlaceholder.innerHTML = `
                     </body>
                     <div>
                    </html>
                        <i class="fas fa-exclamation-triangle" style="font-size: 1.5rem; color: #dc3545; margin-bottom: 10px;"></i>
                 `);
                         <p>خطا در بارگذاری "${bookText}". لطفاً دوباره تلاش کنید.</p>
                 contentFrame.contentDocument.close();
                     </div>
             }, 1500);
                 `;
                 contentFrame.style.display = 'none';
             };
              
              
            // به‌روزرسانی لینک‌ها
             wikiLink.href = wikiUrl;
             wikiLink.href = wikiUrl;
             wikiLink.style.display = 'flex';
             wikiLink.style.display = 'flex';
خط ۷۶۳: خط ۶۶۳:
         }
         }


        // مشاهده مستقیم
         directView.addEventListener('click', function() {
         directView.addEventListener('click', function() {
             if (currentContent) {
             if (currentContent) {
خط ۷۷۰: خط ۶۷۱:
         });
         });


        // کنترل بزرگ‌نمایی
         function applyZoom() {
         function applyZoom() {
             contentFrame.style.zoom = `${currentZoom}%`;
             contentFrame.style.zoom = `${currentZoom}%`;
خط ۸۰۶: خط ۷۰۸:
         }
         }


        // بستن لیست وقتی کاربر در جای دیگری کلیک می‌کند
         document.addEventListener('click', function(event) {
         document.addEventListener('click', function(event) {
             if (!event.target.closest('.searchable-select')) {
             if (!event.target.closest('.searchable-select')) {
خط ۸۱۲: خط ۷۱۵:
         });
         });


        // مدیریت کلیدهای کیبورد
         searchInput.addEventListener('keydown', function(event) {
         searchInput.addEventListener('keydown', function(event) {
             if (event.key === 'Escape') {
             if (event.key === 'Escape') {
خط ۸۱۷: خط ۷۲۱:
             }
             }
         });
         });
        // لاگ برای دیباگ
        console.log('سیستم بارگذاری شد. حالا می‌توانید تست کنید:');
        console.log('1. یک دسته‌بندی انتخاب کنید');
        console.log('2. روی "برای مشاهده محتوا کلیک کنید" کلیک کنید');
        console.log('3. لیست محتواها نمایش داده می‌شود');
     </script>
     </script>
</body>
</body>
</html>
</html>

نسخهٔ کنونی تا ‏۱۶ اکتبر ۲۰۲۵، ساعت ۱۷:۵۶

کتابخانه انتشارات دانشنامه کتاب مقدس

کتابخانه دانشنامه کتاب مقدس

مطالعه آنلاین کتاب‌ها و مقالات مسیحی

کتابخانه جامع منابع مسیحی

کتابخانهٔ دانشنامهٔ کتاب مقدس مرجع کامل و تخصصی برای مطالعهٔ آنلاین کتاب‌ها و مقالات مسیحی است.

کتاب‌ها

انتشار همهٔ کتاب‌ها در دانشنامه با اجازهٔ رسمی نویسندگان یا ناشران انجام شده است، و برای برخی آثار، مجوز چاپ مجدد نیز دریافت گردیده است. تمامی حقوق برای انتشارات دانشنامهٔ کتاب مقدس محفوظ است. نویسندگان و ناشران مسیحی می‌توانند برای همکاری و انتشار آثار خود با ما در ارتباط باشند.

مقالات

مقالات دانشنامه با اجازهٔ نویسندگان یا بر اساس منابع عمومی و بدون حق کپی‌رایت منتشر می‌شوند. در همهٔ موارد، اصول امانت‌داری و احترام به منبع اصلی رعایت شده است. پژوهشگران و نویسندگان مسیحی می‌توانند برای انتشار مقالات خود با ما همکاری کنند

فروشگاه کتاب

در فروشگاه کتاب دانشنامه، امکان خرید کتاب‌های چاپی و الکترونیکی فراهم شده است.

لطفاً دسته‌بندی انتخاب کنید
لطفاً ابتدا یک دسته‌بندی انتخاب کنید
هیچ محتوایی انتخاب نشده است

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