view service/deskArduino/index.html @ 1133:114ca7fd9d01

IR remote rule Ignore-this: 901771de421a81129f2ddf4316af91d9 darcs-hash:a037a1bcf9631ac214fe1e61ff42fb00f25cb451
author drewp <drewp@bigasterisk.com>
date Sat, 03 Feb 2018 14:38:10 -0800
parents 9e99114dde57
children
line wrap: on
line source

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>desk arduino</title>
    <style type="text/css" media="all">
      /* <![CDATA[ */
      body {
	  background: #000000;
	  color: #888;
      }
      h1 {
	  font-size:100%;
      }
      div.credit {
	  font-size: 80%;
	  margin-top:41px;
      }
      /* ]]> */
    </style>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://bigasterisk.com/bathroomLight/static/farbtastic/farbtastic.js"></script>
    <link rel="stylesheet" href="http://bigasterisk.com/bathroomLight/static/farbtastic/farbtastic.css" type="text/css" />

  </head>
  <body>
    <h1>desk arduino</h1>

    <div class="colorpicker" chan="0"></div>
    <div class="colorpicker" chan="1"></div>
    
    <script type="text/javascript">
      $(document).ready(function() {
	  $(".colorpicker").each(function (elem) {
	      var chan = $(this).attr("chan");
	      
	      var picker = $.farbtastic(this, function (newColor) {
		  $.post('brite/'+chan, newColor);
	      });
	      
	      $.get('brite/'+chan, picker.setColor);
	  });
      });
    </script>
    
    <div class="credit">
      Using the 
      <a href="http://acko.net/dev/farbtastic">Farbtastic color picker</a>
    </div>

  </body>
</html>