From dce834c9a11fdc133ae299a8725f31f7a8a7b41a Mon Sep 17 00:00:00 2001
From: Stephan Porada <sporada@uni-bielefeld.de>
Date: Thu, 24 Oct 2019 13:13:34 +0200
Subject: [PATCH] Add full_width and limited_width templates.

---
 app/templates/403.html.j2                     |  2 +-
 app/templates/404.html.j2                     |  2 +-
 app/templates/500.html.j2                     |  2 +-
 app/templates/admin/admin.html.j2             |  2 +-
 app/templates/admin/admin_user_page.html.j2   |  2 +-
 .../admin/edit_profile_admin.html.j2          |  2 +-
 app/templates/auth/login.html.j2              |  2 +-
 app/templates/auth/register.html.j2           |  2 +-
 app/templates/auth/reset_password.html.j2     |  2 +-
 .../auth/reset_password_request.html.j2       |  2 +-
 app/templates/auth/unconfirmed.html.j2        |  2 +-
 app/templates/base.html.j2                    | 14 ++---
 app/templates/full_width.html.j2              | 11 ++++
 app/templates/limited_width.html.j2           | 13 +++++
 app/templates/main/corpora/corpus.html.j2     |  3 +-
 .../main/corpora/corpus_analysis.html.j2      | 54 +++++++++++++++++++
 app/templates/main/dashboard.html.j2          |  2 +-
 app/templates/main/index.html.j2              |  2 +-
 app/templates/main/jobs/job.html.j2           |  2 +-
 app/templates/profile/index.html.j2           |  2 +-
 app/templates/services/nlp.html.j2            |  2 +-
 app/templates/services/ocr.html.j2            |  2 +-
 22 files changed, 101 insertions(+), 28 deletions(-)
 create mode 100644 app/templates/full_width.html.j2
 create mode 100644 app/templates/limited_width.html.j2
 create mode 100644 app/templates/main/corpora/corpus_analysis.html.j2

diff --git a/app/templates/403.html.j2 b/app/templates/403.html.j2
index 70f7d846..5381a3de 100644
--- a/app/templates/403.html.j2
+++ b/app/templates/403.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "limited_width.html.j2" %}
 
 {% block page_content %}
 <div class="page-header">
diff --git a/app/templates/404.html.j2 b/app/templates/404.html.j2
index 85a2a842..2e9e5e14 100644
--- a/app/templates/404.html.j2
+++ b/app/templates/404.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "limited_width.html.j2" %}
 
 {% block page_content %}
 <div class="page-header">
diff --git a/app/templates/500.html.j2 b/app/templates/500.html.j2
index 3e869656..d1314384 100644
--- a/app/templates/500.html.j2
+++ b/app/templates/500.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "limited_width.html.j2" %}
 
 {% block page_content %}
 <div class="page-header">
diff --git a/app/templates/admin/admin.html.j2 b/app/templates/admin/admin.html.j2
index 673f6cbc..8fbb368c 100644
--- a/app/templates/admin/admin.html.j2
+++ b/app/templates/admin/admin.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "full_width.html.j2" %}
 
 {% block page_content %}
 <div class="col s12">
diff --git a/app/templates/admin/admin_user_page.html.j2 b/app/templates/admin/admin_user_page.html.j2
index 01944235..c37f08f0 100644
--- a/app/templates/admin/admin_user_page.html.j2
+++ b/app/templates/admin/admin_user_page.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "limited_width.html.j2" %}
 
 {% block page_content %}
 <div class="col s12 m6">
diff --git a/app/templates/admin/edit_profile_admin.html.j2 b/app/templates/admin/edit_profile_admin.html.j2
index af27c067..f96aabc6 100644
--- a/app/templates/admin/edit_profile_admin.html.j2
+++ b/app/templates/admin/edit_profile_admin.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "limited_width.html.j2" %}
 
 {% block page_content %}
 <div class="col s12 m8">
diff --git a/app/templates/auth/login.html.j2 b/app/templates/auth/login.html.j2
index cc649b6a..df8dce84 100644
--- a/app/templates/auth/login.html.j2
+++ b/app/templates/auth/login.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "limited_width.html.j2" %}
 
 {% block page_content %}
 <div class="col s12 m4">
