Spaces:
Running
Running
Download components/header.js from ffcc9393/invoice-genius-pro: direct link, hf CLI and curl.
- Browser
- Download file 1.94 kB
-
https://huggingface.co/spaces/ffcc9393/invoice-genius-pro/resolve/main/components/header.js
- Command line
-
hf download hf://spaces/ffcc9393/invoice-genius-pro/components/header.js
-
curl -L -o header.js https://huggingface.co/spaces/ffcc9393/invoice-genius-pro/resolve/main/components/header.js
1.94 kB
| class CustomHeader extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| header { | |
| background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); | |
| color: white; | |
| padding: 1rem 0; | |
| box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); | |
| } | |
| .header-container { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: 0 1rem; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .logo { | |
| display: flex; | |
| align-items: center; | |
| font-weight: 700; | |
| font-size: 1.25rem; | |
| } | |
| .logo svg { | |
| margin-right: 0.5rem; | |
| } | |
| nav ul { | |
| display: flex; | |
| list-style: none; | |
| gap: 1.5rem; | |
| } | |
| nav a { | |
| color: white; | |
| text-decoration: none; | |
| font-weight: 500; | |
| transition: opacity 0.3s; | |
| } | |
| nav a:hover { | |
| opacity: 0.8; | |
| } | |
| @media (max-width: 768px) { | |
| .header-container { | |
| flex-direction: column; | |
| gap: 1rem; | |
| } | |
| nav ul { | |
| gap: 1rem; | |
| } | |
| } | |
| </style> | |
| <header> | |
| <div class="header-container"> | |
| <div class="logo"> | |
| <i data-feather="file-text"></i> | |
| InvoiceGenius | |
| </div> | |
| <nav> | |
| <ul> | |
| <li><a href="/"><i data-feather="home" class="mr-1"></i> Главная</a></li> | |
| <li><a href="/templates"><i data-feather="file" class="mr-1"></i> Шаблоны</a></li> | |
| <li><a href="/contacts"><i data-feather="mail" class="mr-1"></i> Контакты</a></li> | |
| </ul> | |
| </nav> | |
| </div> | |
| </header> | |
| `; | |
| } | |
| } | |
| customElements.define('custom-header', CustomHeader); |