From 0bc9f7db2b82bd446e79bdefb03a20516fe3d8b8 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 25 Apr 2022 07:15:29 +0300 Subject: UI: Add index page and basic styling Add template(s) for the index page and some basic styling to get started with. --- qc_app/entry.py | 4 ++-- qc_app/static/css/styles.css | 31 +++++++++++++++++++++++++++++++ qc_app/templates/base.html | 19 +++++++++++++++++++ qc_app/templates/index.html | 27 +++++++++++++++++++++++++++ 4 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 qc_app/static/css/styles.css create mode 100644 qc_app/templates/base.html create mode 100644 qc_app/templates/index.html (limited to 'qc_app') diff --git a/qc_app/entry.py b/qc_app/entry.py index 4963246..951b201 100644 --- a/qc_app/entry.py +++ b/qc_app/entry.py @@ -1,9 +1,9 @@ """Entry-point module""" -from flask import Blueprint +from flask import Blueprint, render_template entrybp = Blueprint("entry", __name__) @entrybp.route("/", methods=["GET", "POST"]) def upload_file(): """Enables uploading the files""" - return "STUB: We upload the files here" + return render_template("index.html") diff --git a/qc_app/static/css/styles.css b/qc_app/static/css/styles.css new file mode 100644 index 0000000..4d569d8 --- /dev/null +++ b/qc_app/static/css/styles.css @@ -0,0 +1,31 @@ +label, legend { + text-transform: capitalize; +} + +.heading { + color: #FEFEFE; + background-color: #336699; + text-transform: capitalize; + border-radius: 5px; + padding-left: 0.5em; +} + +fieldset { + border-radius: 5px; +} + +.btn { + text-align: center; + border-radius: 5px; + display: inline-block; + vertical-align: middle; + text-transform: capitalize; + padding: 0.45em 0.3em 0.45em 0.3em; +} + +.btn-main { + color: #FEFEFE; + border-color: #357ebd; + background-color: #336699; + font-weight: bold; +} diff --git a/qc_app/templates/base.html b/qc_app/templates/base.html new file mode 100644 index 0000000..67ba6b5 --- /dev/null +++ b/qc_app/templates/base.html @@ -0,0 +1,19 @@ + + + + + + + + QC: {%block title%}{%endblock%} + + + {%block css%}{%endblock%} + + + + {%block contents%}{%endblock%} + + {%block javascript%}{%endblock%} + + diff --git a/qc_app/templates/index.html b/qc_app/templates/index.html new file mode 100644 index 0000000..ec45605 --- /dev/null +++ b/qc_app/templates/index.html @@ -0,0 +1,27 @@ +{%extends "base.html"%} + +{%block title%}Upload File{%endblock%} + +{%block contents%} +

upload file

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