Skip to content

Commit

Permalink
updated a bunch of stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
drewtu2 committed Apr 22, 2017
1 parent 8a7a8ea commit 46c82c6
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 21 deletions.
11 changes: 11 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from flask import Flask
from flask import render_template
from flask import request
app = Flask(__name__)

@app.route('/')
Expand All @@ -9,3 +10,13 @@ def index():
@app.route('/images/<filename>/')
def getImg(filename):
return app.send_static_file('images/' + filename)

@app.route('/dashboard/', methods=['GET'])
def dashboard():
if "command" in request.args:
command = request.args['command']
sendCommand(command)
return render_template('dashboard.html')

def sendCommand(command):
socketio.emit("channel-a", command)
44 changes: 29 additions & 15 deletions static/css/mystyle.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
/* Tags */
body,html {
height:100%;
}
footer {
background-color: #2f2f2f; /* Black Gray */
color: white;
height: 8%;
}

/* Classes */
.margin-top {
margin-top: 0px;
}

.content {
height: 100%;
width: 100%
}
footer {
background-color: #2f2f2f; /* Black Gray */
color: white;
height: 8%;
.full-height {
height: 100%;
}
.inherit-height{
height: inherit;
}
.no-margin{
margin-top: 0px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
}


/* IDs */
#video{
background-color: red;
height: 100%;
Expand All @@ -29,21 +45,19 @@ footer {
width: 100%
}
#map_box{
margin-left: 0%;
margin-top: 10px;
width: 300px;
height: 300px;
margin-left: 10%;
margin-top: 10%;
width: 90%;
height: 30%;
background-color: white;

}

#assistance_box{
right: 5%;
width: 50%;
height: 50%;
}

#map {
height: 300px;
float: right;
width: 100%;
height: 30%;
margin-right: 10%;
margin-top: 10%;
}
23 changes: 17 additions & 6 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/socket.io/1.3.6/socket.io.min.js"></script>
<script type="text/javascript" charset="utf-8">
console.log("HERE WE ARE");
var socket = io.connect('http://' + document.domain + ':' + location.port);
socket.on('channel-a', function(message) {
if (message == "displayOn") {

} else if (message == "displayOff") {

}
});
</script>

<!--
-->
Expand Down Expand Up @@ -49,16 +62,14 @@
</div>

<div class="container no-margin content full-height">

<div class="row inherit-height">
<div class="col-sm-3 inherit-height">
<div id="map_box" class="row"></div>
<div class="row"></div>
<div class="col-md-3 inherit-height">
<div id="map_box"></div>
</div>
<div class="col-md-6"></div>
<div class="col-sm-3">
<div class="col-md-3">
<div id="assistance_box">
<img width=100%
<img width=50%
src="{{ url_for('static', filename='resources/dogtransfinal.gif') }}">
</div>
<div id="info" style="background-color: red"></div>
Expand Down

0 comments on commit 46c82c6

Please sign in to comment.