تست: تفاوت میان نسخهها
ظاهر
بدون خلاصۀ ویرایش |
بدون خلاصۀ ویرایش |
||
خط ۴۸: | خط ۴۸: | ||
font-size: 14px; | font-size: 14px; | ||
margin-top: 8px; | margin-top: 8px; | ||
} | } | ||
خط ۱۱۵: | خط ۹۳: | ||
background: white; | background: white; | ||
height: 500px; | height: 500px; | ||
} | |||
.content-header { | |||
padding: 10px 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: 16px; | |||
} | |||
.content-controls { | |||
display: flex; | |||
gap: 8px; | |||
} | |||
.control-btn { | |||
background: white; | |||
border: 1px solid #dee2e6; | |||
border-radius: 4px; | |||
padding: 5px 10px; | |||
cursor: pointer; | |||
font-size: 12px; | |||
transition: all 0.3s ease; | |||
display: flex; | |||
align-items: center; | |||
gap: 4px; | |||
} | |||
.control-btn:hover { | |||
background: #e9ecef; | |||
} | } | ||
.iframe-container { | .iframe-container { | ||
width: 100%; | width: 100%; | ||
height: 100%; | height: calc(100% - 50px); | ||
position: relative; | |||
} | } | ||
خط ۱۵۱: | خط ۱۶۷: | ||
} | } | ||
.wiki-link, .site-link { | .wiki-link, .site-link, .view-link { | ||
background-color: #3e6f73; | background-color: #3e6f73; | ||
color: white; | color: white; | ||
خط ۱۶۳: | خط ۱۷۹: | ||
text-align: center; | text-align: center; | ||
flex: 1; | flex: 1; | ||
display: flex; | |||
align-items: center; | |||
justify-content: center; | |||
gap: 6px; | |||
} | } | ||
.site-link { | .site-link { | ||
background-color: #6c757d; | background-color: #6c757d; | ||
} | |||
.view-link { | |||
background-color: #4a7c59; | |||
} | } | ||
خط ۱۷۵: | خط ۱۹۹: | ||
.wiki-link:hover { | .wiki-link:hover { | ||
background-color: #2d5257; | background-color: #2d5257; | ||
} | } | ||
. | .view-link:hover { | ||
background | background-color: #3e6f4a; | ||
} | } | ||
. | .loading-bar { | ||
height: 3px; | |||
background: linear-gradient(90deg, #8fb996, #3e6f73); | |||
width: 0%; | |||
transition: width 0.4s ease; | |||
position: absolute; | |||
top: 0; | |||
right: 0; | |||
} | } | ||
خط ۲۵۲: | خط ۲۲۸: | ||
} | } | ||
.wiki-link, .site-link { | .wiki-link, .site-link, .view-link { | ||
width: 100%; | width: 100%; | ||
} | } | ||
. | .content-header { | ||
flex-direction: column; | flex-direction: column; | ||
gap: 8px; | gap: 8px; | ||
align-items: flex-start; | |||
} | } | ||
. | .content-controls { | ||
width: 100%; | |||
justify-content: space-between; | |||
} | } | ||
} | } | ||
خط ۲۷۸: | خط ۲۵۲: | ||
در این بخش میتوانید کتابها و مقالات مختلف را مطالعه کنید. | در این بخش میتوانید کتابها و مقالات مختلف را مطالعه کنید. | ||
برای شروع، دستهبندی و سپس مورد مورد نظر خود را انتخاب نمایید. | برای شروع، دستهبندی و سپس مورد مورد نظر خود را انتخاب نمایید. | ||
</div> | </div> | ||
</div> | </div> | ||
خط ۳۱۸: | خط ۲۷۶: | ||
<div class="content-frame"> | <div class="content-frame"> | ||
<div class="content-header"> | |||
<div class="content-title" id="contentTitle">هیچ محتوایی انتخاب نشده است</div> | |||
<div class="content-controls"> | |||
<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> | |||
<button class="control-btn" id="refreshBtn"><i class="fas fa-redo"></i> بارگذاری مجدد</button> | |||
</div> | |||
</div> | |||
<div class="loading-bar" id="loadingBar"></div> | |||
<div class="iframe-container"> | <div class="iframe-container"> | ||
<div class="iframe-placeholder" id="iframePlaceholder"> | <div class="iframe-placeholder" id="iframePlaceholder"> | ||
خط ۳۲۹: | خط ۲۹۶: | ||
<div class="action-buttons"> | <div class="action-buttons"> | ||
<a id="siteLink" href="#" class="site-link" target="_blank" style="display: none;"> | <a id="siteLink" href="#" class="site-link" target="_blank" style="display: none;"> | ||
<i class="fas fa-external-link-alt"></i> | |||
مشاهده صفحه در سایت اصلی | مشاهده صفحه در سایت اصلی | ||
</a> | </a> | ||
<a id="wikiLink" href="#" class="wiki-link" target="_blank" style="display: none;"> | <a id="wikiLink" href="#" class="wiki-link" target="_blank" style="display: none;"> | ||
<i class="fab fa-wikipedia-w"></i> | |||
مشاهده صفحه کامل در ویکی | مشاهده صفحه کامل در ویکی | ||
</a> | </a> | ||
<a id="viewLink" href="#" class="view-link" target="_blank" style="display: none;"> | |||
<i class="fas fa-eye"></i> | |||
مشاهده صفحه | |||
</a> | |||
</div> | </div> | ||
</div> | </div> | ||
خط ۳۷۳: | خط ۳۳۵: | ||
const wikiLink = document.getElementById('wikiLink'); | const wikiLink = document.getElementById('wikiLink'); | ||
const siteLink = document.getElementById('siteLink'); | const siteLink = document.getElementById('siteLink'); | ||
const | const viewLink = document.getElementById('viewLink'); | ||
const | const contentTitle = document.getElementById('contentTitle'); | ||
const | const zoomIn = document.getElementById('zoomIn'); | ||
const | const zoomOut = document.getElementById('zoomOut'); | ||
const refreshBtn = document.getElementById('refreshBtn'); | |||
const loadingBar = document.getElementById('loadingBar'); | |||
let currentZoom = 100; | |||
let | let currentContent = ''; | ||
// وقتی دستهبندی تغییر کرد | // وقتی دستهبندی تغییر کرد | ||
خط ۴۶۳: | خط ۳۸۰: | ||
} | } | ||
currentContent = selectedValue; | |||
showContent(selectedValue, selectedText); | showContent(selectedValue, selectedText); | ||
}); | }); | ||
خط ۴۶۸: | خط ۳۸۶: | ||
// نمایش محتوا | // نمایش محتوا | ||
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`; | ||
const wikiUrl = `https://www.pediabible.com/index.php/${bookValue}`; | const wikiUrl = `https://www.pediabible.com/index.php/${bookValue}`; | ||
const siteUrl = `https://www.pediabible.com/index.php/${bookValue}`; | const siteUrl = `https://www.pediabible.com/index.php/${bookValue}`; | ||
contentTitle.textContent = bookText; | |||
// نمایش loading | // نمایش loading | ||
خط ۴۹۹: | خط ۴۰۱: | ||
</div> | </div> | ||
`; | `; | ||
// نوار پیشرفت | |||
let progress = 0; | |||
const progressInterval = setInterval(() => { | |||
progress += Math.random() * 15; | |||
if (progress > 90) progress = 90; | |||
loadingBar.style.width = `${progress}%`; | |||
}, 200); | |||
// بارگذاری محتوا | // بارگذاری محتوا | ||
خط ۵۰۴: | خط ۴۱۴: | ||
contentFrame.onload = function() { | contentFrame.onload = function() { | ||
clearInterval(progressInterval); | |||
loadingBar.style.width = '100%'; | |||
setTimeout(() => { | |||
loadingBar.style.width = '0%'; | |||
}, 500); | |||
contentFrame.style.display = 'block'; | contentFrame.style.display = 'block'; | ||
iframePlaceholder.style.display = 'none'; | iframePlaceholder.style.display = 'none'; | ||
applyZoom(); | |||
}; | }; | ||
contentFrame.onerror = function() { | contentFrame.onerror = function() { | ||
clearInterval(progressInterval); | |||
loadingBar.style.width = '0%'; | |||
iframePlaceholder.style.display = 'flex'; | iframePlaceholder.style.display = 'flex'; | ||
iframePlaceholder.innerHTML = ` | iframePlaceholder.innerHTML = ` | ||
خط ۵۲۱: | خط ۴۴۰: | ||
// بهروزرسانی لینکها | // بهروزرسانی لینکها | ||
wikiLink.href = wikiUrl; | wikiLink.href = wikiUrl; | ||
wikiLink.style.display = ' | wikiLink.style.display = 'flex'; | ||
siteLink.href = siteUrl; | siteLink.href = siteUrl; | ||
siteLink.style.display = ' | siteLink.style.display = 'flex'; | ||
viewLink.href = contentUrl; | |||
viewLink.style.display = 'flex'; | |||
} | } | ||
// کنترل بزرگنمایی | |||
function applyZoom() { | |||
contentFrame.style.zoom = `${currentZoom}%`; | |||
} | |||
zoomIn.addEventListener('click', function() { | |||
if (currentZoom < 150) { | |||
currentZoom += 10; | |||
applyZoom(); | |||
} | |||
}); | |||
zoomOut.addEventListener('click', function() { | |||
if (currentZoom > 50) { | |||
currentZoom -= 10; | |||
applyZoom(); | |||
} | |||
}); | |||
refreshBtn.addEventListener('click', function() { | |||
if (currentContent) { | |||
const contentText = contentSelect.options[contentSelect.selectedIndex].text; | |||
showContent(currentContent, contentText); | |||
} | |||
}); | |||
function resetContent() { | function resetContent() { | ||
currentContent = ''; | |||
contentTitle.textContent = 'هیچ محتوایی انتخاب نشده است'; | |||
contentFrame.style.display = 'none'; | contentFrame.style.display = 'none'; | ||
iframePlaceholder.style.display = 'flex'; | iframePlaceholder.style.display = 'flex'; | ||
خط ۵۳۸: | خط ۴۸۸: | ||
wikiLink.style.display = 'none'; | wikiLink.style.display = 'none'; | ||
siteLink.style.display = 'none'; | siteLink.style.display = 'none'; | ||
viewLink.style.display = 'none'; | |||
contentFrame.src = 'about:blank'; | contentFrame.src = 'about:blank'; | ||
loadingBar.style.width = '0%'; | |||
} | } | ||
</script> | </script> | ||
</body> | </body> | ||
</html> | </html> |
نسخهٔ ۱۲ اکتبر ۲۰۲۵، ساعت ۲۲:۳۵
<!DOCTYPE html>
کتابخانه پدیا بایبل
در این بخش میتوانید کتابها و مقالات مختلف را مطالعه کنید.
برای شروع، دستهبندی و سپس مورد مورد نظر خود را انتخاب نمایید.
هیچ محتوایی انتخاب نشده است
لطفاً یک کتاب یا مقاله از لیست انتخاب کنید