diff --git a/ActualProjectCode/DjangoProject/templates/index.html b/ActualProjectCode/DjangoProject/templates/index.html index e3c9f582a2dce3284e515c3f8b31132493a9d72d..c2e992d96b143cbe338f941f60f16625a09810f6 100644 --- a/ActualProjectCode/DjangoProject/templates/index.html +++ b/ActualProjectCode/DjangoProject/templates/index.html @@ -1,12 +1,12 @@ <!DOCTYPE html> -<html> +<html lang="en"> <head> <title>ShallowSink - Home</title> {% load static %} <link rel="stylesheet" href="{% static 'styles.css' %}"> <style> /* General Styles */ - body { + html, body { font-family: Arial, sans-serif; margin: 0; padding: 0; @@ -14,6 +14,14 @@ color: #333; height: 100%; } + + /* Page wrapper to ensure footer at bottom */ + .page-wrapper { + min-height: 100%; + display: flex; + flex-direction: column; + } + header { background-color: #004085; color: #ffffff; @@ -24,7 +32,7 @@ /* Navbar Styles */ .nav-container { display: flex; - justify-content: space-between; + justify-content: center; align-items: center; max-width: 1200px; margin: 0 auto; @@ -32,24 +40,33 @@ } .logo h1 { margin: 0; - font-size: 24px; + font-size: 28px; + text-align: center; } - .auth-links { + + /* Auth Buttons */ + .auth-buttons { display: flex; - gap: 10px; + justify-content: center; + gap: 20px; + margin-top: 40px; } - .auth-links .btn { + .big-btn { color: #ffffff; + background-color: #004085; text-decoration: none; - padding: 8px 16px; - border: 2px solid #ffffff; - border-radius: 4px; + padding: 15px 30px; + border: 2px solid #004085; + border-radius: 6px; font-weight: bold; + font-size: 18px; transition: 0.3s; + display: inline-block; } - .auth-links .btn:hover { - background-color: #ffffff; - color: #004085; + .big-btn:hover { + background-color: #002d5e; + transform: translateY(-3px); + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); } /* Main Content */ @@ -58,8 +75,7 @@ margin: 40px auto; padding: 0 20px; text-align: center; - flex: 1; - height: 100%; + flex: 1; /* This will push the footer down */ } .intro h1 { font-size: 36px; @@ -78,8 +94,7 @@ color: #ffffff; text-align: center; padding: 10px 0; - margin-top: 40px; - bottom: 0; + width: 100%; } footer p { margin: 0; @@ -87,32 +102,35 @@ </style> </head> <body> - <header> - <nav> - <div class="nav-container"> - <div class="logo"> - <h1>ShallowSink</h1> + <div class="page-wrapper"> + <header> + <nav> + <div class="nav-container"> + <div class="logo" style="margin: 0 auto;"> + <h1>ShallowSink</h1> + </div> </div> - <div class="auth-links"> - <a href="{% url 'login' %}" class="btn">Login</a> - <a href="{% url 'register' %}" class="btn">Register</a> + </nav> + </header> + + <main> + <section class="intro"> + <h1>Welcome to ShallowSink</h1> + <p>Your trusted platform for making better tech decisions.</p> + + <div class="auth-buttons"> + <a href="{% url 'login' %}" class="big-btn">Login</a> + <a href="{% url 'register' %}" class="big-btn">Register</a> </div> - </div> - </nav> - </header> + </section> - <main> - <section class="intro"> - <h1>Welcome to ShallowSink</h1> - <p>Your trusted platform for making better tech decisions.</p> - </section> - </main> + {% block content %} + {% endblock %} + </main> - <footer> - <p>© 2025 ShallowSink</p> - </footer> - {% block content %} - {% endblock %} + <footer> + <p>© 2025 ShallowSink</p> + </footer> + </div> </body> -</html> - +</html> \ No newline at end of file diff --git a/ActualProjectCode/DjangoProject/templates/modelForms/userUpload.html b/ActualProjectCode/DjangoProject/templates/modelForms/userUpload.html index 9602e9d61884dfb9ec2983ec6156e79f114da1d3..7ff6530b0ff1b9ab8b8ee2d8f5ac26b942a5c445 100644 --- a/ActualProjectCode/DjangoProject/templates/modelForms/userUpload.html +++ b/ActualProjectCode/DjangoProject/templates/modelForms/userUpload.html @@ -81,20 +81,60 @@ <div class="container"> <p><a href="{% url 'profile' %}" style="display: inline-block; background-color: #4CAF50; color: white; text-decoration: none; padding: 10px 15px; border-radius: 5px; font-weight: bold; margin-bottom: 20px; transition: background-color 0.3s ease;">Return to Profile</a></p> <form action="" method="POST" enctype="multipart/form-data"> + {% csrf_token %} + {% for model in models %} - <h2> {{ model.modelTitle }}</h2> - <p> Uploaded by: {{ model.username }} </p> - <p> {{ model.modelDescription }}</p> + <h2>{{ model.modelTitle }}</h2> + <p>Uploaded by: {{ model.username }}</p> + <p>{{ model.modelDescription }}</p> <hr> {% endfor %} + <h1>Upload your CSV</h1> - {% csrf_token %} - {{ form.as_p }} + {# Render hidden username field #} + {{ form.username }} + + {# Render uploadedFile field #} + <div class="form-group"> + <label for="{{ form.uploadedFile.id_for_label }}">{{ form.uploadedFile.label }}:</label> + {{ form.uploadedFile }} + {% if form.uploadedFile.help_text %} + <small>{{ form.uploadedFile.help_text }}</small> + {% endif %} + {% if form.uploadedFile.errors %} + <span class="error">{{ form.uploadedFile.errors }}</span> + {% endif %} + </div> + + {# Render targetColumn field #} + <div class="form-group"> + <label>{{ form.targetColumn.label }}:</label> + {{ form.targetColumn }} + {% if form.targetColumn.help_text %} + <small>{{ form.targetColumn.help_text }}</small> + {% endif %} + {% if form.targetColumn.errors %} + <span class="error">{{ form.targetColumn.errors }}</span> + {% endif %} + </div> + + {# Replace chosenML with dropdown #} + <div class="form-group"> + <label for="model-select">{{ form.chosenML.label }}:</label> + <select id="model-select" name="chosenML"> + <option value="">-- Select a model --</option> + {% for model in models %} + <option value="{{ model.modelTitle }}">{{ model.modelTitle }}</option> + {% endfor %} + </select> + {% if form.chosenML.errors %} + <span class="error">{{ form.chosenML.errors }}</span> + {% endif %} + </div> <input type="submit" value="Submit"> </form> </div> - </body> </html> \ No newline at end of file