diff --git a/static/css/styles.css b/static/css/styles.css index a60c94b..56f595a 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -70,48 +70,47 @@ footer { } #books-container { - grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); - gap: 1rem; - padding: 1rem 2%; + justify-content: center !important; } .book-card { + width: 100%; /* Wykorzystaj całą dostępną szerokość */ height: 100%; - display: flex; - flex-direction: column; background: #1a1a1a; border: 1px solid #343434; - transition: transform 0.3s ease; + transition: all 0.3s ease; } -.book-card:hover { - transform: translateY(-5px); +.cover-container { + width: 100%; + aspect-ratio: 5/8; /* Nowoczesne podejście do proporcji */ + overflow: hidden; + position: relative; } .book-cover { width: 100%; - height: 300px; - object-fit: contain; - padding: 15px; + height: 100%; + object-fit: cover; + object-position: center top; + transition: transform 0.3s ease; } -.book-overlay { - position: absolute; - bottom: 0; - left: 0; - right: 0; - padding: 1rem; - background: linear-gradient(0deg, rgba(7,44,36,0.9) 0%, rgba(0,0,0,0) 100%); +.book-cover:hover { + transform: scale(1.05); } .book-title { font-size: 1rem; - margin: 0; - color: #E3CB9A; -} - -.book-cover:hover .book-overlay { - opacity: 1; + line-height: 1.3; + height: 3.2em; /* Na 2 linie tekstu */ + margin: 0.5rem 0; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; + text-align: center; + padding: 0 0.5rem; } .book-info { diff --git a/static/index.html b/static/index.html index b53a2fd..54019aa 100644 --- a/static/index.html +++ b/static/index.html @@ -50,11 +50,18 @@

NOWOŚCI

-
- -
-
- Ładowanie... +
+
+
+
+ +
+
+ Ładowanie... +
+
+
+
diff --git a/static/js/main.js b/static/js/main.js index cbf6113..a94e239 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -128,16 +128,18 @@ function renderBooks(books) { } container.innerHTML = books.map(book => ` -
- `).join(''); // Dodaj obsługę przycisków "Dodaj do koszyka"