Spaces:
Running
Running
Download components/header.js from Amamia/gradegenius-pro: direct link, hf CLI and curl.
- Browser
- Download file 2.2 kB
-
https://huggingface.co/spaces/Amamia/gradegenius-pro/resolve/main/components/header.js
- Command line
-
hf download hf://spaces/Amamia/gradegenius-pro/components/header.js
-
curl -L -o header.js https://huggingface.co/spaces/Amamia/gradegenius-pro/resolve/main/components/header.js
2.2 kB
| 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); |