Permalink
Browse files

WIP: Edit HTML, add bootstrap styles

  • Loading branch information...
amybaldwindev committed Feb 5, 2018
1 parent 083787e commit 80035d5f615e30fac371d738c2449d2e41515333
Showing with 81 additions and 42 deletions.
  1. +56 −34 PiBotBrain/templates/basic_motor.html
  2. +25 −8 PiBotBrain/templates/layout.html
@@ -36,40 +36,62 @@
<h1>Basic Motor Test</h1>
<p>Encoder Read Status:<div id="encStatus">OK</div></p>
<hr/>
<h3>Motor 1</h3>
<p>Encoder 1:<div id="m1enc">{{m1enc}}</div></p>
<form action="{{ url_for('basic_motor', address=rcAddr)}}" method="post">
<input type="hidden" name="motor" value="1"/>
<input type="hidden" name="direction" value="+"/>
<input type="submit" value="Positive"/>
</form>
<form action="{{ url_for('basic_motor', address=rcAddr)}}" method="post">
<input type="hidden" name="motor" value="1"/>
<input type="hidden" name="direction" value="0"/>
<input type="submit" value="Stop"/>
</form>
<form action="{{ url_for('basic_motor', address=rcAddr)}}" method="post">
<input type="hidden" name="motor" value="1"/>
<input type="hidden" name="direction" value="-"/>
<input type="submit" value="Negative"/>
</form>
<div class="row">
<div class="col-sm-6 m1">
<h3>Motor 1</h3>
<p>Encoder 1:<div id="m1enc">{{m1enc}}</div></p>
<div class="row">
<div class="col-3 positive">
<form action="{{ url_for('basic_motor', address=rcAddr)}}" method="post">
<input type="hidden" name="motor" value="1"/>
<input type="hidden" name="direction" value="+"/>
<input type="submit" value="Positive"/>
</form>
</div>
<div class="col-3 stop">
<form action="{{ url_for('basic_motor', address=rcAddr)}}" method="post">
<input type="hidden" name="motor" value="1"/>
<input type="hidden" name="direction" value="0"/>
<input type="submit" value="Stop"/>
</form>
</div>
<div class="col-3 negative">
<form action="{{ url_for('basic_motor', address=rcAddr)}}" method="post">
<input type="hidden" name="motor" value="1"/>
<input type="hidden" name="direction" value="-"/>
<input type="submit" value="Negative"/>
</form>
</div>
</div><!--row-->
<!--<hr/>-->
</div><!-- col-sm-6 -->

<hr/>
<h3>Motor 2</h3>
<p>Encoder 2:<div id="m2enc">{{m2enc}}</div></p>
<form action="{{ url_for('basic_motor', address=rcAddr)}}" method="post">
<input type="hidden" name="motor" value="2"/>
<input type="hidden" name="direction" value="+"/>
<input type="submit" value="Positive"/>
</form>
<form action="{{ url_for('basic_motor', address=rcAddr)}}" method="post">
<input type="hidden" name="motor" value="2"/>
<input type="hidden" name="direction" value="0"/>
<input type="submit" value="Stop"/>
</form>
<form action="{{ url_for('basic_motor', address=rcAddr)}}" method="post">
<input type="hidden" name="motor" value="2"/>
<input type="hidden" name="direction" value="-"/>
<input type="submit" value="Negative"/>
</form>
<div class="col-sm-6 m2">
<h3>Motor 2</h3>
<p>Encoder 2:<div id="m2enc">{{m2enc}}</div></p>
<div class="row">
<div class="col-3">
<form action="{{ url_for('basic_motor', address=rcAddr)}}" method="post">
<input type="hidden" name="motor" value="2"/>
<input type="hidden" name="direction" value="+"/>
<input type="submit" value="Positive"/>
</form>
</div>
<div class="col-3">
<form action="{{ url_for('basic_motor', address=rcAddr)}}" method="post">
<input type="hidden" name="motor" value="2"/>
<input type="hidden" name="direction" value="0"/>
<input type="submit" value="Stop"/>
</form>
</div>
<div class="col-3">
<form action="{{ url_for('basic_motor', address=rcAddr)}}" method="post">
<input type="hidden" name="motor" value="2"/>
<input type="hidden" name="direction" value="-"/>
<input type="submit" value="Negative"/>
</form>
</div>
<hr/>
</div>
{% endblock %}
@@ -1,10 +1,27 @@
<!doctype html>
<title>PiBot Brain</title>
<link rel=stylesheet type=text/css href="{{url_for('static', filename='style.css')}}">
<div class=page>
{% for message in get_flashed_messages() %}
<div class=flash>{{message}}</div>
<hr/>
{% endfor %}
{% block body %}{% endblock %}
<head>
<title>PiBot Brain</title>
<meta charset="utf-8">
<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!--Responsive Design -->

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!---Font Awesome -->
<script src="https://use.fontawesome.com/1d2ee0eb57.js"></script>

<link rel="stylesheet" type="text/css" href=".{{url_for('static', filename='style.css')}}">

</head>
<body>
<div class="container">
<div class=page>
{% for message in get_flashed_messages() %}
<div class=flash>{{message}}</div>
<hr/>
{% endfor %}
{% block body %}{% endblock %}
</div>
</div>
</body>
</div>

0 comments on commit 80035d5

Please sign in to comment.