Spaces:
Running
Running
Download components/gov-header.js from large000/govmail-simulator: direct link, hf CLI and curl.
- Browser
- Download file 2.36 kB
-
https://huggingface.co/spaces/large000/govmail-simulator/resolve/main/components/gov-header.js
- Command line
-
hf download hf://spaces/large000/govmail-simulator/components/gov-header.js
-
curl -L -o gov-header.js https://huggingface.co/spaces/large000/govmail-simulator/resolve/main/components/gov-header.js
2.36 kB
| class GovHeader extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| .header-bg { | |
| background-color: #1e3a8a; | |
| background-image: linear-gradient(to right, #1e3a8a, #1e40af); | |
| } | |
| .nav-link:hover { | |
| background-color: rgba(255, 255, 255, 0.1); | |
| } | |
| .seal { | |
| filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); | |
| } | |
| </style> | |
| <header class="header-bg text-white shadow-md"> | |
| <div class="container mx-auto px-4"> | |
| <div class="flex items-center justify-between py-3"> | |
| <div class="flex items-center space-x-4"> | |
| <div class="seal-badge seal rounded-full w-12 h-12 flex items-center justify-center"> | |
| <i data-feather="shield" class="text-blue-700 w-6 h-6"></i> | |
| </div> | |
| <h1 class="text-xl font-bold">Government Services</h1> | |
| </div> | |
| <nav class="hidden md:flex space-x-1"> | |
| <a href="/" class="nav-link px-4 py-2 rounded-md flex items-center"> | |
| <i data-feather="home" class="mr-2 w-4 h-4"></i> | |
| Home | |
| </a> | |
| <a href="#" class="nav-link px-4 py-2 rounded-md flex items-center"> | |
| <i data-feather="info" class="mr-2 w-4 h-4"></i> | |
| About | |
| </a> | |
| <a href="#" class="nav-link px-4 py-2 rounded-md flex items-center"> | |
| <i data-feather="mail" class="mr-2 w-4 h-4"></i> | |
| Contact | |
| </a> | |
| </nav> | |
| <button class="md:hidden p-2 rounded-md hover:bg-blue-800"> | |
| <i data-feather="menu"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </header> | |
| `; | |
| } | |
| } | |
| customElements.define('gov-header', GovHeader); |