Merge branch 'dl9rdz:devel' into devel

pull/182/head
eben80 2021-09-15 08:34:00 +02:00 zatwierdzone przez GitHub
commit 62eb246959
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 99 dodań i 33 usunięć

Wyświetl plik

@ -10,16 +10,18 @@
<body>
<div class="wrapper"><div class="header">
<h2>rdzTTGOSonde Server</h2>
<div class="tab">
<button class="tablinks" onclick="selTab(event,'QRG')" id="defaultTab">QRG</button>
<button class="tablinks" onclick="selTab(event,'WiFi')">WiFi</button>
<button class="tablinks" onclick="selTab(event,'Data')">Data</button>
<button class="tablinks" onclick="document.location.href='livemap.html'">LiveMap</button>
<button class="tablinks" onclick="selTab(event,'Map')">Map</button>
<button class="tablinks" onclick="selTab(event,'Config')">Config</button>
<button class="tablinks" onclick="selTab(event,'Control')">Control</button>
<button class="tablinks" onclick="selTab(event,'About')">About</button>
<div class="topnav" id="myTopnav">
<a href="#" onclick="selTab(event,'QRG')" class="tablinks" id="defaultTab">QRG</a>
<a href="#" onclick="selTab(event,'WiFi')" class="tablinks">WiFi</a>
<a href="#" onclick="selTab(event,'Data')" class="tablinks">Data</a>
<a href="#" onclick="document.location.href='livemap.html'" class="tablinks">LiveMap</a>
<a href="#" onclick="selTab(event,'Map')" class="tablinks">Map</a>
<a href="#" onclick="selTab(event,'Config')" class="tablinks">Config</a>
<a href="#" onclick="selTab(event,'Control')" class="tablinks">Control</a>
<a href="#" onclick="selTab(event,'About')" class="tablinks">About</a>
<a href="javascript:void(0);" class="icon" onclick="myFunction()">
<span class="hamburger"></span>
</a>
</div>
</div>
@ -102,6 +104,17 @@ function selTab(evt, id) {
var iframe = act.getElementsByTagName("iframe")[0];
iframe.setAttribute("src", link);
}
var x = document.getElementById("myTopnav");
x.className = "topnav";
}
/* Toggle between adding and removing the "responsive" class to topnav when the user clicks on the icon */
function myFunction() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
document.getElementById("defaultTab").click();
</script>

Wyświetl plik

@ -4,6 +4,25 @@ body, html {
font-family: Arial;
}
.hamburger {
position: relative;
display: inline-block;
width: 1.25em;
height: 0.8em;
margin-right: 0.3em;
border-top: 0.2em solid #fff;
border-bottom: 0.2em solid #fff;
}
.hamburger:before {
content: "";
position: absolute;
top: 0.3em;
left: 0px;
width: 100%;
border-top: 0.2em solid #fff;
}
.wrapper {
height: 100%;
display: flex;
@ -32,29 +51,6 @@ td#sfreq {
background-color: #ccc;
}
.tab {
overflow: hidden;
border: 1px solid #ccc;
}
.tab button {
background-color: inherit;
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 10px 10px;
width: 12vw;
transition: 0.3s;
}
.tab button:hover {
background-color: #ddd;
}
.tab button.active {
background-color: #ccc;
}
.content {
display: flex;
flex: 1;
@ -272,3 +268,60 @@ p{
margin-right: 3px;
}
/* Add a black background color to the top navigation */
.topnav {
background-color: #333;
overflow: hidden;
}
/* Style the links inside the navigation bar */
.topnav a {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
/* Change the color of links on hover */
.topnav a:hover {
background-color: #ddd;
color: black;
}
/* Add an active class to highlight the current page */
.topnav a.active {
background-color: #04AA6D;
color: white;
}
/* Hide the link that should open and close the topnav on small screens */
.topnav .icon {
display: none;
}
/* When the screen is less than 600 pixels wide, hide all links, except for the first one ("Home"). Show the link that contains should open and close the topnav (.icon) */
@media screen and (max-width: 600px) {
.topnav a:not(.active) {display: none;}
.topnav a.icon {
float: right;
display: block;
}
}
/* The "responsive" class is added to the topnav with JavaScript when the user clicks on the icon. This class makes the topnav look good on small screens (display the links vertically instead of horizontally) */
@media screen and (max-width: 600px) {
.topnav.responsive {position: relative;}
.topnav.responsive a.icon {
position: absolute;
right: 0;
top: 0;
}
.topnav.responsive a {
float: none;
display: block;
text-align: left;
}
}