/
nollieundergrob
/
PythonPackageStorage
Обзор
Документация
Войти
/
nollieundergrob
/
PythonPackageStorage
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
frontend/src/components/LibrarySection.module.css
309 строк
7 KB
nollieundergrob
Update
12 мар 2025, 22:03
12 мар 2025, 22:03
373621d
Код
Авторство
О чём код?
/* LibrarySection.module.css */ @import url('https://fonts.googleapis.com/css2?family=Consolas&display=swap'); .section { padding: 40px 20px; max-width: 800px; margin: 0 auto; /* Центрирование контейнера */ font-family: 'Consolas', sans-serif; } .sectionHeader { text-align: center; /* Заголовок по центру */ margin-bottom: 30px; position: relative; } .sectionHeader h2 { font-size: 2.2rem; font-weight: 700; color: #111827; position: relative; display: inline-block; } .sectionHeader h2::after { content: ''; position: absolute; width: 60px; height: 4px; background: #22c55e; bottom: -8px; left: 50%; transform: translateX(-50%); /* Центрирование линии под заголовком */ border-radius: 2px; transition: width 0.3s ease; } .sectionHeader:hover h2::after { width: 80px; } .libraryGrid { padding: 20px; background-color: #; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; justify-content: center; /* Центрирование карточек */ } .libraryLink { text-decoration: none; } .libraryCard { display: flex; justify-content: center; align-items: center; flex-direction: column; padding: 20px; background-color: #4ade80; color: #ffffff; font-size: 14px; font-weight: bold; text-align: center; border-radius: 8px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease; opacity: 0; transform: scale(0.95); animation: fadeIn 0.3s forwards; } .libraryCard:hover { transform: scale(1.05); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); } .libraryCard:hover .libraryDescription { max-height: 150px; /* Устанавливаем максимальную высоту для полного отображения */ opacity: 1; /* Показываем описание */ transform: translateY(0); /* Возвращаем текст в исходное положение */ } .libraryName { margin-bottom: 3px; font-size: 28px; font-weight: 600; } .libraryDescription { max-height: 0; /* Начальная высота равна 0 */ overflow: hidden; /* Скрываем содержимое за пределами контейнера */ opacity: 0; /* Начальная прозрачность равна 0 */ transform: translateY(-10px); /* Немного поднимаем текст выше */ transition: max-height 0.3s ease, opacity 0.3s ease, transform 0.3s ease; /* Добавляем плавный переход */ color: rgba(255, 255, 255, 0.8); font-size: 0.8rem; max-width: 400px; white-space: normal; /* Разрешаем перенос строк */ } .versionBadge { position: absolute; top: 10px; right: 10px; background: rgba(255, 255, 255, 0.2); color: white; font-size: 0.75rem; padding: 4px 8px; border-radius: 4px; font-weight: 500; } .python .versionBadge { background: rgba(59, 130, 246, 0.2); } .nodejs .versionBadge { background: rgba(220, 38, 38, 0.2); } /* Контейнер загрузки */ .LoadingContainter { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; /* Занимает весь экран */ background-color: #f3f4f6; /* Фон совпадает с основным фоном */ color: #111827; /* Цвет текста */ font-family: 'Consolas', sans-serif; /* Шрифт из ваших стилей */ } /* Спиннер (анимированный круг) */ .spinner { width: 40px; height: 40px; border: 4px solid #d1d5db; /* Серый цвет границы */ border-top: 4px solid #4ade80; /* Зелёный цвет анимации */ border-radius: 50%; /* Круглый вид */ animation: spin 1s linear infinite; /* Анимация вращения */ } /* Текст загрузки */ .LoadingText { margin-top: 15px; font-size: 16px; font-weight: bold; color: #111827; /* Цвет текста */ opacity: 0.8; /* Немного прозрачный */ animation: fadeIn 0.5s ease forwards; /* Плавное появление текста */ } /* Анимация вращения спиннера */ @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .SearchContainter{ display: flex; justify-content: center; margin-bottom: 20px; } .SearchInput { padding: 10px 15px; font-size: 16px; border: 1px solid #d1d5db; border-radius: 8px; width: 100%; max-width: 400px; transition: border-color 0.3s ease; } .search-input:focus { border-color: #4ade80; outline: none; } /* Анимация появления текста */ @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } @media (max-width: 600px) { .libraryGrid { grid-template-columns: 1fr; } .sectionHeader h2 { font-size: 1.8rem; } } /* Контейнер для панели управления */ .control-panel { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 20px; } /* Поле для поиска */ .search-input { flex: 1; padding: 12px 15px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 16px; background: #f9fafb; transition: border-color 0.3s ease; } .search-input:focus { border-color: #4ade80; outline: none; box-shadow: 0 0 10px rgba(74, 222, 128, 0.3); } /* Выпадающий список фильтра */ .filter-select { padding: 12px 20px; font-size: 16px; font-family: 'Consolas', monospace; color: #1f2937; background-color: #f9fafb; border: 1px solid #d1d5db; border-radius: 8px; transition: all 0.3s ease; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; background-size: 12px; cursor: pointer; width: 100%; max-width: 200px; } .filter-select:focus { border-color: #4ade80; box-shadow: 0 0 10px rgba(74, 222, 128, 0.3); } .filter-select:hover { border-color: #4ade80; } /* Кнопки сортировки */ .btn_sub { padding: 12px 20px; background-color: #4ade80; color: white; border: none; border-radius: 8px; font-size: 16px; cursor: pointer; transition: background-color 0.3s ease, transform 0.2s ease; } .btn_sub:hover { background-color: #22c55e; transform: translateY(-2px); } .btn_sub:active { background-color: #16a34a; transform: translateY(0); } /* Анимация появления */ @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } /* Адаптивность */ @media (max-width: 600px) { .libraryGrid { grid-template-columns: 1fr; } .sectionHeader h2 { font-size: 1.8rem; } .filter-select { max-width: 100%; } }