diff --git a/app/templates/auth/register.html.j2 b/app/templates/auth/register.html.j2
index acbaa2be..0c8ee664 100644
--- a/app/templates/auth/register.html.j2
+++ b/app/templates/auth/register.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "limited_width.html.j2" %}
 
 {% block page_content %}
 <div class="col s12 m4">
diff --git a/app/templates/auth/reset_password.html.j2 b/app/templates/auth/reset_password.html.j2
index 5985c7cf..dd4efb88 100644
--- a/app/templates/auth/reset_password.html.j2
+++ b/app/templates/auth/reset_password.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "limited_width.html.j2" %}
 
 {% block page_content %}
 <div class="col s12 m4">
diff --git a/app/templates/auth/reset_password_request.html.j2 b/app/templates/auth/reset_password_request.html.j2
index 8ef88700..895e4f80 100644
--- a/app/templates/auth/reset_password_request.html.j2
+++ b/app/templates/auth/reset_password_request.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "limited_width.html.j2" %}
 
 {% block page_content %}
 <div class="col s12 m4">
diff --git a/app/templates/auth/unconfirmed.html.j2 b/app/templates/auth/unconfirmed.html.j2
index 78ac1510..d2ecd62a 100644
--- a/app/templates/auth/unconfirmed.html.j2
+++ b/app/templates/auth/unconfirmed.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "limited_width.html.j2" %}
 
 {% block title %}Opaque - Confirm your account{% endblock %}
 
diff --git a/app/templates/base.html.j2 b/app/templates/base.html.j2
index 487241d6..a3206a90 100644
--- a/app/templates/base.html.j2
+++ b/app/templates/base.html.j2
@@ -24,8 +24,8 @@
       {% if current_user.is_dark == True %}
       DarkReader.enable({
         brightness: 100,
-        contrast: 90,
-        sepia: 10
+        contrast: 100,
+        sepia: 0
       });
       {% else %}
       DarkReader.disable();
@@ -182,15 +182,9 @@
     </header>
 
     <main class="grey lighten-5">
-      <div class="container">
-        <div class="row">
-          <div class="col s12">
-            <h2>{% if title %}{{ title }}{% else %}Unnamed page{% endif %}</h2>
-          </div>
-          {% block page_content %}
+          {% block main_block %}
           {% endblock %}
-        </div>
-      </div>
+
     </main>
 
     <footer class="page-footer">
diff --git a/app/templates/full_width.html.j2 b/app/templates/full_width.html.j2
new file mode 100644
index 00000000..b4de437f
--- /dev/null
+++ b/app/templates/full_width.html.j2
@@ -0,0 +1,11 @@
+{% extends "base.html.j2" %}
+
+{% block main_block %}
+<div class="row">
+  <div class="col s12">
+    <h2>{% if title %}{{ title }}{% else %}Unnamed page{% endif %}</h2>
+  </div>
+  {% block page_content %}
+  {% endblock %}
+</div>
+{% endblock %}
diff --git a/app/templates/limited_width.html.j2 b/app/templates/limited_width.html.j2
new file mode 100644
index 00000000..27243320
--- /dev/null
+++ b/app/templates/limited_width.html.j2
@@ -0,0 +1,13 @@
+{% extends "base.html.j2" %}
+
+{% block main_block %}
+<div class="container">
+  <div class="row">
+    <div class="col s12">
+      <h2>{% if title %}{{ title }}{% else %}Unnamed page{% endif %}</h2>
+    </div>
+    {% block page_content %}
+    {% endblock %}
+  </div>
+</div>
+{% endblock %}
diff --git a/app/templates/main/corpora/corpus.html.j2 b/app/templates/main/corpora/corpus.html.j2
index 2751e4e2..321f9c28 100644
--- a/app/templates/main/corpora/corpus.html.j2
+++ b/app/templates/main/corpora/corpus.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "limited_width.html.j2" %}
 
 {% block page_content %}
 <script>
@@ -84,6 +84,7 @@
   <!-- Confirm deletion of job with modal dialogue
   Modal Trigger-->
   <a href="#modal-confirm-delete" class="waves-effect waves-light btn red modal-trigger"><i class="material-icons left">delete</i>Delete Corpus</a>
