view service/deskArduino/index.html @ 1000:df5a40967a2f

polymer updates Ignore-this: f4f88b324b54abf90af6dc5360910041 darcs-hash:20150830185325-312f9-8f07ba7ccc6ecd6528159fa5fd09a166d3ce1650
author drewp <drewp@bigasterisk.com>
date Sun, 30 Aug 2015 11:53:25 -0700
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>