پرش به محتوا

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

از دانشنامه کتاب مقدس
بدون خلاصۀ ویرایش
بدون خلاصۀ ویرایش
 
(۳۶ نسخهٔ میانیِ ایجادشده توسط همین کاربر نشان داده نشد)
خط ۱: خط ۱:
<!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>
    <meta name="description" content="مطالعه آنلاین کتاب‌های مقدس شامل عیسی، انجیل متی، مزامیر، پیدایش و مقالات تخصصی درباره مسیح، تثلیث، نجات و روح القدس در کتابخانه پدیا بایبل">
    <meta name="keywords" content="کتاب مقدس, انجیل, عیسی مسیح, مقالات مذهبی, کتابخانه آنلاین, مزامیر, پیدایش, تثلیث, روح القدس, نجات, پدیا بایبل">
    <meta name="author" content="پدیا بایبل">
    <meta name="robots" content="index, follow">
    <link rel="canonical" href="https://www.pediabible.com/library" />
   
    <!-- Open Graph Meta Tags -->
    <meta property="og:title" content="کتابخانه پدیا بایبل - مطالعه آنلاین کتاب‌ها و مقالات مذهبی">
    <meta property="og:description" content="مطالعه آنلاین کتاب‌های مقدس و مقالات تخصصی مذهبی">
    <meta property="og:type" content="website">
    <meta property="og:url" content="https://www.pediabible.com/library">
    <meta property="og:image" content="https://www.pediabible.com/images/logo.png">
    <meta property="og:locale" content="fa_IR">
   
    <!-- Twitter Card Meta Tags -->
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:title" content="کتابخانه پدیا بایبل - مطالعه آنلاین کتاب‌ها و مقالات مذهبی">
    <meta name="twitter:description" content="مطالعه آنلاین کتاب‌های مقدس و مقالات تخصصی مذهبی">
   
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
   
    <!-- داده‌های ساختاریافته Schema.org -->
    <script type="application/ld+json">
    {
        "@context": "https://schema.org",
        "@type": "CollectionPage",
        "name": "کتابخانه پدیا بایبل",
        "description": "مطالعه آنلاین کتاب‌ها و مقالات مذهبی",
        "url": "https://www.pediabible.com/library",
        "publisher": {
            "@type": "Organization",
            "name": "پدیا بایبل",
            "url": "https://www.pediabible.com",
            "logo": {
                "@type": "ImageObject",
                "url": "https://www.pediabible.com/images/logo.png"
            }
        },
        "mainEntity": {
            "@type": "ItemList",
            "numberOfItems": 8,
            "itemListElement": [
                {
                    "@type": "Book",
                    "position": 1,
                    "name": "عیسی",
                    "url": "https://www.pediabible.com/index.php/عیسی",
                    "description": "مطالعه کتاب عیسی - زندگی و تعالیم حضرت عیسی مسیح"
                },
                {
                    "@type": "Book",
                    "position": 2,
                    "name": "انجیل متی",
                    "url": "https://www.pediabible.com/index.php/انجیل_متی",
                    "description": "انجیل متی - اولین انجیل از انجیل‌های چهارگانه"
                },
                {
                    "@type": "Book",
                    "position": 3,
                    "name": "مزامیر",
                    "url": "https://www.pediabible.com/index.php/مزامیر",
                    "description": "مزامیر - کتاب نیایش و مناجات"
                },
                {
                    "@type": "Book",
                    "position": 4,
                    "name": "پیدایش",
                    "url": "https://www.pediabible.com/index.php/پیدایش",
                    "description": "پیدایش - اولین کتاب تورات"
                },
                {
                    "@type": "Article",
                    "position": 5,
                    "name": "مسیح",
                    "url": "https://www.pediabible.com/index.php/مسیح",
                    "description": "مقالات تخصصی درباره مسیحشناسی"
                },
                {
                    "@type": "Article",
                    "position": 6,
                    "name": "تثلیث",
                    "url": "https://www.pediabible.com/index.php/تثلیث",
                    "description": "مطالعات تخصصی درباره مفهوم تثلیث"
                },
                {
                    "@type": "Article",
                    "position": 7,
                    "name": "نجات",
                    "url": "https://www.pediabible.com/index.php/نجات",
                    "description": "مقالات درباره نجات و رستگاری"
                },
                {
                    "@type": "Article",
                    "position": 8,
                    "name": "روح القدس",
                    "url": "https://www.pediabible.com/index.php/روح_القدس",
                    "description": "مطالعات تخصصی درباره روح القدس"
                }
            ]
        },
        "breadcrumb": {
            "@type": "BreadcrumbList",
            "itemListElement": [
                {
                    "@type": "ListItem",
                    "position": 1,
                    "name": "خانه",
                    "item": "https://www.pediabible.com"
                },
                {
                    "@type": "ListItem",
                    "position": 2,
                    "name": "کتابخانه",
                    "item": "https://www.pediabible.com/library"
                }
            ]
        }
    }
    </script>
   
     <style>
     <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
       
         body {
         body {
             font-family: Tahoma, Arial, sans-serif;
             font-family: Tahoma, Arial, sans-serif;
             background-color: #f6f6f6;
             background-color: #f6f6f6;
            color: #333;
            line-height: 1.6;
            padding: 0;
             margin: 0;
             margin: 0;
            padding: 20px;
            color: #333;
         }
         }
       
         .container {
         .container {
             max-width: 1200px;
             max-width: 100%;
             margin: 0 auto;
             margin: 0;
             background: white;
             background: white;
             padding: 20px;
            padding: 0;
        }
       
        .header {
            background: linear-gradient(135deg, #3e6f73, #4a7c59);
            color: white;
             padding: 20px 15px;
            margin-bottom: 15px;
            text-align: center;
        }
       
        h1 {
            margin: 0;
            font-size: 22px;
            font-weight: 700;
        }
       
        .description {
            color: rgba(255,255,255,0.9);
            font-size: 13px;
            margin-top: 8px;
            line-height: 1.5;
        }
       
        .seo-content {
            background: #fff;
            padding: 20px 15px;
            margin: 0 15px 15px;
             border-radius: 8px;
             border-radius: 8px;
             box-shadow: 0 0 10px rgba(0,0,0,0.1);
             border: 1px solid #e9ecef;
        }
       
        .seo-content h2 {
            color: #3e6f73;
            margin-bottom: 15px;
            font-size: 18px;
        }
       
        .seo-content p {
            margin-bottom: 15px;
            text-align: justify;
            font-size: 14px;
            line-height: 1.8;
        }
       
        .content-list {
            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;
        }
       
        .content-item p {
            font-size: 13px;
            color: #666;
            margin: 0;
        }
       
        .filter-section {
            margin: 0 15px 15px;
            background: #f8f9fa;
            padding: 15px;
            border: 1px solid #dee2e6;
         }
         }
         h1 {
          
             text-align: center;
        .filter-row {
             color: #2c3e50;
             display: flex;
             margin-bottom: 30px;
             gap: 10px;
             margin-bottom: 0;
         }
         }
       
         .form-group {
         .form-group {
             margin-bottom: 15px;
             flex: 1;
         }
         }
       
         label {
         label {
             display: block;
             display: block;
             margin-bottom: 5px;
             margin-bottom: 6px;
             font-weight: bold;
             font-weight: 600;
             color: #495057;
             color: #495057;
            font-size: 13px;
         }
         }
         select, input[type="text"] {
       
         select {
             width: 100%;
             width: 100%;
             padding: 10px;
             padding: 10px 12px;
             border: 1px solid #ced4da;
             border: 1px solid #ced4da;
            border-radius: 6px;
            font-size: 13px;
            background: white;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 1px solid #e9ecef;
        }
       
        select:focus {
            outline: none;
            border-color: #3e6f73;
            box-shadow: 0 0 0 2px rgba(62, 111, 115, 0.1);
        }
       
        select:disabled {
            background-color: #f8f9fa;
            color: #6c757d;
            cursor: not-allowed;
            border-color: #dee2e6;
        }
       
        .content-frame {
            margin: 0 15px;
            border: 1px solid #dee2e6;
            border-radius: 0;
            overflow: hidden;
            background: white;
            height: calc(100vh - 250px);
            min-height: 400px;
        }
       
        .content-header {
            padding: 12px 15px;
            background: #f8f9fa;
            border-bottom: 1px solid #dee2e6;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
       
        .content-title {
            font-weight: 600;
            color: #3e6f73;
            font-size: 14px;
        }
       
        .content-controls {
            display: flex;
            gap: 8px;
        }
       
        .control-btn {
            background: white;
            border: 1px solid #dee2e6;
             border-radius: 4px;
             border-radius: 4px;
             font-size: 16px;
            padding: 6px 12px;
             box-sizing: border-box;
            cursor: pointer;
             font-size: 12px;
            transition: all 0.3s ease;
            display: flex;
             align-items: center;
            gap: 4px;
            font-weight: 600;
            color: #495057;
        }
       
        .control-btn:hover {
            background: #3e6f73;
            color: white;
            border-color: #3e6f73;
         }
         }
       
         .iframe-container {
         .iframe-container {
             margin-top: 20px;
             width: 100%;
             border: 1px solid #dee2e6;
             height: calc(100% - 50px);
            border-radius: 8px;
             position: relative;
             overflow: hidden;
         }
         }
         iframe {
          
        .clean-frame {
             width: 100%;
             width: 100%;
             height: 600px;
             height: 100%;
            border: none;
            background: white;
        }
       
        .iframe-placeholder {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
            color: #6c757d;
            font-size: 14px;
            text-align: center;
            padding: 20px;
            background: white;
        }
       
        .action-buttons {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 15px;
            background-color: #f8f9fa;
            border-top: 1px solid #dee2e6;
            gap: 8px;
        }
       
        .wiki-link, .site-link, .view-link {
            background: #3e6f73;
            color: white;
            text-decoration: none;
            font-weight: 600;
            padding: 10px 15px;
            border-radius: 4px;
             border: none;
             border: none;
            cursor: pointer;
            font-size: 13px;
            text-align: center;
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            transition: all 0.3s ease;
         }
         }
         .admin-section {
       
             background: #e8f5e8;
         .site-link {
            border: 1px solid #28a745;
             background: #6c757d;
            padding: 15px;
            border-radius: 6px;
            margin-top: 15px;
            display: none;
         }
         }
         .user-section {
       
             background: #fff3cd;
         .view-link {
            border: 1px solid #ffeaa7;
             background: #4a7c59;
            padding: 15px;
            border-radius: 6px;
            margin-top: 15px;
            display: none;
         }
         }
         .admin-title {
          
             color: #155724;
        .wiki-link:hover, .site-link:hover, .view-link:hover {
             font-weight: bold;
             opacity: 0.9;
            margin-bottom: 10px;
             transform: translateY(-1px);
         }
         }
         .user-title {
       
             color: #856404;
         .loading-bar {
             font-weight: bold;
             height: 2px;
             margin-bottom: 10px;
            background: linear-gradient(90deg, #8fb996, #3e6f73);
            width: 0%;
            transition: width 0.4s ease;
             position: absolute;
            top: 0;
             right: 0;
         }
         }
         .loading {
       
             text-align: center;
         .breadcrumb {
             color: #007bff;
             background: #f8f9fa;
             padding: 10px;
            padding: 10px 15px;
            margin-bottom: 15px;
            border-bottom: 1px solid #dee2e6;
            font-size: 13px;
        }
       
        .breadcrumb a {
             color: #3e6f73;
             text-decoration: none;
         }
         }
    </style>
</head>
<body>
    <div class="container">
        <h1>کتابخانه پدیا بایبل</h1>
          
          
         <div class="form-group">
         .breadcrumb a:hover {
            <label for="bookSelect">انتخاب کتاب:</label>
             text-decoration: underline;
            <select id="bookSelect">
         }
                <option value="">-- لطفاً یک کتاب انتخاب کنید --</option>
                <option value="کتاب_مقدس">کتاب مقدس</option>
                <option value="انجیل_متی">انجیل متی</option>
                <option value="انجیل_مرقس">انجیل مرقس</option>
                <option value="مزامیر">مزامیر</option>
            </select>
        </div>
 
        <div id="adminSection" class="admin-section">
             <div class="admin-title">🔧 بخش مدیریت - ایجاد کتاب جدید</div>
            <div class="form-group">
                <label for="bookSearch">نام کتاب جدید:</label>
                <input type="text" id="bookSearch" placeholder="نام کتاب جدید را وارد کرده و Enter بزنید...">
            </div>
        </div>
 
        <div id="userSection" class="user-section">
            <div class="user-title">👤 بخش کاربران</div>
            <div class="form-group">
                <label for="userSearch">جستجوی کتاب (فقط نمایش):</label>
                <input type="text" id="userSearch" placeholder="نام کتاب را برای نمایش وارد کنید...">
            </div>
         </div>
          
          
         <div class="iframe-container">
         @media (max-width: 768px) {
            <iframe id="contentFrame" src="about:blank"></iframe>
             .filter-row {
        </div>
                 flex-direction: column;
    </div>
 
    <script>
        class BookManager {
             constructor() {
                 this.bookSelect = document.getElementById('bookSelect');
                this.bookSearch = document.getElementById('bookSearch');
                this.userSearch = document.getElementById('userSearch');
                this.contentFrame = document.getElementById('contentFrame');
                this.adminSection = document.getElementById('adminSection');
                this.userSection = document.getElementById('userSection');
               
                this.DYNAMIC_BOOKS_KEY = 'pb_dynamic_books_v2';
                this.isAdmin = false;
                this.isCheckingAdmin = false;
               
                this.init();
             }
             }
              
              
             async init() {
             .content-frame {
                 await this.checkAdminStatus();
                 height: calc(100vh - 280px);
                this.loadDynamicBooks();
                 min-height: 350px;
                 this.setupEventListeners();
                this.showInitialBook();
             }
             }
              
              
             // تشخیص مدیر از طریق تست دسترسی به ویکی
             .action-buttons {
            async checkAdminStatus() {
                 flex-direction: column;
                this.isCheckingAdmin = true;
               
                try {
                    // تست ایجاد یک صفحه موقت برای بررسی دسترسی
                    const testPageName = `Temp_Test_${Date.now()}`;
                    const testUrl = `https://www.pediabible.com/index.php/${encodeURIComponent(testPageName)}`;
                   
                    const response = await fetch(testUrl, {
                        method: 'GET',
                        credentials: 'include' // ارجاع کوکی‌های session
                    });
                   
                    // اگر صفحه باز شد و خطای دسترسی نداد، احتمالاً مدیر است
                    if (response.ok) {
                        const html = await response.text();
                       
                        // بررسی وجود فرم لاگین یا پیام دسترسی ممنوع
                        this.isAdmin = !html.includes('log in') &&
                                      !html.includes('لاگین') &&
                                      !html.includes('permission') &&
                                      !html.includes('دسترسی');
                    }
                   
                 } catch (error) {
                    console.log('خطا در بررسی دسترسی:', error);
                    this.isAdmin = false;
                }
               
                this.isCheckingAdmin = false;
                this.updateUI();
             }
             }
              
              
             updateUI() {
             .wiki-link, .site-link, .view-link {
                if (this.isAdmin) {
                 width: 100%;
                    this.adminSection.style.display = 'block';
                    this.userSection.style.display = 'none';
                    console.log('👑 حالت مدیر فعال شد');
                 } else {
                    this.adminSection.style.display = 'none';
                    this.userSection.style.display = 'block';
                    console.log('👤 حالت کاربر عادی فعال شد');
                }
             }
             }
              
              
             loadDynamicBooks() {
             .content-header {
                 const savedBooks = localStorage.getItem(this.DYNAMIC_BOOKS_KEY);
                 flex-direction: column;
                 if (savedBooks) {
                 gap: 8px;
                    try {
                align-items: flex-start;
                        const books = JSON.parse(savedBooks);
                        books.forEach(book => {
                            if (!this.bookExistsInList(book)) {
                                this.addBookToSelect(book);
                            }
                        });
                    } catch (e) {
                        console.error('خطا در بارگذاری لیست کتاب‌ها:', e);
                    }
                }
             }
             }
              
              
             bookExistsInList(bookName) {
             .content-controls {
                 return Array.from(this.bookSelect.options).some(option =>
                 width: 100%;
                    option.value === bookName
                 justify-content: space-between;
                 );
             }
             }
              
              
             addBookToSelect(bookName) {
             .header {
                 const option = document.createElement('option');
                 padding: 15px 10px;
                option.value = bookName;
                option.textContent = this.formatBookName(bookName);
                this.bookSelect.appendChild(option);
             }
             }
              
              
             formatBookName(bookName) {
             h1 {
                 return bookName.replace(/_/g, ' ');
                 font-size: 20px;
             }
             }
              
              
             saveNewBook(bookName) {
             .description {
                 const savedBooks = localStorage.getItem(this.DYNAMIC_BOOKS_KEY);
                 font-size: 12px;
                let books = savedBooks ? JSON.parse(savedBooks) : [];
               
                if (!books.includes(bookName)) {
                    books.push(bookName);
                    localStorage.setItem(this.DYNAMIC_BOOKS_KEY, JSON.stringify(books));
                    return true;
                }
                return false;
             }
             }
              
              
             showBook(bookName) {
             .content-list {
                 if (!bookName) return;
                 grid-template-columns: 1fr;
                const encodedBookName = encodeURIComponent(bookName);
                this.contentFrame.src = `https://www.pediabible.com/index.php/${encodedBookName}`;
             }
             }
        }
    </style>
</head>
<body>
    <!-- Breadcrumb Navigation -->
    <nav class="breadcrumb" aria-label="breadcrumb">
        <a href="https://www.pediabible.com">خانه</a> /
        <span>کتابخانه</span>
    </nav>
    <div class="container">
        <header class="header">
            <h1>کتابخانه پدیا بایبل</h1>
            <p class="description">مطالعه آنلاین کتاب‌ها و مقالات مذهبی شامل کتاب‌های مقدس و مقالات تخصصی</p>
        </header>
        <!-- محتوای سئو -->
        <section class="seo-content">
            <h2>کتابخانه جامع منابع مذهبی</h2>
            <p>کتابخانه پدیا بایبل مرجع کامل و تخصصی برای مطالعه آنلاین کتاب‌های مقدس و مقالات مذهبی است. در این کتابخانه می‌توانید به منابع معتبر و جامعی از متون دینی دسترسی داشته باشید.</p>
              
              
             // ایجاد کتاب جدید (فقط برای مدیر)
             <div class="content-list">
             async createNewBook(bookName) {
                <div class="content-item">
                 if (!bookName.trim()) {
                    <h3>کتاب‌های مقدس</h3>
                     alert('لطفاً نام کتاب را وارد کنید');
                    <p>مطالعه کتاب‌های مقدس از جمله عیسی، انجیل متی، مزامیر، پیدایش و دیگر متون مذهبی با ترجمه‌های معتبر</p>
                     return;
                </div>
                 }
                <div class="content-item">
                    <h3>مقالات تخصصی</h3>
                    <p>مقالات متعدد درباره موضوعات مذهبی مانند مسیح، تثلیث، نجات، روح القدس و دیگر مفاهیم دینی</p>
                </div>
                <div class="content-item">
                    <h3>مطالعه آنلاین</h3>
                    <p>امکان مطالعه تمامی منابع به صورت آنلاین با قابلیت‌های پیشرفته مانند بزرگ‌نمایی و مشاهده مستقیم</p>
                </div>
                <div class="content-item">
                    <h3>منابع معتبر</h3>
                    <p>دسترسی به منابع معتبر و مورد تأیید مراجع دینی برای مطالعه و تحقیق</p>
                </div>
            </div>
        </section>
 
        <section class="filter-section" aria-label="فیلترهای جستجو">
             <div class="filter-row">
                 <div class="form-group">
                    <label for="categorySelect"><i class="fas fa-folder"></i> دسته‌بندی:</label>
                     <select id="categorySelect">
                        <option value="">لطفاً دسته‌بندی انتخاب کنید</option>
                        <option value="کتاب">کتاب</option>
                        <option value="مقاله">مقاله</option>
                     </select>
                 </div>
                  
                  
                 if (!this.isAdmin) {
                 <div class="form-group">
                     alert('شما دسترسی لازم برای ایجاد کتاب جدید را ندارید');
                    <label for="contentSelect"><i class="fas fa-book-open"></i> انتخاب محتوا:</label>
                     return;
                     <select id="contentSelect" disabled>
                 }
                        <option value="">ابتدا دسته‌بندی را انتخاب کنید</option>
                  
                     </select>
                 const formattedBookName = bookName.trim().replace(/ /g, '_');
                 </div>
                  
            </div>
                // بررسی نهایی دسترسی قبل از ایجاد
        </section>
                 if (this.isCheckingAdmin) {
       
                     alert('لطفاً چند ثانیه صبر کنید...');
        <section class="content-frame" aria-label="محتوای مطالعه">
                     return;
            <div class="content-header">
                 }
                 <div class="content-title" id="contentTitle">هیچ محتوایی انتخاب نشده است</div>
                  
                 <div class="content-controls">
                 try {
                    <button class="control-btn" id="zoomOut"><i class="fas fa-search-minus"></i> کوچک‌نمایی</button>
                     // تست نهایی دسترسی
                    <button class="control-btn" id="zoomIn"><i class="fas fa-search-plus"></i> بزرگ‌نمایی</button>
                     const testUrl = `https://www.pediabible.com/index.php/${encodeURIComponent(formattedBookName)}`;
                    <button class="control-btn" id="directView"><i class="fas fa-external-link-alt"></i> مشاهده مستقیم</button>
                    const response = await fetch(testUrl, { credentials: 'include' });
                 </div>
                   
            </div>
                    if (!response.ok) {
            <div class="loading-bar" id="loadingBar"></div>
                        throw new Error('دسترسی ممنوع');
            <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>
                    const isNew = this.saveNewBook(formattedBookName);
                        <p>لطفاً یک کتاب یا مقاله از لیست انتخاب کنید</p>
                    if (isNew) {
                     </div>
                        this.addBookToSelect(formattedBookName);
                </div>
                    }
                <iframe id="contentFrame" class="clean-frame" src="about:blank" style="display: none;" title="محتوای مطالعه"></iframe>
                   
            </div>
                    // نمایش کتاب
            <div class="action-buttons">
                    this.bookSelect.value = formattedBookName;
                 <a id="siteLink" href="#" class="site-link" target="_blank" rel="noopener noreferrer" style="display: none;">
                    this.showBook(formattedBookName);
                    <i class="fas fa-home"></i>
                    this.bookSearch.value = '';
                    مشاهده صفحه در سایت اصلی
                   
                 </a>
                    alert(`✅ کتاب "${this.formatBookName(formattedBookName)}" با موفقیت ایجاد شد`);
                 <a id="wikiLink" href="#" class="wiki-link" target="_blank" rel="noopener noreferrer" style="display: none;">
                   
                     <i class="fab fa-wikipedia-w"></i>
                } catch (error) {
                    مشاهده صفحه کامل در ویکی
                    console.error('خطا در ایجاد کتاب:', error);
                </a>
                    alert('❌ خطا در ایجاد کتاب. ممکن است دسترسی لازم را نداشته باشید.');
                <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: 'مسیح', text: 'مسیح' },
                { value: 'تثلیث', text: 'تثلیث' },
                { value: 'نجات', text: 'نجات' },
                { value: 'روح_القدس', text: 'روح القدس' }
            ]
        };
 
        // عناصر
        const categorySelect = document.getElementById('categorySelect');
        const contentSelect = document.getElementById('contentSelect');
        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');
 
        let currentZoom = 100;
        let currentContent = '';
 
        // وقتی دسته‌بندی تغییر کرد
        categorySelect.addEventListener('change', function() {
            const selectedCategory = this.value;
           
            if (!selectedCategory) {
                contentSelect.disabled = true;
                contentSelect.innerHTML = '<option value="">ابتدا دسته‌بندی را انتخاب کنید</option>';
                resetContent();
                 return;
             }
             }
              
              
             // جستجو برای کاربران عادی
             // پر کردن لیست محتواها
             searchBook(bookName) {
             contentSelect.disabled = false;
                 if (!bookName.trim()) return;
            contentSelect.innerHTML = '<option value="">لطفاً محتوا انتخاب کنید</option>';
                  
           
                 const formattedBookName = bookName.trim().replace(/ /g, '_');
            booksData[selectedCategory].forEach(item => {
                this.showBook(formattedBookName);
                 const option = document.createElement('option');
                 this.userSearch.value = '';
                 option.value = item.value;
                 option.textContent = item.text;
                contentSelect.appendChild(option);
            });
           
            resetContent();
        });
 
        // وقتی محتوا تغییر کرد
        contentSelect.addEventListener('change', function() {
            const selectedValue = this.value;
            const selectedText = this.options[this.selectedIndex].text;
           
            if (!selectedValue) {
                resetContent();
                 return;
             }
             }
              
              
             setupEventListeners() {
             currentContent = selectedValue;
                 // انتخاب از لیست
            showContent(selectedValue, selectedText);
                 this.bookSelect.addEventListener('change', () => {
        });
                     this.showBook(this.bookSelect.value);
 
                 });
        // نمایش محتوا
        function showContent(bookValue, bookText) {
            const contentUrl = `https://www.pediabible.com/index.php/${bookValue}?action=render`;
            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);
                  
                  
                 // جستجوی مدیر
                 contentFrame.style.display = 'block';
                 this.bookSearch.addEventListener('keypress', (e) => {
                 iframePlaceholder.style.display = 'none';
                    if (e.key === 'Enter') {
                applyZoom();
                         this.createNewBook(this.bookSearch.value);
            };
                     }
           
                 });
            contentFrame.onerror = function() {
               
                clearInterval(progressInterval);
                // جستجوی کاربر عادی
                loadingBar.style.width = '0%';
                this.userSearch.addEventListener('keypress', (e) => {
                iframePlaceholder.style.display = 'flex';
                    if (e.key === 'Enter') {
                iframePlaceholder.innerHTML = `
                        this.searchBook(this.userSearch.value);
                    <div>
                    }
                         <i class="fas fa-exclamation-triangle" style="font-size: 1.5rem; color: #dc3545; margin-bottom: 10px;"></i>
                });
                        <p>خطا در بارگذاری "${bookText}". لطفاً دوباره تلاش کنید.</p>
             }
                     </div>
                `;
                 contentFrame.style.display = 'none';
            };
           
            // به‌روزرسانی لینک‌ها
            wikiLink.href = wikiUrl;
            wikiLink.style.display = 'flex';
           
            siteLink.href = siteUrl;
             siteLink.style.display = 'flex';
              
              
             showInitialBook() {
             viewLink.href = contentUrl;
                if (this.bookSelect.options.length > 1 && !this.bookSelect.value) {
            viewLink.style.display = 'flex';
                    this.bookSelect.selectedIndex = 1;
        }
                    this.showBook(this.bookSelect.value);
 
                }
        // مشاهده مستقیم
        directView.addEventListener('click', function() {
            if (currentContent) {
                const directUrl = `https://www.pediabible.com/index.php/${currentContent}`;
                window.open(directUrl, '_blank', 'noopener,noreferrer');
             }
             }
        });
        // کنترل بزرگ‌نمایی
        function applyZoom() {
            contentFrame.style.zoom = `${currentZoom}%`;
         }
         }
          
 
         // راه‌اندازی سیستم
         zoomIn.addEventListener('click', function() {
         document.addEventListener('DOMContentLoaded', () => {
            if (currentZoom < 150) {
            new BookManager();
                currentZoom += 10;
                applyZoom();
            }
         });
 
         zoomOut.addEventListener('click', function() {
            if (currentZoom > 50) {
                currentZoom -= 10;
                applyZoom();
            }
         });
         });
        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%';
        }
     </script>
     </script>
</body>
</body>
</html>
</html>

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

کتابخانه پدیا بایبل - مطالعه آنلاین کتاب‌ها و مقالات مذهبی | پدیا بایبل

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

مطالعه آنلاین کتاب‌ها و مقالات مذهبی شامل کتاب‌های مقدس و مقالات تخصصی

کتابخانه جامع منابع مذهبی

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

کتاب‌های مقدس

مطالعه کتاب‌های مقدس از جمله عیسی، انجیل متی، مزامیر، پیدایش و دیگر متون مذهبی با ترجمه‌های معتبر

مقالات تخصصی

مقالات متعدد درباره موضوعات مذهبی مانند مسیح، تثلیث، نجات، روح القدس و دیگر مفاهیم دینی

مطالعه آنلاین

امکان مطالعه تمامی منابع به صورت آنلاین با قابلیت‌های پیشرفته مانند بزرگ‌نمایی و مشاهده مستقیم

منابع معتبر

دسترسی به منابع معتبر و مورد تأیید مراجع دینی برای مطالعه و تحقیق

هیچ محتوایی انتخاب نشده است

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