File size: 1,819 Bytes
e30f492 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | 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); |