This commit is contained in:
2026-07-19 18:01:05 +08:00
commit fe4b286ce1
132 changed files with 25378 additions and 0 deletions
+156
View File
@@ -0,0 +1,156 @@
<?php
/**
* WiFi-config page stylesheet.
*
* Emits CSS to the browser with a `Content-type: text/css` header. Used
* exclusively by admin/wifi.php to style the WiFi configuration UI
* (network list cards, scan results, info panels). Theme colours are
* loaded from /etc/pistar-css.ini (operator-overridable via
* admin/expert/edit_dashboard.php) when that file exists, otherwise
* fall back to the built-in palette below.
*
* The PHP header here is a near-duplicate of css/pistar-css.php's
* theme-load block — kept in lockstep with that file. The CSS body is
* WiFi-specific and intentionally diverges.
*
* Do NOT edit this file by hand. The same long-standing typos in
* variable names ($bannerDropShaddows, $tableHeadDropShaddow) are
* preserved here because the CSS body interpolates them by name —
* see the matching note in css/pistar-css.php.
*/
// Output CSS, not the default text/html.
header('Content-type: text/css');
if (file_exists('/etc/pistar-css.ini')) {
// Load the operator's theme overrides.
$piStarCssFile = '/etc/pistar-css.ini';
if (fopen($piStarCssFile, 'r')) {
$piStarCss = parse_ini_file($piStarCssFile, true);
}
// Map parsed INI values onto the variables the CSS body interpolates.
$backgroundPage = $piStarCss['Background']['Page']; // page background (usually off-white)
$backgroundContent = $piStarCss['Background']['Content']; // white background in the content section
$backgroundBanners = $piStarCss['Background']['Banners']; // the ubiquitous Pi-Star red
$textBanners = $piStarCss['Text']['Banners']; // usually white
$bannerDropShaddows = $piStarCss['Text']['BannersDrop']; // banner drop-shadow colour
$tableHeadDropShaddow = $piStarCss['Tables']['HeadDrop']; // table-header drop-shadow colour
$textContent = $piStarCss['Content']['Text']; // section title colour
$tableRowEvenBg = $piStarCss['Tables']['BgEven']; // table row background (even)
$tableRowOddBg = $piStarCss['Tables']['BgOdd']; // table row background (odd)
} else {
// Fallback palette used when /etc/pistar-css.ini is absent.
$backgroundPage = 'edf0f5'; // page background (usually off-white)
$backgroundContent = 'ffffff'; // white background in the content section
$backgroundBanners = 'dd4b39'; // the ubiquitous Pi-Star red
$textBanners = 'ffffff'; // usually white
$bannerDropShaddows = '303030'; // banner drop-shadow colour
$tableHeadDropShaddow = '8b0000'; // table-header drop-shadow colour
$textContent = '000000'; // section title colour
$tableRowEvenBg = 'f7f7f7'; // table row background (even)
$tableRowOddBg = 'd0d0d0'; // table row background (odd)
}
?>
body {
background-color: #<?php echo $backgroundBanners; ?>;
}
.red {
color:red;
}
.green {
color:green;
}
.network {
border:1px solid;
text-align:left;
padding-top:5px;
padding-left:5px;
background-color: #<?php echo $tableRowOddBg; ?>;
}
.tableft {
display:inline-block;
text-align:right;
width:120px;
}
textarea {
width:699px;
height:499px;
}
input.button {
width:80%;
border:1px solid;
}
input[type=text],input[type=password] {
border:1px solid;
}
input[type=button],input[type=submit] {
border:1px solid;
border-radius:5px;
}
.infoheader {
width:100%;
text-align:center;
margin-top:10px;
border-bottom: 1px solid;
}
.infobox {
background-color: #<?php echo $backgroundBanners; ?>;
font-weight: bold;
width:100%;
}
.intinfo {
background-color: #<?php echo $tableRowOddBg; ?>;
color: #<?php echo $textContent; ?>;
width: 398px;
text-align: left;
border-right: 1px solid;
border-left: 1px solid;
float: left;
border-bottom:1px solid;
font-family: "Courier New", Courier, monospace;
}
.wifiinfo {
background-color: #<?php echo $tableRowOddBg; ?>;
color: #<?php echo $textContent; ?>;
margin: 0 0 0 400px;
border-right: 1px solid;
text-align: left;
border-bottom:1px solid;
font-family: "Courier New", Courier, monospace;
}
.intheader {
background-color: #<?php echo $backgroundBanners; ?>;
color: #<?php echo $textBanners; ?>;
text-align:center;
width:100%;
font-weight: bold;
}
.intfooter {
background-color: #<?php echo $backgroundBanners; ?>;
color: #<?php echo $textBanners; ?>;
width:100%;
border-top:1px solid;
float:left;
text-align:center;
}
.tail {
background-color: #<?php echo $backgroundBanners; ?>;
color: #<?php echo $backgroundBanners; ?>;
width:100%;
}