pidor/www/htdocs/lights.level2.lu/index.html

130 lines
4.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Thierry Degeling [@FAQ]">
<title>Control the lights of Level2</title>
<link href="bootstrap.min.css" rel="stylesheet">
<style type="text/css">
body {
padding-top: 15px;
}
.jumbotron {
padding: 0px;
}
.h1, .h2, .h3, h1, h2, h3 {
margin-top: 0;
}
.well {
padding: 10px;
}
</style>
</head>
<body>
<div class="container">
<div class="jumbotron hidden-xs">
<div class="container">
<h1>Hello, human!</h1>
<p>Manage the Level2 lights here</p>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class=" well">
<h1>Chill Switch</h1>
<p><a class="btn btn-success btn-lg btn-block" data-area="chill" data-status="on" >On</a></p>
<p><a class="btn btn-danger btn-lg btn-block" data-area="chill" data-status="off" >Off</a></p>
</div>
</div>
<div class="col-md-6">
<div class=" well">
<h1>Main Switch</h1>
<p><a class="btn btn-success btn-lg btn-block" data-area="main" data-status="on" >On</a></p>
<p><a class="btn btn-danger btn-lg btn-block" data-area="main" data-status="off" >Off</a></p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class=" well">
<h1>Projection screen</h1>
<p><a class="btn btn-danger btn-lg btn-block" data-area="screen" data-status="off" >^^^ Roll Up ^^^</a></p>
<p><a class="btn btn-success btn-lg btn-block" data-area="screen" data-status="on" >vvv Roll Down vvv</a></p>
Note: switching the projector on will roll the screen down automatically
</div>
</div>
<div class="col-md-6">
<div class=" well">
<h1>Projector</h1>
<p><a class="btn btn-success btn-lg btn-block" data-area="projector" data-status="on" >On</a></p>
<p><a class="btn btn-success btn-lg btn-block" data-area="projector" data-status="dvi" >Slideshow</a></p>
<p><a class="btn btn-success btn-lg btn-block" data-area="projector" data-status="hdmi2" >Chromecast</a></p>
<p><a class="btn btn-success btn-lg btn-block" data-area="projector" data-status="hdmi1" >HDMI</a></p>
<p><a class="btn btn-success btn-lg btn-block" data-area="projector" data-status="vga1" >VGA</a></p>
<p><a class="btn btn-danger btn-lg btn-block" data-area="projector" data-status="off" >Off</a></p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class=" well">
<h1>Amplifier</h1>
<p><a class="btn btn-success btn-lg btn-block" data-area="receiver" data-status="on" >On</a></p>
<p><a class="btn btn-success btn-lg btn-block" data-area="receiver" data-status="jack1" >Jack 1</a></p>
<p><a class="btn btn-success btn-lg btn-block" data-area="receiver" data-status="jack2" >Jack 2</a></p>
<p><a class="btn btn-success btn-lg btn-block" data-area="receiver" data-status="hdmi" >HDMI (projector) 2.0</a></p>
<p><a class="btn btn-success btn-lg btn-block" data-area="receiver" data-status="optical" >Optical (BluRay) 5.1</a></p>
<p><a class="btn btn-success btn-lg btn-block" data-area="receiver" data-status="cd" >CD (white laptop)r</a></p>
<p><a class="btn btn-success btn-lg btn-block" data-area="receiver" data-status="tuner" >Tuner</a></p>
<p><a class="btn btn-success btn-lg btn-block" data-area="receiver" data-status="vol+" >Vol+</a></p>
<p><a class="btn btn-success btn-lg btn-block" data-area="receiver" data-status="vol-" >Vol-</a></p>
<p><a class="col-md-3 btn btn-danger btn-lg btn-block" data-area="receiver" data-status="off" >Off</a></p>
</div>
</div>
</div>
<!--
<div class="col-md-6">
<div class=" well">
<h1>Main Door</h1>
<p><a class="btn btn-success btn-lg btn-block" data-area="maindoor" data-status="open" >Open door</a></p>
</div>
</div>
-->
</div>
</div> <!-- /container -->
<div class="jumbotron hidden-xs">
<script src="jquery.min.js"></script>
<script type="text/javascript">
$( ".btn" ).on( "click", function() {
$.get( "http://lights.level2.lu/api.php", { area: $( this ).data( 'area' ), status: $( this ).data( 'status' ) } );
});
</script>
</body>
</html>