Spaces:
Running
Running
Download components/header.js from Tawd/cupid-s-command-center: direct link, hf CLI and curl.
- Browser
- Download file 2.77 kB
-
https://huggingface.co/spaces/Tawd/cupid-s-command-center/resolve/main/components/header.js
- Command line
-
hf download hf://spaces/Tawd/cupid-s-command-center/components/header.js
-
curl -L -o header.js https://huggingface.co/spaces/Tawd/cupid-s-command-center/resolve/main/components/header.js
2.77 kB
| class CustomHeader extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| header { | |
| background: linear-gradient(135deg, var(--tw-gradient-stops)); | |
| --tw-gradient-from: #f06595; | |
| --tw-gradient-to: #ff4d6d; | |
| --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); | |
| color: white; | |
| padding: 1.5rem; | |
| text-align: center; | |
| box-shadow: 0 4px 30px rgba(240, 101, 149, 0.4); | |
| position: relative; | |
| border-bottom: 5px solid rgba(255, 255, 255, 0.3); | |
| backdrop-filter: blur(10px); | |
| border-radius: 0 0 20px 20px; | |
| margin: 0 20px; | |
| } | |
| h1 { | |
| font-size: 2.5rem; | |
| margin: 0; | |
| font-weight: 800; | |
| text-shadow: 2px 2px 4px rgba(0,0,0,0.2); | |
| background: linear-gradient(to right, #fff, #ffdeeb); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| } | |
| .clock { | |
| font-size: 1.2rem; | |
| margin-top: 0.5rem; | |
| color: white; | |
| font-weight: 500; | |
| } | |
| .targets { | |
| position: absolute; | |
| top: 1rem; | |
| left: 1rem; | |
| background: rgba(255, 255, 255, 0.9); | |
| padding: 0.5rem 1rem; | |
| border-radius: 9999px; | |
| color: #f06595; | |
| font-weight: 600; | |
| box-shadow: 0 2px 10px rgba(0,0,0,0.1); | |
| } | |
| .buttons { | |
| position: absolute; | |
| top: 1rem; | |
| right: 1rem; | |
| display: flex; | |
| gap: 0.5rem; | |
| } | |
| button { | |
| background: white; | |
| color: #f06595; | |
| border: none; | |
| padding: 0.5rem 1rem; | |
| border-radius: 9999px; | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: all 0.2s; | |
| box-shadow: 0 2px 5px rgba(0,0,0,0.1); | |
| } | |
| button:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 4px 8px rgba(0,0,0,0.15); | |
| } | |
| </style> | |
| <header> | |
| <div class="targets"> | |
| <span>❤ Small: 40/hr</span> | |
| <span> | </span> | |
| <span>💝 Large: 25/hr</span> | |
| </div> | |
| <h1>Valentine's Production Dashboard</h1> | |
| <div class="clock" id="clock">Loading time...</div> | |
| <div class="buttons"> | |
| <button id="commentBtn"> | |
| <i data-feather="message-square"></i> Note | |
| </button> | |
| <button id="carryoverBtn"> | |
| <i data-feather="heart"></i> Specials | |
| </button> | |
| </div> | |
| </header> | |
| `; | |
| } | |
| } | |
| customElements.define('custom-header', CustomHeader); |