-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathadmin-panel.html
More file actions
207 lines (177 loc) · 4.61 KB
/
Copy pathadmin-panel.html
File metadata and controls
207 lines (177 loc) · 4.61 KB
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
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Panel Admin — Estadísticas</title>
<style>
body {
margin: 0;
font-family: Verdana, Geneva, Tahoma, sans-serif;
background: #e8e8e8;
}
.container {
display: flex;
max-width: 1200px;
margin: 20px auto;
background: #f4f7f2;
border: 2px solid #2b5f2b;
border-radius: 6px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
min-height: 500px;
}
.sidebar {
width: 220px;
background: #d7f0d7;
border-right: 2px solid #2b5f2b;
padding: 16px;
}
.sidebar h3 {
margin-top: 0;
color: #144014;
font-size: 18px;
}
.sidebar p {
margin: 6px 0;
}
.sidebar ul {
padding-left: 18px;
}
.main {
flex: 1;
padding: 20px;
}
h2 {
color: #1b5b1b;
border-bottom: 1px dashed #9ccf9c;
padding-bottom: 6px;
margin-top: 0;
}
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 18px;
margin-top: 20px;
}
.card {
background: #bce5bc;
border: 1px solid #2b5f2b;
border-radius: 6px;
padding: 16px;
min-height: 140px;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.card h3 {
margin: 0 0 12px 0;
color: #144014;
}
.stat-number {
font-size: 32px;
font-weight: bold;
margin-bottom: 8px;
}
.progress-bar {
background: #d7f0d7;
border-radius: 6px;
overflow: hidden;
height: 18px;
}
.progress {
height: 100%;
background: #2b5f2b;
width: 0%;
transition: width 1s ease-in-out;
text-align: right;
color: #fff;
padding-right: 6px;
font-size: 12px;
line-height: 18px;
font-weight: bold;
}
footer {
text-align: center;
padding: 10px;
margin-top: 20px;
font-size: 12px;
color: #444;
}
</style>
</head>
<body>
<div class="container">
<div class="sidebar">
<h3>Usuario</h3>
<p id="usernameDisplay"></p>
<hr>
<p>Opciones:</p>
<ul>
<li>Ver estadísticas</li>
</ul>
</div>
<div class="main">
<h2>Estadísticas del Proyecto</h2>
<div class="stats-grid">
<div class="card">
<h3>Total de visitas</h3>
<div class="stat-number" id="visitas">0</div>
</div>
<div class="card">
<h3>Usuarios a los que les ha gustado</h3>
<div class="progress-bar">
<div class="progress" id="gustado">0%</div>
</div>
</div>
<div class="card">
<h3>Usuarios considerando pasarse a Linux</h3>
<div class="progress-bar">
<div class="progress" id="considerando">0%</div>
</div>
</div>
<div class="card">
<h3>Usuarios que ya usan Linux</h3>
<div class="progress-bar">
<div class="progress" id="usando">0%</div>
</div>
</div>
</div>
</div>
</div>
<footer>© 2025 Enciclopedia Pinux — Panel Admin</footer>
<script>
if (!sessionStorage.getItem("user")) {
window.location.href = "admin-login.html";
}
document.getElementById("usernameDisplay").textContent =
sessionStorage.getItem("user") || "Invitado";
const stats = {
visitas: 2489,
gustado: 80,
considerando: 39,
usando: 15
};
let visitasActuales = 0;
const visitasElem = document.getElementById("visitas");
const incremento = Math.ceil(stats.visitas / 100);
const intervalVisitas = setInterval(() => {
if (visitasActuales < stats.visitas) {
visitasActuales += incremento;
if (visitasActuales > stats.visitas) visitasActuales = stats.visitas;
visitasElem.textContent = visitasActuales;
} else {
clearInterval(intervalVisitas);
}
}, 30);
const progressElements = ["gustado", "considerando", "usando"];
progressElements.forEach(id => {
const elem = document.getElementById(id);
setTimeout(() => {
elem.style.width = stats[id] + "%";
elem.textContent = stats[id] + "%";
}, 300);
});
</script>
</body>
</html>