کتابخانه دانشنامه کتاب مقدس: تفاوت میان نسخهها
بدون خلاصۀ ویرایش |
بدون خلاصۀ ویرایش |
||
خط ۲۷۸: | خط ۲۷۸: | ||
} | } | ||
. | .select-display { | ||
width: 100%; | width: 100%; | ||
padding: 10px 12px; | padding: 10px 12px; | ||
خط ۲۸۵: | خط ۲۸۵: | ||
font-size: 13px; | font-size: 13px; | ||
background: white; | background: white; | ||
cursor: pointer; | |||
transition: all 0.3s ease; | transition: all 0.3s ease; | ||
border: 1px solid #e9ecef; | border: 1px solid #e9ecef; | ||
text-align: right; | |||
position: relative; | |||
} | } | ||
. | .select-display:after { | ||
content: "▼"; | |||
position: absolute; | |||
left: 12px; | |||
top: 50%; | |||
transform: translateY(-50%); | |||
font-size: 10px; | |||
color: #6c757d; | |||
} | |||
.select-display:focus { | |||
outline: none; | outline: none; | ||
border-color: #3e6f73; | border-color: #3e6f73; | ||
خط ۲۹۶: | خط ۳۰۸: | ||
} | } | ||
. | .select-display:disabled { | ||
background-color: #f8f9fa; | background-color: #f8f9fa; | ||
color: #6c757d; | color: #6c757d; | ||
خط ۳۱۱: | خط ۳۲۳: | ||
border: 1px solid #ced4da; | border: 1px solid #ced4da; | ||
border-radius: 6px; | border-radius: 6px; | ||
max-height: | max-height: 300px; | ||
overflow-y: auto; | overflow-y: auto; | ||
z-index: 1000; | z-index: 1000; | ||
display: none; | display: none; | ||
box-shadow: 0 4px 12px rgba(0,0,0,0.1); | box-shadow: 0 4px 12px rgba(0,0,0,0.1); | ||
} | |||
.search-box { | |||
padding: 10px; | |||
border-bottom: 1px solid #e9ecef; | |||
background: #f8f9fa; | |||
position: sticky; | |||
top: 0; | |||
z-index: 1001; | |||
} | |||
.search-input { | |||
width: 100%; | |||
padding: 8px 12px; | |||
border: 1px solid #ced4da; | |||
border-radius: 4px; | |||
font-size: 13px; | |||
} | |||
.search-input:focus { | |||
outline: none; | |||
border-color: #3e6f73; | |||
} | |||
.options-container { | |||
max-height: 250px; | |||
overflow-y: auto; | |||
} | } | ||
خط ۳۴۴: | خط ۳۸۳: | ||
color: #6c757d; | color: #6c757d; | ||
font-style: italic; | font-style: italic; | ||
text-align: center; | |||
padding: 15px; | |||
} | } | ||
خط ۵۸۰: | خط ۶۲۱: | ||
<div class="form-group"> | <div class="form-group"> | ||
<label for=" | <label for="contentSelect"><i class="fas fa-book-open"></i> انتخاب محتوا:</label> | ||
<div class="searchable-select"> | <div class="searchable-select"> | ||
< | <div class="select-display" id="selectDisplay">لطفاً دستهبندی انتخاب کنید</div> | ||
<div class="options-list" id="optionsList"> | <div class="options-list" id="optionsList"> | ||
<!-- گزینهها اینجا نمایش داده میشوند --> | <div class="search-box"> | ||
<input type="text" class="search-input" id="searchInput" placeholder="جستجو در محتواها..."> | |||
</div> | |||
<div class="options-container" id="optionsContainer"> | |||
<!-- گزینهها اینجا نمایش داده میشوند --> | |||
</div> | |||
</div> | </div> | ||
</div> | </div> | ||
خط ۶۵۰: | خط ۶۹۶: | ||
// عناصر | // عناصر | ||
const categorySelect = document.getElementById('categorySelect'); | const categorySelect = document.getElementById('categorySelect'); | ||
const | const selectDisplay = document.getElementById('selectDisplay'); | ||
const searchInput = document.getElementById('searchInput'); | |||
const optionsList = document.getElementById('optionsList'); | const optionsList = document.getElementById('optionsList'); | ||
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'); | ||
خط ۶۷۳: | خط ۷۲۱: | ||
if (!selectedCategory) { | if (!selectedCategory) { | ||
selectDisplay.textContent = 'لطفاً دستهبندی انتخاب کنید'; | |||
selectDisplay.style.color = '#6c757d'; | |||
selectedContentValue.value = ''; | selectedContentValue.value = ''; | ||
optionsList. | optionsList.style.display = 'none'; | ||
resetContent(); | resetContent(); | ||
return; | return; | ||
} | } | ||
// فعال کردن | // فعال کردن نمایش | ||
selectDisplay.textContent = 'لطفاً محتوا انتخاب کنید'; | |||
selectDisplay.style.color = '#333'; | |||
selectedContentValue.value = ''; | selectedContentValue.value = ''; | ||
currentItems = booksData[selectedCategory]; | currentItems = booksData[selectedCategory]; | ||
// | resetContent(); | ||
}); | |||
// وقتی روی نمایش کلیک میشود | |||
selectDisplay.addEventListener('click', function() { | |||
if (!categorySelect.value) return; | |||
if (optionsList.style.display === 'block') { | |||
optionsList.style.display = 'none'; | |||
} else { | |||
optionsList.style.display = 'block'; | |||
searchInput.value = ''; | |||
populateOptions(currentItems); | |||
setTimeout(() => { | |||
searchInput.focus(); | |||
}, 100); | |||
} | |||
}); | }); | ||
// وقتی کاربر در فیلد جستجو تایپ میکند | // وقتی کاربر در فیلد جستجو تایپ میکند | ||
searchInput.addEventListener('input', function() { | |||
const searchTerm = this.value.toLowerCase(); | const searchTerm = this.value.toLowerCase(); | ||
const filteredItems = currentItems.filter(item => | const filteredItems = currentItems.filter(item => | ||
خط ۷۰۰: | خط ۷۶۱: | ||
); | ); | ||
populateOptions(filteredItems, searchTerm); | populateOptions(filteredItems, searchTerm); | ||
}); | }); | ||
// پر کردن لیست گزینهها | // پر کردن لیست گزینهها | ||
function populateOptions(itemsList, searchTerm = '') { | function populateOptions(itemsList, searchTerm = '') { | ||
optionsContainer.innerHTML = ''; | |||
if (itemsList.length === 0) { | if (itemsList.length === 0) { | ||
const noResult = document.createElement('div'); | const noResult = document.createElement('div'); | ||
noResult.className = ' | noResult.className = 'no-results'; | ||
noResult.textContent = 'نتیجهای یافت نشد'; | noResult.textContent = 'نتیجهای یافت نشد'; | ||
optionsContainer.appendChild(noResult); | |||
return; | return; | ||
} | } | ||
خط ۷۴۴: | خط ۷۸۹: | ||
option.addEventListener('click', function() { | option.addEventListener('click', function() { | ||
selectDisplay.textContent = item.text; | |||
selectDisplay.style.color = '#333'; | |||
selectedContentValue.value = item.value; | selectedContentValue.value = item.value; | ||
optionsList.style.display = 'none'; | optionsList.style.display = 'none'; | ||
خط ۷۵۳: | خط ۷۹۹: | ||
}); | }); | ||
optionsContainer.appendChild(option); | |||
}); | }); | ||
} | } | ||
خط ۸۷۰: | خط ۹۱۶: | ||
document.addEventListener('click', function(event) { | document.addEventListener('click', function(event) { | ||
if (!event.target.closest('.searchable-select')) { | if (!event.target.closest('.searchable-select')) { | ||
optionsList.style.display = 'none'; | |||
} | |||
}); | |||
// مدیریت کلیدهای کیبورد | |||
searchInput.addEventListener('keydown', function(event) { | |||
if (event.key === 'Escape') { | |||
optionsList.style.display = 'none'; | optionsList.style.display = 'none'; | ||
} | } |
نسخهٔ ۱۶ اکتبر ۲۰۲۵، ساعت ۰۰:۲۸
کتابخانه دانشنامه کتاب مقدس
مطالعه آنلاین کتابها و مقالات مسیحی دارای اجازه پخش در دانشنامه کتاب مقدس
کتابخانه جامع منابع مسیحی
کتابخانهٔ دانشنامهٔ کتاب مقدس مرجع کامل و تخصصی برای مطالعهٔ آنلاین کتابها و مقالات مسیحی است، همهٔ مطالب با کسب اجازه از ناشران یا نویسندگان منتشر شدهاند و حقوق آنها برای انتشارات دانشنامهٔ کتاب مقدس محفوظ است. در صورت نبود حق کپیرایت، انتشار با رعایت اصول امانت و احترام به منبع انجام گرفته است.
کتابها
انتشار همهٔ کتابها در دانشنامه با اجازهٔ رسمی نویسندگان یا ناشران انجام شده است، و برای برخی آثار، مجوز چاپ مجدد نیز دریافت گردیده است. تمامی حقوق برای انتشارات دانشنامهٔ کتاب مقدس محفوظ است. نویسندگان و ناشران مسیحی میتوانند برای همکاری و انتشار آثار خود با ما در ارتباط باشند.
مقالات
مقالات دانشنامه با اجازهٔ نویسندگان یا بر اساس منابع عمومی و بدون حق کپیرایت منتشر میشوند. در همهٔ موارد، اصول امانتداری و احترام به منبع اصلی رعایت شده است. پژوهشگران و نویسندگان مسیحی میتوانند برای انتشار مقالات خود با ما همکاری کنند
لطفاً یک کتاب یا مقاله از لیست انتخاب کنید