پرش به محتوا

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

از دانشنامه کتاب مقدس
بدون خلاصۀ ویرایش
بدون خلاصۀ ویرایش
خط ۳: خط ۳:
     <meta charset="UTF-8">
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <title>کتابخانه - پدیا بایبل</title>
     <title>کتابخانه پدیا بایبل - مطالعه کتاب‌ها و مقالات مسیحی</title>
    <meta name="description" content="کتابخانه جامع پدیا بایبل - مطالعه آنلاین کتاب‌های مقدس، مقالات الهیات مسیحی، تفسیر کتاب مقدس و منابع آموزشی دینی">
   
     <style>
     <style>
         body {
         body {
خط ۱۱: خط ۱۳:
             padding: 20px;
             padding: 20px;
             color: #333;
             color: #333;
            line-height: 1.6;
         }
         }
         .container {
         .container {
خط ۲۱: خط ۲۴:
         }
         }
         .header {
         .header {
             background-color: #3e6f73;
             background-color: white;
             color: white;
             color: #3e6f73;
             padding: 20px;
             padding: 20px;
             border-radius: 8px;
             border-radius: 8px;
             margin-bottom: 20px;
             margin-bottom: 20px;
             text-align: center;
             text-align: center;
            border: 2px solid #3e6f73;
         }
         }
         h1 {
         h1 {
             margin: 0;
             margin: 0;
             font-size: 24px;
             font-size: 28px;
            color: #3e6f73;
            font-weight: bold;
        }
        .description {
            color: #666;
            font-size: 16px;
            margin-top: 10px;
            line-height: 1.6;
         }
         }
         .filter-section {
         .filter-section {
             margin-bottom: 20px;
             margin-bottom: 20px;
             padding: 0;
             padding: 0;
        }
        .filter-row {
            display: flex;
            gap: 15px;
            margin-bottom: 15px;
            align-items: flex-end;
         }
         }
         .form-group {
         .form-group {
             margin-bottom: 15px;
            flex: 1;
             margin-bottom: 0;
         }
         }
         label {
         label {
خط ۵۴: خط ۷۳:
             background: white;
             background: white;
         }
         }
       
        /* استایل برای select با جستجو */
        .custom-select-container {
            position: relative;
            flex: 2;
        }
        .custom-select {
            width: 100%;
            padding: 10px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            font-size: 16px;
            background: white;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: left 10px center;
            background-size: 16px;
            padding-left: 35px;
        }
        .custom-select-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid #ced4da;
            border-radius: 4px;
            margin-top: 5px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            z-index: 1000;
            display: none;
            max-height: 300px;
            overflow: hidden;
        }
        .search-box {
            padding: 10px;
            border-bottom: 1px solid #eee;
            background: #f8f9fa;
        }
        .search-box input {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
        }
        .options-container {
            max-height: 250px;
            overflow-y: auto;
        }
        .option-item {
            padding: 10px 12px;
            cursor: pointer;
            border-bottom: 1px solid #f0f0f0;
            transition: background-color 0.2s;
        }
        .option-item:hover {
            background-color: #e9ecef;
        }
        .option-item:last-child {
            border-bottom: none;
        }
        .option-item.selected {
            background-color: #3e6f73;
            color: white;
        }
       
         .content-frame {
         .content-frame {
             margin-top: 20px;
             margin-top: 20px;
خط ۶۷: خط ۱۵۷:
             border: none;
             border: none;
         }
         }
         .wiki-link {
         .action-buttons {
             text-align: center;
             display: flex;
            justify-content: space-between;
            align-items: center;
             padding: 15px;
             padding: 15px;
             background-color: #f8f9fa;
             background-color: #f8f9fa;
             border-top: 1px solid #dee2e6;
             border-top: 1px solid #dee2e6;
         }
         }
         .wiki-link a {
         .wiki-link {
             color: #3e6f73;
             color: #3e6f73;
             text-decoration: none;
             text-decoration: none;
خط ۸۲: خط ۱۷۴:
             transition: all 0.3s;
             transition: all 0.3s;
         }
         }
         .wiki-link a:hover {
         .wiki-link:hover {
             background-color: #3e6f73;
             background-color: #3e6f73;
             color: white;
             color: white;
        }
        .home-link {
            background-color: #3e6f73;
            color: white;
            text-decoration: none;
            font-weight: bold;
            padding: 10px 20px;
            border: 1px solid #3e6f73;
            border-radius: 4px;
            transition: all 0.3s;
        }
        .home-link:hover {
            background-color: #2d5257;
            color: white;
        }
       
        @media (max-width: 768px) {
            .filter-row {
                flex-direction: column;
            }
            .content-frame {
                height: 500px;
            }
         }
         }
     </style>
     </style>
