From 9dfbb63fe0427259787bdd33d96c42af1d0275f8 Mon Sep 17 00:00:00 2001
From: Adam Drake <drakeadam02@gmail.com>
Date: Thu, 2 May 2024 13:09:34 +0100
Subject: [PATCH] Updated CSS for Model page and added navbar back to create
 post

---
 .../prediction_service/create_post.html       | 53 ++++++++++---------
 .../templates/prediction_service/model.html   | 48 ++++++++---------
 2 files changed, 51 insertions(+), 50 deletions(-)

diff --git a/prediction_service/templates/prediction_service/create_post.html b/prediction_service/templates/prediction_service/create_post.html
index fbfa686..5d7f15e 100644
--- a/prediction_service/templates/prediction_service/create_post.html
+++ b/prediction_service/templates/prediction_service/create_post.html
@@ -1,31 +1,34 @@
-{% extends "prediction_service/base.html" %}
+{% include "prediction_service/base.html" %}
+{% include "prediction_service/navbar.html" %}
+
+<br>
 
 {% block content %}
 <div class="container d-flex justify-content-center align-items-center" style="height: 100vh;">
-  <div class="card">
-    <div class="card-body">
-      <h2 class="card-title text-center">Create a New Post</h2>
-      <form method="post" enctype="multipart/form-data">
-          {% csrf_token %}
-          
-          <div class="form-group">
-              <label for="title">Title:</label>
-              <input type="text" class="form-control" name="title" id="title">
-          </div>
-
-          <div class="form-group">
-              <label for="content">Content:</label>
-              <textarea class="form-control" name="content" id="content" rows="5"></textarea>
-          </div>
-
-          <div class="form-group">
-              <label for="modelFile">Model File:</label>
-              <input type="file" class="form-control-file" name="modelFile" id="modelFile" accept="">
-          </div>
-
-          <button type="submit" class="btn btn-primary">Submit</button>
-      </form>
+    <div class="card">
+      <div class="card-body">
+        <h2 class="card-title text-center">Create a New Post</h2>
+        <form method="post" enctype="multipart/form-data">
+            {% csrf_token %}
+            
+            <div class="form-group">
+                <label for="title">Title:</label>
+                <input type="text" class="form-control" name="title" id="title">
+            </div>
+  
+            <div class="form-group">
+                <label for="content">Content:</label>
+                <input type="text" class="form-control" name="content" id="content">
+            </div>
+  
+            <div class="form-group">
+                <label for="modelFile">Model File:</label>
+                <input type="file" class="form-control-file" name="modelFile" id="modelFile" accept="">
+            </div>
+  
+            <button type="submit" class="btn btn-primary">Submit</button>
+        </form>
+      </div>
     </div>
-  </div>
 </div>
 {% endblock %}
diff --git a/prediction_service/templates/prediction_service/model.html b/prediction_service/templates/prediction_service/model.html
index 4c2612f..894313c 100644
--- a/prediction_service/templates/prediction_service/model.html
+++ b/prediction_service/templates/prediction_service/model.html
@@ -3,29 +3,27 @@
 
 <br>
 
-<div class="container">
-
-    <h1>ML-Model</h1>
-
-    <!-- <img src="data:image/png;base64,{{ img_str }}" alt="PIL Image"> -->
-
-    <!-- <h2>Model Layers: {{ layer }}</h2> -->
-
-    <p>Upload an image of one of the following cars and receive a prediction:</p> 
-    <ul>
-        <li>Acura</li>
-        <li>Alfa Romeo</li>
-        <li>Aston Martin</li>
-        <li>Audi</li>
-        <li>Bentley</li>
-    </ul>
-
-    <form action="/mlmodel/{{ modelID }}/" method="post" enctype="multipart/form-data">
-
-        {% csrf_token %}
-        <input type="file" name="photo" id="photoInput" accept="image/*">
-        <button type="submit">Upload Photo</button>
-    </form>
-    
-</div>
+<div class="container d-flex justify-content-center align-items-center" style="height: 100vh;">
+    <div class="card">
+      <div class="card-body">
+        <h1 class="card-title text-center">ML-Model</h1>
+        <p>Upload an image of one of the following cars and receive a prediction:</p> 
+        <ul>
+            <li>Acura</li>
+            <li>Alfa Romeo</li>
+            <li>Aston Martin</li>
+            <li>Audi</li>
+            <li>Bentley</li>
+        </ul>
+  
+        <form action="/mlmodel/{{ modelID }}/" method="post" enctype="multipart/form-data">
+            {% csrf_token %}
+            <div class="form-group">
+                <input type="file" class="form-control-file" name="photo" id="photoInput" accept="image/*">
+            </div>
+            <button type="submit" class="btn btn-primary">Upload Photo</button>
+        </form>
+      </div>
+    </div>
+  </div>
 
-- 
GitLab