Download components/sidebar.js from rcok/add-nasa-theme-https-3vdpmvj: direct link, hf CLI and curl.
- Browser
- Download file 1.82 kB
-
https://huggingface.co/spaces/rcok/add-nasa-theme-https-3vdpmvj/resolve/main/components/sidebar.js
- Command line
-
hf download hf://spaces/rcok/add-nasa-theme-https-3vdpmvj/components/sidebar.js
-
curl -L -o sidebar.js https://huggingface.co/spaces/rcok/add-nasa-theme-https-3vdpmvj/resolve/main/components/sidebar.js
1.82 kB
| class CustomSidebar extends HTMLElement { | |
| connectedCallback() { | |
| this.attachShadow({ mode: 'open' }); | |
| this.shadowRoot.innerHTML = ` | |
| <style> | |
| aside { | |
| width: 300px; | |
| background: #1f2937; | |
| padding: 1.5rem; | |
| border-radius: 0.75rem; | |
| height: fit-content; | |
| } | |
| h3 { | |
| font-size: 1.25rem; | |
| font-weight: 600; | |
| margin-bottom: 1rem; | |
| color: #60a5fa; | |
| } | |
| ul { list-style: none; padding: 0; margin: 0; } | |
| li { margin-bottom: 0.75rem; } | |
| a { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| color: #d1d5db; | |
| text-decoration: none; | |
| padding: 0.5rem; | |
| border-radius: 0.375rem; | |
| transition: all 0.2s; | |
| } | |
| a:hover { | |
| background: #374151; | |
| color: #ffffff; | |
| } | |
| i { width: 18px; height: 18px; } | |
| .sidebar-divider { | |
| height: 1px; | |
| background: #374151; | |
| margin: 1rem 0; | |
| } | |
| </style> | |
| <aside> | |
| <h3>Quick Links</h3> | |
| <ul> | |
| <li><a href="/"><i data-feather="home"></i> Home</a></li> | |
| <li><a href="/help.html"><i data-feather="help-circle"></i> RPA Help</a></li> | |
| </ul> | |
| <div class="sidebar-divider"></div> | |
| <h3>Popular Topics</h3> | |
| <ul> | |
| <li><a href="#"><i data-feather="zap"></i> Error Handling</a></li> | |
| <li><a href="#"><i data-feather="key"></i> Credentials</a></li> | |
| <li><a href="#"><i data-feather="download"></i> Package Deploy</a></li> | |
| <li><a href="#"><i data-feather="server"></i> Control Room</a></li> | |
| </ul> | |
| </aside> | |
| `; | |
| feather.replace(); | |
| } | |
| } | |
| customElements.define('custom-sidebar', CustomSidebar); |