کتابخانه دانشنامه کتاب مقدس: تفاوت میان نسخهها
بدون خلاصۀ ویرایش |
بدون خلاصۀ ویرایش |
||
(۷ نسخهٔ میانیِ ایجادشده توسط همین کاربر نشان داده نشد) | |||
خط ۱: | خط ۱: | ||
<html lang="fa" dir="rtl"> | <html lang="fa" dir="rtl"> | ||
<head> | <head> | ||
خط ۲۱۰: | خط ۲۰۹: | ||
text-align: center; | text-align: center; | ||
padding: 15px; | padding: 15px; | ||
} | } | ||
خط ۳۹۶: | خط ۳۶۴: | ||
<div class="content-item"> | <div class="content-item"> | ||
<h3>کتابها</h3> | <h3>کتابها</h3> | ||
<p>انتشار همهٔ کتابها در دانشنامه با اجازهٔ رسمی نویسندگان یا ناشران انجام شده است.</p> | <p>انتشار همهٔ کتابها در دانشنامه با اجازهٔ رسمی نویسندگان یا ناشران انجام شده است، و برای برخی آثار، مجوز چاپ مجدد نیز دریافت گردیده است. تمامی حقوق برای انتشارات دانشنامهٔ کتاب مقدس محفوظ است. | ||
نویسندگان و ناشران مسیحی میتوانند برای همکاری و انتشار آثار خود با ما در ارتباط باشند.</p> | |||
</div> | </div> | ||
<div class="content-item"> | <div class="content-item"> | ||
<h3>مقالات</h3> | <h3>مقالات</h3> | ||
<p>مقالات دانشنامه با اجازهٔ نویسندگان یا بر اساس منابع عمومی منتشر میشوند.</p> | <p>مقالات دانشنامه با اجازهٔ نویسندگان یا بر اساس منابع عمومی و بدون حق کپیرایت منتشر میشوند. در همهٔ موارد، اصول امانتداری و احترام به منبع اصلی رعایت شده است. | ||
پژوهشگران و نویسندگان مسیحی میتوانند برای انتشار مقالات خود با ما همکاری کنند</p> | |||
</div> | </div> | ||
<div class="content-item"> | <div class="content-item"> | ||
خط ۴۳۰: | خط ۴۰۰: | ||
</div> | </div> | ||
<div class="options-container" id="optionsContainer"> | <div class="options-container" id="optionsContainer"> | ||
<div class="no-results">لطفاً | <div class="no-results">لطفاً ابتدا یک دستهبندی انتخاب کنید</div> | ||
</div> | </div> | ||
</div> | </div> | ||
</div> | </div> | ||
خط ۴۷۷: | خط ۴۴۶: | ||
<script> | <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 categorySelect = document.getElementById('categorySelect'); | ||
const selectDisplay = document.getElementById('selectDisplay'); | const selectDisplay = document.getElementById('selectDisplay'); | ||
خط ۵۲۳: | خط ۴۸۵: | ||
const optionsList = document.getElementById('optionsList'); | const optionsList = document.getElementById('optionsList'); | ||
const optionsContainer = document.getElementById('optionsContainer'); | const optionsContainer = document.getElementById('optionsContainer'); | ||
const selectedContentValue = document.getElementById('selectedContentValue'); | const selectedContentValue = document.getElementById('selectedContentValue'); | ||
const contentFrame = document.getElementById('contentFrame'); | const contentFrame = document.getElementById('contentFrame'); | ||
const iframePlaceholder = document.getElementById('iframePlaceholder'); | const iframePlaceholder = document.getElementById('iframePlaceholder'); | ||
خط ۵۳۸: | خط ۵۰۰: | ||
let currentZoom = 100; | let currentZoom = 100; | ||
let currentContent = ''; | let currentContent = ''; | ||
let currentItems = []; | |||
// وقتی دستهبندی تغییر کرد | |||
categorySelect.addEventListener('change', function() { | categorySelect.addEventListener('change', function() { | ||
const selectedCategory = this.value; | const selectedCategory = this.value; | ||
خط ۵۵۱: | خط ۵۱۵: | ||
} | } | ||
// فعال کردن نمایش | |||
selectDisplay.textContent = 'برای مشاهده محتوا کلیک کنید'; | |||
selectDisplay.textContent = | |||
selectDisplay.style.color = '#333'; | selectDisplay.style.color = '#333'; | ||
selectedContentValue.value = ''; | selectedContentValue.value = ''; | ||
currentItems = booksData[selectedCategory]; | |||
resetContent(); | resetContent(); | ||
}); | }); | ||
// وقتی روی نمایش کلیک میشود | |||
selectDisplay.addEventListener('click', function() { | selectDisplay.addEventListener('click', function() { | ||
if (! | if (!categorySelect.value) { | ||
alert('لطفاً ابتدا یک دستهبندی انتخاب کنید'); | |||
categorySelect.focus(); | |||
return; | |||
} | |||
if (optionsList.style.display === 'block') { | if (optionsList.style.display === 'block') { | ||
خط ۵۷۲: | خط ۵۳۷: | ||
optionsList.style.display = 'block'; | optionsList.style.display = 'block'; | ||
searchInput.value = ''; | searchInput.value = ''; | ||
// در اینجا تابع populateOptions فراخوانی میشود | |||
populateOptions(currentItems); | |||
setTimeout(() => { | setTimeout(() => { | ||
searchInput.focus(); | searchInput.focus(); | ||
خط ۵۸۰: | خط ۵۴۷: | ||
}); | }); | ||
// وقتی کاربر در فیلد جستجو تایپ میکند | |||
searchInput.addEventListener('input', function() { | searchInput.addEventListener('input', function() { | ||
const searchTerm = this.value.toLowerCase(); | |||
const filteredItems = currentItems.filter(item => | |||
item.text.toLowerCase().includes(searchTerm) | |||
); | |||
populateOptions(filteredItems, searchTerm); | |||
}); | }); | ||
function | // پر کردن لیست گزینهها - این تابع اکنون به درستی فراخوانی میشود | ||
function populateOptions(itemsList, searchTerm = '') { | |||
console.log('populateOptions فراخوانی شد با', itemsList.length, 'آیتم'); | |||
optionsContainer.innerHTML = ''; | optionsContainer.innerHTML = ''; | ||
خط ۶۲۱: | خط ۵۶۹: | ||
return; | return; | ||
} | } | ||
itemsList.forEach(item => { | itemsList.forEach(item => { | ||
خط ۶۲۸: | خط ۵۷۴: | ||
option.className = 'option-item'; | option.className = 'option-item'; | ||
if ( | if (searchTerm) { | ||
const regex = new RegExp(`(${ | // هایلایت کردن متن جستجو شده | ||
const regex = new RegExp(`(${searchTerm})`, 'gi'); | |||
const highlightedText = item.text.replace(regex, '<span class="highlight">$1</span>'); | const highlightedText = item.text.replace(regex, '<span class="highlight">$1</span>'); | ||
option.innerHTML = highlightedText; | option.innerHTML = highlightedText; | ||
خط ۶۴۲: | خط ۵۸۹: | ||
optionsList.style.display = 'none'; | optionsList.style.display = 'none'; | ||
// نمایش محتوا | |||
currentContent = item.value; | currentContent = item.value; | ||
showContent(item.value, item.text); | showContent(item.value, item.text); | ||
}); | }); | ||
optionsContainer.appendChild(option); | |||
}); | }); | ||
} | } | ||
// نمایش محتوا | |||
function showContent(bookValue, bookText) { | function showContent(bookValue, bookText) { | ||
const contentUrl = `https://www.pediabible.com/index.php/${bookValue}?action=render`; | const contentUrl = `https://www.pediabible.com/index.php/${bookValue}?action=render`; | ||
خط ۷۱۴: | خط ۶۰۶: | ||
contentTitle.textContent = bookText; | contentTitle.textContent = bookText; | ||
// نمایش loading | |||
contentFrame.style.display = 'none'; | contentFrame.style.display = 'none'; | ||
iframePlaceholder.style.display = 'flex'; | iframePlaceholder.style.display = 'flex'; | ||
خط ۷۲۳: | خط ۶۱۶: | ||
`; | `; | ||
// نوار پیشرفت | |||
let progress = 0; | let progress = 0; | ||
const progressInterval = setInterval(() => { | const progressInterval = setInterval(() => { | ||
progress += Math.random() * | progress += Math.random() * 15; | ||
if (progress > | if (progress > 90) progress = 90; | ||
loadingBar.style.width = `${progress}%`; | loadingBar.style.width = `${progress}%`; | ||
}, 200); | }, 200); | ||
// بارگذاری محتوا | |||
contentFrame.src = contentUrl; | |||
contentFrame.onload = function() { | |||
clearInterval(progressInterval); | clearInterval(progressInterval); | ||
loadingBar.style.width = '100%'; | loadingBar.style.width = '100%'; | ||
خط ۷۴۰: | خط ۶۳۷: | ||
iframePlaceholder.style.display = 'none'; | iframePlaceholder.style.display = 'none'; | ||
applyZoom(); | applyZoom(); | ||
}; | |||
contentFrame.onerror = function() { | |||
< | clearInterval(progressInterval); | ||
loadingBar.style.width = '0%'; | |||
iframePlaceholder.style.display = 'flex'; | |||
<p> | iframePlaceholder.innerHTML = ` | ||
</ | <div> | ||
<i class="fas fa-exclamation-triangle" style="font-size: 1.5rem; color: #dc3545; margin-bottom: 10px;"></i> | |||
` | <p>خطا در بارگذاری "${bookText}". لطفاً دوباره تلاش کنید.</p> | ||
contentFrame. | </div> | ||
} | `; | ||
contentFrame.style.display = 'none'; | |||
}; | |||
// بهروزرسانی لینکها | |||
wikiLink.href = wikiUrl; | wikiLink.href = wikiUrl; | ||
wikiLink.style.display = 'flex'; | wikiLink.style.display = 'flex'; | ||
خط ۷۶۳: | خط ۶۶۳: | ||
} | } | ||
// مشاهده مستقیم | |||
directView.addEventListener('click', function() { | directView.addEventListener('click', function() { | ||
if (currentContent) { | if (currentContent) { | ||
خط ۷۷۰: | خط ۶۷۱: | ||
}); | }); | ||
// کنترل بزرگنمایی | |||
function applyZoom() { | function applyZoom() { | ||
contentFrame.style.zoom = `${currentZoom}%`; | contentFrame.style.zoom = `${currentZoom}%`; | ||
خط ۸۰۶: | خط ۷۰۸: | ||
} | } | ||
// بستن لیست وقتی کاربر در جای دیگری کلیک میکند | |||
document.addEventListener('click', function(event) { | document.addEventListener('click', function(event) { | ||
if (!event.target.closest('.searchable-select')) { | if (!event.target.closest('.searchable-select')) { | ||
خط ۸۱۲: | خط ۷۱۵: | ||
}); | }); | ||
// مدیریت کلیدهای کیبورد | |||
searchInput.addEventListener('keydown', function(event) { | searchInput.addEventListener('keydown', function(event) { | ||
if (event.key === 'Escape') { | if (event.key === 'Escape') { | ||
خط ۸۱۷: | خط ۷۲۱: | ||
} | } | ||
}); | }); | ||
// لاگ برای دیباگ | |||
console.log('سیستم بارگذاری شد. حالا میتوانید تست کنید:'); | |||
console.log('1. یک دستهبندی انتخاب کنید'); | |||
console.log('2. روی "برای مشاهده محتوا کلیک کنید" کلیک کنید'); | |||
console.log('3. لیست محتواها نمایش داده میشود'); | |||
</script> | </script> | ||
</body> | </body> | ||
</html> | </html> |
نسخهٔ کنونی تا ۱۶ اکتبر ۲۰۲۵، ساعت ۱۷:۵۶
کتابخانه دانشنامه کتاب مقدس
مطالعه آنلاین کتابها و مقالات مسیحی
کتابخانه جامع منابع مسیحی
کتابخانهٔ دانشنامهٔ کتاب مقدس مرجع کامل و تخصصی برای مطالعهٔ آنلاین کتابها و مقالات مسیحی است.
کتابها
انتشار همهٔ کتابها در دانشنامه با اجازهٔ رسمی نویسندگان یا ناشران انجام شده است، و برای برخی آثار، مجوز چاپ مجدد نیز دریافت گردیده است. تمامی حقوق برای انتشارات دانشنامهٔ کتاب مقدس محفوظ است. نویسندگان و ناشران مسیحی میتوانند برای همکاری و انتشار آثار خود با ما در ارتباط باشند.
مقالات
مقالات دانشنامه با اجازهٔ نویسندگان یا بر اساس منابع عمومی و بدون حق کپیرایت منتشر میشوند. در همهٔ موارد، اصول امانتداری و احترام به منبع اصلی رعایت شده است. پژوهشگران و نویسندگان مسیحی میتوانند برای انتشار مقالات خود با ما همکاری کنند
فروشگاه کتاب
در فروشگاه کتاب دانشنامه، امکان خرید کتابهای چاپی و الکترونیکی فراهم شده است.
لطفاً یک کتاب یا مقاله از لیست انتخاب کنید