Spaces:
Running
Running
File size: 5,722 Bytes
504bb6f a3f0dd4 504bb6f 8cd240c 504bb6f bb99454 d58e69d bb99454 8cd240c 440285d 504bb6f 7520416 1646bef 440285d 504bb6f e5bda5f 440285d 504bb6f d58e69d 440285d 504bb6f d58e69d 440285d 504bb6f bb99454 504bb6f 7086f0e 28e4f2d 7086f0e 28e4f2d 7086f0e 28e4f2d 504bb6f |
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 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
class CustomSidebar extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
:host {
display: block;
position: fixed;
left: 0;
top: 0;
height: 100vh;
width: 16rem;
background: #1a1e2e;
border-right: 1px solid #2d3748;
z-index: 40;
transition: transform 0.3s ease;
}
.sidebar-content {
padding: 1.5rem;
height: 100%;
display: flex;
flex-direction: column;
}
.logo {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 2rem;
padding-bottom: 1rem;
border-bottom: 1px solid #2d3748;
}
.logo-icon {
width: 2rem;
height: 2rem;
background: linear-gradient(135deg, #ff580f 0%, #ff8c66 100%);
border-radius: 0.5rem;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
.logo-text {
font-weight: 700;
font-size: 1.25rem;
background: linear-gradient(135deg, #ff580f 0%, #ff8c66 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.nav-items {
display: flex;
flex-direction: column;
gap: 0.5rem;
flex: 1;
}
.nav-item {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem 1rem;
border-radius: 0.5rem;
color: #a0aec0;
text-decoration: none;
transition: all 0.2s ease;
}
.nav-item:hover {
background: #21223a;
color: white;
}
.nav-item.active {
background: #21223a;
color: #ff580f;
}
.nav-item i {
width: 1.25rem;
height: 1.25rem;
}
.sidebar-footer {
margin-top: auto;
padding-top: 1rem;
border-top: 1px solid #2d3748;
}
.user-profile {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.75rem;
border-radius: 0.5rem;
transition: background 0.2s ease;
}
.user-profile:hover {
background: #21223a;
}
.user-avatar {
width: 2.5rem;
height: 2.5rem;
border-radius: 50%;
background: #2d3748;
display: flex;
align-items: center;
justify-content: center;
color: #ff580f;
}
.user-info {
flex: 1;
}
.user-name {
font-weight: 600;
font-size: 0.875rem;
color: white;
}
.user-role {
font-size: 0.75rem;
color: #a0aec0;
}
@media (max-width: 768px) {
:host {
transform: translateX(-100%);
}
:host(.open) {
transform: translateX(0);
}
}
</style>
<div class="sidebar-content">
<div class="logo">
<div class="logo-icon">
<i data-feather="smartphone"></i>
</div>
<div class="logo-text">Mobile Test Pilot</div>
</div>
<nav class="nav-items">
<a href="index.html" class="nav-item">
<i data-feather="home"></i>
<span>Dashboard</span>
</a>
<a href="chatbot.html" class="nav-item">
<i data-feather="home"></i>
<span>Dashboard</span>
</a>
<a href="active-tests.html" class="nav-item">
<i data-feather="activity"></i>
<span>Testes Ativos</span>
</a>
<a href="cenarios.html" class="nav-item">
<i data-feather="git-branch"></i>
<span>Cenários</span>
</a>
<a href="historico.html" class="nav-item">
<i data-feather="clock"></i>
<span>Histórico</span>
</a>
<a href="relatorios.html" class="nav-item">
<i data-feather="pie-chart"></i>
<span>Relatórios</span>
</a>
<a href="configuracao.html" class="nav-item">
<i data-feather="sliders"></i>
<span>Configurações</span>
</a>
<a href="#" class="nav-item">
<i data-feather="help-circle"></i>
<span>Ajuda</span>
</a>
<a href="#" class="nav-item">
<i data-feather="book"></i>
<span>Documentação</span>
</a>
</nav>
<div class="sidebar-footer">
<div class="user-profile">
<div class="user-avatar">
<i data-feather="user"></i>
</div>
<div class="user-info">
<div class="user-name">Carlos Silva</div>
<div class="user-role">QA Engineer</div>
</div>
</div>
</div>
</div>
`;
// Inicializar feather icons no shadow DOM
this.shadowRoot.querySelectorAll('[data-feather]').forEach(icon => {
const iconName = icon.getAttribute('data-feather');
if (window.feather) {
const svg = window.feather.icons[iconName].toSvg();
icon.outerHTML = svg;
}
});
}
}
customElements.define('custom-sidebar', CustomSidebar); |