-
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathindex.html
More file actions
356 lines (317 loc) · 9.29 KB
/
index.html
File metadata and controls
356 lines (317 loc) · 9.29 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
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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Apache2 - Home Assistant App</title>
<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=Outfit:wght@300;400;600;700&display=swap"
rel="stylesheet"
/>
<style>
:root {
--primary: #ef4444;
--primary-dark: #b91c1c;
--bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
--glass-bg: rgba(255, 255, 255, 0.03);
--glass-border: rgba(255, 255, 255, 0.1);
--glass-blur: blur(12px);
--text: #f8fafc;
--text-muted: #94a3b8;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Outfit', sans-serif;
background: var(--bg-gradient);
background-attachment: fixed;
color: var(--text);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
line-height: 1.6;
}
.container {
max-width: 900px;
width: 100%;
display: flex;
flex-direction: column;
gap: 2rem;
animation: fadeIn 0.8s ease-out;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.glass {
background: var(--glass-bg);
backdrop-filter: var(--glass-blur);
-webkit-backdrop-filter: var(--glass-blur);
border: 1px solid var(--glass-border);
border-radius: 24px;
padding: 2.5rem;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 2rem;
}
.header-content h1 {
font-size: 3rem;
font-weight: 700;
background: linear-gradient(to right, #fff, #94a3b8);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 0.5rem;
}
.header-content p {
color: var(--text-muted);
font-size: 1.25rem;
font-weight: 300;
}
.status-badge {
display: flex;
align-items: center;
gap: 0.75rem;
background: rgba(34, 197, 94, 0.1);
border: 1px solid rgba(34, 197, 94, 0.2);
padding: 0.75rem 1.5rem;
border-radius: 100px;
color: #4ade80;
font-weight: 600;
font-size: 0.9rem;
white-space: nowrap;
}
.status-dot {
width: 10px;
height: 10px;
background: #22c55e;
border-radius: 50%;
box-shadow: 0 0 12px #22c55e;
animation: pulse 2s infinite;
}
@keyframes pulse {
0% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
}
70% {
transform: scale(1);
box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
}
100% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
}
}
.grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1.5rem;
}
.card {
background: rgba(255, 255, 255, 0.02);
border: 1px solid var(--glass-border);
padding: 1.5rem;
border-radius: 20px;
transition: all 0.3s ease;
}
.card:hover {
background: rgba(255, 255, 255, 0.05);
transform: translateY(-4px);
border-color: rgba(255, 255, 255, 0.2);
}
.card-label {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.1em;
color: var(--text-muted);
margin-bottom: 0.5rem;
font-weight: 600;
}
.card-value {
font-size: 1.5rem;
font-weight: 600;
color: #fff;
}
.content-section {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.content-section h2 {
font-size: 1.75rem;
color: var(--primary);
font-weight: 600;
}
.content-section p {
color: var(--text-muted);
font-size: 1.1rem;
}
.code-box {
background: rgba(0, 0, 0, 0.3);
padding: 1rem 1.5rem;
border-radius: 12px;
font-family: 'Courier New', monospace;
color: var(--primary);
border: 1px solid rgba(239, 68, 68, 0.2);
display: inline-block;
}
.links-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
margin-top: 1rem;
}
.btn {
display: flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
background: rgba(255, 255, 255, 0.05);
border: 1px solid var(--glass-border);
padding: 1rem;
border-radius: 16px;
color: #fff;
text-decoration: none;
font-weight: 600;
transition: all 0.3s ease;
}
.btn:hover {
background: var(--primary);
border-color: var(--primary);
transform: scale(1.02);
}
.footer {
text-align: center;
color: var(--text-muted);
font-size: 0.875rem;
margin-top: 1rem;
}
@media (max-width: 768px) {
.grid,
.links-grid {
grid-template-columns: 1fr;
}
.header {
flex-direction: column;
align-items: flex-start;
}
.header-content h1 {
font-size: 2.25rem;
}
}
</style>
</head>
<body>
<div class="container">
<header class="glass header">
<div class="header-content">
<h1>Apache2</h1>
<p>Welcome to your web server</p>
</div>
<div class="status-badge">
<div class="status-dot"></div>
SERVER RUNNING
</div>
</header>
<section class="grid">
<div class="card glass">
<div class="card-label">Server Type</div>
<div class="card-value">Apache</div>
</div>
<div class="card glass">
<div class="card-label">Version</div>
<div class="card-value" id="apache-version">2.4.x</div>
</div>
<div class="card glass">
<div class="card-label">Page Loaded</div>
<div class="card-value" id="server-uptime">0s</div>
</div>
<div class="card glass">
<div class="card-label">Load Time</div>
<div class="card-value" id="load-time">0ms</div>
</div>
</section>
<main class="glass content-section">
<h2>Success!</h2>
<p>
The Apache HTTP server is working correctly. This is a placeholder page displayed because
no content was found in your data directory.
</p>
<p>
To serve your own website, replace the contents of the following directory with your
files:
</p>
<div>
<span class="code-box" id="doc-root">/share/htdocs</span>
</div>
<h2 style="margin-top: 1rem">Quick Links</h2>
<div class="links-grid">
<a href="https://github.com/FaserF/hassio-addons" target="_blank" class="btn">
Repository
</a>
<a
href="https://github.com/FaserF/hassio-addons/tree/master/apache2"
target="_blank"
class="btn"
>
Documentation
</a>
<a href="https://github.com/FaserF/hassio-addons/issues" target="_blank" class="btn">
Support
</a>
</div>
</main>
<footer class="footer">Apache2 Home Assistant App by FaserF</footer>
</div>
<script>
// Try to get Apache version from server headers
fetch(window.location.href, { method: 'HEAD' })
.then((response) => {
const server = response.headers.get('server');
if (server && server.includes('Apache')) {
document.getElementById('apache-version').textContent = server
.replace('Apache/', '')
.split(' ')[0];
}
})
.catch(() => {});
// Set local document root based on presumed config
const path = window.location.pathname;
if (path.includes('apache2-minimal')) {
document.getElementById('doc-root').textContent = '/share/apache2';
}
// Page metrics logic
const startTime = Date.now();
setInterval(() => {
const seconds = Math.floor((Date.now() - startTime) / 1000);
const mins = Math.floor(seconds / 60);
const secs = seconds % 60;
document.getElementById('server-uptime').textContent =
mins > 0 ? `${mins}m ${secs}s` : `${secs}s`;
}, 1000);
// Calculate load time
window.addEventListener('load', () => {
const [entry] = performance.getEntriesByType('navigation');
const loadTime = entry ? entry.duration : performance.now();
document.getElementById('load-time').textContent = `${Math.round(loadTime)}ms`;
});
</script>
</body>
</html>