29 lines
778 B
HTML
29 lines
778 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<link href="/css/nav.css" rel="stylesheet">
|
|
<title>ESP32 AP</title>
|
|
</head>
|
|
<body>
|
|
<div id="navbar"></div>
|
|
<h1>Welcome to ESP32 AP</h1>
|
|
<p>This is a simple web server running on ESP32 in Access Point mode.</p>
|
|
<div id="status"></div>
|
|
<script>
|
|
|
|
fetch('/www/navbar.html')
|
|
.then(response => response.text())
|
|
.then(data => {
|
|
document.getElementById('navbar').innerHTML = data;
|
|
});
|
|
|
|
// Fetch status
|
|
fetch('/api/status')
|
|
.then(response => response.json())
|
|
.then(data => {
|
|
document.getElementById('status').innerHTML =
|
|
`Status: ${data.status}`;
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |