0_0_2 Нормальная сетка для внутрянки манги
This commit is contained in:
@@ -9,13 +9,11 @@
|
|||||||
<script src="{% static 'js/manga_view.js' %}" defer></script>
|
<script src="{% static 'js/manga_view.js' %}" defer></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div class="main-container">
|
||||||
|
|
||||||
<div class="container">
|
<!-- Блок с навигацией -->
|
||||||
<!-- Основной контейнер для контента -->
|
<div class="navigation-box">
|
||||||
<div class="content-wrapper">
|
<ul>
|
||||||
|
|
||||||
<div class="chapter">
|
|
||||||
<ul style="display: block">
|
|
||||||
<li class="breadcrumb">
|
<li class="breadcrumb">
|
||||||
<a href="/manga/111">Каталог</a>
|
<a href="/manga/111">Каталог</a>
|
||||||
<span>-</span>
|
<span>-</span>
|
||||||
@@ -24,13 +22,11 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Блок с изображениями -->
|
||||||
<!-- Бокс с изображением -->
|
<div class="image-container">
|
||||||
<div class="image-box" id="imageBox">
|
<div class="image-box" id="imageBox">
|
||||||
<img id="mangaImage" src="" alt="Страница">
|
<img id="mangaImage" src="" alt="Страница">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Сетка-превью -->
|
|
||||||
<div class="manga-grid-container" id="previewContainer">
|
<div class="manga-grid-container" id="previewContainer">
|
||||||
<div id="previewGrid" class="manga-grid">
|
<div id="previewGrid" class="manga-grid">
|
||||||
{% for img in manga.imgs_manga %}
|
{% for img in manga.imgs_manga %}
|
||||||
@@ -42,10 +38,10 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Блок с выпадающим списком -->
|
||||||
<!-- Выпадающий список страниц -->
|
<div class="dropdown-box">
|
||||||
<div class="page postload">
|
|
||||||
<select id="drop" onchange="changePage(this)">
|
<select id="drop" onchange="changePage(this)">
|
||||||
<option value="preview">🔍 Превью</option>
|
<option value="preview">🔍 Превью</option>
|
||||||
{% for img in manga.imgs_manga %}
|
{% for img in manga.imgs_manga %}
|
||||||
@@ -54,9 +50,5 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,93 +1,116 @@
|
|||||||
/* Основные стили */
|
/* Основные стили */
|
||||||
.centered-box {
|
/* Центрируем основной контейнер */
|
||||||
width: 800px;
|
.main-container {
|
||||||
margin: 0 auto; /* Автоматические отступы по бокам */
|
display: flex;
|
||||||
background: #f0f0f0;
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
max-width: 900px;
|
||||||
|
margin: 20px auto;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
align-content: center;
|
background: #f9f9f9;
|
||||||
}
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
||||||
.centered-box > *{
|
border-radius: 8px;
|
||||||
margin: 10px 15px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-box {
|
/* Бокс с названием и каталогом */
|
||||||
display: none;
|
.info-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
padding: 15px;
|
||||||
|
background: #e0e0e0;
|
||||||
|
border-radius: 5px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#mangaImage {
|
/* Блок с сеткой превью и изображением */
|
||||||
max-width: 100%;
|
.preview-box {
|
||||||
max-height: 90vh;
|
|
||||||
object-fit: contain;
|
|
||||||
}
|
|
||||||
|
|
||||||
.manga-grid-container {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0 auto;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
background: #fff;
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 5px;
|
||||||
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Сетка манги */
|
||||||
.manga-grid {
|
.manga-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(9, 102px);
|
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: 0 auto;
|
width: 100%;
|
||||||
max-width: calc(6 * 102px + 5 * 10px);
|
max-width: 600px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Превью картинок */
|
||||||
.manga-preview {
|
.manga-preview {
|
||||||
width: 102px;
|
width: 100px;
|
||||||
height: 142px;
|
height: 140px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: 3px;
|
border-radius: 5px;
|
||||||
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
|
|
||||||
background: #eee;
|
background: #eee;
|
||||||
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||||
|
cursor: pointer;
|
||||||
|
transition: transform 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.manga-preview img {
|
.manga-preview img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
object-position: center top;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: transform 0.2s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.manga-preview img:hover {
|
.manga-preview:hover {
|
||||||
transform: scale(1.05);
|
transform: scale(1.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb {
|
/* Основное изображение */
|
||||||
font-weight: bold;
|
.image-box {
|
||||||
list-style: none;
|
display: none;
|
||||||
text-decoration: none;
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
li.breadcrumb > a {
|
#mangaImage {
|
||||||
text-decoration: none !important;
|
max-width: 100%;
|
||||||
color: green;
|
max-height: 80vh;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Блок с выпадающим списком */
|
||||||
|
.select-box {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 15px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select-box select {
|
||||||
|
padding: 8px;
|
||||||
|
font-size: 16px;
|
||||||
|
border-radius: 5px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
/* Адаптивность */
|
/* Адаптивность */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.manga-grid {
|
.manga-grid {
|
||||||
grid-template-columns: repeat(4, 102px);
|
grid-template-columns: repeat(4, 1fr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 480px) {
|
@media (max-width: 480px) {
|
||||||
.manga-grid {
|
.manga-grid {
|
||||||
grid-template-columns: repeat(3, 102px);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 360px) {
|
@media (max-width: 360px) {
|
||||||
.manga-grid {
|
.manga-grid {
|
||||||
grid-template-columns: repeat(2, 102px);
|
grid-template-columns: repeat(2, 1fr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user