Roughly setup html and some basic javascript. I'm probably going to redo most of this though.
This commit is contained in:
6
app.py
6
app.py
@@ -1,11 +1,11 @@
|
|||||||
from flask import Flask
|
from flask import Flask, render_template
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def hello_world():
|
def index():
|
||||||
return 'Hello World!'
|
return render_template("index.html")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
12
static/scripts.js
Normal file
12
static/scripts.js
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
function updateAlerts() {
|
||||||
|
var text = document.querySelector('#alert_text');
|
||||||
|
var email = document.querySelector('#alert_email');
|
||||||
|
alert(text.checked);
|
||||||
|
alert(email.checked);
|
||||||
|
|
||||||
|
fetch('/updateAlerts')
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateFeed() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
10
templates/freedfreq.html
Normal file
10
templates/freedfreq.html
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
41
templates/index.html
Normal file
41
templates/index.html
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<script src="../static/scripts.js"></script>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Hydro</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Information</h1>
|
||||||
|
<div>
|
||||||
|
Plant Date:
|
||||||
|
1/19/2022
|
||||||
|
<a href="plantdate.html">Change</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Last Feed Date:
|
||||||
|
<a href="lastfeeddate.html">Change</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Next Feed Date:
|
||||||
|
<a href="nextfeeddate.html">Change</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Feed Frequency:
|
||||||
|
<a href="freedfreq.html">Change</a>
|
||||||
|
</div>
|
||||||
|
<h1>Alerts</h1>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="alert_text" name="AlertText" value=true>
|
||||||
|
<label for="alert_text">Text Message</label>
|
||||||
|
<input type="checkbox" id="alert_email" name="AlertEmail" value=true>
|
||||||
|
<label for="alert_email">Email</label><br>
|
||||||
|
<button class=button onclick="updateAlerts()">Save</button>
|
||||||
|
</div>
|
||||||
|
<br><br>
|
||||||
|
<div>
|
||||||
|
<button class=button onclick="updateFeed()">Update Feed</button>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
10
templates/lastfeeddate.html
Normal file
10
templates/lastfeeddate.html
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
10
templates/nextfeeddate.html
Normal file
10
templates/nextfeeddate.html
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
10
templates/plantdate.html
Normal file
10
templates/plantdate.html
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user