From c8ef8843aaaf28bc38b544ae8ac72accf233aead Mon Sep 17 00:00:00 2001 From: Matt Kohls Date: Mon, 4 Sep 2023 15:36:33 -0400 Subject: Revamped project init New repo for larger structural changes from Sensor-Server. Currently doing most all the same stuff but hopefully better. Still have to clean out some of the older templates for the new interface --- snag/templates/dashboard/dashboard.html | 43 ++++++++++++++++++++++++++++++++ snag/templates/interactive.html | 39 +++++++++++++++++++++++++++++ snag/templates/layout.html | 29 ++++++++++++++++++++++ snag/templates/show_entries.html | 44 +++++++++++++++++++++++++++++++++ 4 files changed, 155 insertions(+) create mode 100644 snag/templates/dashboard/dashboard.html create mode 100644 snag/templates/interactive.html create mode 100644 snag/templates/layout.html create mode 100644 snag/templates/show_entries.html (limited to 'snag/templates') diff --git a/snag/templates/dashboard/dashboard.html b/snag/templates/dashboard/dashboard.html new file mode 100644 index 0000000..c061b66 --- /dev/null +++ b/snag/templates/dashboard/dashboard.html @@ -0,0 +1,43 @@ +{% extends 'layout.html' %} + +{% block headline %}{% block title %}Dashboard{% endblock %}{% endblock %} + +{% block content %} +
+ {% if deviceList|length == 0 %} +Hmmm nothing seems to be logged yet + {% endif %} + {% for entry in deviceList %} + +

{{ entry.name }} | {{ entry.location }}

+ + + {% if entry.location != "status" %} + + + + {% else %} + + {% endif %} + + +
+
+ +
+
+
+ +
+
+
+ +
+
+ + {% endfor %} + +
+{% endblock %} + +{% block footer %} Best by: {{ generatedAt }} {% endblock %} diff --git a/snag/templates/interactive.html b/snag/templates/interactive.html new file mode 100644 index 0000000..1756865 --- /dev/null +++ b/snag/templates/interactive.html @@ -0,0 +1,39 @@ +{% extends "layout.html" %} +{% block body %} +
+

+ + +

+

+ + +

+

+ + + +

+

+ + + +

+
+ + +
+ +
+ + +{% endblock %} diff --git a/snag/templates/layout.html b/snag/templates/layout.html new file mode 100644 index 0000000..50ad57b --- /dev/null +++ b/snag/templates/layout.html @@ -0,0 +1,29 @@ + + + + + + snag | {% block title %}{% endblock %} + + + + +
+ +
+
+

{% block headline %}{% endblock %}

+
+ + {% block content %}{% endblock %} + + + + diff --git a/snag/templates/show_entries.html b/snag/templates/show_entries.html new file mode 100644 index 0000000..86451df --- /dev/null +++ b/snag/templates/show_entries.html @@ -0,0 +1,44 @@ +{% extends "layout.html" %} +{% block body %} + +
+ +
+
+ +
+ {% if devId == 2 %} +
+ +
+ {% endif %} + +
+

Readings from the past 24 hours

+

+ + + + + + + + {% for entry in log %} + + + + + + + {% endfor %} +
TimestampTemperature (C)Humidity (%)Pressure (hPa)
{{ entry.date }}{{ entry.temperature }}{{ entry.humidity }}{{ entry.pressure }}
+

+{% endblock %} -- cgit v1.2.3