Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

basic user interface

  • Loading branch information...
commit c8e0bf52a2a99b11b7e06a50bd86a795991e5793 1 parent 2e3a26e
@reconbot authored
View
4 package.json
@@ -4,8 +4,8 @@
"description": "buzzes my front door",
"main": "server.js",
"dependencies": {
- "connect": "~2.7.2",
- "johnny-five": "git+ssh://git@github.com:rwldrn/johnny-five.git"
+ "johnny-five": "git+ssh://git@github.com:reconbot/johnny-five.git",
+ "express": "3.1.0"
},
"devDependencies": {},
"scripts": {
View
BIN  public/favicon.ico
Binary file not shown
View
117 public/index.html
@@ -0,0 +1,117 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Levo League &#8212; The page you were looking for doesn&#8217;t exist (404)</title>
+ <style type="text/css">
+ /*-- FONTS --*/
+ @font-face { /* Modern No.20 BT - (regular) */
+ font-family: 'modern_no20';
+ font-weight: normal;
+ font-style: normal;
+ }
+ @font-face { /* Source Sans Pro - (regular) */
+ font-family: 'source_sans_pro';
+ font-weight: normal;
+ font-style: normal;
+ }
+ /*-- STYLES --*/
+ html, body {
+ width: 100%;
+ height: 100%;
+ margin: 0px 0px 0px 0px;
+ }
+ div.site-container {
+ display: block;
+ position: relative;
+ width: auto;
+ max-width: 1000px;
+ height: auto;
+ margin: 0px auto 0px auto;
+ padding: 50px 50px 0px 50px;
+ }
+ div.site-container img.logo {
+ display: block;
+ position: relative;
+ width: 244px;
+ height: 30px;
+ margin: 0px auto 0px auto;
+ }
+ h1 {
+ display: block;
+ position: relative;
+ width: auto;
+ height: 100px;
+ margin: 80px 0px 0px 0px;
+
+ font-family: 'modern_no20', georgia, serif;
+ font-weight: normal;
+ font-size: 90px;
+ line-height: 100px;
+ color: #000;
+ }
+ div.hr {
+ display: block;
+ position: relative;
+ width: 100%;
+ max-width: 720px;
+ height: 1px;
+ margin: 0px 0px 30px 0px;
+
+ background: #dbdee3;
+ color: #dbdee3;
+ overflow: hidden;
+ line-height: 1px;
+ }
+ h2 {
+ display: block;
+ position: relative;
+ width: auto;
+ height: 30px;
+ margin: 0px 0px 0px 0px;
+
+ font-family: 'modern_no20', georgia, serif;
+ font-weight: normal;
+ font-size: 26px;
+ line-height: 30px;
+ color: #000;
+ }
+ p {
+ display: block;
+ position: relative;
+ width: auto;
+ height: 30px;
+ margin: 9px 0px 0px 0px;
+
+ font-family: 'source_sans_pro', georgia, serif;
+ font-weight: normal;
+ font-size: 15px;
+ line-height: 18px;
+ color: #8892a1;
+ }
+ a {
+ color: #42307a;
+ text-decoration: none;
+ }
+ a:hover {
+ color: #41444a;
+ text-decoration: none;
+ }
+ a:active {
+ color: #000;
+ text-decoration: none;
+ }
+ /*-- FONTS --*/
+ </style>
+</head>
+
+<body>
+ <!-- This file lives in public/404.html -->
+ <div class="site-container">
+ <img class="logo" src="/logo.png" />
+ <h1>Doors</h1>
+ <div class="hr">&nbsp;</div>
+ <h2>Do you want to open the door?</h2>
+ <p><a href="/openDoor">Yes</a> | No</p>
+ </div>
+</body>
+</html>
View
BIN  public/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
121 public/success.html
@@ -0,0 +1,121 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Levo League &#8212; The page you were looking for doesn&#8217;t exist (404)</title>
+ <style type="text/css">
+ /*-- FONTS --*/
+ @font-face { /* Modern No.20 BT - (regular) */
+ font-family: 'modern_no20';
+ font-weight: normal;
+ font-style: normal;
+ }
+ @font-face { /* Source Sans Pro - (regular) */
+ font-family: 'source_sans_pro';
+ font-weight: normal;
+ font-style: normal;
+ }
+ /*-- STYLES --*/
+ html, body {
+ width: 100%;
+ height: 100%;
+ margin: 0px 0px 0px 0px;
+ }
+ div.site-container {
+ display: block;
+ position: relative;
+ width: auto;
+ max-width: 1000px;
+ height: auto;
+ margin: 0px auto 0px auto;
+ padding: 50px 50px 0px 50px;
+ }
+ div.site-container img.logo {
+ display: block;
+ position: relative;
+ width: 244px;
+ height: 30px;
+ margin: 0px auto 0px auto;
+ }
+ h1 {
+ display: block;
+ position: relative;
+ width: auto;
+ height: 100px;
+ margin: 80px 0px 0px 0px;
+
+ font-family: 'modern_no20', georgia, serif;
+ font-weight: normal;
+ font-size: 90px;
+ line-height: 100px;
+ color: #000;
+ }
+ div.hr {
+ display: block;
+ position: relative;
+ width: 100%;
+ max-width: 720px;
+ height: 1px;
+ margin: 0px 0px 30px 0px;
+
+ background: #dbdee3;
+ color: #dbdee3;
+ overflow: hidden;
+ line-height: 1px;
+ }
+ h2 {
+ display: block;
+ position: relative;
+ width: auto;
+ height: 30px;
+ margin: 0px 0px 0px 0px;
+
+ font-family: 'modern_no20', georgia, serif;
+ font-weight: normal;
+ font-size: 26px;
+ line-height: 30px;
+ color: #000;
+ }
+ p {
+ display: block;
+ position: relative;
+ width: auto;
+ height: 30px;
+ margin: 9px 0px 0px 0px;
+
+ font-family: 'source_sans_pro', georgia, serif;
+ font-weight: normal;
+ font-size: 15px;
+ line-height: 18px;
+ color: #8892a1;
+ }
+ a {
+ color: #42307a;
+ text-decoration: none;
+ }
+ a:hover {
+ color: #41444a;
+ text-decoration: none;
+ }
+ a:active {
+ color: #000;
+ text-decoration: none;
+ }
+ /*-- FONTS --*/
+ </style>
+</head>
+
+<body>
+ <!-- This file lives in public/404.html -->
+ <div class="site-container">
+ <img class="logo" src="/logo.png" />
+ <h1>Doors Open!</h1>
+ <div class="hr">&nbsp;</div>
+ <h2>I hope you know this person!</h2>
+ <script type="text/javascript">
+ setTimeout(function(){
+ document.location = '/';
+ }, 2000);
+ </script>
+ </div>
+</body>
+</html>
View
6 readme.md
@@ -0,0 +1,6 @@
+DOOR
+===
+
+This program will open my door.
+
+Please don't use it.
View
18 server.js
@@ -1,4 +1,20 @@
/*global require:true */
var arduino = require('./arduino');
-// arduino.openDoor();
+arduino.openDoor();
// arduino.buildStatus(false);
+
+var express = require('express');
+var app = express();
+
+app
+ .use(express.logger('dev'))
+ .use(express['static']('public'))
+ .use(function (req, res, next) {
+ if (req.url === '/openDoor') {
+ arduino.openDoor();
+ res.redirect('/success.html');
+ return;
+ }
+ next();
+ })
+ .listen(3000);
Please sign in to comment.
Something went wrong with that request. Please try again.