Bit of code cleanup and layout fix to button row

pull/3/head
askpatrickw 2022-09-13 21:51:54 -07:00
rodzic 25bae648e7
commit 96c9eaafe9
2 zmienionych plików z 191 dodań i 174 usunięć

Wyświetl plik

@ -1,33 +1,4 @@
<?php include 'header.php' ?> <?php include 'header.php' ?>
<!---
<html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<LINK href="styles/simple.css" rel="stylesheet" type="text/css">
<title>DigiPi </title>
<body style="position: relative; height: 100%; width: 100%; overflow: hidden;">
<table width=400 >
<tr>
<td width=10% bgcolor="lightgrey">
<font size=+3><strong>DigiPi</strong> </font>
</td>
<td width=10% bgcolor="lightgrey" >
<img align=right height=40px src="radio.png">
</td>
</tr>
</table>
<br/>
-->
<!---
<h1><strong>DigiPi</strong></h1>
--->
<form action="index.php" method="post"> <form action="index.php" method="post">
<?php <?php
@ -47,7 +18,6 @@ if (isset($_POST["tnc"])) {
} }
} }
if (isset($_POST["digipeater"])) { if (isset($_POST["digipeater"])) {
$submit = $_POST["digipeater"]; $submit = $_POST["digipeater"];
if ( $submit == 'on' ) { if ( $submit == 'on' ) {
@ -548,79 +518,83 @@ $output = shell_exec('sudo systemctl reset-failed pat 2> /dev/null');
$output = shell_exec('sudo systemctl reset-failed js8call 2> /dev/null'); $output = shell_exec('sudo systemctl reset-failed js8call 2> /dev/null');
?> ?>
</table> </table>
<br/> <br/>
<br/> <br/>
<!--<table cellpadding="4" bgcolor="#dddddd" border="1" style="border-width:1px;border-color:black; border-collapse:collapse;" > -->
<table> <table>
<tr> <tr>
<td width="100px"> <td width="100px">
<script language="JavaScript"> <script language="JavaScript">
document.write('<a href="' + window.location.protocol + '//' + window.location.hostname + ':8080' + '" target="new" title="Pat Email Client"><strong>PatEmail</strong></a> ' ); document.write('<a href="' + window.location.protocol + '//' + window.location.hostname + ':8080' + '" target="new" title="Pat Email Client">PatEmail</a> ' );
</script> </script>
</td> </td>
<td width="100px"> <td width="100px">
<a href="axcall.php" target="new" title="Connect to radio/BBS"><strong>AXCall</strong></a> <a href="axcall.php" target="new" title="Connect to radio/BBS">AXCall</a>
</td> </td>
<td width="100px"> <td width="100px">
<a href="/js8" target="js8" title="Display JS8Call screen"><strong>JS8Call</strong></a> <a href="/js8" target="js8" title="Display JS8Call screen">JS8Call</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<a href="/ft8" target="ft8" title="Dispaly FT8 screen"><strong>WSJTX FT8</strong> <a href="/ft8" target="ft8" title="Dispaly FT8 screen">WSJTX FT8</a>
</td> </td>
<td> <td>
<a href="/tv" target="tv" title="Dispaly SSTV screen"><strong>SSTV</strong> <a href="/tv" target="tv" title="Dispaly SSTV screen">SSTV</a>
</td> </td>
<td> <td>
<a href="/fld" target="fld" title="Display FLDigi screen"><strong>FLDigi</strong></a> <a href="/fld" target="fld" title="Display FLDigi screen">FLDigi</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<a href="/wifi.php" title="Setup Wifi connection"><strong>Wifi</strong></a> <a href="/wifi.php" title="Setup Wifi connection">Wifi</a>
</td> </td>
<td> <td>
<a href=/shell.php target="shell" title="Command prompt"><strong>Shell</strong></a> <a href=/shell.php target="shell" title="Command prompt">Shell</a>
</td> </td>
<td> <td>
<a href=/log.php title="Direwolf Log" target="log"><strong>PktLog</strong></a> <a href=/log.php title="Direwolf Log" target="log">PktLog</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td > <td >
<a href=/syslog.php title="System log file" target="syslog"><strong>SysLog</strong></a> <a href=/syslog.php title="System log file" target="syslog">SysLog</a>
</td> </td>
<td > <td >
<a href=/index.php><strong>Refresh</strong></a> <a href=/index.php>Refresh</a>
</td> </td>
<td colspan="1"> <td colspan="1">
<a href=/help.php><strong>Help</strong></a> <a href=/help.php>Help</a>
</td> </td>
</tr> </tr>
<?php <?php
if (!file_exists("/var/cache/digipi/localized.txt")) { if (!file_exists("/var/cache/digipi/localized.txt")) {
echo '<tr><td colspan=3><a href="/setup.php" title="REQUIRED! Enter your callsign and other local information" " target="setup"><font color="green"><strong>Initialize</strong></font></a> </td></tr>'; echo '<tr><td colspan=3><a href="/setup.php" title="REQUIRED! Enter your callsign and other local information" " target="setup"><font color="green">Initialize</font></a> </td></tr>';
} }
?> ?>
</table> </table>
</table>
<br/><br/> <br/><br/>
<table class="bottom-nav">
<tr>
<td class="bottom-nav">
<input type="submit" name="reboot" value="Reboot"> <input type="submit" name="reboot" value="Reboot">
&nbsp; </td>
<td class="bottom-nav">
<input type="submit" name="shutdown" value="Shutdown"> <input type="submit" name="shutdown" value="Shutdown">
&nbsp; </td>
<td class="bottom-nav">
<input title="Write current application configurations (ft8, js8call, etc) to SD card" type="submit" name="save" value="Save Configs"> <input title="Write current application configurations (ft8, js8call, etc) to SD card" type="submit" name="save" value="Save Configs">
&nbsp; </td>
</tr>
</table>
<br/><br/> <br/><br/>
<small>1.6-2 KM6LYW ©2022</small> <small>1.6-2 KM6LYW ©2022</small>
@ -631,7 +605,7 @@ $output = shell_exec('sudo systemctl reset-failed js8call 2> /dev/null');
if (isset($_POST["reboot"])) { if (isset($_POST["reboot"])) {
$submit = $_POST["reboot"]; $submit = $_POST["reboot"];
if ( $submit == 'Reboot' ) { if ( $submit == 'Reboot' ) {
echo "<br/><br/><strong><font color=red>Restarting DigiPi...</font></strong><br/> "; echo "<br/><br/><font color=red>Restarting DigiPi...</font><br/> ";
# if (isset($_SERVER['SERVER_ADDR'])) { # if (isset($_SERVER['SERVER_ADDR'])) {
# $IP = $_SERVER['SERVER_ADDR']; # $IP = $_SERVER['SERVER_ADDR'];
# } # }
@ -648,7 +622,7 @@ if (isset($_POST["reboot"])) {
if (isset($_POST["shutdown"])) { if (isset($_POST["shutdown"])) {
$submit = $_POST["shutdown"]; $submit = $_POST["shutdown"];
if ( $submit == 'Shutdown' ) { if ( $submit == 'Shutdown' ) {
echo "<br/><br/><strong><font color=red>Shutting down DigiPi...</font></strong><br/> "; echo "<br/><br/><font color=red>Shutting down DigiPi...</font><br/> ";
$output = shell_exec("sudo killall direwatch.py"); $output = shell_exec("sudo killall direwatch.py");
$output = shell_exec("sudo /home/pi/digibanner.py -b Digipi -s Shutdown..."); $output = shell_exec("sudo /home/pi/digibanner.py -b Digipi -s Shutdown...");
$output = shell_exec("sudo /sbin/shutdown -h 0"); $output = shell_exec("sudo /sbin/shutdown -h 0");
@ -659,10 +633,10 @@ if (isset($_POST["shutdown"])) {
if (isset($_POST["save"])) { if (isset($_POST["save"])) {
$submit = $_POST["save"]; $submit = $_POST["save"];
if ( $submit == 'Save Configs' ) { if ( $submit == 'Save Configs' ) {
echo "<br/><br/><strong><font color=red>Saving configuration...</font></strong><br/> "; echo "<br/><br/><font color=red>Saving configuration...</font><br/> ";
$output = shell_exec("sudo -i -u pi /home/pi/saveconfigs.sh"); $output = shell_exec("sudo -i -u pi /home/pi/saveconfigs.sh");
#echo $output; #echo $output;
echo "<br/><br/><strong><font color=red>Please reboot or shutdown gracefully.</font></strong><br/> "; echo "<br/><br/><font color=red>Please reboot or shutdown gracefully.</font><br/> ";
} }
} }
@ -670,10 +644,9 @@ if (isset($_POST["save"])) {
<br/> <br/>
<br/> <br/>
<!-- EASTER EGG -->
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/dot"><font size="+3" color="#eeeeee">.</font></a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/dot"><font size="+3" color="#eeeeee">.</font></a>
</form> </form>
</font>
</body> </body>
</html> </html>

Wyświetl plik

@ -2,8 +2,7 @@
Base styles Base styles
------------------------*/ ------------------------*/
body body {
{
margin: 0; margin: 0;
padding: 5; padding: 5;
color: #333; color: #333;
@ -14,45 +13,69 @@ body
overflow: initial !important; overflow: initial !important;
} }
h1,h2,h3,h4,h5,h6 h1,
{ h2,
h3,
h4,
h5,
h6 {
margin: 0 0 .5em; margin: 0 0 .5em;
font-weight: 500; font-weight: 500;
line-height: 1.1; line-height: 1.1;
font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif; font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif;
} }
h1 { font-size: 2.25em; } /* 36px */ h1 {
h2 { font-size: 1.75em; } /* 28px */ font-size: 2.25em;
h3 { font-size: 1.375em; } /* 22px */ }
h4 { font-size: 1.125em; } /* 18px */
h5 { font-size: 1em; } /* 16px */
h6 { font-size: .875em; } /* 14px */
p /* 36px */
{ h2 {
font-size: 1.75em;
}
/* 28px */
h3 {
font-size: 1.375em;
}
/* 22px */
h4 {
font-size: 1.125em;
}
/* 18px */
h5 {
font-size: 1em;
}
/* 16px */
h6 {
font-size: .875em;
}
/* 14px */
p {
margin: 0 0 1.5em; margin: 0 0 1.5em;
line-height: 1.5; line-height: 1.5;
font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif; font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif;
} }
div div {
{
margin: 0 0 1.5em; margin: 0 0 1.5em;
line-height: 1.5; line-height: 1.5;
font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif; font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif;
} }
blockquote blockquote {
{
padding: 1em 2em; padding: 1em 2em;
margin: 0 0 2em; margin: 0 0 2em;
border-left: 5px solid #eee; border-left: 5px solid #eee;
} }
hr hr {
{
height: 0; height: 0;
margin-top: 1em; margin-top: 1em;
margin-bottom: 2em; margin-bottom: 2em;
@ -60,16 +83,15 @@ hr
border-top: 1px solid #ddd; border-top: 1px solid #ddd;
} }
table table {
{
background-color: transparent; background-color: transparent;
border-spacing: 0; border-spacing: 0;
border-collapse: collapse; border-collapse: collapse;
border-top: 1px solid #ddd; border-top: 1px solid #ddd;
} }
th, td th,
{ td {
padding: .2em 1em; padding: .2em 1em;
vertical-align: top; vertical-align: top;
text-align: left; text-align: left;
@ -77,12 +99,39 @@ th, td
font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif; font: 1em/1.2 "Arial", Arial, Helvetica, Geneva, sans-serif;
} }
a { text-decoration:none; } table.bottom-nav,
a:link { color: royalblue; } .bottom-nav th,
a:visited { color: royalblue; } .bottom-nav td {
a:focus { color: black; } background-color: transparent;
a:hover { color: green; } border-spacing: 0;
a:active { color: red; } border-collapse: collapse;
border-top: none;
border-bottom: none;
}
a {
text-decoration: none;
}
a:link {
color: royalblue;
}
a:visited {
color: royalblue;
}
a:focus {
color: black;
}
a:hover {
color: green;
}
a:active {
color: red;
}
@ -90,42 +139,39 @@ a:active { color: red; }
Layout styles Layout styles
------------------------*/ ------------------------*/
.container .container {
{
max-width: 70em; max-width: 70em;
margin: 0 auto; margin: 0 auto;
} }
.header .header {
{
color: #fff; color: #fff;
background: #999; background: #999;
padding: 1em 1.25em; padding: 1em 1.25em;
} }
.header-heading { margin: 0; } .header-heading {
margin: 0;
}
.nav-bar .nav-bar {
{
background: #000; background: #000;
padding: 0; padding: 0;
} }
.content .content {
{
/* overflow: hidden; --*/ /* overflow: hidden; --*/
overflow: scroll; overflow: scroll;
padding: 1em 1.25em; padding: 1em 1.25em;
background-color: #fff; background-color: #fff;
} }
.main, .aside .main,
{ .aside {
margin-bottom: 1em; margin-bottom: 1em;
} }
.footer .footer {
{
color: #fff; color: #fff;
background: #000; background: #000;
padding: 1em 1.25em; padding: 1em 1.25em;
@ -135,21 +181,18 @@ Layout styles
Nav Nav
------------------------*/ ------------------------*/
.nav .nav {
{
margin: 0; margin: 0;
padding: 0; padding: 0;
list-style: none; list-style: none;
} }
.nav li .nav li {
{
display: inline; display: inline;
margin: 0; margin: 0;
} }
.nav a .nav a {
{
display: block; display: block;
padding: .7em 1.25em; padding: .7em 1.25em;
color: #fff; color: #fff;
@ -157,23 +200,25 @@ Nav
border-bottom: 1px solid gray; border-bottom: 1px solid gray;
} }
.nav a:link { color: white; } .nav a:link {
.nav a:visited { color: white; } color: white;
}
.nav a:focus .nav a:visited {
{ color: white;
}
.nav a:focus {
color: black; color: black;
background-color: white; background-color: white;
} }
.nav a:hover .nav a:hover {
{
color: white; color: white;
background-color: green; background-color: green;
} }
.nav a:active .nav a:active {
{
color: white; color: white;
background-color: red; background-color: red;
} }
@ -182,10 +227,11 @@ Nav
Single styles Single styles
------------------------*/ ------------------------*/
.img-responsive { max-width: 100%; } .img-responsive {
max-width: 100%;
}
.btn .btn {
{
color: #fff !important; color: #fff !important;
background-color: royalblue; background-color: royalblue;
border-color: #222; border-color: #222;
@ -203,46 +249,39 @@ Single styles
text-decoration: none; text-decoration: none;
} }
.btn:hover .btn:hover {
{
color: #fff !important; color: #fff !important;
background-color: green; background-color: green;
} }
.btn:focus .btn:focus {
{
color: #fff !important; color: #fff !important;
background-color: black; background-color: black;
} }
.btn:active .btn:active {
{
color: #fff !important; color: #fff !important;
background-color: red; background-color: red;
} }
.table .table {
{
width: 100%; width: 100%;
max-width: 100%; max-width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
} }
.list-unstyled .list-unstyled {
{
padding-left: 0; padding-left: 0;
list-style: none; list-style: none;
} }
.list-inline .list-inline {
{
padding-left: 0; padding-left: 0;
margin-left: -5px; margin-left: -5px;
list-style: none; list-style: none;
} }
.list-inline > li .list-inline>li {
{
display: inline-block; display: inline-block;
padding-right: 5px; padding-right: 5px;
padding-left: 5px; padding-left: 5px;
@ -252,37 +291,42 @@ Single styles
Wide styles Wide styles
------------------------*/ ------------------------*/
@media (min-width: 55em) @media (min-width: 55em) {
{ .header {
.header { padding: 1.5em 3em; } padding: 1.5em 3em;
.nav-bar { padding: 1em 3em; } }
.content { padding: 2em 3em; }
.main .nav-bar {
{ padding: 1em 3em;
}
.content {
padding: 2em 3em;
}
.main {
float: left; float: left;
width: 65%; width: 65%;
margin-right: 5%; margin-right: 5%;
margin-bottom: 1em; margin-bottom: 1em;
} }
.aside .aside {
{
float: left; float: left;
width: 30%; width: 30%;
margin-bottom: 1em; margin-bottom: 1em;
} }
.footer { padding: 2em 3em; } .footer {
padding: 2em 3em;
}
.nav li .nav li {
{
display: inline; display: inline;
margin: 0 1em 0 0; margin: 0 1em 0 0;
} }
.nav a .nav a {
{
display: inline; display: inline;
padding: 0; padding: 0;
border-bottom: 0; border-bottom: 0;