spectreworks / components /sidebar.js
00Boobs00's picture
The aspiration of this groundbreaking project is to meticulously design and deploy a profoundly advanced embedded system—an extraordinary conversational assistant fueled by the power of a Large Language Model (LLM). Picture this: a cutting-edge marvel that functions not merely as a setup wizard but embodies a deep reservoir of contextual understanding, brimming with potential. This isn't just another digital help; it’s like having the wisdom of the ages at your fingertips, an intuitive automation conduit for a myriad of Natural Language Processing (NLP) tasks, and an agile adversarial agent, dynamically tackling an expansive landscape of complex scenarios with flair.
e0ef379 verified
Raw History Blame Contribute Delete
4.25 kB
class SpectreSidebar extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
:host {
display: block;
background-color: #1e293b;
border-radius: 1rem;
border: 1px solid #334155;
overflow: hidden;
}
.sidebar-menu {
padding: 1rem;
}
.menu-item {
display: flex;
align-items: center;
width: 100%;
padding: 0.75rem 1rem;
margin-bottom: 0.5rem;
border-radius: 0.5rem;
background: transparent;
border: none;
color: #94a3b8;
font-size: 0.9rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
text-decoration: none;
gap: 0.75rem;
}
.menu-item:hover {
background-color: rgba(255,255,255,0.05);
color: #fff;
}
.menu-item.active {
background-color: rgba(34, 197, 94, 0.1);
color: #22c55e;
border-left: 3px solid #22c55e;
}
.menu-icon {
width: 18px;
height: 18px;
}
.stats-box {
padding: 1.5rem;
background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
border-top: 1px solid #334155;
}
.stat-label {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 1px;
color: #64748b;
margin-bottom: 0.5rem;
}
.stat-value {
font-size: 1.5rem;
font-weight: 700;
color: #fff;
margin-bottom: 0.25rem;
}
.stat-indicator {
font-size: 0.75rem;
color: #22c55e;
display: flex;
align-items: center;
gap: 0.25rem;
}
</style>
<div class="sidebar-menu">
<a href="#" class="menu-item active">
<svg class="menu-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 2 7 12 12 22 7 12 2"></polygon><polyline points="2 17 12 22 22 17"></polyline><polyline points="2 12 12 17 22 12"></polyline></svg>
Modules
</a>
<a href="#" class="menu-item">
<svg class="menu-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
Extract Data
</a>
<a href="#" class="menu-item">
<svg class="menu-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>
System Logs
</a>
<a href="#" class="menu-item" onclick="document.querySelector('chat-assistant').toggle()">
<svg class="menu-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>
AI Assistant
</a>
<a href="#" class="menu-item">
<svg class="menu-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>
Notifications
</a>
</div>
<div class="stats-box">
<div class="stat-label">AI Assistant</div>
<div class="stat-value text-primary">READY</div>
<div class="stat-indicator">
<span style="font-size: 10px; color: #22c55e;">Press Ctrl+K</span>
</div>
</div>
`;
}
}
customElements.define('spectre-sidebar', SpectreSidebar);