This commit is contained in:
Vinejar
2025-03-30 02:59:20 +03:00
commit 2184ad7171
6 changed files with 231 additions and 0 deletions

View File

@@ -0,0 +1,94 @@
.content-wrapper {
position: relative;
min-height: 500px;
}
.image-box {
display: none;
width: 100%;
text-align: center;
margin-bottom: 20px;
}
#mangaImage {
max-width: 100%;
max-height: 90vh;
object-fit: contain;
}
.manga-grid-container {
width: 90%;
margin: 0 auto;
}
.manga-grid {
display: grid;
grid-template-columns: repeat(9, 102px);
gap: 10px;
justify-content: center;
margin: 0 auto;
max-width: calc(6 * 102px + 5 * 10px);
}
.manga-preview {
width: 102px;
height: 142px;
overflow: hidden;
border-radius: 3px;
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
background: #eee;
}
.manga-preview img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center top;
cursor: pointer;
transition: transform 0.2s;
}
.manga-preview img:hover {
transform: scale(1.05);
}
.breadcrumb-item {
list-style: none;
display: flex;
align-items: center;
}
.breadcrumb-item a {
text-decoration: none;
color: green; /* Сохраняет цвет текста как у родителя */
font-weight: bold;
}
.breadcrumb-item .separator {
margin: 0 5px;
}
/* Адаптивность */
@media (max-width: 768px) {
.manga-grid {
grid-template-columns: repeat(4, 102px);
}
}
@media (max-width: 480px) {
.manga-grid {
grid-template-columns: repeat(3, 102px);
}
}
@media (max-width: 360px) {
.manga-grid {
grid-template-columns: repeat(2, 102px);
}
}

View File

@@ -0,0 +1,34 @@
function changePage(select) {
const selectedImg = select.value;
const previewContainer = document.getElementById("previewContainer");
const imageBox = document.getElementById("imageBox");
const mangaImage = document.getElementById("mangaImage");
if (selectedImg === "preview") {
previewContainer.style.display = "block";
imageBox.style.display = "none";
} else {
previewContainer.style.display = "none";
mangaImage.src = selectedImg;
imageBox.style.display = "block";
}
}
function showImage(imgSrc) {
const drop = document.getElementById("drop");
drop.value = imgSrc;
changePage(drop);
// Прокрутка к изображению
document.getElementById("imageBox").scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
// Инициализация при загрузке
document.addEventListener('DOMContentLoaded', function() {
// Убедимся, что превью отображается по умолчанию
document.getElementById("previewContainer").style.display = "block";
document.getElementById("imageBox").style.display = "none";
});