Spaces:
Running
Running
Download components/sidebar.js from seniorcoder/crm-uzpg8ql: direct link, hf CLI and curl.
- Browser
- Download file 4.6 kB
-
https://huggingface.co/spaces/seniorcoder/crm-uzpg8ql/resolve/main/components/sidebar.js
- Command line
-
hf download hf://spaces/seniorcoder/crm-uzpg8ql/components/sidebar.js
-
curl -L -o sidebar.js https://huggingface.co/spaces/seniorcoder/crm-uzpg8ql/resolve/main/components/sidebar.js
4.6 kB
| class CustomSidebar extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| :host { | |
| display: block; | |
| } | |
| aside { | |
| width: 16rem; | |
| background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(249,250,251,0.95) 100%); | |
| backdrop-filter: blur(10px); | |
| padding: 1.5rem; | |
| height: 100vh; | |
| position: fixed; | |
| left: 0; | |
| top: 0; | |
| border-right: 1px solid rgba(229,231,235,0.5); | |
| transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); | |
| z-index: 30; | |
| box-shadow: 4px 0 6px -1px rgba(0, 0, 0, 0.1); | |
| } | |
| .dark aside { | |
| background: linear-gradient(180deg, rgba(17,24,39,0.95) 0%, rgba(31,41,55,0.95) 100%); | |
| border-right: 1px solid rgba(55,65,81,0.5); | |
| } | |
| @media (max-width: 1023px) { | |
| aside { | |
| transform: translateX(-100%); | |
| } | |
| aside.open { | |
| transform: translateX(0); | |
| } | |
| } | |
| .logo { | |
| font-size: 1.75rem; | |
| font-weight: 800; | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| background-clip: text; | |
| margin-bottom: 2rem; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.75rem; | |
| } | |
| .logo-icon { | |
| width: 2.5rem; | |
| height: 2.5rem; | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| border-radius: 0.75rem; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| color: white; | |
| } | |
| ul { | |
| list-style: none; | |
| padding: 0; | |
| margin: 0; | |
| } | |
| li { | |
| margin: 0.25rem 0; | |
| } | |
| a { | |
| color: #6b7280; | |
| text-decoration: none; | |
| display: flex; | |
| align-items: center; | |
| gap: 0.75rem; | |
| padding: 0.75rem 1rem; | |
| border-radius: 0.75rem; | |
| transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); | |
| font-weight: 500; | |
| } | |
| .dark a { | |
| color: #9ca3af; | |
| } | |
| a:hover { | |
| background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%); | |
| color: #6366f1; | |
| transform: translateX(0.25rem); | |
| } | |
| a.active { | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| color: white; | |
| box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3); | |
| } | |
| .menu-section { | |
| margin-bottom: 2rem; | |
| } | |
| .menu-title { | |
| font-size: 0.75rem; | |
| font-weight: 600; | |
| text-transform: uppercase; | |
| color: #9ca3af; | |
| margin-bottom: 0.5rem; | |
| padding: 0 1rem; | |
| letter-spacing: 0.05em; | |
| } | |
| .dark .menu-title { | |
| color: #6b7280; | |
| } | |
| </style> | |
| <aside> | |
| <div class="logo"> | |
| <div class="logo-icon"> | |
| <i data-feather="hexagon"></i> | |
| </div> | |
| Nexus | |
| </div> | |
| <div class="menu-section"> | |
| <div class="menu-title">Main</div> | |
| <ul> | |
| <li><a href="/" class="active"><i data-feather="home"></i>Dashboard</a></li> | |
| <li><a href="#"><i data-feather="users"></i>Clients</a></li> | |
| <li><a href="#"><i data-feather="target"></i>Leads</a></li> | |
| <li><a href="#"><i data-feather="calendar"></i>Calendar</a></li> | |
| </ul> | |
| </div> | |
| <div class="menu-section"> | |
| <div class="menu-title">Analytics</div> | |
| <ul> | |
| <li><a href="#"><i data-feather="bar-chart-2"></i>Reports</a></li> | |
| <li><a href="#"><i data-feather="trending-up"></i>Performance</a></li> | |
| <li><a href="#"><i data-feather="pie-chart"></i>Insights</a></li> | |
| </ul> | |
| </div> | |
| <div class="menu-section"> | |
| <div class="menu-title">Tools</div> | |
| <ul> | |
| <li><a href="#"><i data-feather="mail"></i>Messages</a></li> | |
| <li><a href="#"><i data-feather="file-text"></i>Documents</a></li> | |
| <li><a href="#"><i data-feather="settings"></i>Settings</a></li> | |
| </ul> | |
| </div> | |
| </aside> | |
| `; | |
| // Initialize feather icons | |
| setTimeout(() => feather.replace(), 0); | |
| } | |
| } | |
| customElements.define('custom-sidebar', CustomSidebar); |