خط ۹۲: خط ۲۰۷:
         <div class="header">
         <div class="header">
             <h1>کتابخانه پدیا بایبل</h1>
             <h1>کتابخانه پدیا بایبل</h1>
            <div class="description">
                در این بخش می‌توانید کتاب‌ها و مقالات مختلف را مطالعه کنید.
                برای شروع، دسته‌بندی و سپس مورد مورد نظر خود را انتخاب نمایید.
            </div>
         </div>
         </div>
          
          
         <div class="filter-section">
         <div class="filter-section">
             <div class="form-group">
             <div class="filter-row">
                <label for="categorySelect">دسته‌بندی:</label>
                <div class="form-group">
                <select id="categorySelect">
                    <label for="categorySelect">دسته‌بندی:</label>
                    <option value="all">همه</option>
                    <select id="categorySelect">
                    <option value="کتاب">کتاب</option>
                        <option value="all">همه</option>
                    <option value="مقاله">مقاله</option>
                        <option value="کتاب">کتاب</option>
                </select>
                        <option value="مقاله">مقاله</option>
            </div>
                    </select>
           
                </div>
            <div class="form-group">
               
                <label for="bookSelect">انتخاب کتاب/مقاله:</label>
                <div class="form-group">
                <select id="bookSelect">
                    <label for="bookSelect">انتخاب محتوا:</label>
                    <option value="">-- لطفاً یک مورد انتخاب کنید --</option>
                    <div class="custom-select-container">
                    <!-- کتاب‌ها -->
                        <select id="bookSelect" class="custom-select">
                    <option value="عیسی" data-category="کتاب">عیسی</option>
                            <option value="">-- لطفاً یک مورد انتخاب کنید --</option>
                    <option value="انجیل_متی" data-category="کتاب">انجیل متی</option>
                            <!-- کتاب‌ها -->
                    <option value="مزامیر" data-category="کتاب">مزامیر</option>
                            <option value="عیسی" data-category="کتاب">عیسی</option>
                    <!-- مقالات -->
                            <option value="انجیل_متی" data-category="کتاب">انجیل متی</option>
                    <option value="مسیح" data-category="مقاله">مسیح</option>
                            <option value="مزامیر" data-category="کتاب">مزامیر</option>
                    <option value="تثلیث" data-category="مقاله">تثلیث</option>
                            <option value="پیدایش" data-category="کتاب">پیدایش</option>
                    <option value="نجات" data-category="مقاله">نجات</option>
                            <option value="خروج" data-category="کتاب">خروج</option>
                 </select>
                            <option value="مکاشفه" data-category="کتاب">مکاشفه</option>
                            <!-- مقالات -->
                            <option value="مسیح" data-category="مقاله">مسیح</option>
                            <option value="تثلیث" data-category="مقاله">تثلیث</option>
                            <option value="نجات" data-category="مقاله">نجات</option>
                            <option value="تعمید" data-category="مقاله">تعمید</option>
                            <option value="شام_ربانی" data-category="مقاله">شام ربانی</option>
                            <option value="روح_القدس" data-category="مقاله">روح القدس</option>
                        </select>
                       
                        <div class="custom-select-dropdown" id="customDropdown">
                            <div class="search-box">
                                <input type="text" id="dropdownSearch" placeholder="جستجو در محتواها...">
                            </div>
                            <div class="options-container" id="optionsContainer">
                                <!-- options here will be populated by JavaScript -->
                            </div>
                        </div>
                    </div>
                 </div>
             </div>
             </div>
         </div>
         </div>
