From 1d40830066a1bb5d98a67e6f85c9121b24b9c32b Mon Sep 17 00:00:00 2001 From: nono Date: Wed, 4 May 2022 21:19:22 +0200 Subject: [PATCH] Added webcam, using partial templates --- src/templates/banner.html | 21 +++++ src/templates/base.html | 57 ++++++++++++ src/templates/footer.html | 5 + src/templates/header.html | 10 ++ src/templates/index.html | 47 +--------- src/templates/webcam.html | 186 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 282 insertions(+), 44 deletions(-) create mode 100644 src/templates/banner.html create mode 100644 src/templates/base.html create mode 100644 src/templates/webcam.html diff --git a/src/templates/banner.html b/src/templates/banner.html new file mode 100644 index 0000000..17b82a5 --- /dev/null +++ b/src/templates/banner.html @@ -0,0 +1,21 @@ + +
+ LittlePrynter icon

Little Prynter

+
+ +
+ {% with messages = get_flashed_messages(category_filter=('error')) %} + {% if messages %} + {% for message in messages %} + + {% endfor %} + {% endif %} + {% endwith %} + + {% with messages = get_flashed_messages(category_filter=('info')) %} + {% if messages %} + {% for message in messages %} + + {% endfor %} + {% endif %} + {% endwith %} diff --git a/src/templates/base.html b/src/templates/base.html new file mode 100644 index 0000000..a6cf7a8 --- /dev/null +++ b/src/templates/base.html @@ -0,0 +1,57 @@ + + + + + LittlePrynter + + + + + + +
+ LittlePrynter icon

Little Prynter

+
+ + +
+ + +
+ {% with messages = get_flashed_messages(category_filter=('error')) %} + {% if messages %} + {% for message in messages %} + + {% endfor %} + {% endif %} + {% endwith %} + + {% with messages = get_flashed_messages(category_filter=('info')) %} + {% if messages %} + {% for message in messages %} + + {% endfor %} + {% endif %} + {% endwith %} + + + {% block content %} + + + {% endblock %} +
+ +
+ + diff --git a/src/templates/footer.html b/src/templates/footer.html index e69de29..6b3e682 100644 --- a/src/templates/footer.html +++ b/src/templates/footer.html @@ -0,0 +1,5 @@ +
+ +
+ + diff --git a/src/templates/header.html b/src/templates/header.html index e69de29..f669595 100644 --- a/src/templates/header.html +++ b/src/templates/header.html @@ -0,0 +1,10 @@ + + + + + LittlePrynter + + + + + diff --git a/src/templates/index.html b/src/templates/index.html index e5aead0..2f171f9 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -1,40 +1,7 @@ - - - - - LittlePrynter - - - - - - -
- LittlePrynter icon

Little Prynter

-
- -
- {% with messages = get_flashed_messages(category_filter=('error')) %} - {% if messages %} - {% for message in messages %} - - {% endfor %} - {% endif %} - {% endwith %} +{% extends 'base.html' %} - {% with messages = get_flashed_messages(category_filter=('info')) %} - {% if messages %} - {% for message in messages %} - - {% endfor %} - {% endif %} - {% endwith %} +{% block content %} -

Print a short message

@@ -60,12 +27,4 @@
- -
-
- -
- - + {% endblock %} diff --git a/src/templates/webcam.html b/src/templates/webcam.html new file mode 100644 index 0000000..4aed202 --- /dev/null +++ b/src/templates/webcam.html @@ -0,0 +1,186 @@ +{% extends 'base.html' %} + +{% block content %} + +
+

Photomaton

+
+ + + +
+ + + +
+
+ +
+ + + + + + +
+ + + + + +
+ +{% endblock %}