/
ilgizok
/
MyLibFront
Обзор
Документация
Войти
/
ilgizok
/
MyLibFront
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/components/Book/BookProfile.module.css
388 строк
6 KB
ilgiz
add
20 апр 2025, 00:44
20 апр 2025, 00:44
a4c46b9
Код
Авторство
О чём код?
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; } .backButton { background: none; border: none; color: #2563eb; cursor: pointer; font-size: 1rem; margin-bottom: 1rem; padding: 0.5rem 1rem; border-radius: 4px; transition: background-color 0.2s; } .backButton:hover { background-color: #f3f4f6; } .bookHeader { display: flex; gap: 2rem; margin-bottom: 2rem; } .bookCover { width: 300px; height: 450px; object-fit: cover; border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } .placeholderCover { width: 300px; height: 450px; background-color: #f3f4f6; display: flex; align-items: center; justify-content: center; color: #6b7280; border-radius: 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } .bookInfo { flex: 1; } .title { font-size: 2rem; margin-bottom: 1rem; color: #1f2937; } .authors { margin-bottom: 1.5rem; } .authors h3 { font-size: 1.2rem; margin-bottom: 0.5rem; } .authors ul { list-style: none; padding: 0; margin: 0; } .authors li { margin-bottom: 0.25rem; } .meta { background-color: #f9fafb; padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; } .meta p { margin: 0.5rem 0; } .description { margin-bottom: 3rem; } .description h2 { font-size: 1.5rem; margin-bottom: 1rem; color: #1f2937; } .description p { line-height: 1.6; color: #4b5563; } .reviewsSection { margin-top: 2rem; } .reviewsSection h2 { font-size: 1.5rem; margin-bottom: 1.5rem; color: #1f2937; } .ratingSummary { margin-bottom: 1.5rem; } .ratingSummary h3 { font-size: 1.2rem; color: #1f2937; } .reviewsList { display: flex; flex-direction: column; gap: 1.5rem; } .reviewCard { background-color: white; border-radius: 8px; padding: 1.5rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); } .reviewHeader { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; } .userName { font-weight: 600; color: #1f2937; } .rating { color: #f59e0b; } .starFilled { color: #f59e0b; } .starEmpty { color: #d1d5db; } .reviewText { line-height: 1.6; color: #4b5563; margin-bottom: 1rem; } .reviewDate { font-size: 0.875rem; color: #9ca3af; } .loading, .error, .notFound { text-align: center; padding: 2rem; font-size: 1.2rem; } .error { color: #dc2626; } .notFound { color: #6b7280; } @media (max-width: 768px) { .bookHeader { flex-direction: column; } .bookCover, .placeholderCover { width: 100%; height: auto; aspect-ratio: 2/3; } .container { padding: 1rem; } } .ratingSummary { background-color: #f8f9fa; padding: 1.5rem; border-radius: 8px; margin-bottom: 2rem; display: flex; flex-direction: column; gap: 0.5rem; } .stars { font-size: 1.5rem; letter-spacing: 0.2rem; } .starFilled { color: #ffc107; } .starEmpty { color: #e4e5e9; } .reviewsList { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 1.5rem; } .reviewCard { background-color: white; border-radius: 8px; padding: 1.5rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } .reviewHeader { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; } .userName { font-weight: 600; color: #212529; } .reviewDate { color: #6c757d; font-size: 0.875rem; } .reviewText { line-height: 1.6; color: #495057; } .noReviews { text-align: center; color: #6c757d; margin-top: 2rem; } .userActions { margin-top: 2rem; padding: 1.5rem; background-color: #f8f9fa; border-radius: 8px; } .libraryActions, .ratingActions { margin-bottom: 1.5rem; } .statusButtons { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; } .statusButton { padding: 0.5rem 1rem; border: 1px solid #dee2e6; border-radius: 4px; background-color: white; cursor: pointer; transition: all 0.2s; } .statusButton:hover { background-color: #e9ecef; } .statusButton.active { background-color: #2563eb; color: white; border-color: #2563eb; } .removeButton { padding: 0.5rem 1rem; border: 1px solid #dc3545; border-radius: 4px; background-color: white; color: #dc3545; cursor: pointer; transition: all 0.2s; } .removeButton:hover { background-color: #f8d7da; } .ratingStars { display: flex; gap: 0.5rem; margin-top: 0.5rem; } .ratingStars .star { font-size: 2rem; /* Увеличили размер звезд */ cursor: pointer; transition: all 0.2s; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid #e2e8f0; /* Добавили границу */ background-color: #f8fafc; /* Фон для неактивных звезд */ } .ratingStars .star.filled { color: #ffc107; } .ratingStars .star:hover { color: #ffc107; } .reviewForm { margin-top: 2rem; padding: 1.5rem; background-color: #f8f9fa; border-radius: 8px; } .reviewTextarea { width: 100%; min-height: 120px; padding: 1rem; border: 1px solid #dee2e6; border-radius: 4px; margin: 0.5rem 0 1rem; resize: vertical; } .submitButton { padding: 0.75rem 1.5rem; background-color: #28a745; color: white; border: none; border-radius: 4px; cursor: pointer; transition: background-color 0.2s; } .submitButton:hover { background-color: #218838; } .submitButton:disabled { background-color: #6c757d; cursor: not-allowed; } .userRating { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.25rem; font-size: 0.875rem; color: #4b5563; }