Spaces:
Running
Running
melhore os espaçamento e o lyout esta feio deixe mais moderno
Browse files- components/device-grid.js +15 -13
- components/sidebar.js +18 -10
- index.html +7 -6
- style.css +76 -29
components/device-grid.js
CHANGED
|
@@ -5,29 +5,31 @@ class CustomDeviceGrid extends HTMLElement {
|
|
| 5 |
<style>
|
| 6 |
.devices-list {
|
| 7 |
width: 100%;
|
| 8 |
-
border-collapse:
|
|
|
|
| 9 |
}
|
| 10 |
-
|
| 11 |
.devices-list th {
|
| 12 |
-
background-color:
|
| 13 |
color: #94a3b8;
|
| 14 |
text-align: left;
|
| 15 |
-
padding: 1rem;
|
| 16 |
font-weight: 600;
|
| 17 |
-
border-bottom: 1px solid
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
}
|
| 19 |
-
|
| 20 |
.devices-list td {
|
| 21 |
-
padding:
|
| 22 |
-
border-bottom: 1px solid
|
| 23 |
-
color: #
|
|
|
|
| 24 |
}
|
| 25 |
-
|
| 26 |
.devices-list tr:hover td {
|
| 27 |
-
background-color:
|
| 28 |
}
|
| 29 |
-
|
| 30 |
-
.status-badge {
|
| 31 |
display: inline-flex;
|
| 32 |
align-items: center;
|
| 33 |
justify-content: center;
|
|
|
|
| 5 |
<style>
|
| 6 |
.devices-list {
|
| 7 |
width: 100%;
|
| 8 |
+
border-collapse: separate;
|
| 9 |
+
border-spacing: 0;
|
| 10 |
}
|
|
|
|
| 11 |
.devices-list th {
|
| 12 |
+
background-color: rgba(15, 23, 42, 0.8);
|
| 13 |
color: #94a3b8;
|
| 14 |
text-align: left;
|
| 15 |
+
padding: 1rem 1.25rem;
|
| 16 |
font-weight: 600;
|
| 17 |
+
border-bottom: 1px solid rgba(51, 65, 85, 0.5);
|
| 18 |
+
backdrop-filter: blur(8px);
|
| 19 |
+
position: sticky;
|
| 20 |
+
top: 0;
|
| 21 |
+
z-index: 10;
|
| 22 |
}
|
|
|
|
| 23 |
.devices-list td {
|
| 24 |
+
padding: 1rem 1.25rem;
|
| 25 |
+
border-bottom: 1px solid rgba(51, 65, 85, 0.3);
|
| 26 |
+
color: #f8fafc;
|
| 27 |
+
transition: background-color 0.2s ease;
|
| 28 |
}
|
|
|
|
| 29 |
.devices-list tr:hover td {
|
| 30 |
+
background-color: rgba(30, 41, 59, 0.5);
|
| 31 |
}
|
| 32 |
+
.status-badge {
|
|
|
|
| 33 |
display: inline-flex;
|
| 34 |
align-items: center;
|
| 35 |
justify-content: center;
|
components/sidebar.js
CHANGED
|
@@ -10,18 +10,24 @@ class CustomSidebar extends HTMLElement {
|
|
| 10 |
position: fixed;
|
| 11 |
left: 0;
|
| 12 |
top: 0;
|
| 13 |
-
background:
|
| 14 |
-
border-right: 1px solid
|
| 15 |
-
z-index:
|
| 16 |
-
|
|
|
|
| 17 |
.logo {
|
| 18 |
-
padding: 1.5rem;
|
| 19 |
-
border-bottom: 1px solid
|
| 20 |
display: flex;
|
| 21 |
align-items: center;
|
| 22 |
gap: 0.75rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
}
|
| 24 |
-
|
| 25 |
color: #3b82f6;
|
| 26 |
}
|
| 27 |
.logo-text {
|
|
@@ -35,12 +41,14 @@ class CustomSidebar extends HTMLElement {
|
|
| 35 |
.nav-item {
|
| 36 |
display: flex;
|
| 37 |
align-items: center;
|
| 38 |
-
padding: 0.
|
| 39 |
color: #94a3b8;
|
| 40 |
text-decoration: none;
|
| 41 |
-
transition: all 0.
|
|
|
|
|
|
|
| 42 |
}
|
| 43 |
-
|
| 44 |
background: rgba(30, 58, 138, 0.3);
|
| 45 |
color: white;
|
| 46 |
}
|
|
|
|
| 10 |
position: fixed;
|
| 11 |
left: 0;
|
| 12 |
top: 0;
|
| 13 |
+
background: rgba(2, 6, 23, 0.9);
|
| 14 |
+
border-right: 1px solid rgba(30, 41, 59, 0.5);
|
| 15 |
+
z-index: 20;
|
| 16 |
+
backdrop-filter: blur(8px);
|
| 17 |
+
}
|
| 18 |
.logo {
|
| 19 |
+
padding: 1.5rem 1.75rem;
|
| 20 |
+
border-bottom: 1px solid rgba(30, 41, 59, 0.5);
|
| 21 |
display: flex;
|
| 22 |
align-items: center;
|
| 23 |
gap: 0.75rem;
|
| 24 |
+
transition: all 0.3s ease;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.logo:hover {
|
| 28 |
+
background: rgba(30, 64, 175, 0.1);
|
| 29 |
}
|
| 30 |
+
.logo-icon {
|
| 31 |
color: #3b82f6;
|
| 32 |
}
|
| 33 |
.logo-text {
|
|
|
|
| 41 |
.nav-item {
|
| 42 |
display: flex;
|
| 43 |
align-items: center;
|
| 44 |
+
padding: 0.875rem 1.75rem;
|
| 45 |
color: #94a3b8;
|
| 46 |
text-decoration: none;
|
| 47 |
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
| 48 |
+
font-size: 0.9375rem;
|
| 49 |
+
margin: 0.25rem 0;
|
| 50 |
}
|
| 51 |
+
.nav-item:hover {
|
| 52 |
background: rgba(30, 58, 138, 0.3);
|
| 53 |
color: white;
|
| 54 |
}
|
index.html
CHANGED
|
@@ -13,9 +13,10 @@
|
|
| 13 |
<script src="components/device-grid.js"></script>
|
| 14 |
</head>
|
| 15 |
<body class="bg-slate-900">
|
| 16 |
-
<
|
| 17 |
-
<
|
| 18 |
-
|
|
|
|
| 19 |
<div class="flex items-center gap-4">
|
| 20 |
<button class="flex items-center gap-2 px-4 py-2 bg-slate-800 rounded-lg text-slate-300 hover:bg-slate-700">
|
| 21 |
<i data-feather="refresh-cw" class="w-4 h-4"></i>
|
|
@@ -29,9 +30,9 @@
|
|
| 29 |
</div>
|
| 30 |
|
| 31 |
<custom-stats-cards></custom-stats-cards>
|
| 32 |
-
<div class="bg-slate-
|
| 33 |
-
<div class="p-6 border-b border-slate-
|
| 34 |
-
|
| 35 |
<h3 class="text-lg font-semibold text-white">Device Inventory</h3>
|
| 36 |
<div class="flex items-center gap-3">
|
| 37 |
<input type="text" placeholder="Search devices..." class="bg-slate-700 text-slate-300 text-sm rounded-md px-3 py-1 w-64">
|
|
|
|
| 13 |
<script src="components/device-grid.js"></script>
|
| 14 |
</head>
|
| 15 |
<body class="bg-slate-900">
|
| 16 |
+
<custom-sidebar></custom-sidebar>
|
| 17 |
+
<main class="relative z-0">
|
| 18 |
+
<div class="flex justify-between items-center mb-8 px-6">
|
| 19 |
+
<h1 class="text-3xl font-bold text-white">Compliance Dashboard</h1>
|
| 20 |
<div class="flex items-center gap-4">
|
| 21 |
<button class="flex items-center gap-2 px-4 py-2 bg-slate-800 rounded-lg text-slate-300 hover:bg-slate-700">
|
| 22 |
<i data-feather="refresh-cw" class="w-4 h-4"></i>
|
|
|
|
| 30 |
</div>
|
| 31 |
|
| 32 |
<custom-stats-cards></custom-stats-cards>
|
| 33 |
+
<div class="bg-slate-900/50 rounded-2xl border border-slate-800 overflow-hidden backdrop-blur-sm">
|
| 34 |
+
<div class="p-6 border-b border-slate-800">
|
| 35 |
+
<div class="flex justify-between items-center">
|
| 36 |
<h3 class="text-lg font-semibold text-white">Device Inventory</h3>
|
| 37 |
<div class="flex items-center gap-3">
|
| 38 |
<input type="text" placeholder="Search devices..." class="bg-slate-700 text-slate-300 text-sm rounded-md px-3 py-1 w-64">
|
style.css
CHANGED
|
@@ -1,13 +1,30 @@
|
|
| 1 |
|
| 2 |
/* Base styles */
|
| 3 |
body {
|
| 4 |
-
color: #
|
| 5 |
-
background-color: #
|
| 6 |
min-height: 100vh;
|
| 7 |
font-family: 'Inter', sans-serif;
|
|
|
|
| 8 |
}
|
| 9 |
|
| 10 |
-
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
::-webkit-scrollbar {
|
| 12 |
width: 6px;
|
| 13 |
height: 6px;
|
|
@@ -25,73 +42,103 @@ body {
|
|
| 25 |
::-webkit-scrollbar-thumb:hover {
|
| 26 |
background: #475569;
|
| 27 |
}
|
| 28 |
-
|
| 29 |
-
/* Input styles */
|
| 30 |
input, select {
|
| 31 |
background-color: #1e293b;
|
| 32 |
border: 1px solid #334155;
|
| 33 |
-
color: #
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
}
|
| 36 |
|
| 37 |
input:focus, select:focus {
|
| 38 |
outline: none;
|
| 39 |
-
border-color: #
|
| 40 |
-
box-shadow: 0 0 0
|
|
|
|
| 41 |
}
|
| 42 |
-
|
| 43 |
-
/* Button styles */
|
| 44 |
button {
|
| 45 |
-
transition: all 0.2s;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
}
|
| 47 |
|
| 48 |
button:hover {
|
| 49 |
-
transform: translateY(-
|
|
|
|
| 50 |
}
|
| 51 |
-
/*
|
| 52 |
.status-badge {
|
| 53 |
display: inline-flex;
|
| 54 |
align-items: center;
|
| 55 |
justify-content: center;
|
| 56 |
-
padding: 0.
|
| 57 |
border-radius: 9999px;
|
| 58 |
-
font-size: 0.
|
| 59 |
font-weight: 600;
|
| 60 |
text-transform: uppercase;
|
| 61 |
letter-spacing: 0.05em;
|
|
|
|
| 62 |
}
|
| 63 |
|
| 64 |
.status-badge.compliant {
|
| 65 |
-
background-color:
|
| 66 |
-
color:
|
|
|
|
| 67 |
}
|
| 68 |
|
| 69 |
.status-badge.non-compliant {
|
| 70 |
-
background-color:
|
| 71 |
-
color:
|
|
|
|
| 72 |
}
|
| 73 |
-
|
| 74 |
-
/* Table styles */
|
| 75 |
table {
|
| 76 |
width: 100%;
|
| 77 |
-
border-collapse:
|
|
|
|
| 78 |
}
|
| 79 |
|
| 80 |
th {
|
| 81 |
text-align: left;
|
| 82 |
-
padding: 1rem;
|
| 83 |
font-weight: 600;
|
| 84 |
color: #94a3b8;
|
| 85 |
-
background-color:
|
|
|
|
|
|
|
|
|
|
| 86 |
border-bottom: 1px solid #334155;
|
| 87 |
}
|
| 88 |
|
| 89 |
td {
|
| 90 |
-
padding: 1rem;
|
| 91 |
-
border-bottom: 1px solid
|
| 92 |
-
color: #
|
|
|
|
| 93 |
}
|
| 94 |
|
| 95 |
tr:hover td {
|
| 96 |
-
background-color:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
}
|
|
|
|
| 1 |
|
| 2 |
/* Base styles */
|
| 3 |
body {
|
| 4 |
+
color: #f8fafc;
|
| 5 |
+
background-color: #020617;
|
| 6 |
min-height: 100vh;
|
| 7 |
font-family: 'Inter', sans-serif;
|
| 8 |
+
line-height: 1.6;
|
| 9 |
}
|
| 10 |
|
| 11 |
+
/* Layout improvements */
|
| 12 |
+
main {
|
| 13 |
+
padding: 2rem 3rem;
|
| 14 |
+
margin-left: 280px; /* Account for sidebar */
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
/* Modern spacing system */
|
| 18 |
+
:root {
|
| 19 |
+
--space-xs: 0.25rem;
|
| 20 |
+
--space-sm: 0.5rem;
|
| 21 |
+
--space-md: 1rem;
|
| 22 |
+
--space-lg: 1.5rem;
|
| 23 |
+
--space-xl: 2rem;
|
| 24 |
+
--space-2xl: 3rem;
|
| 25 |
+
--space-3xl: 4rem;
|
| 26 |
+
}
|
| 27 |
+
/* Modern scrollbars */
|
| 28 |
::-webkit-scrollbar {
|
| 29 |
width: 6px;
|
| 30 |
height: 6px;
|
|
|
|
| 42 |
::-webkit-scrollbar-thumb:hover {
|
| 43 |
background: #475569;
|
| 44 |
}
|
| 45 |
+
/* Modern inputs */
|
|
|
|
| 46 |
input, select {
|
| 47 |
background-color: #1e293b;
|
| 48 |
border: 1px solid #334155;
|
| 49 |
+
color: #f8fafc;
|
| 50 |
+
border-radius: 0.5rem;
|
| 51 |
+
padding: 0.625rem 1rem;
|
| 52 |
+
font-size: 0.9375rem;
|
| 53 |
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
| 54 |
+
width: 100%;
|
| 55 |
}
|
| 56 |
|
| 57 |
input:focus, select:focus {
|
| 58 |
outline: none;
|
| 59 |
+
border-color: #60a5fa;
|
| 60 |
+
box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
|
| 61 |
+
background-color: #1e293b;
|
| 62 |
}
|
| 63 |
+
/* Modern buttons */
|
|
|
|
| 64 |
button {
|
| 65 |
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
| 66 |
+
border-radius: 0.75rem;
|
| 67 |
+
padding: 0.75rem 1.5rem;
|
| 68 |
+
font-weight: 500;
|
| 69 |
+
display: inline-flex;
|
| 70 |
+
align-items: center;
|
| 71 |
+
gap: 0.5rem;
|
| 72 |
+
border: none;
|
| 73 |
+
cursor: pointer;
|
| 74 |
}
|
| 75 |
|
| 76 |
button:hover {
|
| 77 |
+
transform: translateY(-2px);
|
| 78 |
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
| 79 |
}
|
| 80 |
+
/* Modern status badges */
|
| 81 |
.status-badge {
|
| 82 |
display: inline-flex;
|
| 83 |
align-items: center;
|
| 84 |
justify-content: center;
|
| 85 |
+
padding: 0.375rem 0.875rem;
|
| 86 |
border-radius: 9999px;
|
| 87 |
+
font-size: 0.8125rem;
|
| 88 |
font-weight: 600;
|
| 89 |
text-transform: uppercase;
|
| 90 |
letter-spacing: 0.05em;
|
| 91 |
+
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
|
| 92 |
}
|
| 93 |
|
| 94 |
.status-badge.compliant {
|
| 95 |
+
background-color: rgba(16, 185, 129, 0.15);
|
| 96 |
+
color: #34d399;
|
| 97 |
+
box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.2);
|
| 98 |
}
|
| 99 |
|
| 100 |
.status-badge.non-compliant {
|
| 101 |
+
background-color: rgba(239, 68, 68, 0.15);
|
| 102 |
+
color: #f87171;
|
| 103 |
+
box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.2);
|
| 104 |
}
|
| 105 |
+
/* Modern table styles */
|
|
|
|
| 106 |
table {
|
| 107 |
width: 100%;
|
| 108 |
+
border-collapse: separate;
|
| 109 |
+
border-spacing: 0;
|
| 110 |
}
|
| 111 |
|
| 112 |
th {
|
| 113 |
text-align: left;
|
| 114 |
+
padding: 1rem 1.25rem;
|
| 115 |
font-weight: 600;
|
| 116 |
color: #94a3b8;
|
| 117 |
+
background-color: rgba(30, 41, 59, 0.8);
|
| 118 |
+
backdrop-filter: blur(8px);
|
| 119 |
+
position: sticky;
|
| 120 |
+
top: 0;
|
| 121 |
border-bottom: 1px solid #334155;
|
| 122 |
}
|
| 123 |
|
| 124 |
td {
|
| 125 |
+
padding: 1rem 1.25rem;
|
| 126 |
+
border-bottom: 1px solid rgba(51, 65, 85, 0.5);
|
| 127 |
+
color: #f8fafc;
|
| 128 |
+
transition: background-color 0.2s ease;
|
| 129 |
}
|
| 130 |
|
| 131 |
tr:hover td {
|
| 132 |
+
background-color: rgba(30, 41, 59, 0.5);
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
/* Modern card shadows */
|
| 136 |
+
.stat-card {
|
| 137 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
|
| 138 |
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.stat-card:hover {
|
| 142 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
| 143 |
+
transform: translateY(-2px);
|
| 144 |
}
|