Spaces:
Running
Running
File size: 2,202 Bytes
e3f6739 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | class CustomHeader extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
.header {
background-color: white;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.nav-link:hover {
color: #4F46E5;
}
.nav-link.active {
color: #4F46E5;
border-bottom: 2px solid #4F46E5;
}
</style>
<header class="header">
<div class="container mx-auto px-4 py-4">
<div class="flex justify-between items-center">
<div class="flex items-center space-x-2">
<i data-feather="book" class="text-primary w-6 h-6"></i>
<h1 class="text-xl font-bold text-gray-800">GradeGenius Pro</h1>
</div>
<nav class="hidden md:flex space-x-8">
<a href="#" class="nav-link active text-sm font-medium py-2">Главная</a>
<a href="#" class="nav-link text-sm font-medium text-gray-600 hover:text-primary py-2">Студенты</a>
<a href="#" class="nav-link text-sm font-medium text-gray-600 hover:text-primary py-2">Оценки</a>
<a href="#" class="nav-link text-sm font-medium text-gray-600 hover:text-primary py-2">Аналитика</a>
<a href="#" class="nav-link text-sm font-medium text-gray-600 hover:text-primary py-2">Настройки</a>
</nav>
<div class="flex items-center space-x-4">
<button class="p-2 rounded-full bg-gray-100 text-gray-600 hover:bg-gray-200">
<i data-feather="bell"></i>
</button>
<div class="flex items-center space-x-2">
<div class="h-8 w-8 rounded-full bg-primary-100 flex items-center justify-center">
<span class="text-primary text-sm font-medium">П</span>
</div>
<span class="hidden md:inline text-sm font-medium text-gray-700">Преподаватель</span>
</div>
</div>
</div>
</div>
</header>
`;
}
}
customElements.define('custom-header', CustomHeader); |