+  <a href="{{ url_for('main.corpus_analysis', corpus_id=corpus.id) }}" class="waves-effect waves-light btn "><i class="material-icons left">help</i>Analyse</a>
   <!-- Modal Strucutre -->
   <div id="modal-confirm-delete" class="modal">
     <div class="modal-content">
diff --git a/app/templates/main/corpora/corpus_analysis.html.j2 b/app/templates/main/corpora/corpus_analysis.html.j2
new file mode 100644
index 00000000..cbe60bcf
--- /dev/null
+++ b/app/templates/main/corpora/corpus_analysis.html.j2
@@ -0,0 +1,54 @@
+{% extends "full_width.html.j2" %}
+
+{% block page_content %}
+<div class="col s12 m9 l9">
+  <div class="card">
+    <div class="card-content">
+      <span class="card-title">Query Results</span>
+      <table class="responsive highlight">
+       <tr>
+         <th>Firstname</th>
+         <th>Lastname</th>
+         <th>Age</th>
+       </tr>
+       <tr>
+         <td>Jill</td>
+         <td>Smith</td>
+         <td>50</td>
+       </tr>
+       {% for i in range(0,51) %}
+       <tr>
+         <td>Eve</td>
+         <td>Jackson</td>
+         <td>94</td>
+       </tr>
+       {% endfor %}
+      </table>
+    </div>
+  </div>
+</div>
+<div class="col s12 m3 l3 sticky">
+      <div class="card">
+        <div class="card-content">
+          <span class="card-title">Card Title</span>
+          <table class="responsive highlight">
+           <tr>
+             <th>Firstname</th>
+             <th>Lastname</th>
+             <th>Age</th>
+           </tr>
+           <tr>
+             <td>Jill</td>
+             <td>Smith</td>
+             <td>50</td>
+           </tr>
+           <tr>
+             <td>Eve</td>
+             <td>Jackson</td>
+             <td>94</td>
+           </tr>
+          </table>
+        </div>
+      </div>
+    </div>
+{% endblock %}
diff --git a/app/templates/main/dashboard.html.j2 b/app/templates/main/dashboard.html.j2
index 20df65df..2f77ba77 100644
--- a/app/templates/main/dashboard.html.j2
+++ b/app/templates/main/dashboard.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "limited_width.html.j2" %}
 
 {% block page_content %}
 <div class="col s12 m4">
diff --git a/app/templates/main/index.html.j2 b/app/templates/main/index.html.j2
index a796f3bf..2abd190c 100644
--- a/app/templates/main/index.html.j2
+++ b/app/templates/main/index.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "limited_width.html.j2" %}
 
 {% block page_content %}
 <div class="col s12 m4">
diff --git a/app/templates/main/jobs/job.html.j2 b/app/templates/main/jobs/job.html.j2
index 6603a26b..39541405 100644
--- a/app/templates/main/jobs/job.html.j2
+++ b/app/templates/main/jobs/job.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "limited_width.html.j2" %}
 
 {% block page_content %}
 <script>
diff --git a/app/templates/profile/index.html.j2 b/app/templates/profile/index.html.j2
index 8ce29ea6..0f09b4ca 100644
--- a/app/templates/profile/index.html.j2
+++ b/app/templates/profile/index.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "limited_width.html.j2" %}
 
 {% block page_content %}
 <div class="col s12 m4">
diff --git a/app/templates/services/nlp.html.j2 b/app/templates/services/nlp.html.j2
index c5353ab1..521296cf 100644
--- a/app/templates/services/nlp.html.j2
+++ b/app/templates/services/nlp.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "limited_width.html.j2" %}
 
 {% block page_content %}
 <div class="col s12 m4">
diff --git a/app/templates/services/ocr.html.j2 b/app/templates/services/ocr.html.j2
index c04c09c8..68887f83 100644
--- a/app/templates/services/ocr.html.j2
+++ b/app/templates/services/ocr.html.j2
@@ -1,4 +1,4 @@
-{% extends "base.html.j2" %}
+{% extends "limited_width.html.j2" %}
 
 {% block page_content %}
 <div class="col s12 m4">
-- 
GitLab