Spaces:
Running
Running
Download components/header.js from bro445454548/viewboost-pro: direct link, hf CLI and curl.
- Browser
- Download file 3.2 kB
-
https://huggingface.co/spaces/bro445454548/viewboost-pro/resolve/main/components/header.js
- Command line
-
hf download hf://spaces/bro445454548/viewboost-pro/components/header.js
-
curl -L -o header.js https://huggingface.co/spaces/bro445454548/viewboost-pro/resolve/main/components/header.js
3.2 kB
| class CustomHeader extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| .header { | |
| background: rgba(255, 255, 255, 0.08); | |
| backdrop-filter: blur(20px); | |
| border-bottom: 1px solid rgba(255, 255, 255, 0.15); | |
| position: sticky; | |
| top: 0; | |
| z-index: 1000; | |
| } | |
| @keyframes floatModern { | |
| 0%, 100% { | |
| transform: translateY(0px) rotate(0deg); | |
| } | |
| 25% { | |
| transform: translateY(-8px) rotate(2deg); | |
| } | |
| 75% { | |
| transform: translateY(-4px) rotate(-1deg); | |
| } | |
| } | |
| .logo-icon { | |
| animation: floatModern 4s ease-in-out infinite; | |
| } | |
| .nav-link { | |
| position: relative; | |
| transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); | |
| } | |
| .nav-link::after { | |
| content: ''; | |
| position: absolute; | |
| bottom: -2px; | |
| left: 0; | |
| width: 0; | |
| height: 2px; | |
| background: linear-gradient(90deg, #0ea5e9, #d946ef); | |
| transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); | |
| } | |
| .nav-link:hover::after { | |
| width: 100%; | |
| } | |
| </style> | |
| <header class="header"> | |
| <div class="container mx-auto px-4 py-3"> | |
| <div class="flex items-center justify-between"> | |
| <div class="flex items-center space-x-3"> | |
| <div class="logo-icon p-2"> | |
| <i data-feather="zap" class="text-primary-500"></i> | |
| </div> | |
| <div> | |
| <h1 class="text-xl font-bold bg-gradient-to-r from-primary-600 to-secondary-600 bg-clip-text text-transparent">ViewBoost Pro</h1> | |
| <p class="text-xs text-gray-500">Progressive Automation</p> | |
| </div> | |
| </div> | |
| <div class="flex items-center space-x-6"> | |
| <a href="/" class="nav-link text-gray-600 hover:text-primary-600"> | |
| <i data-feather="home" class="w-4 h-4"></i> | |
| </a> | |
| <a href="#" class="nav-link text-gray-600 hover:text-primary-600"> | |
| <i data-feather="help-circle" class="w-4 h-4"></i> | |
| </a> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| `; | |
| } | |
| } | |
| customElements.define('custom-header', CustomHeader); | |