/
kirra16
/
projectitog1
Обзор
Документация
Войти
/
kirra16
/
projectitog1
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/components/Header/Header.css
385 строк
6 KB
kirra16
Initial commit
19 дек 2025, 12:55
19 дек 2025, 12:55
1fb5414
Код
Авторство
О чём код?
.main-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 2rem; background-color: #f5e8dc; box-shadow: 0 2px 10px rgba(139, 69, 19, 0.1); position: sticky; top: 0; z-index: 1000; } .logo a { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; } .logo img { border-radius: 50%; transition: transform 0.3s ease; } .logo img:hover { transform: scale(1.05); } .logo-text { font-size: 1.25rem; font-weight: 600; color: #5d4037; display: none; } @media (min-width: 768px) { .logo-text { display: inline; } } .mobile-menu-toggle { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 24px; background: transparent; border: none; cursor: pointer; padding: 0; z-index: 10; } .mobile-menu-toggle span { width: 100%; height: 3px; background: #5d4037; border-radius: 2px; transition: all 0.3s ease; } .mobile-menu-toggle:hover span { background: #8d6e63; } .main-nav { flex: 1; margin: 0 2rem; } .nav-list { display: flex; list-style: none; gap: 1.5rem; margin: 0; padding: 0; justify-content: center; } .nav-list a { text-decoration: none; color: #5d4037; font-weight: 500; transition: all 0.3s ease; padding: 0.5rem 1rem; border-radius: 4px; display: block; font-size: 1rem; white-space: nowrap; } .nav-list a:hover { color: #8d6e63; background-color: rgba(141, 110, 99, 0.1); } .nav-list a.active { background-color: #8d6e63; color: white; } .nav-list a.active:hover { background-color: #5d4037; } .header-right { display: flex; align-items: center; gap: 1.5rem; } .contact-info { display: flex; align-items: center; } .contact-link { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; padding: 0.5rem; border-radius: 4px; transition: all 0.3s ease; } .contact-link:hover { background-color: rgba(141, 110, 99, 0.1); } .whatsapp-icon { width: 35px; height: 35px; opacity: 0.8; } .phone-number { color: #5d4037; font-weight: 500; font-size: 0.9rem; display: none; } @media (min-width: 1024px) { .phone-number { display: inline; } } .user-menu { display: flex; align-items: center; } .user-menu-logged { display: flex; align-items: center; gap: 1rem; } .user-menu-guest { display: flex; align-items: center; gap: 0.75rem; } .profile-link { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; padding: 0.5rem; border-radius: 4px; transition: all 0.3s ease; color: #5d4037; font-weight: 500; } .profile-link:hover { color: #8d6e63; background-color: rgba(141, 110, 99, 0.1); } .profile-link.active { background-color: #8d6e63; color: white; } .user-avatar { width: 16px; height: 16px; background: linear-gradient(135deg, #8d6e63, #5d4037); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 0.65rem; flex-shrink: 0; } .user-name { font-size: 0.9rem; display: none; } @media (min-width: 640px) { .user-name { display: inline; } } .logout-btn, .login-btn, .register-btn { padding: 0.5rem 1rem; border-radius: 4px; border: none; cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: all 0.3s ease; text-decoration: none; white-space: nowrap; } .logout-btn { background-color: #8d6e63; color: white; } .logout-btn:hover { background-color: #5d4037; } .login-btn { background-color: #8d6e63; color: white; } .login-btn:hover { background-color: #5d4037; } .register-btn { background-color: #f5e8dc; color: #5d4037; border: 1px solid #8d6e63; } .register-btn:hover { background-color: #8d6e63; color: white; } @media (max-width: 768px) { .main-header { padding: 1rem; flex-wrap: wrap; } .mobile-menu-toggle { display: flex; order: 2; } .main-nav { order: 4; width: 100%; margin: 0; max-height: 0; overflow: hidden; transition: max-height 0.3s ease; } .main-nav.open { max-height: 300px; margin-top: 1rem; } .nav-list { flex-direction: column; gap: 0.5rem; background: white; padding: 1rem; border-radius: 8px; box-shadow: 0 4px 12px rgba(139, 69, 19, 0.1); } .nav-list a { padding: 0.75rem 1rem; } .header-right { order: 3; flex: 1; justify-content: flex-end; gap: 1rem; } .contact-info { display: none; } .user-menu-guest { flex-direction: column; align-items: stretch; gap: 0.5rem; } .login-btn, .register-btn { padding: 0.5rem; font-size: 0.85rem; } .user-menu-logged { flex-direction: column; align-items: stretch; gap: 0.5rem; } .profile-link { padding: 0.4rem; } .logout-btn { width: 100%; } } .mobile-menu-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.3); z-index: 999; } .mobile-menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); } .mobile-menu-toggle.open span:nth-child(2) { opacity: 0; } .mobile-menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); } @media (max-width: 480px) { .logo img { width: 40px; height: 40px; } .main-nav.open { margin-top: 0.5rem; } .nav-list { padding: 0.75rem; } } @media (min-width: 769px) and (max-width: 1024px) { .main-header { padding: 1rem 1.5rem; } .nav-list { gap: 1rem; } .nav-list a { padding: 0.5rem 0.75rem; font-size: 0.9rem; } }