/
ALEXWORLD
/
ALEXWORLD1
Обзор
Документация
Войти
/
ALEXWORLD
/
ALEXWORLD1
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
styles/style.css
706 строк
12 KB
AlexeyWorld
Update style.css
07 июн 2025, 10:39
Не верифицирован
07 июн 2025, 10:39
7df3dd5
Код
Авторство
О чём код?
/* Переменные */ :root { --primary: #4E3A2D; --accent: #8B5A2B; --light: #FFF9F0; --text: #333333; --white: #ffffff; --gray-light: #f5f5f5; --shadow: 0 2px 10px rgba(0, 0, 0, 0.1); --transition: all 0.3s ease; } /* Базовые стили */ html { scroll-behavior: smooth; } body { font-family: 'Roboto', sans-serif; color: var(--text); margin: 0; padding: 0; line-height: 1.6; background-color: var(--light); } .container { width: 85%; max-width: 1200px; margin: 0 auto; padding: 20px 0; } .title { font-family: 'Playfair Display', serif; color: var(--primary); font-weight: 700; } /* Блок header */ .header { background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1589998059171-988d887df646?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80'); background-size: cover; background-position: center; color: var(--white); text-align: center; padding: 100px 20px; } .header__content { max-width: 800px; margin: 0 auto; } .header__title { font-size: 2.5rem; margin-bottom: 20px; } .header__subtitle { font-size: 1.2rem; margin-bottom: 30px; } /* Блок about */ .about { padding: 60px 0; } .about__container { display: flex; align-items: center; gap: 40px; } .about__image-wrapper { position: relative; width: 300px; height: 300px; border-radius: 50%; overflow: hidden; border: 5px solid var(--accent); transition: var(--transition); flex-shrink: 0; } .about__image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; } .image-caption { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0, 0, 0, 0.7); color: var(--white); padding: 15px; text-align: center; transform: translateY(100%); opacity: 0; transition: var(--transition); } .about__image-wrapper:hover .image-caption { transform: translateY(0); opacity: 1; } .about__image-wrapper:hover .about__image { transform: scale(1.05); } .about__content { flex: 1; } .about__quote { font-style: italic; padding-left: 20px; border-left: 3px solid var(--accent); margin: 20px 0; } /* Блок courses */ .courses { background-color: var(--white); padding: 60px 0; } .courses__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; } /* Элемент course-card */ .course-card { border: 1px solid #ddd; border-radius: 8px; padding: 25px; transition: var(--transition); background-color: var(--white); } .course-card:hover { transform: translateY(-10px); box-shadow: var(--shadow); } .course-card__icon { font-size: 2.5rem; color: var(--accent); margin-bottom: 15px; } .course-card__title { font-size: 1.5rem; margin-bottom: 10px; } /* Блок materials */ .materials { padding: 60px 0; background-color: var(--gray-light); } .materials__list { list-style-type: none; padding: 0; } .materials__item { margin-bottom: 10px; } .materials__link { color: var(--primary); text-decoration: none; transition: var(--transition); } .materials__link:hover { text-decoration: underline; } /* Блок learning-materials */ .learning-materials { padding: 60px 0; } .learning-materials__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 25px; margin-top: 30px; } .material-card { border: 1px solid #eee; border-radius: 8px; padding: 20px; transition: var(--transition); background-color: var(--white); } .material-card:hover { box-shadow: var(--shadow); } .material-card__badge { display: inline-block; background-color: var(--accent); color: var(--white); padding: 3px 10px; border-radius: 20px; font-size: 0.8rem; margin-bottom: 10px; } .material-card__title { font-size: 1.3rem; margin-bottom: 10px; } /* Блок contacts */ .contacts { padding: 60px 0; } .contacts__info { margin-bottom: 15px; } .contacts__link { color: var(--primary); text-decoration: none; transition: var(--transition); } .contacts__link:hover { text-decoration: underline; } .contacts__social { margin-top: 20px; } .contacts__social-link { color: var(--primary); text-decoration: none; } /* Блок footer */ .footer { background-color: var(--primary); color: var(--white); text-align: center; padding: 30px 0; margin-top: 60px; } /* Кнопки */ .button { display: inline-block; padding: 12px 30px; margin: 10px; border-radius: 5px; text-decoration: none; font-weight: 500; transition: var(--transition); text-align: center; } .button_theme_primary { background-color: var(--primary); color: var(--white); } .button_theme_primary:hover { background-color: #3a2b20; } .button_theme_outline { border: 2px solid var(--white); color: var(--white); } .button_theme_outline:hover { background-color: rgba(255, 255, 255, 0.1); } /* Стили для навигационной шапки */ .main-nav { background-color: var(--primary); padding: 1rem 0; position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow); } .nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 20px; } .nav-logo { color: var(--white); font-size: 1.5rem; font-weight: 700; text-decoration: none; } .nav-menu { display: flex; list-style: none; margin: 0; padding: 0; } .nav-item { margin-left: 1.5rem; } .nav-link { color: var(--white); text-decoration: none; font-weight: 500; padding: 0.5rem 1rem; border-radius: 4px; transition: var(--transition); } .nav-link:hover { background-color: var(--accent); } /* Стили для прелоадера */ .preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--light); display: flex; justify-content: center; align-items: center; z-index: 9999; transition: opacity 0.5s ease; } .preloader--hidden { opacity: 0; } .loader { width: 50px; height: 50px; border: 5px solid #ddd; border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } /* Стили для Swiper */ .gallerySwiper { width: 100%; height: 500px; margin: 40px 0; } .swiper-slide { display: flex; align-items: center; justify-content: center; border-radius: 8px; overflow: hidden; background: #f5f5f5; } .swiper-slide img { width: 100%; height: 100%; object-fit: cover; } .swiper-button-next, .swiper-button-prev { color: var(--primary); background: rgba(255, 255, 255, 0.7); width: 40px; height: 40px; border-radius: 50%; transition: all 0.3s ease; } .swiper-button-next:hover, .swiper-button-prev:hover { background: rgba(255, 255, 255, 0.9); } .swiper-button-next::after, .swiper-button-prev::after { font-size: 1.5rem; } .swiper-pagination-bullet { background: var(--white); opacity: 0.7; } .swiper-pagination-bullet-active { background: var(--accent); opacity: 1; } /* Быстрая навигация */ .headings-nav { position: fixed; top: 100px; right: 20px; background: var(--white); padding: 15px; border-radius: 8px; box-shadow: var(--shadow); max-width: 250px; z-index: 100; } .nav-title { margin-top: 0; color: var(--primary); font-size: 1.2rem; } .nav-list { list-style: none; padding: 0; margin: 0; } .nav-item { margin-bottom: 8px; } .nav-link { color: var(--accent); text-decoration: none; transition: var(--transition); } .nav-link:hover { color: var(--primary); } /* Кнопка скролла вверх */ .scroll-top { display: none; position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; border-radius: 50%; background-color: var(--accent); color: var(--white); border: none; cursor: pointer; font-size: 20px; z-index: 99; transition: var(--transition); } .scroll-top:hover { background-color: var(--primary); } /* Темная тема */ body.dark-mode { --primary: #8B5A2B; --accent: #C79C6E; --light: #333333; --text: #ffffff; --gray-light: #444444; background-color: var(--light); color: var(--text); } body.dark-mode .course-card, body.dark-mode .material-card { background-color: #444; border-color: #555; } body.dark-mode .headings-nav { background: #444; } body.dark-mode .nav-link { color: var(--accent); } /* Модальные окна курсов */ .course-materials-modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7); } .modal-content { background-color: var(--white); margin: 5% auto; padding: 25px; width: 80%; max-width: 800px; border-radius: 8px; position: relative; max-height: 80vh; overflow-y: auto; box-shadow: var(--shadow); } .close-modal { position: absolute; right: 20px; top: 10px; font-size: 28px; cursor: pointer; color: var(--primary); transition: var(--transition); } .close-modal:hover { color: var(--accent); } .course-details { margin: 20px 0; color: var(--text); } .course-details h4 { color: var(--primary); margin-bottom: 15px; } .course-files { margin-top: 20px; } .course-files h4 { color: var(--primary); margin-bottom: 15px; } .course-files ul { list-style-type: none; padding: 0; margin: 0; } .course-files li { margin: 10px 0; padding: 10px; border-bottom: 1px solid var(--gray-light); display: flex; justify-content: space-between; align-items: center; } .course-files a { color: var(--accent); text-decoration: none; transition: var(--transition); flex-grow: 1; } .course-files a:hover { color: var(--primary); text-decoration: underline; } .download-all { text-align: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--gray-light); } /* Адаптивность */ @media (max-width: 768px) { .container { width: 90%; } .about__container { flex-direction: column; } .about__image-wrapper { width: 200px; height: 200px; margin: 0 auto 30px; } .header__title { font-size: 2rem; } .nav-container { flex-direction: column; } .nav-menu { margin-top: 1rem; flex-wrap: wrap; justify-content: center; } .nav-item { margin: 0.5rem; } .headings-nav { display: none; } .gallerySwiper { height: 400px; } .modal-content { width: 90%; margin: 10% auto; } } @media (max-width: 480px) { .about__image-wrapper { width: 150px; height: 150px; } .header { padding: 60px 20px; } .header__title { font-size: 1.8rem; } .header__subtitle { font-size: 1rem; } .courses__grid, .learning-materials__grid { grid-template-columns: 1fr; } .nav-menu { flex-direction: column; align-items: center; } .nav-item { margin: 0.25rem 0; } .gallerySwiper { height: 300px; } .modal-content { padding: 15px; } .course-files li { flex-direction: column; align-items: flex-start; } .course-files a { margin-top: 5px; } }