خط ۱۲۲: خط ۲۶۰:
         <div class="content-frame">
         <div class="content-frame">
             <iframe id="contentFrame" class="clean-frame" src="about:blank"></iframe>
             <iframe id="contentFrame" class="clean-frame" src="about:blank"></iframe>
             <div class="wiki-link">
             <div class="action-buttons">
                 <a id="wikiLink" href="#" target="_blank" style="display: none;">📖 مطالعه کامل صفحه در ویکی</a>
                <a href="https://www.pediabible.com" class="home-link" target="_blank">
                    🏠 مشاهده صفحه اصلی پدیا بایبل
                </a>
                 <a id="wikiLink" href="#" class="wiki-link" target="_blank" style="display: none;">
                    📖 مشاهده صفحه کامل در ویکی
                </a>
             </div>
             </div>
         </div>
         </div>
خط ۱۳۲: خط ۲۷۵:
             const categorySelect = document.getElementById('categorySelect');
             const categorySelect = document.getElementById('categorySelect');
             const bookSelect = document.getElementById('bookSelect');
             const bookSelect = document.getElementById('bookSelect');
            const customSelect = document.querySelector('.custom-select');
            const customDropdown = document.getElementById('customDropdown');
            const dropdownSearch = document.getElementById('dropdownSearch');
            const optionsContainer = document.getElementById('optionsContainer');
             const contentFrame = document.getElementById('contentFrame');
             const contentFrame = document.getElementById('contentFrame');
             const wikiLink = document.getElementById('wikiLink');
             const wikiLink = document.getElementById('wikiLink');
              
              
             const originalOptions = Array.from(bookSelect.options);
             const allBooks = Array.from(bookSelect.options).filter(opt => opt.value !== "");
           
            let isDropdownOpen = false;
           
            // باز کردن/بستن dropdown
            customSelect.addEventListener('click', function(e) {
                e.stopPropagation();
                isDropdownOpen = !isDropdownOpen;
                customDropdown.style.display = isDropdownOpen ? 'block' : 'none';
               
                if (isDropdownOpen) {
                    populateDropdownOptions();
                    dropdownSearch.value = '';
                    dropdownSearch.focus();
                }
            });
           
            // بستن dropdown وقتی کلیک خارج شود
            document.addEventListener('click', function() {
                isDropdownOpen = false;
                customDropdown.style.display = 'none';
            });
           
            // جلوگیری از بستن وقتی روی dropdown کلیک شود
            customDropdown.addEventListener('click', function(e) {
                e.stopPropagation();
            });
              
              
             function filterBooks() {
            // پر کردن options در dropdown
             function populateDropdownOptions(searchTerm = '') {
                 const category = categorySelect.value;
                 const category = categorySelect.value;
                const searchLower = searchTerm.toLowerCase();
                  
                  
                 bookSelect.innerHTML = '';
                 optionsContainer.innerHTML = '';
                  
                  
                 const firstOption = document.createElement('option');
                 const filteredBooks = allBooks.filter(book => {
                firstOption.value = "";
                    const matchesCategory = category === 'all' || book.getAttribute('data-category') === category;
                firstOption.textContent = "-- لطفاً یک مورد انتخاب کنید --";
                    const matchesSearch = !searchTerm || book.text.toLowerCase().includes(searchLower);
                 bookSelect.appendChild(firstOption);
                    return matchesCategory && matchesSearch;
                 });
                  
                  
                 originalOptions.forEach(option => {
                 filteredBooks.forEach(book => {
                     if (option.value === "") return;
                     const optionItem = document.createElement('div');
                    optionItem.className = 'option-item';
                    optionItem.textContent = book.text;
                    optionItem.setAttribute('data-value', book.value);
                      
                      
                    const itemCategory = option.getAttribute('data-category');
                     if (book.value === bookSelect.value) {
                     if (category === 'all' || itemCategory === category) {
                         optionItem.classList.add('selected');
                         bookSelect.appendChild(option.cloneNode(true));
                     }
                     }
                   
                    optionItem.addEventListener('click', function() {
                        bookSelect.value = this.getAttribute('data-value');
                        customSelect.textContent = this.textContent;
                        isDropdownOpen = false;
                        customDropdown.style.display = 'none';
                       
                        if (bookSelect.value) {
                            showBook(bookSelect.value, this.textContent);
                        }
                    });
                   
                    optionsContainer.appendChild(optionItem);
                 });
                 });
               
                if (filteredBooks.length === 0) {
                    const noResult = document.createElement('div');
                    noResult.className = 'option-item';
                    noResult.textContent = 'نتیجه‌ای یافت نشد';
                    noResult.style.color = '#999';
                    noResult.style.cursor = 'default';
                    optionsContainer.appendChild(noResult);
                }
             }
             }
              
              
            // جستجو در dropdown
            dropdownSearch.addEventListener('input', function() {
                populateDropdownOptions(this.value);
            });
           
            // فیلتر کردن بر اساس دسته‌بندی
            categorySelect.addEventListener('change', function() {
                populateDropdownOptions(dropdownSearch.value);
                if (bookSelect.value) {
                    const selectedBook = allBooks.find(book => book.value === bookSelect.value);
                    if (selectedBook) {
                        const bookCategory = selectedBook.getAttribute('data-category');
                        if (this.value !== 'all' && bookCategory !== this.value) {
                            bookSelect.value = '';
                            customSelect.textContent = '-- لطفاً یک مورد انتخاب کنید --';
                            showBook('', '');
                        }
                    }
                }
            });
           
            // نمایش کتاب در iframe
             function showBook(bookValue, bookText) {
             function showBook(bookValue, bookText) {
                 if (!bookValue) {
                 if (!bookValue) {
خط ۱۶۴: خط ۳۸۶:
                 }
                 }
                  
                  
                // استفاده از action=render برای محتوای تمیز
                 const cleanContentUrl = `https://www.pediabible.com/index.php/${bookValue}?action=render`;
                 const cleanContentUrl = `https://www.pediabible.com/index.php/${bookValue}?action=render`;
                 const wikiPageUrl = `https://www.pediabible.com/index.php/${bookValue}`;
                 const wikiPageUrl = `https://www.pediabible.com/index.php/${bookValue}`;
                  
                  
                console.log('در حال بارگذاری آدرس:', cleanContentUrl);
               
                // استفاده از iframe با action=render
                 contentFrame.src = cleanContentUrl;
                 contentFrame.src = cleanContentUrl;
                  
                  
                 wikiLink.href = wikiPageUrl;
                 wikiLink.href = wikiPageUrl;
                 wikiLink.textContent = `📖 مطالعه کامل "${bookText}" در ویکی`;
                 wikiLink.textContent = `📖 مشاهده صفحه کامل "${bookText}"`;
                 wikiLink.style.display = 'block';
                 wikiLink.style.display = 'inline-block';
             }
             }
              
              
             categorySelect.addEventListener('change', filterBooks);
             // بارگذاری اولیه
              
             populateDropdownOptions();
            bookSelect.addEventListener('change', function() {
                if (this.selectedIndex > 0) {
                    const selectedOption = this.options[this.selectedIndex];
                    showBook(selectedOption.value, selectedOption.text);
                } else {
                    showBook('', '');
                }
            });
           
            filterBooks();
           
            setTimeout(() => {
                if (bookSelect.options.length > 1) {
                    bookSelect.selectedIndex = 1;
                    const selectedOption = bookSelect.options[1];
                    showBook(selectedOption.value, selectedOption.text);
                }
            }, 100);
         });
         });
     </script>
     </script>
</body>
</body>
</html>
</html>

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

کتابخانه پدیا بایبل - مطالعه کتاب‌ها و مقالات مسیحی

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

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