From e52c18a09cabd374093b06ef0f521767cd228ba6 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Wed, 24 Jun 2020 23:39:05 +0530 Subject: make it better --- app/templates/base.html | 51 +++++++++++++++++++++++++++++++++++++ app/templates/display_photo.html | 7 ++++++ app/templates/dock_upload.html | 53 +++++++++++++++++++++++++++++++++++++++ app/templates/flash_messages.html | 7 ++++++ app/templates/form.html | 23 +++++++++++++++++ app/templates/home.html | 9 +++++++ app/templates/result.html | 7 ++++++ app/templates/wtform.html | 20 +++++++++++++++ 8 files changed, 177 insertions(+) create mode 100644 app/templates/base.html create mode 100644 app/templates/display_photo.html create mode 100644 app/templates/dock_upload.html create mode 100644 app/templates/flash_messages.html create mode 100644 app/templates/form.html create mode 100644 app/templates/home.html create mode 100644 app/templates/result.html create mode 100644 app/templates/wtform.html (limited to 'app/templates') diff --git a/app/templates/base.html b/app/templates/base.html new file mode 100644 index 0000000..68fe61b --- /dev/null +++ b/app/templates/base.html @@ -0,0 +1,51 @@ + + + + + Curie Web + + + + + +
+
+

Curie Web Demo

+
+
+
+
+ {% block main %} + {% endblock %} +
+
+ + + + + + + \ No newline at end of file diff --git a/app/templates/display_photo.html b/app/templates/display_photo.html new file mode 100644 index 0000000..413e2e1 --- /dev/null +++ b/app/templates/display_photo.html @@ -0,0 +1,7 @@ +{% extends 'base.html' %} + +{% block main %} +

Description: {{ description }}

+

Succesfuly Submitted

+ +{% endblock %} \ No newline at end of file diff --git a/app/templates/dock_upload.html b/app/templates/dock_upload.html new file mode 100644 index 0000000..3fc8419 --- /dev/null +++ b/app/templates/dock_upload.html @@ -0,0 +1,53 @@ +{% extends 'base.html' %} + +{% block main %} +

Enter Your Configuration

+
+ {% include 'flash_messages.html' %} + {{ form.csrf_token }} +
+ {{ form.description.label }} + {{ form.description(class="form-control") }} +
+
+
+ {{ form.size_x.label }} + {{ form.size_x(class="form-control")}} +
+
+ {{ form.size_y.label }} + {{ form.size_y(class="form-control")}} +
+
+ {{ form.size_z.label }} + {{ form.size_z(class="form-control")}} +
+
+
+
+ {{ form.center_x.label }} + {{ form.center_x(class="form-control")}} +
+
+ {{ form.center_y.label }} + {{ form.center_y(class="form-control")}} +
+
+ {{ form.center_z.label }} + {{ form.center_z(class="form-control")}} +
+
+
+
+ {{ form.target.label }} + {{ form.target(class="form-control") }} +
+
+ {{ form.ligand.label }} + {{ form.ligand(class="form-control")}} +
+
+ + +
+{% endblock %} \ No newline at end of file diff --git a/app/templates/flash_messages.html b/app/templates/flash_messages.html new file mode 100644 index 0000000..b524c24 --- /dev/null +++ b/app/templates/flash_messages.html @@ -0,0 +1,7 @@ +{% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} + {% for category, message in messages %} +
{{ message }}
+ {% endfor %} + {% endif %} +{% endwith %} \ No newline at end of file diff --git a/app/templates/form.html b/app/templates/form.html new file mode 100644 index 0000000..ae30dd5 --- /dev/null +++ b/app/templates/form.html @@ -0,0 +1,23 @@ +{% extends 'base.html' %} + +{% block main %} +

Basic Form in Flask

+ +
+ {% include 'flash_messages.html' %} +
+ + +
+
+ + +
+
+ + +
+ + +
+{% endblock %} \ No newline at end of file diff --git a/app/templates/home.html b/app/templates/home.html new file mode 100644 index 0000000..f7a7c78 --- /dev/null +++ b/app/templates/home.html @@ -0,0 +1,9 @@ +{% extends 'base.html' %} + +{% block main %} +

Curie Web Demo

+

The dock and report demo performs molecular docking using AutoDock Vina and then finds protein-ligand interactions using PLIP

+ +{% endblock %} \ No newline at end of file diff --git a/app/templates/result.html b/app/templates/result.html new file mode 100644 index 0000000..ca7db1c --- /dev/null +++ b/app/templates/result.html @@ -0,0 +1,7 @@ +{% extends 'base.html' %} + +{% block main %} +

Successful Form Submission

+ {% include 'flash_messages.html' %} +

My name is {{ firstname + ' ' + lastname }} and my email address is {{ email }}.

+{% endblock %} \ No newline at end of file diff --git a/app/templates/wtform.html b/app/templates/wtform.html new file mode 100644 index 0000000..6d9add5 --- /dev/null +++ b/app/templates/wtform.html @@ -0,0 +1,20 @@ +{% extends 'base.html' %} + +{% block main %} +

WTForms in Flask

+

Here we are using the Flask-WTF library to create and process a form. Flask-WTF also comes with CSRF protection and validation classes.

+
+ {% include 'flash_messages.html' %} + {{ form.csrf_token }} +
+ {{ form.firstname.label }} {{ form.firstname(class="form-control") }} +
+
+ {{ form.lastname.label }} {{ form.lastname(class="form-control") }} +
+
+ {{ form.email.label }} {{ form.email(class="form-control", placeholder="jdoe@example.com") }} +
+ +
+{% endblock %} \ No newline at end of file -- cgit v1.2.3