modified: data/www/index.html new file: data/www/spectrum.html new file: partitions.csv modified: platformio.ini deleted: src/NoteMappings copy.h modified: src/main.cpp modified: src/web_server.cpp modified: src/web_server.h
101 lines
3.1 KiB
HTML
101 lines
3.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Audio2MIDI</title>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
display: flex;
|
|
height: 100vh;
|
|
font-family: Arial, sans-serif;
|
|
}
|
|
.sidemenu {
|
|
width: 250px;
|
|
background: #2c3e50;
|
|
color: white;
|
|
padding: 20px 0;
|
|
}
|
|
.menu-item {
|
|
padding: 15px 25px;
|
|
cursor: pointer;
|
|
transition: background 0.3s;
|
|
}
|
|
.menu-item:hover {
|
|
background: #34495e;
|
|
}
|
|
.menu-item.active {
|
|
background: #3498db;
|
|
}
|
|
.content {
|
|
flex: 1;
|
|
padding: 20px;
|
|
background: #f8f9fa;
|
|
overflow-y: auto;
|
|
}
|
|
.danger-zone {
|
|
display: none; /* Hide the danger zone since it's no longer needed */
|
|
}
|
|
.danger-btn {
|
|
background: #e74c3c;
|
|
color: white;
|
|
border: none;
|
|
padding: 10px 15px;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
width: 100%;
|
|
margin: 5px 0;
|
|
}
|
|
.danger-btn:hover {
|
|
background: #c0392b;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="sidemenu">
|
|
<div class="menu-item active" data-page="dashboard">Dashboard</div>
|
|
<div class="menu-item" data-page="wifi">WiFi Settings</div>
|
|
<div class="menu-item" data-page="midi">MIDI Config</div>
|
|
<div class="menu-item" data-page="system">System</div>
|
|
</div>
|
|
<div class="content" id="mainContent">
|
|
<iframe id="contentFrame" style="width:100%;height:100%;border:none;"></iframe>
|
|
</div>
|
|
|
|
<script>
|
|
const pages = {
|
|
dashboard: '/dashboard.html',
|
|
wifi: '/wifi.html',
|
|
midi: '/midi.html',
|
|
system: '/system.html',
|
|
spectrum: '/spectrum.html' // Added spectrum page
|
|
};
|
|
|
|
document.querySelectorAll('.menu-item').forEach(item => {
|
|
item.addEventListener('click', () => {
|
|
document.querySelectorAll('.menu-item').forEach(i => i.classList.remove('active'));
|
|
item.classList.add('active');
|
|
const page = item.dataset.page;
|
|
document.getElementById('contentFrame').src = pages[page];
|
|
});
|
|
});
|
|
|
|
// Add spectrum menu item
|
|
const spectrumMenuItem = document.createElement('div');
|
|
spectrumMenuItem.className = 'menu-item';
|
|
spectrumMenuItem.dataset.page = 'spectrum';
|
|
spectrumMenuItem.textContent = 'Spectrum';
|
|
document.querySelector('.sidemenu').appendChild(spectrumMenuItem);
|
|
|
|
spectrumMenuItem.addEventListener('click', () => {
|
|
document.querySelectorAll('.menu-item').forEach(i => i.classList.remove('active'));
|
|
spectrumMenuItem.classList.add('active');
|
|
document.getElementById('contentFrame').src = pages.spectrum;
|
|
});
|
|
|
|
// Load dashboard by default
|
|
document.getElementById('contentFrame').src = pages.dashboard;
|
|
</script>
|
|
</body>
|
|
</html>
|