Skip to content

Commit

Permalink
Merge branch 'master' of github.com:hackerdojo/hd-kiosk
Browse files Browse the repository at this point in the history
Conflicts:
	main.html
  • Loading branch information
progrium committed Jun 10, 2010
2 parents 67e2eee + 2fa022d commit 8eeacd3
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 14 deletions.
30 changes: 16 additions & 14 deletions main.html
@@ -1,10 +1,12 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link type="text/css" rel="stylesheet" href="http://www.dustball.com/dojo/kiosk.css" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link type="text/css" rel="stylesheet" href="http://www.dustball.com/dojo/kiosk.css" />
<meta http-equiv="refresh" content="180" />
<script type="text/javascript" language="javascript" src="/static/niftyplayer.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/static/niftyplayer.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="/static/sounds.js"></script>
<title>Hacker Dojo Kiosk</title>
<script type="text/javascript" charset="utf-8">

Expand Down Expand Up @@ -64,23 +66,23 @@
</head>
<body onload="onl();">

<div id=top>
<table width=100%><tr>
<div id="top">
<table width="100%"><tr>
<td>
<img class="jiggle" src="http://www.dustball.com/dojo/logo.png" width=345 height=122 >
<img class="jiggle" src="http://www.dustball.com/dojo/logo.png" width="345" height="122" alt="Hacker Dojo Logo" />
</td>
<td>
<h1 class="jiggle">Welcome to Hacker Dojo</h1>
<h3 class="jiggle">NOTICE: Sign-in is now at the front desk... behind you!</h3>
</td>
</tr></table>
</div>
<div id=msg>
</div>

<div id="msg">
&nbsp;
</div>

<div id=left>
<div id="left">
<div class="jiggle" style="height:100%">

<h2 class="sectionhead">Currently Staffing</h2>
Expand All @@ -98,5 +100,5 @@ <h2 class="sectionhead">Schedule</h2>
</div>

<a href="javascript:alert(niftyplayer('niftyPlayer1').getState());">.</a>
</body>
</html>
</body>
</html>
54 changes: 54 additions & 0 deletions static/sounds.js
@@ -0,0 +1,54 @@
function letsDance() {
document.body.style.background="#"+randhex()+randhex()+randhex()+randhex()+randhex()+randhex();
var fore = "#"+randhexlight()+randhexlight()+randhexlight()+randhexlight()+randhexlight()+randhexlight();

$(".jiggle").each(function(i) {
this.style.color = fore;
this.style.position = "relative";
this.style.top = jiggly()+"px";
this.style.left = Math.floor(Math.round(Math.random() * 20))+"px";
});
}

function jiggly() {
return 10-Math.floor(Math.round(Math.random() * 20));
}

function randhex() {
return String.fromCharCode(97 + Math.round(Math.random() * 6));
}

function randhexlight() {
return Math.round(Math.random() * 6);
}

function showmsg(m) {
msgbox = document.getElementById("msg");
msgbox.style.display="block";
msgbox.innerHTML = m;
setTimeout('msgbox.style.display="none";',10000);
}

function playsound(file) {
$('body').append('\<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="165" height="38" id="niftyPlayer1" align="">\<param name=movie value="/static/niftyplayer.swf?file='+file+'&as=1">\<param name=quality value=high>\<param name=bgcolor value=#FFFFFF>\<embed src="/static/niftyplayer.swf?file='+file+'&as=1" quality=high bgcolor=#FFFFFF width="0" height="0" name="niftyPlayer1" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">\<\/embed>\<\/object>');
setTimeout(function(){ $("#niftyPlayer1").remove(); }, 4000);
}

function gotMsg(msg) {
msg = eval("(" + msg + ")");
if (msg["say"] != null) {
playsound("http://chapaai.adamsmith.as:8999/speech?text="+msg["say"]);
}
if (msg["text"] != null) {
showmsg(msg["text"]);
}
document.getElementById("staff").src = document.getElementById("staff").src;
waitForMsg();
}

function waitForMsg(){ $('body').append('\<script type="text/javascript" src="http://live.readyinrealtime.com/hackerdojo-signin?callback=gotMsg">\<\/script>'); }

$(document).ready(function(){
setTimeout(waitForMsg, 4000);
letsDance();
});

0 comments on commit 8eeacd3

Please sign in to comment.