Merge pull request #1052 from caco3/re-aranged-menus3

moved the index-configure.html menus to the index.html page
This commit is contained in:
jomjol
2022-09-24 06:32:38 +02:00
committed by GitHub
3 changed files with 200 additions and 337 deletions

View File

@@ -5,115 +5,29 @@
<title>AI on the edge</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- <link rel="stylesheet" href="style.css" type="text/css" > -->
<style>
/* Older Firmware versions (11.2.0 and older) do not support css files, therefore we need to keep it integrated for now! */
body, html {
width: 100%;
height: 100%;
min-height: 800px;
margin: 0px 0px 0px 2px;
padding: 0;
font-family: arial;
width: fit-content;
}
.main {
display: flex;
width: 100%;
height: 100%;
flex-direction: column;
overflow: hidden;
}
.iframe {
flex-grow: 1;
margin: 5px 7px 4px 0px;
padding: 0;
border: 2px solid black;
}
h1 {
font-size: 2em;
margin-block-end: 0.3em;
}
h2 {
font-size: 1.5em;
margin-block-start: 0.3em;
}
h3 {
font-size: 1.2em;
}
p {
font-size: 1em;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
width:1000px;
}
li {
float: left;
font-family: arial;
font-size: 18px;
}
li a, .dropbtn {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover, .dropdown:hover .dropbtn {
background-color: red;
}
li.dropdown {
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
font-family: arial;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
color: white;
background-color: red;
}
.dropdown:hover .dropdown-content {
display: block;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" >
<script type="text/javascript" src="common.js"></script>
<script type="text/javascript" src="gethost.js"></script>
<script type="text/javascript" src="readconfigcommon.js"></script>
<script type="text/javascript" src="readconfigparam.js"></script>
<script>
async function loadPage(page) {
document.getElementById('maincontent').src = page;
[].forEach.call(document.querySelectorAll('.submenu'), function (el) {
el.style.visibility = 'hidden';
});
}
function resetMenu() {
[].forEach.call(document.querySelectorAll('.submenu'), function (el) {
el.style.visibility = 'visible';
});
}
</script>
</head>
<body>
@@ -126,28 +40,40 @@ li.dropdown {
</td></tr>
</table>
<ul>
<li><a href="#"onclick="document.getElementById('maincontent').src = '/wasserzaehler_roi.html';">Overview</a></li>
<li class="dropdown">
<a href="javascript:void(0)" class="dropbtn">Configuration</a>
<div class="dropdown-content">
<a href="#"onclick="document.getElementById('maincontent').src = '/prevalue_set.html';">Set Previous Value</a>
<a href="index_configure.html">Edit Configuration</a>
</div>
<div class="menu" onmouseover="resetMenu()">
<ul>
<li><a href="#" onclick="loadPage('wasserzaehler_roi.html');">Overview</a></li>
<li><a>Settings <i class="arrow down"></i></a>
<ul class="submenu">
<li><a href="#" onclick="loadPage('prevalue_set.html');">Set Previous Value</a></li>
<li><a href="#" onclick="loadPage('edit_config_param.html');">Configuration</a></li>
<li><a>Alignment <i class="arrow right"></i></a>
<ul>
<li><a href="#" onclick="loadPage('edit_reference.html');">Reference Image</a></li>
<li><a href="#" onclick="loadPage('edit_alignment.html');">Alignment Marks</a></li>
</ul>
</li>
<li><a><strong>R</strong>egions <strong>O</strong>f <strong>I</strong>nterest <i class="arrow right"></i></a>
<ul>
<li><a href="#" onclick="loadPage('edit_digits.html');">Digital ROIs</a></li>
<li><a href="#" onclick="loadPage('edit_analog.html');">Analog ROIs</a></li>
</ul>
</li>
</ul>
<li><a href="#" onclick="loadPage('wasserzaehler.html?full');">Recognition</a></li>
<li><a href="#" onclick="loadPage('fileserver/');">File Server</a></li>
<li><a>System <i class="arrow down"></i></a>
<ul class="submenu">
<li><a href="#" onclick="loadPage('backup.html');">Backup/Restore</a></li>
<li><a href="#" onclick="loadPage('ota_page.html');">OTA Update</a></li>
<li><a href="#" onclick="loadPage('fileserver/log/message/?readonly=true');">Log Viewer</a></li>
<li><a href="#" onclick="loadPage('reboot_page.html');">Reboot</a></li>
<li><a href="#" onclick="loadPage('info.html');">Info</a></li>
</ul>
</li>
<li><a href="#"onclick="document.getElementById('maincontent').src = '/wasserzaehler.html?full';">Recognition</a></li>
<li><a href="#"onclick="document.getElementById('maincontent').src = '/fileserver/';">File Server</a></li>
<li class="dropdown">
<a href="javascript:void(0)" class="dropbtn">System</a>
<div class="dropdown-content">
<a href="#"onclick="document.getElementById('maincontent').src = '/backup.html';">Backup/Restore</a>
<a href="#"onclick="document.getElementById('maincontent').src = '/ota_page.html';">OTA Update</a>
<a href="#"onclick="document.getElementById('maincontent').src = '/fileserver/log/message/?readonly=true';">Log Viewer</a>
<a href="#"onclick="document.getElementById('maincontent').src = '/reboot_page.html';">Reboot</a>
<a href="#"onclick="document.getElementById('maincontent').src = '/info.html';">Info</a>
</div>
</li>
</ul>
</ul>
</div>
<iframe name="maincontent" class="iframe" id="maincontent" src="wasserzaehler_roi.html"></iframe>

View File

@@ -1,169 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<title>AI on the edge</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- <link rel="stylesheet" href="style.css" type="text/css" > -->
<style>
/* Older Firmware versions (11.2.0 and older) do not support css files, therefore we need to keep it integrated for now! */
body, html {
width: 100%;
height: 100%;
min-height: 800px;
margin: 0px 0px 0px 2px;
padding: 0;
font-family: arial;
width: fit-content;
}
.main {
display: flex;
width: 100%;
height: 100%;
flex-direction: column;
overflow: hidden;
}
.iframe {
flex-grow: 1;
margin: 5px 7px 4px 0px;
padding: 0;
border: 2px solid black;
}
h1 {
font-size: 2em;
margin-block-end: 0.3em;
}
h2 {
font-size: 1.5em;
margin-block-start: 0.3em;
}
h3 {
font-size: 1.2em;
}
p {
font-size: 1em;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
width:1000px;
}
li {
float: left;
font-family: arial;
font-size: 18px;
}
li a, .dropbtn {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover, .dropdown:hover .dropbtn {
background-color: red;
}
li.dropdown {
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
font-family: arial;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
color: white;
background-color: red;
}
.dropdown:hover .dropdown-content {
display: block;
}
</style>
</head>
<body>
<div class="main">
<table style="border: none">
<tr><td style="padding-right: 10px;"><img src="favicon.ico"></td>
<td><h1 id="id_title"> Digitizer - Configure</h1>
<h2>An ESP32 all inclusive neural network recognition system for meter digitalization</h2>
</td></tr>
</table>
<ul>
<li aria-current="page"><a href="index.html">Main Page</a>
<li><a href="#"onclick="document.getElementById('maincontent').src = 'edit_config_param.html';">Configuration</a></li>
<li class="dropdown">
<a href="javascript:void(0)" class="dropbtn">Alignment</a>
<div class="dropdown-content">
<a href="#"onclick="document.getElementById('maincontent').src = 'edit_reference.html';">Reference Image</a>
<a href="#"onclick="document.getElementById('maincontent').src = 'edit_alignment.html';">Alignment Marks</a>
</div>
</li>
<li class="dropdown">
<a href="javascript:void(0)" class="dropbtn">Regions Of Interest (ROI)</a>
<div class="dropdown-content">
<a href="#"onclick="document.getElementById('maincontent').src = 'edit_digits.html';">Digital ROIs</a>
<a href="#"onclick="document.getElementById('maincontent').src = 'edit_analog.html';">Analog ROIs</a>
</div>
</li>
<li class="dropdown">
<a href="javascript:void(0)" class="dropbtn">System</a>
<div class="dropdown-content">
<a href="#"onclick="document.getElementById('maincontent').src = '/backup.html';">Backup/Restore</a>
<a href="#"onclick="document.getElementById('maincontent').src = '/ota_page.html';">OTA Update</a>
<a href="#"onclick="document.getElementById('maincontent').src = '/fileserver/log/message/?readonly=true';">Log Viewer</a>
<a href="#"onclick="document.getElementById('maincontent').src = '/reboot_page.html';">Reboot</a>
<a href="#"onclick="document.getElementById('maincontent').src = '/info.html';">Info</a>
</div>
</li>
</ul>
<iframe name="maincontent" class="iframe" id="maincontent" src="edit_config_param.html"></iframe>
<span id="Version" style="font-size: 10px; margin-top: -5px">Loading version...</span>
<script type="text/javascript" src="common.js"></script>
<script type="text/javascript" src="gethost.js"></script>
<script type="text/javascript">
LoadHostname();
LoadVersion();
</script>
</div>
</body>
</html>

View File

@@ -18,9 +18,9 @@ body, html {
.iframe {
flex-grow: 1;
margin: 5px 7px 4px 0px;
margin: 5px 0px 4px 0px;
padding: 0;
border: 2px solid black;
border: 2px solid #333; /* black */
}
h1 {
@@ -41,60 +41,166 @@ p {
font-size: 1em;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
width:1000px;
.menu {
margin: 0px;
padding: 0px;
font-family: "Arial";
font-size: 18px;
font-weight: bold;
width: 1008px;
background: #333; /* black */
}
li {
float: left;
font-family: arial;
font-size: 18px;
.menu ul {
height: 50px;
list-style: none;
margin: 0;
padding: 0;
}
li a, .dropbtn {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
.menu li {
float: left;
padding: 0px;
}
li a:hover, .dropdown:hover .dropbtn {
background-color: red;
/* Top Menu */
.menu li a {
color: white;
background: #333; /* black */
display: block;
font-weight: normal;
line-height: 50px;
margin: 0px;
padding: 0px 25px;
text-align: center;
text-decoration: none;
}
li.dropdown {
display: inline-block;
/* Selected top menu, 1th submenu */
.menu li a:hover,
.menu ul li:hover a {
background: red;
color: white;
text-decoration: none;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
font-family: arial;
.menu li ul {
background: #f9f9f9; /* light gray */
display: none;
height: auto;
padding: 0px;
margin: 0px;
border: 0px;
position: absolute;
width: 210px;
z-index: 200;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
.menu li:hover ul {
display: block;
}
.dropdown-content a:hover {
color: white;
background-color: red;
.menu li li {
display: block;
float: none;
margin: 0px;
padding: 0px;
width: 210px;
}
.dropdown:hover .dropdown-content {
display: block;
}
/* 1th menu */
.menu li:hover li a {
background: #f9f9f9; /* light gray */
color: #333; /* black */
}
.menu li ul a {
display: block;
height: 50px;
/* font-style: normal; */
margin: 0px;
padding: 0px 10px 0px 15px;
text-align: left;
}
/* Selected 1th menu */
.menu li ul a:hover,
.menu li ul li:hover a {
background: red;
border: 0px;
color: white;
text-decoration: none;
}
.menu p {
clear: left;
}
.menu ul li ul li {
position: relative;
}
.menu ul li ul li ul,
.menu ul li:hover ul li ul {
display: none;
}
.menu ul li ul li:hover ul {
display: block;
position: absolute;
left: 100%;
top: 0;
}
.menu ul li ul li:hover ul li a {
color: #333; /* black */
background: #eeeeee; /*light gray */
}
.menu ul li ul li:hover ul li a:hover {
background: red;
color: white;
}
.arrow {
border: solid #333; /* black */
border-width: 0 3px 3px 0;
display: inline-block;
padding: 3px;
color: white;
}
.right {
transform: rotate(-45deg);
-webkit-transform: rotate(-45deg);
position: absolute;
right: 10px;
top: 20px;
width:0px;
height:0px;
}
.down {
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
border-bottom: solid white;
border-right: solid white;
margin: 0px 0px 2px 5px;
}