Skip to content

Commit

Permalink
Merge pull request #683 from laf/font-awesome-2-webui
Browse files Browse the repository at this point in the history
WebUI update to support dark / light theme - dark is default
  • Loading branch information
paulgear committed Mar 31, 2015
2 parents 3db6596 + 089de7b commit dc5cfda
Show file tree
Hide file tree
Showing 18 changed files with 148 additions and 110 deletions.
19 changes: 19 additions & 0 deletions html/css/dark.css
@@ -0,0 +1,19 @@
.fa-nav-icons {
color: #e30613;
}

.fa-col-success {
color: #3c763d;
}

.fa-col-info {
color: #31708f;
}

.fa-col-primary {
color: #357ebd;
}

.twitter-typeahead .tt-hint {
border-color: #000 !important;
}
1 change: 1 addition & 0 deletions html/css/font-awesome.css
1 change: 1 addition & 0 deletions html/css/font-awesome.min.css
16 changes: 16 additions & 0 deletions html/css/light.css
@@ -0,0 +1,16 @@
.fa-nav-icons {
color: #e30613;
}

.fa-col-success {
color: #3c763d;
}

.fa-col-info {
color: #31708f;
}

.fa-col-primary {
color: #357ebd;
}

2 changes: 2 additions & 0 deletions html/css/styles.css
Expand Up @@ -2,6 +2,8 @@ body {
font-family: Verdana, Arial, Helvetica, sans-serif;
margin: 0px;
padding: 0px;
padding-bottom: 50px;
padding-top: 50px;
background: rgb(255,255,255); /* Old browsers */
color: #555;
font-size: 10pt;
Expand Down
1 change: 1 addition & 0 deletions html/fonts/FontAwesome.otf
1 change: 1 addition & 0 deletions html/fonts/fontawesome-webfont.eot
1 change: 1 addition & 0 deletions html/fonts/fontawesome-webfont.svg
1 change: 1 addition & 0 deletions html/fonts/fontawesome-webfont.ttf
1 change: 1 addition & 0 deletions html/fonts/fontawesome-webfont.woff
1 change: 1 addition & 0 deletions html/fonts/fontawesome-webfont.woff2
Binary file modified html/images/librenms_logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added html/images/librenms_logo_dark.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added html/images/librenms_logo_light.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
176 changes: 91 additions & 85 deletions html/includes/print-menubar.php

Large diffs are not rendered by default.

34 changes: 10 additions & 24 deletions html/index.php
Expand Up @@ -168,7 +168,9 @@ function catchFatal() {
<link href="css/tagmanager.css" rel="stylesheet" type="text/css" />
<link href="css/mktree.css" rel="stylesheet" type="text/css" />
<link href="css/vis.min.css" rel="stylesheet" type="text/css" />
<link href="css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="<?php echo($config['stylesheet']); ?>" rel="stylesheet" type="text/css" />
<link href="css/<?php echo $config['site_style']; ?>.css" rel="stylesheet" type="text/css" />
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-hover-dropdown.min.js"></script>
Expand Down Expand Up @@ -211,18 +213,6 @@ function popUp(URL)
?>
<br />
<div class="container-fluid">
<?php
if ($_SESSION['authenticated'])
{
?>
<div class="row">
<div class="col-md-12">
&nbsp;<br /><br />
</div>
</div>
<?php
}
?>
<div class="row">
<div class="col-md-12">
<?php
Expand Down Expand Up @@ -316,17 +306,17 @@ function popUp(URL)
<?php
if($config['enable_footer'] == 1) {
?>
<footer>
<nav class="navbar navbar-default <?php echo $navbar; ?> navbar-fixed-bottom">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<?php
echo('<em> Powered by <a href="/about/" target="_blank">' . $config['project_name'].'</a>.</em><br/>');
echo('<h5>Powered by <a href="http://www.librenms.org/" target="_blank" class="red">' . $config['project_name'].'</a>.</h5>');
?>
</div>
</div>
</div>
</footer>
</nav>
<?php
}

Expand Down Expand Up @@ -354,37 +344,33 @@ function popUp(URL)

}

?>
</body>
<?php

if ($no_refresh !== TRUE && $config['page_refresh'] != 0) {
$refresh = $config['page_refresh'] * 1000;
echo('<script type="text/javascript">
$(document).ready(function() {
$("#countdown_timer_status").html("<img src=\"images/16/clock_pause.png\"> Pause");
$("#countdown_timer_status").html("<i class=\"fa fa-pause fa-fw\"></i> Pause");
var Countdown = {
sec: '. $config['page_refresh'] .',
Start: function() {
var cur = this;
this.interval = setInterval(function() {
$("#countdown_timer_status").html("<img src=\"images/16/clock_pause.png\"> Pause");
$("#countdown_timer_status").html("<i class=\"fa fa-pause fa-fw\"></i> Pause");
cur.sec -= 1;
display_time = cur.sec;
if (display_time == 0) {
location.reload();
}
if (display_time % 1 === 0 && display_time <= 300) {
$("#countdown_timer").html("<img src=\"images/16/clock.png\"> Refresh in " + display_time);
$("#countdown_timer").html("<i class=\"fa fa-clock-o fa-fw\"></i> Refresh in " + display_time);
}
}, 1000);
},
Pause: function() {
clearInterval(this.interval);
$("#countdown_timer_status").html("<img src=\"images/16/clock_play.png\"> Resume");
$("#countdown_timer_status").html("<i class=\"fa fa-play fa-fw\"></i> Resume");
delete this.interval;
},
Expand Down Expand Up @@ -414,5 +400,5 @@ function popUp(URL)
}

?>

</body>
</html>
2 changes: 1 addition & 1 deletion includes/defaults.inc.php
Expand Up @@ -103,7 +103,7 @@

$config['project_url'] = "https://github.com/librenms/";
$config['project_issues'] = "https://github.com/librenms/librenms/issues";
$config['title_image'] = "images/librenms_logo.png";
$config['site_style'] = "light"; // Options are dark or light
$config['stylesheet'] = "css/styles.css";
$config['mono_font'] = "DejaVuSansMono";
$config['favicon'] = "";
Expand Down
1 change: 1 addition & 0 deletions includes/definitions.inc.php
Expand Up @@ -1314,5 +1314,6 @@
if (!isset($config['log_dir'])) { $config['log_dir'] = $config['install_dir'] . '/logs'; }
if (!isset($config['log_file'])) { $config['log_dir'] . "/" . $config['project_id'] . ".log"; }
if (!isset($config['plugin_dir'])) { $config['plugin_dir'] = $config['html_dir'] . '/plugins'; }
if (!isset($config['title_image'])) { $config['title_image'] = "images/librenms_logo_".$config['site_style'].".png"; }

?>

0 comments on commit dc5cfda

Please sign in to comment.