summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-05-09 14:43:14 -0400
committerStephen Beaver <sbeaver@netgate.com>2016-05-09 14:45:04 -0400
commited80365be039ba04473ae64dcb9e122d8f43104e (patch)
tree49f2980b2056b5b66e2998cf11fae2fcdbfa597b
parent1ad587b53efe8d0f332a962d02727944cc7d6193 (diff)
downloadpfsense-ed80365be039ba04473ae64dcb9e122d8f43104e.zip
pfsense-ed80365be039ba04473ae64dcb9e122d8f43104e.tar.gz
Add Compact-RED theme and update system.php to sort available themes by pfSense, then BETA, then user supplied themes.
(cherry picked from commit 6a5c6661960e1cd39e3caf66a3caaeb2678d27b1)
-rw-r--r--src/usr/local/www/css/Compact-RED.css112
-rw-r--r--src/usr/local/www/system.php30
2 files changed, 136 insertions, 6 deletions
diff --git a/src/usr/local/www/css/Compact-RED.css b/src/usr/local/www/css/Compact-RED.css
new file mode 100644
index 0000000..350c363
--- /dev/null
+++ b/src/usr/local/www/css/Compact-RED.css
@@ -0,0 +1,112 @@
+
+/* Compact-RED theme for pfSense by PiBa-NL */
+
+@import url("/css/pfSense.css");
+
+body {
+ font-size: 12px;
+}
+
+.form-control {
+ font-size: 12px;
+}
+
+.container.fixed {
+ padding-top: 40px;
+}
+
+/* navigation */
+.navbar {
+ margin-bottom: 2px;
+ min-height:30px;
+}
+
+.navbar-inverse {
+ background-color: #600;
+}
+
+.navbar-brand > img {
+ max-height: 26px;
+}
+
+.navbar-brand {
+ padding: 2px 0 0 5px;
+ height: 30px;
+}
+
+.navbar-inverse .navbar-nav >li>a {
+ border-bottom: 5px solid #212121;
+ color: #fff;
+}
+.navbar-inverse .navbar-nav >li>a:hover{
+ color: #ccc;
+}
+.text-muted {
+ color: #BDBDBD;
+}
+.text-muted > a:hover {
+ color: #ccc;
+}
+
+.nav>li>a {
+ padding: 5px 19px 0px 19px;
+}
+.navbar-inverse .navbar-nav >li>a {
+ border-bottom: 5px solid #600;
+}
+
+.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover {
+ color: #fff;
+ background-color: #600;
+}
+.nav-pills {
+ margin-bottom: 0px;
+}
+
+.dropdown-menu>li>a {
+ padding: 0px 20px;
+}
+
+.navbar-right>li>a {
+ padding: 2px 15px 1px 15px;
+}
+
+.navbar-toggle {
+ margin-top:0px;
+ margin-bottom:0px;
+}
+.panel-default>.panel-heading {
+ background-color: #900;
+}
+
+.form-control {
+ margin-bottom: 2px;
+}
+
+.form-group {
+ padding: 2px 5px 2px 5px;
+}
+.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th {
+ padding:2px;
+}
+
+.header .context-links {
+ top: 1px;
+}
+
+.breadcrumb {
+ margin-bottom: 2px;
+ padding: 0px 15px;
+ font-size: 14px;
+}
+
+/** Page footer */
+.footer {
+ height: 40px;
+ background-color: #600;
+}
+
+.btn
+{
+ padding: 2px 12px;
+} \ No newline at end of file
diff --git a/src/usr/local/www/system.php b/src/usr/local/www/system.php
index da791dc..2795c6c 100644
--- a/src/usr/local/www/system.php
+++ b/src/usr/local/www/system.php
@@ -490,13 +490,31 @@ $section->addInput(new Form_Select(
$form->add($section);
$csslist = array();
-$css = glob("/usr/local/www/css/*.css");
-foreach ($css as $file) {
- $file = basename($file);
- $csslist[$file] = pathinfo($file, PATHINFO_FILENAME);
-}
-asort($csslist);
+// List pfSense files, then any BETA files followed by any user-contributed files
+$cssfiles = glob("/usr/local/www/css/*.css");
+
+if(is_array($cssfiles)) {
+ arsort($cssfiles);
+ $usrcss = $pfscss = $betacss = array();
+
+ foreach ($cssfiles as $css) {
+ if (strpos($css, "BETA") != 0) {
+ array_push($betacss, $css);
+ } else if (strpos($css, "pfSense") != 0) {
+ array_push($pfscss, $css);
+ } else {
+ array_push($usrcss, $css);
+ }
+ }
+
+ $css = array_merge($pfscss, $betacss, $usrcss);
+
+ foreach ($css as $file) {
+ $file = basename($file);
+ $csslist[$file] = pathinfo($file, PATHINFO_FILENAME);
+ }
+}
if (!isset($pconfig['webguicss']) || !isset($csslist[$pconfig['webguicss']])) {
$pconfig['webguicss'] = "pfSense.css";
OpenPOWER on IntegriCloud