rcok's picture
<!DOCTYPE html>
e30f492 verified
Raw History Blame Contribute Delete
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);