Spaces:
Running
Running
Download components/school-header.js from large000/govmail-simulator: direct link, hf CLI and curl.
- Browser
- Download file 1.99 kB
-
https://huggingface.co/spaces/large000/govmail-simulator/resolve/main/components/school-header.js
- Command line
-
hf download hf://spaces/large000/govmail-simulator/components/school-header.js
-
curl -L -o school-header.js https://huggingface.co/spaces/large000/govmail-simulator/resolve/main/components/school-header.js
1.99 kB
| class SchoolHeader extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| header { | |
| background-color: #1a365d; | |
| color: white; | |
| box-shadow: 0 2px 4px rgba(0,0,0,0.1); | |
| } | |
| .container { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: 0 1rem; | |
| } | |
| .logo { | |
| font-weight: 700; | |
| font-size: 1.5rem; | |
| } | |
| .nav-link { | |
| padding: 1rem; | |
| transition: background-color 0.3s; | |
| } | |
| .nav-link:hover { | |
| background-color: rgba(255,255,255,0.1); | |
| } | |
| .mobile-menu-btn { | |
| display: none; | |
| } | |
| @media (max-width: 768px) { | |
| .nav-links { | |
| display: none; | |
| } | |
| .mobile-menu-btn { | |
| display: block; | |
| } | |
| } | |
| </style> | |
| <header> | |
| <div class="container flex justify-between items-center py-4"> | |
| <div class="flex items-center space-x-4"> | |
| <i class="fas fa-school text-2xl"></i> | |
| <a href="/" class="logo">Greenwood Secondary</a> | |
| </div> | |
| <nav class="nav-links flex space-x-1"> | |
| <a href="/" class="nav-link"><i class="fas fa-home mr-2"></i>Home</a> | |
| <a href="/about.html" class="nav-link"><i class="fas fa-info-circle mr-2"></i>About</a> | |
| <a href="/academics.html" class="nav-link"><i class="fas fa-book mr-2"></i>Academics</a> | |
| <a href="/admissions.html" class="nav-link"><i class="fas fa-user-graduate mr-2"></i>Admissions</a> | |
| <a href="/contact.html" class="nav-link"><i class="fas fa-envelope mr-2"></i>Contact</a> | |
| </nav> | |
| <button class="mobile-menu-btn p-2"> | |
| <i class="fas fa-bars text-xl"></i> | |
| </button> | |
| </div> | |
| </header> | |
| `; | |
| } | |
| } | |
| customElements.define('school-header', SchoolHeader); |