Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Kiosk overhaul

  • Loading branch information...
commit b5223aaf129a299f735468041ca261d38dddfc13 1 parent e9db3b4
@dustball dustball authored
View
70 main.html
@@ -1,49 +1,39 @@
<!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" />
-<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>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <link type="text/css" rel="stylesheet" href="/static/style.css" />
+ <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/main.js"></script>
+ <title>Hacker Dojo Kiosk</title>
</head>
-<body>
+<body id="body">
-<div id="top">
- <table width="100%"><tr>
- <td>
- <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">
- &nbsp;
-</div>
-
-<div id="left">
-<div class="jiggle" style="height:100%">
-
- <h2 class="sectionhead">Currently Staffing</h2>
-
- <iframe style="border:none" id="staff" border=0 height=80% width=100% src="http://hackerdojo-signin.appspot.com/staff"></iframe>
+ <div id="top">
+ <table width="100%"><tr>
+ <td>
+ <img class="jiggle" src="/static/logo345.png" width="345" height="122" alt="Hacker Dojo" />
+ </td>
+ <td>
+ <h1 class="jiggle">Welcome to Hacker Dojo</h1>
+ <h3 class="jiggle">Please sign in at the main desk :)</h3>
+ </td>
+ </tr></table>
+ </div>
+
+ <div id="left">
+ <div class="jiggle" style="height:100%">
+ <h2 class="sectionhead">Currently Staffing</h2>
+ <iframe style="border:none" id="staff" border="0" height="80%" width="100%" src="http://hackerdojo-signin.appspot.com/staff"></iframe>
+ </div>
+ </div>
-</div>
-</div>
-
-<div id=right style="">
-<div class="jiggle" style="height:100%">
- <h2 class="sectionhead">Schedule</h2>
- <iframe src="http://events.hackerdojo.com/?base=mini" style=" border-width:0 " width="100%" height="90%" frameborder="0" scrolling="no"></iframe>
-</div>
-</div>
+ <div id="right">
+ <div class="jiggle" style="height:100%">
+ <h2 class="sectionhead">Schedule</h2>
+ <iframe src="http://events.hackerdojo.com/?base=mini" style="border-width:0;" width="100%" height="90%" frameborder="0" scrolling="no"></iframe>
+ </div>
+ </div>
- <a href="javascript:alert(niftyplayer('niftyPlayer1').getState());">.</a>
</body>
</html>
View
25 main.py
@@ -1,40 +1,19 @@
#!/usr/bin/env python
-#
-# Copyright 2007 Google Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-
-
import wsgiref.handlers
from google.appengine.ext.webapp import template
from google.appengine.ext import webapp
-
class MainHandler(webapp.RequestHandler):
def get(self):
self.response.out.write(template.render('main.html', locals()))
-
def main():
- application = webapp.WSGIApplication([('/', MainHandler)],
- debug=True)
+ application = webapp.WSGIApplication([('/', MainHandler)], debug=True)
wsgiref.handlers.CGIHandler().run(application)
-
if __name__ == '__main__':
main()
+
View
BIN  static/logo345.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
25 static/main.js
@@ -0,0 +1,25 @@
+function letsDance() {
+ $(".jiggle").each(function(i) {
+ 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 refreshPage() {
+ $.ajax({
+ url: '/',
+ success: function(data) {
+ $('#body').html(data);
+ }
+ });
+}
+
+$(document).ready(function(){
+ setInterval(refreshPage,3 * 60 * 1000);
+ letsDance();
+});
View
101 static/niftyplayer.js
@@ -1,101 +0,0 @@
-// Script for NiftyPlayer 1.7, by tvst from varal.org
-// Released under the MIT License: http://www.opensource.org/licenses/mit-license.php
-
-var FlashHelper =
-{
- movieIsLoaded : function (theMovie)
- {
- if (typeof(theMovie) != "undefined") return theMovie.PercentLoaded() == 100;
- else return
- false;
- },
-
- getMovie : function (movieName)
- {
- if (navigator.appName.indexOf ("Microsoft") !=-1) return window[movieName];
- else return document[movieName];
- }
-};
-
-function niftyplayer(name)
-{
- this.obj = FlashHelper.getMovie(name);
-
- if (!FlashHelper.movieIsLoaded(this.obj)) return;
-
- this.play = function () {
- this.obj.TCallLabel('/','play');
- };
-
- this.stop = function () {
- this.obj.TCallLabel('/','stop');
- };
-
- this.pause = function () {
- this.obj.TCallLabel('/','pause');
- };
-
- this.playToggle = function () {
- this.obj.TCallLabel('/','playToggle');
- };
-
- this.reset = function () {
- this.obj.TCallLabel('/','reset');
- };
-
- this.load = function (url) {
- this.obj.SetVariable('currentSong', url);
- this.obj.TCallLabel('/','load');
- };
-
- this.loadAndPlay = function (url) {
- this.load(url);
- this.play();
- };
-
- this.getState = function () {
- var ps = this.obj.GetVariable('playingState');
- var ls = this.obj.GetVariable('loadingState');
-
- // returns
- // 'empty' if no file is loaded
- // 'loading' if file is loading
- // 'playing' if user has pressed play AND file has loaded
- // 'stopped' if not empty and file is stopped
- // 'paused' if file is paused
- // 'finished' if file has finished playing
- // 'error' if an error occurred
- if (ps == 'playing')
- if (ls == 'loaded') return ps;
- else return ls;
-
- if (ps == 'stopped')
- if (ls == 'empty') return ls;
- if (ls == 'error') return ls;
- else return ps;
-
- return ps;
-
- };
-
- this.getPlayingState = function () {
- // returns 'playing', 'paused', 'stopped' or 'finished'
- return this.obj.GetVariable('playingState');
- };
-
- this.getLoadingState = function () {
- // returns 'empty', 'loading', 'loaded' or 'error'
- return this.obj.GetVariable('loadingState');
- };
-
- this.registerEvent = function (eventName, action) {
- // eventName is a string with one of the following values: onPlay, onStop, onPause, onError, onSongOver, onBufferingComplete, onBufferingStarted
- // action is a string with the javascript code to run.
- //
- // example: niftyplayer('niftyPlayer1').registerEvent('onPlay', 'alert("playing!")');
-
- this.obj.SetVariable(eventName, action);
- };
-
- return this;
-}
View
BIN  static/niftyplayer.swf
Binary file not shown
View
54 static/sounds.js
@@ -1,54 +0,0 @@
-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();
-});
View
29 static/style.css
@@ -0,0 +1,29 @@
+html,body {margin:0; padding:0; height:100%; width:100%}
+body {font-family:sans-serif;}
+
+#top {position:absolute; top:2%; left:5%; width:90%; height:20%;}
+#left {position:absolute; top:30%; left:5%; width:40%; height:69%;}
+#right {position:absolute; top:30%; left:55%; width:40%; height:69%;}
+
+#top img {float:left; margin-right:2em}
+h1,h2,h3 {margin-top:0;margin-bottom:.5em}
+
+.sectionhead {border-bottom:1px solid #ccc;}
+
+.staffline {clear:both; padding-top:1.0em; height:80px;}
+.staffline .pic {height:72px; width:52px;margin:1px; float:left; margin-right:8px; }
+.staffline .picbox {border:1px solid #ccc; width:54px; height:74px; float:left; margin-right:10px}
+.staffline .name {font-size:150%; margin-top:6px}
+.staffline .email {margin-top:.5em; color:#777; font-size:75%;}
+.staffline .ago {margin-top:.5em; font-size:75%; color:#777}
+.staffline {cursor:pointer}
+.staffline:hover {background:#ddd; }
+
+#msg {font-size:150%; display:none; text-align:center; padding:3em; position:absolute; z-index:2; top:35%; left:25%; width:40%; border:2px solid black; background:#baffbc;}
+
+.ministaff .pic {border:1px solid #ccc;}
+.ministaff .name {font-weight:bold}
+.ministaff td {font-size:10px;}
+.openline, .closeline {padding-top:.7em; font-size:12px; width:100%; text-align:center}
+.openline {color:green;}
+.closeline {color:red;}
Please sign in to comment.
Something went wrong with that request. Please try again.