Download components/header.js from MCHAVEZP102/caseflow-activator-dashboard: direct link, hf CLI and curl.
- Browser
- Download file 2.69 kB
-
https://huggingface.co/spaces/MCHAVEZP102/caseflow-activator-dashboard/resolve/main/components/header.js
- Command line
-
hf download hf://spaces/MCHAVEZP102/caseflow-activator-dashboard/components/header.js
-
curl -L -o header.js https://huggingface.co/spaces/MCHAVEZP102/caseflow-activator-dashboard/resolve/main/components/header.js
2.69 kB
| class CustomHeader extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| header { | |
| background-color: white; | |
| box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); | |
| height: 64px; | |
| display: flex; | |
| align-items: center; | |
| padding: 0 24px; | |
| position: sticky; | |
| top: 0; | |
| z-index: 50; | |
| } | |
| .logo { | |
| font-weight: 700; | |
| font-size: 1.25rem; | |
| color: #4F46E5; | |
| display: flex; | |
| align-items: center; | |
| } | |
| .logo svg { | |
| margin-right: 8px; | |
| } | |
| .header-content { | |
| width: 100%; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .user-menu { | |
| display: flex; | |
| align-items: center; | |
| } | |
| .user-avatar { | |
| width: 36px; | |
| height: 36px; | |
| border-radius: 50%; | |
| background-color: #E0E7FF; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| color: #4F46E5; | |
| font-weight: 600; | |
| margin-left: 16px; | |
| cursor: pointer; | |
| } | |
| @media (max-width: 768px) { | |
| header { | |
| padding: 0 16px; | |
| } | |
| } | |
| </style> | |
| <header> | |
| <div class="header-content"> | |
| <a href="/" class="logo"> | |
| <i data-feather="activity"></i> | |
| <span>CaseFlow</span> | |
| </a> | |
| <div class="user-menu"> | |
| <div class="tooltip"> | |
| <i data-feather="bell"></i> | |
| <span class="tooltip-text">Notifications</span> | |
| </div> | |
| <div class="user-avatar">JD</div> | |
| </div> | |
| </div> | |
| </header> | |
| `; | |
| } | |
| } | |
| customElements.define('custom-header', CustomHeader); |