/
ilgizok
/
MyLibFront
Обзор
Документация
Войти
/
ilgizok
/
MyLibFront
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/components/Book/BookSearch.module.css
144 строки
2 KB
ilgiz
add
20 апр 2025, 00:44
20 апр 2025, 00:44
a4c46b9
Код
Авторство
О чём код?
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; } .title { text-align: center; color: #1e3a8a; margin-bottom: 2rem; } .searchForm { display: flex; justify-content: center; margin-bottom: 2rem; gap: 1rem; } .searchInput { padding: 0.75rem 1rem; border: 1px solid #d1d5db; border-radius: 4px; font-size: 1rem; min-width: 300px; flex-grow: 1; max-width: 500px; } .searchInput:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2); } .searchButton { background-color: #2563eb; color: white; padding: 0 1.5rem; border: none; border-radius: 4px; font-size: 1rem; font-weight: 500; cursor: pointer; transition: background-color 0.2s; } .searchButton:hover { background-color: #1d4ed8; } .searchButton:disabled { background-color: #93c5fd; cursor: not-allowed; } .booksGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2rem; margin-top: 2rem; } .bookCard { background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); transition: transform 0.2s, box-shadow 0.2s; } .bookCard:hover { transform: translateY(-4px); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); } .bookCover { width: 100%; height: 250px; object-fit: cover; border-bottom: 1px solid #e5e7eb; } .placeholderCover { width: 100%; height: 250px; background-color: #f3f4f6; display: flex; align-items: center; justify-content: center; color: #6b7280; border-bottom: 1px solid #e5e7eb; } .bookInfo { padding: 1rem; } .bookTitle { font-size: 1rem; margin-bottom: 0.5rem; color: #1f2937; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .bookAuthor { font-size: 0.875rem; color: #6b7280; margin-bottom: 0.25rem; } .bookYear { font-size: 0.75rem; color: #9ca3af; } .error { color: #dc2626; text-align: center; margin: 1rem 0; } .noResults { text-align: center; color: #6b7280; margin-top: 2rem; } @media (max-width: 768px) { .searchForm { flex-direction: column; } .searchInput { max-width: 100%; } .booksGrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }