Roughly setup html and some basic javascript. I'm probably going to redo most of this though.

This commit is contained in:
dan
2022-01-19 23:37:03 -05:00
parent f635ca6958
commit fa58df3f43
7 changed files with 96 additions and 3 deletions

6
app.py
View File

@@ -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
View 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
View 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
View 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>

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

View 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
View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>