پرش به محتوا

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

از دانشنامه کتاب مقدس
بدون خلاصۀ ویرایش
بدون خلاصۀ ویرایش
 
(۴۴ نسخهٔ میانیِ ایجادشده توسط همین کاربر نشان داده نشد)
خط ۱: خط ۱:
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<html lang="fa" dir="rtl">
<head>
<head>
     <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>
     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
     <style>
     <style>
        :root {
            --primary-color: #2c3e50;
            --secondary-color: #8B4513;
            --accent-color: #A52A2A;
            --light-color: #f8f5f2;
            --dark-color: #3E2723;
            --border-color: #D2B48C;
            --gold-color: #D4AF37;
            --font-family: 'Times New Roman', serif;
        }
       
         * {
         * {
             margin: 0;
             margin: 0;
خط ۲۵: خط ۱۳:
          
          
         body {
         body {
             font-family: var(--font-family);
             font-family: Tahoma, Arial, sans-serif;
             background-color: #f5f1eb;
             background-color: #f6f6f6;
             color: var(--dark-color);
             color: #333;
             line-height: 1.6;
             line-height: 1.6;
             background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" opacity="0.05"><path fill="%238B4513" d="M20,20 L80,20 L80,80 L20,80 Z" stroke="%238B4513" stroke-width="2"/></svg>');
        }
             padding: 0;
       
        .container {
             max-width: 1200px;
            margin: 0 auto;
            background: white;
        }
       
        .header {
            background: linear-gradient(135deg, #3e6f73, #4a7c59);
            color: white;
             padding: 20px 15px;
            text-align: center;
        }
       
        h1 {
             margin: 0;
             margin: 0;
             min-height: 100vh;
             font-size: 22px;
            font-weight: 700;
        }
       
        .description {
            color: rgba(255,255,255,0.9);
            font-size: 13px;
            margin-top: 8px;
         }
         }
          
          
         /* مخفی کردن هدرهای اضافی ویکی */
         .seo-content {
        body > header:first-child,
            background: #fff;
        .wiki-header,
            padding: 20px 15px;
        .mw-header,
            margin: 0 15px 15px;
        #mw-header,
            border-radius: 8px;
        #header,
             border: 1px solid #e9ecef;
        .header {
             display: none !important;
         }
         }
          
          
         .container {
         .seo-content h2 {
             max-width: 1400px;
             color: #3e6f73;
             margin: 0 auto;
             margin-bottom: 15px;
             padding: 10px 20px;
             font-size: 18px;
         }
         }
          
          
         .app-header {
         .seo-content p {
            text-align: center;
             margin-bottom: 15px;
             margin-bottom: 15px;
             padding: 15px 20px;
             text-align: justify;
             border-bottom: 2px solid var(--border-color);
             font-size: 14px;
             background: linear-gradient(to bottom, #f9f6f2, #f0e6d6);
        }
             border-radius: 8px;
       
             box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        .content-list {
             position: relative;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 15px;
            margin-top: 15px;
        }
       
        .content-item {
             background: #f8f9fa;
            padding: 15px;
             border-radius: 6px;
            border-left: 4px solid #3e6f73;
        }
       
        .content-item h3 {
            color: #3e6f73;
             margin-bottom: 8px;
             font-size: 15px;
         }
         }
          
          
         .breadcrumb {
         .content-item p {
            display: flex;
             font-size: 13px;
            justify-content: center;
             color: #666;
            align-items: center;
            gap: 8px;
            margin-bottom: 10px;
             font-size: 0.9rem;
             color: var(--dark-color);
            direction: rtl;
         }
         }
          
          
         .breadcrumb-home {
         .filter-section {
             color: var(--accent-color);
             margin: 0 15px 15px;
             text-decoration: none;
             background: #f8f9fa;
             transition: color 0.3s;
             padding: 15px;
             font-weight: 500;
             border: 1px solid #dee2e6;
         }
         }
          
          
         .breadcrumb-home:hover {
         .filter-row {
             color: var(--primary-color);
             display: flex;
             text-decoration: underline;
             gap: 10px;
         }
         }
          
          
         .breadcrumb-separator {
         .form-group {
             color: var(--border-color);
             flex: 1;
             font-weight: 300;
             position: relative;
         }
         }
          
          
         .breadcrumb-current {
         label {
             color: var(--primary-color);
             display: block;
             font-weight: bold;
            margin-bottom: 6px;
            font-weight: 600;
            color: #495057;
             font-size: 13px;
         }
         }
          
          
         .app-header h1 {
         select {
             color: var(--primary-color);
             width: 100%;
             margin-bottom: 5px;
             padding: 10px 12px;
             font-size: 1.8rem;
             border: 1px solid #ced4da;
             text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
             border-radius: 6px;
             font-weight: 700;
             font-size: 13px;
             text-align: center;
            background: white;
             cursor: pointer;
         }
         }
          
          
         .description {
         .searchable-select {
             color: var(--accent-color);
             position: relative;
            font-size: 1rem;
            font-style: italic;
            margin-top: 3px;
            text-align: center;
         }
         }
          
          
         .selector-container {
         .select-display {
             display: grid;
             width: 100%;
             grid-template-columns: 1fr 1fr;
             padding: 10px 12px;
             gap: 12px;
            border: 1px solid #ced4da;
             margin-bottom: 15px;
             border-radius: 6px;
             font-size: 13px;
             background: white;
             background: white;
             padding: 15px;
             cursor: pointer;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.08);
            border: 1px solid var(--border-color);
            direction: rtl;
             text-align: right;
             text-align: right;
            position: relative;
         }
         }
          
          
         .selector-box {
         .select-display:after {
            content: "▼";
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 10px;
            color: #6c757d;
        }
       
        .options-list {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
             background: white;
             background: white;
            border: 1px solid #ced4da;
             border-radius: 6px;
             border-radius: 6px;
             padding: 12px;
             max-height: 400px;
             border: 1px solid var(--border-color);
             overflow-y: auto;
            z-index: 1000;
            display: none;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
         }
         }
          
          
         .selector-title {
         .search-box {
             font-size: 0.95rem;
             padding: 10px;
             margin-bottom: 8px;
             border-bottom: 1px solid #e9ecef;
             color: var(--primary-color);
             background: #f8f9fa;
             border-bottom: 1px solid var(--border-color);
             position: sticky;
             padding-bottom: 5px;
             top: 0;
            text-align: center;
         }
         }
          
          
         select {
         .search-input {
             width: 100%;
             width: 100%;
            padding: 8px 12px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            font-size: 13px;
        }
       
        .options-container {
            max-height: 300px;
            overflow-y: auto;
        }
       
        .option-item {
             padding: 10px 12px;
             padding: 10px 12px;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            background-color: white;
            font-size: 0.95rem;
            color: var(--dark-color);
             cursor: pointer;
             cursor: pointer;
             transition: all 0.3s;
             border-bottom: 1px solid #f1f1f1;
             font-family: var(--font-family);
             font-size: 13px;
            text-align: right;
            direction: rtl;
         }
         }
          
          
         select:focus {
         .option-item:hover {
             outline: none;
             background: #f0f8f0;
            border-color: var(--accent-color);
            box-shadow: 0 0 0 2px rgba(165, 42, 42, 0.2);
         }
         }
          
          
         .bible-content {
         .highlight {
             background: white;
             background: #fff3cd;
             border-radius: 8px;
             font-weight: bold;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
             padding: 1px 2px;
             padding: 20px;
             border-radius: 2px;
            min-height: 700px;
             border: 1px solid var(--border-color);
            margin-bottom: 15px;
            direction: rtl;
            text-align: right;
         }
         }
          
          
         .chapter-title {
         .no-results {
            color: #6c757d;
            font-style: italic;
             text-align: center;
             text-align: center;
             margin-bottom: 15px;
             padding: 15px;
            color: var(--primary-color);
            font-size: 1.4rem;
            padding-bottom: 8px;
            border-bottom: 2px solid var(--border-color);
         }
         }
          
          
         .content-display {
         .content-frame {
             width: 100%;
             margin: 0 15px;
            height: 750px;
             border: 1px solid #dee2e6;
             border: 1px solid var(--border-color);
             overflow: hidden;
             border-radius: 6px;
             background: white;
             background: white;
            height: 500px;
         }
         }
       
 
         .navigation {
         .content-header {
            padding: 12px 15px;
            background: #f8f9fa;
            border-bottom: 1px solid #dee2e6;
             display: flex;
             display: flex;
             justify-content: space-between;
             justify-content: space-between;
             align-items: center;
             align-items: center;
             margin-top: 20px;
        }
             flex-wrap: wrap;
       
        .content-title {
             font-weight: 600;
             color: #3e6f73;
            font-size: 14px;
        }
       
        .content-controls {
            display: flex;
             gap: 8px;
             gap: 8px;
            direction: rtl;
         }
         }
          
          
         .nav-btn {
         .control-btn {
            padding: 10px 18px;
             background: white;
             background-color: var(--secondary-color);
             border: 1px solid #dee2e6;
             color: white;
             border-radius: 4px;
             border: none;
             padding: 6px 12px;
             border-radius: 6px;
             cursor: pointer;
             cursor: pointer;
            transition: all 0.3s;
             font-size: 12px;
             font-size: 0.95rem;
             display: flex;
             display: flex;
             align-items: center;
             align-items: center;
             gap: 6px;
             gap: 4px;
            font-family: var(--font-family);
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
         }
         }
          
          
         .nav-btn:hover {
         .iframe-container {
             background-color: var(--accent-color);
             width: 100%;
             transform: translateY(-2px);
             height: calc(100% - 50px);
             box-shadow: 0 4px 8px rgba(0,0,0,0.2);
             position: relative;
         }
         }
          
          
         .nav-btn:disabled {
         .clean-frame {
             background-color: #b0a090;
             width: 100%;
             cursor: not-allowed;
             height: 100%;
             transform: none;
             border: none;
             box-shadow: none;
             background: white;
         }
         }
 
       
         .wiki-link {
         .iframe-placeholder {
             display: inline-flex;
             display: flex;
             align-items: center;
             align-items: center;
             justify-content: center;
             justify-content: center;
             gap: 6px;
             height: 100%;
            padding: 10px 18px;
             color: #6c757d;
            background-color: #87CEEB;
             font-size: 14px;
            color: #404040;
            text-decoration: none;
            border-radius: 6px;
            transition: all 0.3s;
            font-size: 0.95rem;
            font-family: var(--font-family);
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }
 
        .wiki-link:hover {
            background-color: #6CB4EE;
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }
 
        .instructions {
            text-align: center;
             color: #7f8c8d;
            padding: 30px 20px;
            border: 2px dashed var(--border-color);
            border-radius: 8px;
            margin-top: 15px;
             font-size: 1rem;
            background-color: var(--light-color);
        }
 
        .loading {
             text-align: center;
             text-align: center;
             padding: 20px;
             padding: 20px;
             color: var(--accent-color);
             background: white;
         }
         }
 
       
         .loading i {
         .action-buttons {
             font-size: 1.5rem;
             display: flex;
             margin-bottom: 10px;
            justify-content: space-between;
            align-items: center;
            padding: 12px 15px;
            background-color: #f8f9fa;
             border-top: 1px solid #dee2e6;
            gap: 8px;
         }
         }
 
       
         .placeholder {
         .wiki-link, .site-link, .view-link {
            background: #3e6f73;
            color: white;
            text-decoration: none;
            font-weight: 600;
            padding: 10px 15px;
            border-radius: 4px;
            font-size: 13px;
            text-align: center;
            flex: 1;
             display: flex;
             display: flex;
            flex-direction: column;
             align-items: center;
             align-items: center;
             justify-content: center;
             justify-content: center;
             height: 100%;
             gap: 6px;
             color: #7f8c8d;
        }
            text-align: center;
       
        .site-link {
             background: #6c757d;
         }
         }
 
       
         .placeholder i {
         .view-link {
             font-size: 2.5rem;
             background: #4a7c59;
            margin-bottom: 12px;
            color: var(--border-color);
         }
         }
 
          
         /* استایل برای راست‌چین کامل */
         .loading-bar {
         option {
             height: 2px;
             direction: rtl;
             background: linear-gradient(90deg, #8fb996, #3e6f73);
             text-align: right;
            width: 0%;
            transition: width 0.4s ease;
            position: absolute;
            top: 0;
            right: 0;
         }
         }
 
          
         /* استایل‌های مخصوص موبایل */
         @media (max-width: 768px) {
         @media (max-width: 768px) {
             .container {
             .filter-row {
                 padding: 5px 10px;
                 flex-direction: column;
             }
             }
              
              
             .app-header {
             .content-frame {
                 margin-bottom: 10px;
                 height: 400px;
                padding: 12px 15px;
             }
             }
              
              
             .breadcrumb {
             .action-buttons {
                 font-size: 0.8rem;
                 flex-direction: column;
                margin-bottom: 8px;
             }
             }
              
              
             .app-header h1 {
             .wiki-link, .site-link, .view-link {
                font-size: 1.4rem;
                 width: 100%;
                 margin-bottom: 4px;
             }
             }
              
              
            .description {
             .content-header {
                font-size: 0.9rem;
            }
           
            .selector-container {
                grid-template-columns: 1fr;
                gap: 8px;
                margin-bottom: 12px;
                padding: 12px;
            }
           
            .bible-content {
                padding: 15px;
                min-height: 600px;
            }
           
            .chapter-title {
                font-size: 1.2rem;
                margin-bottom: 12px;
            }
           
             .content-display {
                height: 550px;
            }
           
            .navigation {
                 flex-direction: column;
                 flex-direction: column;
                 gap: 8px;
                 gap: 8px;
                align-items: flex-start;
             }
             }
              
              
             .nav-btn, .wiki-link {
             .content-controls {
                 width: 100%;
                 width: 100%;
                 justify-content: center;
                 justify-content: space-between;
                font-size: 0.9rem;
                padding: 8px 15px;
            }
        }
 
        @media (max-width: 480px) {
            .content-display {
                height: 500px;
            }
           
            .instructions {
                padding: 20px 15px;
                font-size: 0.9rem;
             }
             }
         }
         }
خط ۳۷۰: خط ۳۵۲:
<body>
<body>
     <div class="container">
     <div class="container">
         <div class="app-header">
         <header class="header">
            <nav class="breadcrumb">
             <h1>کتابخانه دانشنامه کتاب مقدس</h1>
                <a href="https://www.pediabible.com" class="breadcrumb-home">خانه</a>
             <p class="description">مطالعه آنلاین کتاب‌ها و مقالات مسیحی</p>
                <span class="breadcrumb-separator">/</span>
         </header>
                <span class="breadcrumb-current">کتابخانه دانشنامه</span>
            </nav>
             <h1>کتابخانه دانشنامه</h1>
             <p class="description">مطالعه کتاب‌ها و مقالات تخصصی دانشنامه</p>
         </div>
       
        <div id="content-wrapper">
            <!-- محتوا توسط JavaScript پر می‌شود -->
        </div>
    </div>


    <script>
        <section class="seo-content">
        // رده‌های اصلی از مدیاویکی
            <h2>کتابخانه جامع منابع مسیحی</h2>
        const categories = [
            <p>کتابخانهٔ دانشنامهٔ کتاب مقدس مرجع کامل و تخصصی برای مطالعهٔ آنلاین کتاب‌ها و مقالات مسیحی است.</p>
             {
           
                id: "books",
             <div class="content-list">
                 name: "کتاب‌های دانشنامه",
                 <div class="content-item">
                category: "رده:کتاب_دانشنامه"
                    <h3>کتاب‌ها</h3>
            },
                    <p>انتشار همهٔ کتاب‌ها در دانشنامه با اجازهٔ رسمی نویسندگان یا ناشران انجام شده است، و برای برخی آثار، مجوز چاپ مجدد نیز دریافت گردیده است. تمامی حقوق برای انتشارات دانشنامهٔ کتاب مقدس محفوظ است.
            {
نویسندگان و ناشران مسیحی می‌توانند برای همکاری و انتشار آثار خود با ما در ارتباط باشند.</p>
                 id: "translations",
                 </div>
                 name: "مقاله‌های ترجمه شده",
                 <div class="content-item">
                category: "رده:ترجمه_دانشنامه"
                    <h3>مقالات</h3>
            },
                    <p>مقالات دانشنامه با اجازهٔ نویسندگان یا بر اساس منابع عمومی و بدون حق کپی‌رایت منتشر می‌شوند. در همهٔ موارد، اصول امانت‌داری و احترام به منبع اصلی رعایت شده است.
            {
پژوهشگران و نویسندگان مسیحی می‌توانند برای انتشار مقالات خود با ما همکاری کنند</p>
                 id: "articles",
                 </div>
                 name: "مقاله‌های دانشنامه",
                 <div class="content-item">
                category: "رده:مقاله_دانشنامه"
                    <h3>فروشگاه کتاب</h3>
            }
                    <p>در فروشگاه کتاب دانشنامه، امکان خرید کتاب‌های چاپی و الکترونیکی فراهم شده است.</p>
        ];
                </div>
 
             </div>
        // تابع اصلی بارگذاری برنامه
         </section>
        function loadApplication() {
             initializeEncyclopediaApp();
         }


         // 🔧 برنامه اصلی کتابخانه دانشنامه
         <section class="filter-section">
        function initializeEncyclopediaApp() {
             <div class="filter-row">
            const wrapper = document.getElementById('content-wrapper');
                 <div class="form-group">
              
                     <label for="categorySelect"><i class="fas fa-folder"></i> دسته‌بندی:</label>
            // ایجاد ساختار HTML برنامه
                    <select id="categorySelect">
            wrapper.innerHTML = `
                        <option value="">لطفاً دسته‌بندی انتخاب کنید</option>
                 <div class="selector-container">
                        <option value="کتاب">کتاب</option>
                     <div class="selector-box">
                         <option value="مقاله">مقاله</option>
                        <h3 class="selector-title">دسته‌بندی</h3>
                         <option value="فروشگاه کتاب">فروشگاه کتاب</option>
                        <select id="category-select">
                    </select>
                            <option value="">انتخاب دسته‌بندی</option>
                            ${categories.map(cat =>
                                `<option value="${cat.id}">${cat.name}</option>`
                            ).join('')}
                         </select>
                    </div>
                   
                    <div class="selector-box">
                        <h3 class="selector-title">صفحه</h3>
                         <select id="page-select" disabled>
                            <option value="">انتخاب صفحه</option>
                        </select>
                    </div>
                 </div>
                 </div>
                  
                  
                 <div class="bible-content">
                 <div class="form-group">
                     <h2 class="chapter-title" id="chapter-title">لطفاً دسته‌بندی و صفحه مورد نظر را انتخاب کنید</h2>
                     <label for="contentSelect"><i class="fas fa-book-open"></i> انتخاب محتوا:</label>
                      
                     <div class="searchable-select">
                    <div id="verses-container">
                        <div class="select-display" id="selectDisplay">لطفاً دسته‌بندی انتخاب کنید</div>
                         <div class="instructions">
                         <div class="options-list" id="optionsList">
                             <div class="placeholder">
                             <div class="search-box">
                                 <i class="fas fa-book-open"></i>
                                 <input type="text" class="search-input" id="searchInput" placeholder="جستجو در محتواها...">
                                 <p>برای مطالعه محتوا، لطفاً ابتدا دسته‌بندی و سپس صفحه مورد نظر خود را انتخاب کنید.</p>
                            </div>
                            <div class="options-container" id="optionsContainer">
                                 <div class="no-results">لطفاً ابتدا یک دسته‌بندی انتخاب کنید</div>
                             </div>
                             </div>
                         </div>
                         </div>
                     </div>
                     </div>
                      
                     <input type="hidden" id="selectedContentValue">
                    <div class="navigation">
                </div>
                        <button class="nav-btn" id="prev-page" disabled>
            </div>
                            <i class="fas fa-arrow-right"></i>
        </section>
                            صفحه قبلی
       
                        </button>
        <section class="content-frame">
                       
            <div class="content-header">
                        <a href="#" class="wiki-link" id="wiki-page-link" target="_blank" style="display: none;">
                <div class="content-title" id="contentTitle">هیچ محتوایی انتخاب نشده است</div>
                            <i class="fas fa-external-link-alt"></i>
                <div class="content-controls">
                            صفحه کامل
                    <button class="control-btn" id="zoomOut"><i class="fas fa-search-minus"></i> کوچک‌نمایی</button>
                        </a>
                    <button class="control-btn" id="zoomIn"><i class="fas fa-search-plus"></i> بزرگ‌نمایی</button>
                       
                    <button class="control-btn" id="directView"><i class="fas fa-external-link-alt"></i> مشاهده مستقیم</button>
                        <button class="nav-btn" id="next-page" disabled>
                </div>
                            صفحه بعدی
            </div>
                            <i class="fas fa-arrow-left"></i>
            <div class="loading-bar" id="loadingBar"></div>
                         </button>
            <div class="iframe-container">
                <div class="iframe-placeholder" id="iframePlaceholder">
                    <div>
                        <i class="fas fa-book-open" style="font-size: 2rem; color: #6c757d; margin-bottom: 10px;"></i>
                         <p>لطفاً یک کتاب یا مقاله از لیست انتخاب کنید</p>
                     </div>
                     </div>
                 </div>
                 </div>
             `;
                <iframe id="contentFrame" class="clean-frame" src="about:blank" style="display: none;" title="محتوای مطالعه"></iframe>
             </div>
            <div class="action-buttons">
                <a id="siteLink" href="#" class="site-link" target="_blank" rel="noopener noreferrer" style="display: none;">
                    <i class="fas fa-home"></i>
                    مشاهده صفحه در سایت اصلی
                </a>
                <a id="wikiLink" href="#" class="wiki-link" target="_blank" rel="noopener noreferrer" style="display: none;">
                    <i class="fab fa-wikipedia-w"></i>
                    مشاهده صفحه کامل در ویکی
                </a>
                <a id="viewLink" href="#" class="view-link" target="_blank" rel="noopener noreferrer" style="display: none;">
                    <i class="fas fa-eye"></i>
                    مشاهده صفحه
                </a>
            </div>
        </section>
    </div>
 
    <script>
        // داده‌های واقعی
        const booksData = {
            'کتاب': [
                { value: 'کتاب_مسیحیت_در_ایران_تا_صدر_اسلام', text: 'کتاب مسیحیت در ایران تا صدر اسلام' },
                { value: '...', text: 'بزودی' },
                { value: '...', text: 'بزودی' }
            ],
            'مقاله': [
                { value: 'مقاله_۸_تفاوت_کلیدی_بین_کاتولیک‌ها_و_پروتستان‌ها_نویسنده', text: 'مقاله: ۸ تفاوت کلیدی بین کاتولیک‌ها و پروتستان‌ها' },
                { value: 'مقاله_برادران،_ما_تحلیل%E2%80%8Cگران_سیاسی_نیستیم', text: 'مقاله: برادران، ما تحلیل‌گران سیاسی نیستیم' },
                { value: 'مقاله_گناه_آدمی_را_نادان_می‌کند', text: 'مقاله: گناه آدمی را نادان می‌کند' },
                { value: 'مقاله_۴_دلیل_که_چرا_کتاب_مقدس_از_تراجنسیتی_بودن_حمایت_نمی%E2%80%8Cکند', text: 'مقاله: ۴ دلیل که چرا کتاب مقدس از تراجنسیتی بودن حمایت نمی‌کند' },
                { value: '۱۰_معنای_یهوه', text: 'مقاله: ۱۰ معنای یهوه' },
                { value: 'تدریس،_آموزش_و_مطالعه', text: 'مقاله: تدریس، آموزش و مطالعه' },
                { value: 'خدمت_به_خدا_یعنی_چه', text: 'مقاله: خدمت به خدا یعنی چه' },
                { value: '...', text: 'بزودی' },
                { value: '...', text: 'بزودی' },
                { value: '...', text: 'بزودی' }
            ],
            'فروشگاه کتاب': [
                { value: 'کتاب_اسلحه_هایی_در_جنگ_علیه_نیروهای_شیطانی', text: 'اسلحه هایی در جنگ علیه نیروهای شیطانی' },
                { value: 'کتاب_شناخت_عطیه_های_روح_القدس_در_تعلیم_و_عمل', text: 'شناخت عطیه های روح القدس در تعلیم و عمل' },
                { value: 'کتاب_کشف_عطیه_های_روح_القدس_در_خود', text: 'کشف عطیه های روح القدس در خود' },
                { value: 'کتاب_اسلحه_هایی_در_جنگ_علیه_نیروهای_شیطانی', text: 'اسلحه هایی در جنگ علیه نیروهای شیطانی' },
                { value: 'کتاب_گشودن_وعده_های_ابراهیم', text: 'گشودن وعده های ابراهیم' },
                { value: 'کتاب_رهبری_روحانی', text: 'کتاب رهبری روحانی' },
                { value: 'کتاب_ژنرالهای_خدا', text: 'ژنرال های خدا' },
                { value: 'بزودی', text: 'بزودی' },
                { value: 'بزودی', text: 'بزودی' },
                { value: 'بزودی', text: 'بزودی' }
            ]
        };
 
        // عناصر DOM
        const categorySelect = document.getElementById('categorySelect');
        const selectDisplay = document.getElementById('selectDisplay');
        const searchInput = document.getElementById('searchInput');
        const optionsList = document.getElementById('optionsList');
        const optionsContainer = document.getElementById('optionsContainer');
        const selectedContentValue = document.getElementById('selectedContentValue');
 
        const contentFrame = document.getElementById('contentFrame');
        const iframePlaceholder = document.getElementById('iframePlaceholder');
        const wikiLink = document.getElementById('wikiLink');
        const siteLink = document.getElementById('siteLink');
        const viewLink = document.getElementById('viewLink');
        const contentTitle = document.getElementById('contentTitle');
        const zoomIn = document.getElementById('zoomIn');
        const zoomOut = document.getElementById('zoomOut');
        const directView = document.getElementById('directView');
        const loadingBar = document.getElementById('loadingBar');


            // عناصر DOM
        let currentZoom = 100;
            const categorySelect = document.getElementById('category-select');
        let currentContent = '';
            const pageSelect = document.getElementById('page-select');
        let currentItems = [];
            const chapterTitle = document.getElementById('chapter-title');
            const versesContainer = document.getElementById('verses-container');
            const prevPageBtn = document.getElementById('prev-page');
            const nextPageBtn = document.getElementById('next-page');
            const wikiPageLink = document.getElementById('wiki-page-link');


             // متغیرهای وضعیت فعلی
        // وقتی دسته‌بندی تغییر کرد
             let currentCategory = '';
        categorySelect.addEventListener('change', function() {
             let currentPages = [];
            const selectedCategory = this.value;
             let currentPageIndex = 0;
           
            if (!selectedCategory) {
                selectDisplay.textContent = 'لطفاً دسته‌بندی انتخاب کنید';
                selectDisplay.style.color = '#6c757d';
                selectedContentValue.value = '';
                optionsList.style.display = 'none';
                resetContent();
                return;
            }
           
             // فعال کردن نمایش
             selectDisplay.textContent = 'برای مشاهده محتوا کلیک کنید';
             selectDisplay.style.color = '#333';
            selectedContentValue.value = '';
            currentItems = booksData[selectedCategory];
              
            resetContent();
        });


            // رویداد تغییر دسته‌بندی
        // وقتی روی نمایش کلیک می‌شود
            categorySelect.addEventListener('change', function() {
        selectDisplay.addEventListener('click', function() {
                 currentCategory = this.value;
            if (!categorySelect.value) {
                alert('لطفاً ابتدا یک دسته‌بندی انتخاب کنید');
                categorySelect.focus();
                return;
            }
           
            if (optionsList.style.display === 'block') {
                 optionsList.style.display = 'none';
            } else {
                optionsList.style.display = 'block';
                searchInput.value = '';
                  
                  
                 if (currentCategory) {
                 // در اینجا تابع populateOptions فراخوانی می‌شود
                    // نمایش loading
                populateOptions(currentItems);
                    pageSelect.innerHTML = '<option value="">در حال بارگذاری...</option>';
               
                    pageSelect.disabled = true;
                setTimeout(() => {
                   
                     searchInput.focus();
                    // دریافت صفحات از رده انتخاب شده
                }, 100);
                     const category = categories.find(cat => cat.id === currentCategory);
            }
                    loadPagesFromCategory(category.category);
        });
                   
 
                    resetContent();
        // وقتی کاربر در فیلد جستجو تایپ می‌کند
                } else {
        searchInput.addEventListener('input', function() {
                    pageSelect.disabled = true;
            const searchTerm = this.value.toLowerCase();
                    pageSelect.innerHTML = '<option value="">انتخاب صفحه</option>';
            const filteredItems = currentItems.filter(item =>  
                    resetContent();
                item.text.toLowerCase().includes(searchTerm)
                }
            );
            });
            populateOptions(filteredItems, searchTerm);
        });


            // تابع برای دریافت صفحات از رده مدیاویکی
        // پر کردن لیست گزینه‌ها - این تابع اکنون به درستی فراخوانی می‌شود
            async function loadPagesFromCategory(categoryName) {
        function populateOptions(itemsList, searchTerm = '') {
                try {
            console.log('populateOptions فراخوانی شد با', itemsList.length, 'آیتم');
                    // نمایش loading
           
                    pageSelect.innerHTML = '<option value="">در حال بارگذاری صفحات...</option>';
            optionsContainer.innerHTML = '';
                   
           
                    // استفاده از API مدیاویکی برای دریافت صفحات رده
            if (itemsList.length === 0) {
                    const apiUrl = `https://www.pediabible.com/api.php?action=query&list=categorymembers&cmtitle=${encodeURIComponent(categoryName)}&cmlimit=500&format=json&origin=*`;
                const noResult = document.createElement('div');
                   
                noResult.className = 'no-results';
                    const response = await fetch(apiUrl);
                noResult.textContent = 'نتیجه‌ای یافت نشد';
                    const data = await response.json();
                 optionsContainer.appendChild(noResult);
                   
                return;
                    if (data.query && data.query.categorymembers) {
                        currentPages = data.query.categorymembers
                            .filter(member => member.ns === 0) // فقط صفحات اصلی (نه زیرصفحه‌ها)
                            .map(member => ({
                                title: member.title,
                                displayName: member.title.replace(/_/g, ' '),
                                pageId: member.pageid
                            }));
                       
                        // پر کردن dropdown صفحات
                        pageSelect.disabled = false;
                        pageSelect.innerHTML = '<option value="">انتخاب صفحه</option>';
                       
                        currentPages.forEach((page, index) => {
                            const option = document.createElement('option');
                            option.value = index;
                            option.textContent = page.displayName;
                            pageSelect.appendChild(option);
                        });
                       
                        console.log(`✅ ${currentPages.length} صفحه از رده ${categoryName} بارگذاری شد`);
                    } else {
                        throw new Error('داده‌ای دریافت نشد');
                    }
                 } catch (error) {
                    console.error('خطا در بارگذاری صفحات:', error);
                    pageSelect.innerHTML = '<option value="">خطا در بارگذاری</option>';
                    pageSelect.disabled = true;
                   
                    // نمایش پیام خطا
                    versesContainer.innerHTML = `
                        <div class="loading">
                            <i class="fas fa-exclamation-triangle"></i>
                            <p>خطا در بارگذاری صفحات. لطفاً دوباره تلاش کنید.</p>
                        </div>
                    `;
                }
             }
             }
 
           
             // رویداد تغییر صفحه
             itemsList.forEach(item => {
            pageSelect.addEventListener('change', function() {
                const option = document.createElement('div');
                 currentPageIndex = parseInt(this.value);
                 option.className = 'option-item';
                  
                  
                 if (!isNaN(currentPageIndex)) {
                 if (searchTerm) {
                     displayPageContent();
                    // هایلایت کردن متن جستجو شده
                    const regex = new RegExp(`(${searchTerm})`, 'gi');
                     const highlightedText = item.text.replace(regex, '<span class="highlight">$1</span>');
                    option.innerHTML = highlightedText;
                 } else {
                 } else {
                     resetContent();
                     option.textContent = item.text;
                 }
                 }
               
                option.addEventListener('click', function() {
                    selectDisplay.textContent = item.text;
                    selectDisplay.style.color = '#333';
                    selectedContentValue.value = item.value;
                    optionsList.style.display = 'none';
                   
                    // نمایش محتوا
                    currentContent = item.value;
                    showContent(item.value, item.text);
                });
               
                optionsContainer.appendChild(option);
             });
             });
        }


             // نمایش محتوای صفحه - فقط محتوای خالص بدون قالب سایت
        // نمایش محتوا
             function displayPageContent() {
        function showContent(bookValue, bookText) {
                 const page = currentPages[currentPageIndex];
            const contentUrl = `https://www.pediabible.com/index.php/${bookValue}?action=render`;
                 const category = categories.find(cat => cat.id === currentCategory);
            const wikiUrl = `https://www.pediabible.com/index.php/${bookValue}`;
            const siteUrl = `https://www.pediabible.com/index.php/${bookValue}`;
           
            contentTitle.textContent = bookText;
           
             // نمایش loading
            contentFrame.style.display = 'none';
            iframePlaceholder.style.display = 'flex';
            iframePlaceholder.innerHTML = `
                <div>
                    <i class="fas fa-spinner fa-spin" style="font-size: 1.5rem; color: #3e6f73; margin-bottom: 10px;"></i>
                    <p>در حال بارگذاری "${bookText}"...</p>
                </div>
            `;
           
            // نوار پیشرفت
            let progress = 0;
             const progressInterval = setInterval(() => {
                 progress += Math.random() * 15;
                if (progress > 90) progress = 90;
                 loadingBar.style.width = `${progress}%`;
            }, 200);
           
            // بارگذاری محتوا
            contentFrame.src = contentUrl;
           
            contentFrame.onload = function() {
                clearInterval(progressInterval);
                loadingBar.style.width = '100%';
                setTimeout(() => {
                    loadingBar.style.width = '0%';
                }, 500);
                  
                  
                 chapterTitle.textContent = `${category.name} - ${page.displayName}`;
                 contentFrame.style.display = 'block';
                  
                iframePlaceholder.style.display = 'none';
                // استفاده از action=render برای نمایش فقط محتوای اصلی بدون قالب سایت
                 applyZoom();
                const contentUrl = `https://www.pediabible.com/index.php?title=${encodeURIComponent(page.title)}&action=render`;
            };
                  
           
                 versesContainer.innerHTML = `
            contentFrame.onerror = function() {
                     <div class="loading">
                clearInterval(progressInterval);
                         <i class="fas fa-spinner fa-spin"></i>
                loadingBar.style.width = '0%';
                         <p>در حال بارگذاری صفحه...</p>
                 iframePlaceholder.style.display = 'flex';
                 iframePlaceholder.innerHTML = `
                     <div>
                         <i class="fas fa-exclamation-triangle" style="font-size: 1.5rem; color: #dc3545; margin-bottom: 10px;"></i>
                         <p>خطا در بارگذاری "${bookText}". لطفاً دوباره تلاش کنید.</p>
                     </div>
                     </div>
                 `;
                 `;
                  
                 contentFrame.style.display = 'none';
                // ایجاد iframe بعد از تأخیر کوتاه برای نمایش loading
            };
                setTimeout(() => {
           
                    versesContainer.innerHTML = `
            // به‌روزرسانی لینک‌ها
                        <iframe
            wikiLink.href = wikiUrl;
                            id="content-iframe"
            wikiLink.style.display = 'flex';
                            src="${contentUrl}"
           
                            class="content-display"
            siteLink.href = siteUrl;
                            frameborder="0"
            siteLink.style.display = 'flex';
                            loading="lazy"
           
                            sandbox="allow-scripts allow-same-origin allow-popups"
            viewLink.href = contentUrl;
                            allowfullscreen>
             viewLink.style.display = 'flex';
                        </iframe>
        }
                    `;
                }, 300);
               
                // لینک صفحه کامل برای باز کردن در تب جدید
                wikiPageLink.href = `https://www.pediabible.com/index.php?title=${encodeURIComponent(page.title)}`;
                wikiPageLink.style.display = 'flex';
                updateNavigationButtons();
             }


             function updateNavigationButtons() {
        // مشاهده مستقیم
                 prevPageBtn.disabled = currentPageIndex <= 0;
        directView.addEventListener('click', function() {
                 nextPageBtn.disabled = currentPageIndex >= currentPages.length - 1;
             if (currentContent) {
                 const directUrl = `https://www.pediabible.com/index.php/${currentContent}`;
                 window.open(directUrl, '_blank', 'noopener,noreferrer');
             }
             }
        });


            prevPageBtn.addEventListener('click', function() {
        // کنترل بزرگ‌نمایی
                if (currentPageIndex > 0) {
        function applyZoom() {
                    currentPageIndex--;
            contentFrame.style.zoom = `${currentZoom}%`;
                    pageSelect.value = currentPageIndex;
        }
                    displayPageContent();
                }
            });


            nextPageBtn.addEventListener('click', function() {
        zoomIn.addEventListener('click', function() {
                if (currentPageIndex < currentPages.length - 1) {
            if (currentZoom < 150) {
                    currentPageIndex++;
                currentZoom += 10;
                    pageSelect.value = currentPageIndex;
                applyZoom();
                    displayPageContent();
            }
                }
        });
            });


            function resetContent() {
        zoomOut.addEventListener('click', function() {
                chapterTitle.textContent = 'لطفاً دسته‌بندی و صفحه مورد نظر را انتخاب کنید';
            if (currentZoom > 50) {
                 versesContainer.innerHTML = `
                 currentZoom -= 10;
                    <div class="instructions">
                 applyZoom();
                        <div class="placeholder">
                            <i class="fas fa-book-open"></i>
                            <p>برای مطالعه محتوا، لطفاً ابتدا دسته‌بندی و سپس صفحه مورد نظر خود را انتخاب کنید.</p>
                        </div>
                    </div>
                `;
                prevPageBtn.disabled = true;
                 nextPageBtn.disabled = true;
                wikiPageLink.style.display = 'none';
             }
             }
        });


             console.log('✅ برنامه کتابخانه دانشنامه بارگذاری شد');
        function resetContent() {
            currentContent = '';
            contentTitle.textContent = 'هیچ محتوایی انتخاب نشده است';
             contentFrame.style.display = 'none';
            iframePlaceholder.style.display = 'flex';
            iframePlaceholder.innerHTML = `
                <div>
                    <i class="fas fa-book-open" style="font-size: 1.5rem; color: #6c757d; margin-bottom: 10px;"></i>
                    <p>لطفاً یک کتاب یا مقاله از لیست انتخاب کنید</p>
                </div>
            `;
            wikiLink.style.display = 'none';
            siteLink.style.display = 'none';
            viewLink.style.display = 'none';
            contentFrame.src = 'about:blank';
            loadingBar.style.width = '0%';
         }
         }


         // شروع برنامه
         // بستن لیست وقتی کاربر در جای دیگری کلیک می‌کند
         document.addEventListener('DOMContentLoaded', function() {
         document.addEventListener('click', function(event) {
             console.log('🚀 شروع بارگذاری کتابخانه دانشنامه...');
             if (!event.target.closest('.searchable-select')) {
             loadApplication();
                optionsList.style.display = 'none';
            }
        });
 
        // مدیریت کلیدهای کیبورد
        searchInput.addEventListener('keydown', function(event) {
             if (event.key === 'Escape') {
                optionsList.style.display = 'none';
            }
         });
         });
        // لاگ برای دیباگ
        console.log('سیستم بارگذاری شد. حالا می‌توانید تست کنید:');
        console.log('1. یک دسته‌بندی انتخاب کنید');
        console.log('2. روی "برای مشاهده محتوا کلیک کنید" کلیک کنید');
        console.log('3. لیست محتواها نمایش داده می‌شود');
     </script>
     </script>
</body>
</body>
</html>
</html>

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

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

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

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

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

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

کتاب‌ها

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

مقالات

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

فروشگاه کتاب

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

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

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