aboutsummaryrefslogtreecommitdiff
path: root/app/templates
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2020-09-16 23:51:21 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2020-09-16 23:51:21 +0530
commitd20017680bf6e8dfd2e4bcd69654a545f9a8350c (patch)
tree796e228c567f34136941d68b0de100b0376a4f0e /app/templates
parent1b530ca5d1662df06b9d6d3fb5980bcfed1fda5e (diff)
added active link for all pages to navbar
added dropdowns removed starter files removed sentry completely
Diffstat (limited to 'app/templates')
-rw-r--r--app/templates/about.html2
-rw-r--r--app/templates/base.html49
-rw-r--r--app/templates/display_photo.html7
-rw-r--r--app/templates/display_result.html8
-rw-r--r--app/templates/dock_upload.html2
-rw-r--r--app/templates/dock_upload_single.html2
-rw-r--r--app/templates/generate.html2
-rw-r--r--app/templates/home.html1
-rw-r--r--app/templates/job_status.html2
-rw-r--r--app/templates/molecule_editor.html2
-rw-r--r--app/templates/pdbqt_form.html2
-rw-r--r--app/templates/search-pubchem.html2
-rw-r--r--app/templates/search.html2
-rw-r--r--app/templates/visualise.html2
-rw-r--r--app/templates/wtform.html20
15 files changed, 45 insertions, 60 deletions
diff --git a/app/templates/about.html b/app/templates/about.html
index b61bfed..c360003 100644
--- a/app/templates/about.html
+++ b/app/templates/about.html
@@ -1,5 +1,5 @@
{% extends 'base.html' %}
-
+{% set active_page = "about" %}
{% block main %}
<h1>About Curie Web</h1>
<p>Curie Web is a web interface for my private Python Library called "Curie", with some aditional superpowers.</p>
diff --git a/app/templates/base.html b/app/templates/base.html
index 2e79a61..f92d59d 100644
--- a/app/templates/base.html
+++ b/app/templates/base.html
@@ -23,30 +23,47 @@
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
- <li class="nav-item active">
+ <li class="{{ 'nav-item active' if active_page == 'home' else 'nav-item' }}">
<a class="nav-link" href="{{ url_for('home') }}">Home <span class="sr-only">(current)</span></a>
</li>
- <li class="nav-item">
+ <li class="{{ 'nav-item active' if active_page == 'about' else 'nav-item' }}">
<a class="nav-link" href="{{ url_for('about') }}">About</a>
</li>
- <!--
- <li class="nav-item">
- <a class="nav-link" href="{{ url_for('basic_form') }}">Basic Form</a>
+ <li class="{{ 'nav-item dropdown active' if active_page == 'dock' else 'nav-item dropdown' }}">
+ <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ Dock and Report
+ </a>
+ <div class="dropdown-menu" aria-labelledby="navbarDropdown">
+ <a class="dropdown-item" href="{{ url_for('dock_upload') }}">Automatic</a>
+ <a class="dropdown-item" href="{{ url_for('dock_upload_single') }}">Manual</a>
+ </div>
</li>
- <li class="nav-item">
- <a class="nav-link" href="{{ url_for('wtform') }}">WTForms</a>
- </li> -->
- <li class="nav-item">
- <a class="nav-link" href="{{ url_for('dock_upload') }}">Dock and Report</a>
- </li>
- <li class="nav-item">
+ <li class="{{ 'nav-item active' if active_page == 'generate' else 'nav-item' }}">
<a class="nav-link" href="{{ url_for('generate') }}">Generate</a>
</li>
- <li class="nav-item">
- <a class="nav-link" href="{{ url_for('status') }}">Job Status</a>
+ <li class="{{ 'nav-item dropdown active' if active_page == 'search' else 'nav-item dropdown' }}">
+ <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ Research
+ </a>
+ <div class="dropdown-menu" aria-labelledby="navbarDropdown">
+ <a class="dropdown-item" href="{{url_for('pubmed')}}">PubMed</a>
+ <a class="dropdown-item" href="{{url_for('pubchem')}}">PubChem</a>
+ <div class="dropdown-divider"></div>
+ <a class="dropdown-item disabled" href="#">Qrious</a>
+ </div>
</li>
- <li class="nav-item">
- <a class="nav-link" href="{{url_for('pubmed')}}">Search</a>
+ <li class="{{ 'nav-item dropdown active' if active_page == 'tool' else 'nav-item dropdown' }}">
+ <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ Other Tools
+ </a>
+ <div class="dropdown-menu" aria-labelledby="navbarDropdown">
+ <a class="dropdown-item" href="{{url_for('generate_pdbqts')}}">Generate PDBQTs</a>
+ <a class="dropdown-item" href="{{url_for('editor')}}">Molecule Editor</a>
+ <a class="dropdown-item" href="{{url_for('visualise')}}">Molecule Visualiser</a>
+ </div>
+ </li>
+ <li class="{{ 'nav-item active' if active_page == 'job_status' else 'nav-item' }}">
+ <a class="nav-link" href="{{ url_for('status') }}">Job Status</a>
</li>
</ul>
</div>
diff --git a/app/templates/display_photo.html b/app/templates/display_photo.html
deleted file mode 100644
index 413e2e1..0000000
--- a/app/templates/display_photo.html
+++ /dev/null
@@ -1,7 +0,0 @@
-{% extends 'base.html' %}
-
-{% block main %}
- <h2>Description: {{ description }}</h2>
- <p>Succesfuly Submitted</p>
- <!-- <img src="{{ url_for('static', filename="uploads/" + filename) }}" /> -->
-{% endblock %} \ No newline at end of file
diff --git a/app/templates/display_result.html b/app/templates/display_result.html
deleted file mode 100644
index 0174637..0000000
--- a/app/templates/display_result.html
+++ /dev/null
@@ -1,8 +0,0 @@
-{% extends 'base.html' %}
-
-{% block main %}
- <h2>Job ID: {{ job }}</h2>
- <p>Succesfuly Submitted</p>
- <b>Description: </b>{{description}}
- <!-- <img src="{{ url_for('static', filename="uploads/" + filename) }}" /> -->
-{% endblock %} \ No newline at end of file
diff --git a/app/templates/dock_upload.html b/app/templates/dock_upload.html
index 26f1e99..43dcd63 100644
--- a/app/templates/dock_upload.html
+++ b/app/templates/dock_upload.html
@@ -1,5 +1,5 @@
{% extends 'base.html' %}
-
+{% set active_page = "dock" %}
{% block main %}
<h2>Enter Your Configuration</h2>
<form action="{{ url_for('dock_upload') }}" method="post" enctype="multipart/form-data">
diff --git a/app/templates/dock_upload_single.html b/app/templates/dock_upload_single.html
index 882675c..5329972 100644
--- a/app/templates/dock_upload_single.html
+++ b/app/templates/dock_upload_single.html
@@ -1,5 +1,5 @@
{% extends 'base.html' %}
-
+{% set active_page = "dock" %}
{% block main %}
<h2>Enter Your Configuration</h2>
<form action="{{ url_for('dock_upload_single') }}" method="post" enctype="multipart/form-data">
diff --git a/app/templates/generate.html b/app/templates/generate.html
index 629a2a3..7e6808d 100644
--- a/app/templates/generate.html
+++ b/app/templates/generate.html
@@ -1,5 +1,5 @@
{% extends 'base.html' %}
-
+{% set active_page = "generate" %}
{% block main %}
<h1>Curie Generate</h1>
<p>The model {{expName}} has been trained for {{epochs}} epochs using the {{optimizer}} optimization algorithm. Option for finetuning coming soon.</p>
diff --git a/app/templates/home.html b/app/templates/home.html
index 14b5f71..1f7f9e5 100644
--- a/app/templates/home.html
+++ b/app/templates/home.html
@@ -1,4 +1,5 @@
{% extends 'base.html' %}
+{% set active_page = "home" %}
{% block main %}
<h2>Curie Web Demo</h2>
diff --git a/app/templates/job_status.html b/app/templates/job_status.html
index 97ce9b3..446d46a 100644
--- a/app/templates/job_status.html
+++ b/app/templates/job_status.html
@@ -1,5 +1,7 @@
{% extends 'base.html' %}
+{% set active_page = "job_status" %}
+
{% block main %}
<h2>Job ID: {{ ID }}</h2>
<b>Submitted On: </b>{{subDate}}<br>
diff --git a/app/templates/molecule_editor.html b/app/templates/molecule_editor.html
index 22d8481..2a8eab3 100644
--- a/app/templates/molecule_editor.html
+++ b/app/templates/molecule_editor.html
@@ -1,5 +1,5 @@
{% extends 'base.html' %}
-
+{% set active_page = "tool" %}
{% block main %}
<h2>Molecule Editor</h2>
diff --git a/app/templates/pdbqt_form.html b/app/templates/pdbqt_form.html
index 09cd1b0..af1bb37 100644
--- a/app/templates/pdbqt_form.html
+++ b/app/templates/pdbqt_form.html
@@ -1,6 +1,6 @@
{% extends 'base.html' %}
-
+{% set active_page = "tool" %}
{% block main %}
<h2>Generate PDBQTs</h2>
diff --git a/app/templates/search-pubchem.html b/app/templates/search-pubchem.html
index 9b8e7cb..d9f0c2b 100644
--- a/app/templates/search-pubchem.html
+++ b/app/templates/search-pubchem.html
@@ -1,5 +1,5 @@
{% extends 'base.html' %}
-
+{% set active_page = "search" %}
{% block main %}
<h1>SMILES Search</h1>
<p>Get Compound SMILES through PubChem.</p>
diff --git a/app/templates/search.html b/app/templates/search.html
index 1faf151..b2cdfdc 100644
--- a/app/templates/search.html
+++ b/app/templates/search.html
@@ -1,5 +1,5 @@
{% extends 'base.html' %}
-
+{% set active_page = "search" %}
{% block main %}
<h1>Curie Search</h1>
<p>Search PubMed articles.</p>
diff --git a/app/templates/visualise.html b/app/templates/visualise.html
index 67c3a1c..f1bb068 100644
--- a/app/templates/visualise.html
+++ b/app/templates/visualise.html
@@ -1,5 +1,5 @@
{% extends 'base.html' %}
-
+{% set active_page = "tool" %}
{% block main %}
<h1>Curie Visualise</h1>
<p>placeholder uwu</p>
diff --git a/app/templates/wtform.html b/app/templates/wtform.html
deleted file mode 100644
index 6d9add5..0000000
--- a/app/templates/wtform.html
+++ /dev/null
@@ -1,20 +0,0 @@
-{% extends 'base.html' %}
-
-{% block main %}
- <h2>WTForms in Flask</h2>
- <p>Here we are using the Flask-WTF library to create and process a form. Flask-WTF also comes with CSRF protection and validation classes.</p>
- <form method="post" action="{{ url_for('wtform') }}">
- {% include 'flash_messages.html' %}
- {{ form.csrf_token }}
- <div class="form-group">
- {{ form.firstname.label }} {{ form.firstname(class="form-control") }}
- </div>
- <div class="form-group">
- {{ form.lastname.label }} {{ form.lastname(class="form-control") }}
- </div>
- <div class="form-group">
- {{ form.email.label }} {{ form.email(class="form-control", placeholder="jdoe@example.com") }}
- </div>
- <button type="submit" class="btn btn-primary">Submit</button>
-</form>
-{% endblock %} \ No newline at end of file