Skip to content

Commit

Permalink
Added different style sheets
Browse files Browse the repository at this point in the history
Added different style sheets
  • Loading branch information
galadril committed Sep 23, 2015
1 parent 81af173 commit f8c586f
Show file tree
Hide file tree
Showing 9 changed files with 1,774 additions and 13 deletions.
856 changes: 856 additions & 0 deletions css/mainLight.css

Large diffs are not rendered by default.

864 changes: 864 additions & 0 deletions css/mainPurple.css

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions frontpage.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<title>FlatZ Frontpage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css" />
<link href="css/main.css" rel="stylesheet">
<link href="css/icons.css" rel="stylesheet">
<link rel="stylesheet" href="css/main.css" />
<script type="text/javascript" src="js/jquery-2.1.4.js"></script>
<script type="text/javascript" src="js/highcharts.js"></script>
<script type="text/javascript" src="js/jquery.noty.packaged.js"></script>
Expand Down Expand Up @@ -197,6 +197,9 @@ <h2 id="cell10"></h2>

<script type="text/javascript" charset="utf-8">
$(document).ready(function() {

loadCSS("css/"+$.theme);

console.log($.domoticzurl);
RefreshDashboardData();
});
Expand All @@ -216,10 +219,8 @@ <h2 id="cell10"></h2>
var n = noty({text: 'Failed to toggle switch...', type: 'error'});
}
});

RefreshDashboardData();
}

</script>
</body>
</html>
10 changes: 8 additions & 2 deletions graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<title>FlatZ Frontpage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css" />
<link href="css/main.css" rel="stylesheet">
<link rel="stylesheet" href="css/main.css" />

<link href="css/icons.css" rel="stylesheet">
<script type="text/javascript" src="js/jquery-2.1.4.js"></script>
<script type="text/javascript" src="js/highcharts.js"></script>
Expand All @@ -25,6 +26,7 @@
<!-- Google Fonts call. Font Used Open Sans & Raleway -->
<link href="http://fonts.googleapis.com/css?family=Raleway:400,300" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css">

</head>
<body>
<div class="navbar-nav navbar-inverse navbar-fixed-top">
Expand Down Expand Up @@ -139,13 +141,17 @@ <h4 id="cell10" style="margin-top:-35px;></h4>
</div>
<!-- /row -->
</div>

<!-- /container -->
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {

loadCSS("css/"+$.theme);


RefreshSwitchData();
RefreshGraphData();
});

</script>
</body>
</html>
18 changes: 18 additions & 0 deletions js/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,24 @@ function RefreshLogData() {
$.refreshTimerGraph = setInterval(RefreshLogData, 2000);
}


/**
* function to load a given css file
*/
loadCSS = function(href) {
var cssLink = $("<link rel='stylesheet' type='text/css' href='"+href+"'>");
$("head").append(cssLink);
};

/**
* function to load a given js file
*/
loadJS = function(src) {
var jsLink = $("<script type='text/javascript' src='"+src+"'>");
$("head").append(jsLink);
};


function SwitchToggle(idx, switchcmd) {
$.ajax({
url: $.domoticzurl + "/json.htm?type=command&param=switchlight" + "&idx=" + idx + "&switchcmd=" + switchcmd + "&level=0",
Expand Down
13 changes: 9 additions & 4 deletions lights.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css" />

<link href="css/main.css" rel="stylesheet">
<link href="css/icons.css" rel="stylesheet">
<link href="css/slider.css" rel="stylesheet">

<link rel="stylesheet" href="css/common.css" />
<link rel="stylesheet" href="css/color.css" />
<link rel="stylesheet" href="css/main.css" />

<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="js/highcharts.js"></script>
Expand All @@ -21,8 +20,7 @@
<script type="text/javascript" src="js/noty.js"></script>
<script type="text/javascript" src="js/methods.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script src="js/kendo.all.min.js"></script>
<script src="js/colors.js"></script>


<style type="text/css">
body {
Expand Down Expand Up @@ -210,9 +208,16 @@
</div>
<!-- /span3 -->
</div>


<!-- /container -->
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
loadCSS("css/"+$.theme);

loadJS("js/kendo.all.min.js"); //load this script later (big one)
loadJS("js/colors.js");//load this script later (big one)

RefreshSwitchData();
RefreshLightData();
});
Expand Down
6 changes: 5 additions & 1 deletion logs.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
<title>FlatZ Frontpage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css" />
<link href="css/main.css" rel="stylesheet">
<link href="css/icons.css" rel="stylesheet">
<script type="text/javascript" src="js/jquery-2.1.4.js"></script>
<script type="text/javascript" src="js/highcharts.js"></script>
<script type="text/javascript" src="js/jquery.noty.packaged.js"></script>
<script type="text/javascript" src="settings/settings.js"></script>
<script type="text/javascript" src="js/noty.js"></script>
<link rel="stylesheet" href="css/main.css" />
<script type="text/javascript" src="js/methods.js"></script>
<style type="text/css">
body {
Expand Down Expand Up @@ -133,6 +134,9 @@
<!-- /container -->
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
loadCSS("css/"+$.theme);


RefreshSwitchData();
RefreshLogData();
});
Expand Down
2 changes: 2 additions & 0 deletions settings/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
$.domoticzurl = "http://192.168.1.88:8080";//domoticz url (can be with username:password@ip:port)
$.degreesUnit = " C";
$.percentUnit = " %";
$.theme = "mainLight.css"; //possible values: 'main.css', 'mainPurple.css', 'mainLight.css'


//Weather settings
$.location = "Assendelft, NH"; //city and region *required
Expand Down
11 changes: 8 additions & 3 deletions weather.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<title>FlatZ Frontpage</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css" />
<link href="css/main.css" rel="stylesheet">
<link rel="stylesheet" href="css/main.css" />

<link href="css/icons.css" rel="stylesheet">
<link href="css/flatWeatherPlugin.css" rel="stylesheet">

Expand Down Expand Up @@ -116,8 +117,12 @@
<!-- /container -->
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
RefreshSwitchData();


loadCSS("css/"+$.theme);

RefreshSwitchData();


var weatherdash = $("#weatherdash").flatWeatherPlugin({
location: $.location, //city and region *required
country: $.country, //country *required
Expand Down

0 comments on commit f8c586f

Please sign in to comment.