Download components/header.js from srn7exe/techforge-cinematic-nexus: direct link, hf CLI and curl.
- Browser
- Download file 5.19 kB
-
https://huggingface.co/spaces/srn7exe/techforge-cinematic-nexus/resolve/main/components/header.js
- Command line
-
hf download hf://spaces/srn7exe/techforge-cinematic-nexus/components/header.js
-
curl -L -o header.js https://huggingface.co/spaces/srn7exe/techforge-cinematic-nexus/resolve/main/components/header.js
5.19 kB
| class TechforgeHeader extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| :host { | |
| display: block; | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| z-index: 1000; | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| font-family: 'Poppins', sans-serif; | |
| } | |
| .header { | |
| background: rgba(6, 28, 58, 0.95); | |
| backdrop-filter: blur(10px); | |
| -webkit-backdrop-filter: blur(10px); | |
| border-bottom: 1px solid rgba(255, 255, 255, 0.1); | |
| padding: 1rem 2rem; | |
| } | |
| .header-container { | |
| max-width: 1440px; | |
| margin: 0 auto; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .nav-links { | |
| display: flex; | |
| gap: 2rem; | |
| } | |
| .nav-link { | |
| color: #D1D5DB; | |
| text-decoration: none; | |
| font-size: 14px; | |
| font-weight: 500; | |
| transition: color 0.3s ease; | |
| padding: 0.5rem 1rem; | |
| border-radius: 8px; | |
| } | |
| .nav-link:hover { | |
| color: #F5C46B; | |
| background: rgba(245, 196, 107, 0.1); | |
| } | |
| .logo { | |
| display: flex; | |
| align-items: center; | |
| text-decoration: none; | |
| } | |
| .logo-text { | |
| font-size: 32px; | |
| font-weight: 700; | |
| background: linear-gradient(45deg, #FFFFFF, #D1D5DB); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| background-clip: text; | |
| letter-spacing: -0.5px; | |
| } | |
| .logo-text span { | |
| color: #F5C46B; | |
| -webkit-text-fill-color: #F5C46B; | |
| } | |
| .user-button { | |
| background: rgba(245, 196, 107, 0.1); | |
| border: 2px solid rgba(245, 196, 107, 0.3); | |
| border-radius: 50%; | |
| width: 48px; | |
| height: 48px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| color: #F5C46B; | |
| } | |
| .user-button:hover { | |
| background: rgba(245, 196, 107, 0.2); | |
| border-color: rgba(245, 196, 107, 0.5); | |
| transform: scale(1.05); | |
| box-shadow: 0 0 20px rgba(245, 196, 107, 0.2); | |
| } | |
| .user-button i { | |
| width: 24px; | |
| height: 24px; | |
| } | |
| @media (max-width: 768px) { | |
| .header { | |
| padding: 1rem; | |
| } | |
| .logo-text { | |
| font-size: 24px; | |
| } | |
| .user-button { | |
| width: 40px; | |
| height: 40px; | |
| } | |
| .user-button i { | |
| width: 20px; | |
| height: 20px; | |
| } | |
| } | |
| @media (max-width: 480px) { | |
| .logo-text { | |
| font-size: 20px; | |
| } | |
| } | |
| </style> | |
| <header class="header"> | |
| <div class="header-container"> | |
| <a href="/" class="logo"> | |
| <span class="logo-text">TECH<span>FORGE</span> NEXUS</span> | |
| </a> | |
| <a href="/login" class="user-button"> | |
| <i data-feather="user"></i> | |
| </a> | |
| </div> | |
| </header> | |
| `; | |
| // Initialize feather icons after rendering | |
| if (window.feather) { | |
| window.feather.replace(); | |
| } else { | |
| // Wait for feather to load | |
| const checkFeather = setInterval(() => { | |
| if (window.feather) { | |
| window.feather.replace(); | |
| clearInterval(checkFeather); | |
| } | |
| }, 100); | |
| } | |
| } | |
| } | |
| customElements.define('techforge-header', TechforgeHeader); |