Spaces:
Sleeping
Sleeping
File size: 13,620 Bytes
2f2f476 | 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 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 | <!DOCTYPE html>
<html lang="pt-BR" class="scroll-smooth">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Painel Administrativo - SoftEdge Corporation</title>
<!-- SEO & SOCIAL -->
<meta name="description" content="Painel administrativo SoftEdge Corporation. Gerencie projetos, usuários e estatísticas.">
<meta name="keywords" content="admin, painel, dashboard, softedge">
<!-- FAVICON -->
<link rel="icon" href="/assets/placeholder.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/assets/placeholder.svg">
<meta property="og:image" content="/assets/placeholder.svg" />
<meta property="og:title" content="Painel Administrativo - SoftEdge Corporation" />
<meta property="og:description" content="Gerencie seu negócio digital" />
<!-- FONTS -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
<!-- TAILWIND CSS -->
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
fontFamily: {
sans: ['Inter', 'system-ui', 'sans-serif'],
},
colors: {
primary: {
50: '#ecfeff',
100: '#cffafe',
500: '#06b6d4',
600: '#0891b2',
700: '#0e7490',
900: '#164e63',
}
}
}
}
}
</script>
<!-- LUCIDE ICONS -->
<script src="https://unpkg.com/lucide@latest"></script>
<!-- CUSTOM CSS -->
<link href="/assets/css/style.css" rel="stylesheet">
</head>
<body class="min-h-screen bg-slate-950 text-white antialiased font-sans">
<!-- SIDEBAR -->
<div class="fixed inset-y-0 left-0 z-50 w-64 bg-slate-900 border-r border-slate-700 transform -translate-x-full lg:translate-x-0 transition-transform duration-300" id="sidebar">
<div class="flex items-center justify-between p-4 border-b border-slate-700">
<div class="flex items-center space-x-3">
<div class="w-8 h-8 rounded-lg overflow-hidden bg-linear-to-br from-cyan-500 to-blue-600 p-0.5">
<img src="/assets/logo.jpeg" alt="SoftEdge Logo" class="w-full h-full object-cover rounded-lg">
</div>
<span class="text-lg font-bold gradient-text">SoftEdge</span>
</div>
<button class="lg:hidden text-gray-400 hover:text-white" id="sidebar-close">
<i data-lucide="x" class="w-6 h-6"></i>
</button>
</div>
<nav class="p-4 space-y-2">
<a href="#dashboard" class="nav-link active flex items-center space-x-3 px-4 py-3 text-white bg-cyan-500/10 border-r-2 border-cyan-500 rounded-lg">
<i data-lucide="layout-dashboard" class="w-5 h-5"></i>
<span>Dashboard</span>
</a>
<a href="#projects" class="nav-link flex items-center space-x-3 px-4 py-3 text-gray-300 hover:text-white hover:bg-slate-800 rounded-lg transition-colors">
<i data-lucide="folder" class="w-5 h-5"></i>
<span>Projetos</span>
</a>
<a href="#users" class="nav-link flex items-center space-x-3 px-4 py-3 text-gray-300 hover:text-white hover:bg-slate-800 rounded-lg transition-colors">
<i data-lucide="users" class="w-5 h-5"></i>
<span>Usuários</span>
</a>
<a href="#messages" class="nav-link flex items-center space-x-3 px-4 py-3 text-gray-300 hover:text-white hover:bg-slate-800 rounded-lg transition-colors">
<i data-lucide="mail" class="w-5 h-5"></i>
<span>Mensagens</span>
</a>
<a href="#analytics" class="nav-link flex items-center space-x-3 px-4 py-3 text-gray-300 hover:text-white hover:bg-slate-800 rounded-lg transition-colors">
<i data-lucide="bar-chart" class="w-5 h-5"></i>
<span>Analytics</span>
</a>
<a href="#settings" class="nav-link flex items-center space-x-3 px-4 py-3 text-gray-300 hover:text-white hover:bg-slate-800 rounded-lg transition-colors">
<i data-lucide="settings" class="w-5 h-5"></i>
<span>Configurações</span>
</a>
</nav>
<div class="absolute bottom-4 left-4 right-4">
<form method="POST" action="/api/auth/logout">
<button type="submit" class="w-full flex items-center space-x-3 px-4 py-3 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded-lg transition-colors">
<i data-lucide="log-out" class="w-5 h-5"></i>
<span>Sair</span>
</button>
</form>
</div>
</div>
<!-- MAIN CONTENT -->
<div class="lg:ml-64">
<!-- HEADER -->
<header class="bg-slate-900 border-b border-slate-700 px-4 py-4 lg:px-8">
<div class="flex items-center justify-between">
<div class="flex items-center space-x-4">
<button class="lg:hidden text-gray-400 hover:text-white" id="sidebar-toggle">
<i data-lucide="menu" class="w-6 h-6"></i>
</button>
<h1 class="text-2xl font-bold text-white">Painel Administrativo</h1>
</div>
<div class="flex items-center space-x-4">
<div class="text-right">
<p class="text-sm text-gray-400">Bem-vindo,</p>
<p class="text-sm font-semibold text-white">Isaac Quarenta</p>
</div>
<div class="w-10 h-10 rounded-full bg-linear-to-br from-cyan-500 to-blue-600 flex items-center justify-center">
<span class="text-white font-bold text-sm">IQ</span>
</div>
</div>
</div>
</header>
<!-- DASHBOARD CONTENT -->
<main class="p-4 lg:p-8">
<!-- STATS CARDS -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<div class="glass rounded-xl p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-400 text-sm">Total de Projetos</p>
<p class="text-2xl font-bold text-white">{{ stats.total_projects }}</p>
</div>
<div class="w-12 h-12 bg-blue-500/20 rounded-lg flex items-center justify-center">
<i data-lucide="folder" class="w-6 h-6 text-blue-400"></i>
</div>
</div>
</div>
<div class="glass rounded-xl p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-400 text-sm">Usuários Ativos</p>
<p class="text-2xl font-bold text-white">{{ stats.total_users }}</p>
</div>
<div class="w-12 h-12 bg-green-500/20 rounded-lg flex items-center justify-center">
<i data-lucide="users" class="w-6 h-6 text-green-400"></i>
</div>
</div>
</div>
<div class="glass rounded-xl p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-400 text-sm">Mensagens</p>
<p class="text-2xl font-bold text-white">{{ stats.total_contacts }}</p>
</div>
<div class="w-12 h-12 bg-purple-500/20 rounded-lg flex items-center justify-center">
<i data-lucide="mail" class="w-6 h-6 text-purple-400"></i>
</div>
</div>
</div>
<div class="glass rounded-xl p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-400 text-sm">Taxa de Satisfação</p>
<p class="text-2xl font-bold text-white">4.9★</p>
</div>
<div class="w-12 h-12 bg-yellow-500/20 rounded-lg flex items-center justify-center">
<i data-lucide="star" class="w-6 h-6 text-yellow-400"></i>
</div>
</div>
</div>
</div>
<!-- RECENT ACTIVITY -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-8">
<!-- Recent Users -->
<div class="glass rounded-xl p-6">
<h3 class="text-xl font-bold text-white mb-4">Usuários Recentes</h3>
<div class="space-y-4">
{% for user in stats.recent_users %}
<div class="flex items-center space-x-3">
<div class="w-10 h-10 rounded-full bg-slate-700 flex items-center justify-center">
<span class="text-white font-bold text-sm">{{ user.name[0] }}</span>
</div>
<div class="flex-1">
<p class="text-white font-medium">{{ user.name }}</p>
<p class="text-gray-400 text-sm">{{ user.email }}</p>
</div>
<span class="text-xs text-gray-500">{{ user.created_at.strftime('%d/%m') }}</span>
</div>
{% endfor %}
</div>
</div>
<!-- Recent Messages -->
<div class="glass rounded-xl p-6">
<h3 class="text-xl font-bold text-white mb-4">Mensagens Recentes</h3>
<div class="space-y-4">
{% for contact in stats.recent_contacts %}
<div class="border-l-2 border-cyan-500 pl-4">
<p class="text-white font-medium">{{ contact.name }}</p>
<p class="text-gray-400 text-sm line-clamp-2">{{ contact.message }}</p>
<p class="text-xs text-gray-500 mt-1">{{ contact.created_at.strftime('%d/%m %H:%M') }}</p>
</div>
{% endfor %}
</div>
</div>
</div>
<!-- QUICK ACTIONS -->
<div class="glass rounded-xl p-6">
<h3 class="text-xl font-bold text-white mb-4">Ações Rápidas</h3>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<button class="bg-cyan-500 hover:bg-cyan-600 text-white font-semibold py-3 px-4 rounded-lg transition-colors flex items-center justify-center space-x-2">
<i data-lucide="plus" class="w-5 h-5"></i>
<span>Novo Projeto</span>
</button>
<button class="bg-blue-500 hover:bg-blue-600 text-white font-semibold py-3 px-4 rounded-lg transition-colors flex items-center justify-center space-x-2">
<i data-lucide="user-plus" class="w-5 h-5"></i>
<span>Adicionar Usuário</span>
</button>
<button class="bg-purple-500 hover:bg-purple-600 text-white font-semibold py-3 px-4 rounded-lg transition-colors flex items-center justify-center space-x-2">
<i data-lucide="download" class="w-5 h-5"></i>
<span>Exportar Dados</span>
</button>
</div>
</div>
</main>
</div>
<!-- SCRIPTS -->
<script src="https://unpkg.com/lucide@latest"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Initialize Lucide icons
lucide.createIcons();
// Sidebar toggle
const sidebar = document.getElementById('sidebar');
const sidebarToggle = document.getElementById('sidebar-toggle');
const sidebarClose = document.getElementById('sidebar-close');
sidebarToggle?.addEventListener('click', () => {
sidebar.classList.toggle('-translate-x-full');
});
sidebarClose?.addEventListener('click', () => {
sidebar.classList.add('-translate-x-full');
});
// Navigation
const navLinks = document.querySelectorAll('.nav-link');
navLinks.forEach(link => {
link.addEventListener('click', function(e) {
e.preventDefault();
// Update active state
navLinks.forEach(l => {
l.classList.remove('active', 'text-white', 'bg-cyan-500/10', 'border-r-2', 'border-cyan-500');
l.classList.add('text-gray-300');
});
this.classList.add('active', 'text-white', 'bg-cyan-500/10', 'border-r-2', 'border-cyan-500');
this.classList.remove('text-gray-300');
// Close sidebar on mobile
if (window.innerWidth < 1024) {
sidebar.classList.add('-translate-x-full');
}
});
});
// Auto-refresh stats every 30 seconds
setInterval(async () => {
try {
const response = await fetch('/api/stats');
const data = await response.json();
// Update stats if available
const projectStat = document.querySelector('.glass p:contains("Total de Projetos")').nextElementSibling;
if (projectStat) projectStat.textContent = data.projects + '+';
} catch (error) {
console.log('Stats refresh failed');
}
}, 30000);
});
</script>
<style>
.glass {
background: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.1);
}
.gradient-text {
background: linear-gradient(135deg, #06b6d4, #3b82f6);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.nav-link.active {
background: rgba(6, 182, 212, 0.1) !important;
color: white !important;
border-right: 2px solid #06b6d4 !important;
}
.line-clamp-2 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
</style>
</body>
</html>
|