Новые правки в Header

This commit is contained in:
Web-serfer 2026-04-15 22:34:35 +05:00
parent 95333dbb8c
commit a2985e736c

View file

@ -47,6 +47,7 @@ import { COMPANY } from "@constants";
</a>
</div>
<div class="mobile-actions">
<a href={`tel:${COMPANY.phoneClean}`} class="mobile-phone-btn" aria-label="Позонить: {COMPANY.phone}">
<svg
xmlns="http://www.w3.org/2000/svg"
@ -72,6 +73,7 @@ import { COMPANY } from "@constants";
</button>
</div>
</div>
</div>
<!-- 2. Линия прогресса (теперь под контейнером, с высоким z-index) -->
<div class="header-progress-container animate-load" data-delay="300">
@ -252,6 +254,12 @@ import { COMPANY } from "@constants";
transform: scale(0.95);
}
.mobile-actions {
display: flex;
align-items: center;
gap: 16px;
}
/* Скрытие гамбургера при открытом меню */
.burger-btn.active {
opacity: 0;
@ -259,6 +267,11 @@ import { COMPANY } from "@constants";
}
/* --- АНИМАЦИИ ПРИ ЗАГРУЗКЕ --- */
@media (min-width: 993px) {
.mobile-actions {
display: none;
}
}
.animate-load {
opacity: 0;
transform: translateY(-20px);
@ -306,7 +319,7 @@ import { COMPANY } from "@constants";
display: none;
}
.header-right {
gap: 1.25rem;
gap: 0.5rem;
}
.header-phone {
display: none;
@ -323,6 +336,9 @@ import { COMPANY } from "@constants";
.header-phone {
display: flex;
}
.mobile-phone-btn {
display: none;
}
}
@media (max-width: 767px) {
@ -337,7 +353,6 @@ import { COMPANY } from "@constants";
// Проверка авторизации и отображение правильного меню
function initAuth() {
const authSection = document.getElementById('auth-section');
const phoneEl = document.getElementById('header-phone');
if (!authSection) return;
const token = localStorage.getItem('auth_token');
@ -349,7 +364,6 @@ import { COMPANY } from "@constants";
const firstLetter = (user.name || user.email || 'U').charAt(0).toUpperCase();
// Скрываем телефон, показываем аватар и кнопку выхода
if (phoneEl) phoneEl.style.display = 'none';
const displayName = user.name || user.email || 'Пользователь';
authSection.innerHTML = `
@ -384,9 +398,6 @@ import { COMPANY } from "@constants";
function showPhone() {
const authSection = document.getElementById('auth-section');
const phoneEl = document.getElementById('header-phone');
if (phoneEl) phoneEl.style.display = 'flex';
if (authSection) authSection.innerHTML = '';
}