aboutsummaryrefslogtreecommitdiffstats
path: root/src/views
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2022-02-09 17:22:15 -0600
committerMatt Strapp <matt@mattstrapp.net>2022-02-09 17:22:15 -0600
commitcb9ce5560028c8a58a1de4f7390514e71fb0dc36 (patch)
treee9e8c1c4a7fea176d5bff25cc728709b84c33302 /src/views
downloadee4511w-web-cb9ce5560028c8a58a1de4f7390514e71fb0dc36.tar
ee4511w-web-cb9ce5560028c8a58a1de4f7390514e71fb0dc36.tar.gz
ee4511w-web-cb9ce5560028c8a58a1de4f7390514e71fb0dc36.tar.bz2
ee4511w-web-cb9ce5560028c8a58a1de4f7390514e71fb0dc36.tar.lz
ee4511w-web-cb9ce5560028c8a58a1de4f7390514e71fb0dc36.tar.xz
ee4511w-web-cb9ce5560028c8a58a1de4f7390514e71fb0dc36.tar.zst
ee4511w-web-cb9ce5560028c8a58a1de4f7390514e71fb0dc36.zip
Start rewriting the entire app
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to 'src/views')
-rw-r--r--src/views/pages/index.ejs76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/views/pages/index.ejs b/src/views/pages/index.ejs
new file mode 100644
index 0000000..6087732
--- /dev/null
+++ b/src/views/pages/index.ejs
@@ -0,0 +1,76 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+ <!-- HTML headers information -->
+ <%- include('../partials/head.ejs') %>
+ <script type="text/javascript" src="/static/js/app.js"></script>
+</head>
+
+<body>
+ <%- include('../partials/nav.ejs') %>
+ <div class="header">
+ <!-- Get the navbar -->
+
+ <div class="row">
+ <div class="col">
+
+ <h1 id="title2">Homepage</h1>
+ <hr>
+
+
+ <h3 id="subtitle1">Please upload a Python file (.py file extension) onto the Inverted Pendulum</h3>
+ <!--**************************Send form data to web server**************************-->
+ <form method="POST" action="/index" enctype="multipart/form-data">
+ <p><input type="file" name="file" accept=".py" /></p>
+ <p><input type="submit" value="Upload File" onclick="update()"></p>
+ </form>
+
+ For file upload progress bar
+ <div id="myProgress">
+ <div id="myBar"></div>
+ </div>
+
+ <!--The following lines are for the warning flash() messages-->
+ <% if (errors) { %>
+ <% for (const message in errors) { %>
+ <div class="alert alert-warning alert-dismissible fade show" role="alert">
+ <span>
+ <% message %>
+ </span>
+ <button type="button" class="close" data-dismiss="alert" aria-label="Close">
+ <span aria-hidden="true">&times;</span>
+ </button>
+ </div>
+ <% } %>
+ <% } %>
+
+ <!--The following lines are for the danger flash() messages-->
+ <% if (errors) { %>
+ <% for (const message in errors) { %>
+ <div class="alert alert-danger alert-dismissible fade show" role="alert">
+ <span>
+ <% message %>
+ </span>
+ <button type="button" class="close" data-dismiss="alert" aria-label="Close">
+ <span aria-hidden="true">&times;</span>
+ </button>
+ </div>
+ <% } %>
+ <% } %>
+
+
+ <div class="mb-3">
+ <div class="form-group">
+ <label id="Start">Start pendulum: </label>
+ <!-- <button class="btn btn-primary" id="onbutton">Actuate!</button> -->
+ <button type="button" id=button1 onclick="window.location.href='{{ url_for( 'run_test_file') }}';">Actuate!</button>
+ </div>
+ </div>
+ <hr>
+ </div>
+ </div>
+ </div>
+</body>
+
+</html> \ No newline at end of file