Download components/navbar.js from rcok/add-nasa-theme-https-3vdpmvj: direct link, hf CLI and curl.
- Browser
- Download file 2.28 kB
-
https://huggingface.co/spaces/rcok/add-nasa-theme-https-3vdpmvj/resolve/main/components/navbar.js
- Command line
-
hf download hf://spaces/rcok/add-nasa-theme-https-3vdpmvj/components/navbar.js
-
curl -L -o navbar.js https://huggingface.co/spaces/rcok/add-nasa-theme-https-3vdpmvj/resolve/main/components/navbar.js
2.28 kB
| class CustomNavbar extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| .nav-link { | |
| position: relative; | |
| } | |
| .nav-link::after { | |
| content: ''; | |
| position: absolute; | |
| bottom: -2px; | |
| left: 0; | |
| width: 0; | |
| height: 2px; | |
| background-color: #0ea5e9; | |
| transition: width 0.3s ease; | |
| } | |
| .nav-link:hover::after { | |
| width: 100%; | |
| } | |
| </style> | |
| <nav class="bg-black bg-opacity-80 backdrop-blur-md border-b border-nasa-800 fixed w-full z-50"> | |
| <div class="container mx-auto px-4 py-4 flex justify-between items-center"> | |
| <a href="/" class="flex items-center space-x-2"> | |
| <div class="w-10 h-10 rounded-full bg-nasa-600 flex items-center justify-center"> | |
| <i data-feather="rocket" class="text-white"></i> | |
| </div> | |
| <span class="text-xl font-bold font-orbitron">Cosmic RPA</span> | |
| </a> | |
| <div class="hidden md:flex items-center space-x-8"> | |
| <a href="/" class="nav-link text-white hover:text-nasa-300">Home</a> | |
| <a href="#tools" class="nav-link text-white hover:text-nasa-300">Tools</a> | |
| <a href="#features" class="nav-link text-white hover:text-nasa-300">Features</a> | |
| <a href="#contact" class="nav-link text-white hover:text-nasa-300">Contact</a> | |
| <a href="#" class="bg-nasa-600 hover:bg-nasa-700 text-white px-4 py-2 rounded-lg font-medium transition-all">Get Started</a> | |
| </div> | |
| <button class="md:hidden text-white focus:outline-none"> | |
| <i data-feather="menu"></i> | |
| </button> | |
| </div> | |
| </nav> | |
| `; | |
| } | |
| } | |
| customElements.define('custom-navbar', CustomNavbar); |