diff --git a/ACMAS/app/ACMAS_Web/components/button/button.html b/ACMAS/app/ACMAS_Web/components/button/button.html index 5010a7f..a7ac40d 100644 --- a/ACMAS/app/ACMAS_Web/components/button/button.html +++ b/ACMAS/app/ACMAS_Web/components/button/button.html @@ -1,7 +1,7 @@ - + {% if component_type == "primary" %} - + {% elif component_type == "secondary" %} - + {% endif %} diff --git a/ACMAS/app/ACMAS_Web/components/field/field.html b/ACMAS/app/ACMAS_Web/components/field/field.html index 2def580..663f1e6 100644 --- a/ACMAS/app/ACMAS_Web/components/field/field.html +++ b/ACMAS/app/ACMAS_Web/components/field/field.html @@ -1,7 +1,12 @@ -
+{% load component_tags %} + +
{% if component_type == "input" %} - - {% else %} - + + {% else %} + {% if icon_name != "" %} + {% component "icon" icon=icon_name icon_type="mini" icon_class="w-6 h-6 flex-shrink-0 text-gray-400" %} + {% endif %} + {% endif %}
diff --git a/ACMAS/app/ACMAS_Web/components/field/field.py b/ACMAS/app/ACMAS_Web/components/field/field.py index 2e574f5..cc0e200 100644 --- a/ACMAS/app/ACMAS_Web/components/field/field.py +++ b/ACMAS/app/ACMAS_Web/components/field/field.py @@ -5,9 +5,10 @@ class Field(component.Component): template_name = "field/field.html" - def get_context_data(self, placeholder, name, component_type): + def get_context_data(self, placeholder, name, component_type, icon_name): return { "placeholder": placeholder, "name": name, "component_type": component_type, + "icon_name": icon_name, } diff --git a/ACMAS/app/ACMAS_Web/static/img/github.png b/ACMAS/app/ACMAS_Web/static/img/github.png new file mode 100644 index 0000000..9490ffc Binary files /dev/null and b/ACMAS/app/ACMAS_Web/static/img/github.png differ diff --git a/ACMAS/app/ACMAS_Web/templates/_base.html b/ACMAS/app/ACMAS_Web/templates/_base.html index f96f29c..670cebf 100644 --- a/ACMAS/app/ACMAS_Web/templates/_base.html +++ b/ACMAS/app/ACMAS_Web/templates/_base.html @@ -138,7 +138,6 @@ {% endblock %} {% endif %} -
  • GitHub
  • {% if user.is_authenticated %} {% block user %} @@ -158,27 +157,23 @@
    - - -
    +
    {% block content %} {% endblock content %}
    - {% comment %}
    -
    -
    -
    {% endcomment %} - + +
    + +
      +
    • + github +
    • +
    • + RCOS +
    • +
    +
    {% endblock body %} diff --git a/ACMAS/app/ACMAS_Web/templates/index.html b/ACMAS/app/ACMAS_Web/templates/index.html index c6e92b5..c29a4fb 100644 --- a/ACMAS/app/ACMAS_Web/templates/index.html +++ b/ACMAS/app/ACMAS_Web/templates/index.html @@ -31,7 +31,6 @@

    Automated Course Ma

    -
    @@ -40,24 +39,22 @@

    Automated Course Ma class="px-6 rounded-xl relative w-full lg:w-3/12 w-full py-8 md:w-6/12 transition ease-in-out delay-50 hover:-translate-y-1 hover:scale-105 hover:bg-gray-50 duration-200 cursor-pointer" onclick="window.location.href='searchByCourse';" > -
    - {% component "icon" icon="academic-cap" icon_type="mini" icon_class="w-5 h-5" %} +
    + {% component "icon" icon="academic-cap" icon_type="mini" icon_class="w-6 h-6" %}
    Search by Course
    -

    Blah blah blah blah

    -
    - {% component "icon" icon="magnifying-glass" icon_type="mini" icon_class="w-5 h-5" %} +
    + {% component "icon" icon="magnifying-glass" icon_type="mini" icon_class="w-6 h-6" %}
    Search by Question
    -

    Blah blah blah blah

    {% if user.is_authenticated %} @@ -65,30 +62,28 @@
    Search by class="px-6 rounded-xl relative w-full lg:w-3/12 w-full py-8 md:w-6/12 transition ease-in-out delay-50 hover:-translate-y-1 hover:scale-105 hover:bg-gray-50 duration-200 cursor-pointer" onclick="window.location.href='upload-file';" > -
    - {% component "icon" icon="document-arrow-up" icon_type="mini" icon_class="w-5 h-5" %} +
    + {% component "icon" icon="document-arrow-up" icon_type="mini" icon_class="w-6 h-6" %}
    Upload
    File
    -

    Blah blah blah blah

    -
    - {% component "icon" icon="cloud-arrow-up" icon_type="mini" icon_class="w-5 h-5" %} +
    + {% component "icon" icon="cloud-arrow-up" icon_type="mini" icon_class="w-6 h-6" %}
    -
    Upload Manually
    -

    Blah blah blah blah

    +
    Upload
    Manually
    {% else %}
    -
    - {% component "icon" icon="document-arrow-up" icon_type="mini" icon_class="w-5 h-5" %} +
    + {% component "icon" icon="document-arrow-up" icon_type="mini" icon_class="w-6 h-6" %}
    Upload
    File
    @@ -96,11 +91,11 @@
    Upload
    -
    - {% component "icon" icon="cloud-arrow-up" icon_type="mini" icon_class="w-5 h-5" %} +
    + {% component "icon" icon="cloud-arrow-up" icon_type="mini" icon_class="w-6 h-6" %}
    -
    Upload Manually
    +
    Upload
    Manually

    Login to upload

    @@ -110,15 +105,6 @@
    Upload Man
    -{% comment %}
    Simplify
    studying with
    -
    - - ACMAS logo - {% endcomment %} {% endblock content %} {% comment %} {% block content %} {% endcomment %} @@ -146,54 +132,5 @@
    Upload Man href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" crossorigin="anonymous" /> - - - - {% comment %}
    {% endcomment %} - {% comment %}
    -
    -
    Simplify
    studying with
    -
    - - - -
    -
    - -
    - - {%if user.is_authenticated %} - {%block UploadOptions%} - - {%endblock%} - {% endif %} - -
    -
    -
    -
    - - - - -
    {% endcomment %} -{% comment %} {% endblock %} {% endcomment %} + {% endcomment %} diff --git a/ACMAS/app/ACMAS_Web/templates/pdf-reader.html b/ACMAS/app/ACMAS_Web/templates/pdf-reader.html index a017968..1f676b6 100644 --- a/ACMAS/app/ACMAS_Web/templates/pdf-reader.html +++ b/ACMAS/app/ACMAS_Web/templates/pdf-reader.html @@ -15,23 +15,26 @@ {% block facebook_url %}www.acmas.systems{% endblock %} {% block content %} - -
    -

    ACMAS Reader

    -
    -
    - +
    +
    +
    +
    +
    +
    + +
    +
    -
    - - - - {% component "button" text="Return to Homepage" component_type="primary" value="" %} + +
    + {% component "button" text="Return to Query" component_type="primary" value="Return to Query" %} +
    + + {% component "button" text="Return to Homepage" component_type="secondary" value="" %} +
    -
    - {% component "button" text="Return to Query" component_type="primary" value="Return to Query" %} - {% comment %} {% endcomment %} -
    -
    +
    +
    +
    {% endblock %} diff --git a/ACMAS/app/ACMAS_Web/templates/profile.html b/ACMAS/app/ACMAS_Web/templates/profile.html index d22be1c..0304085 100644 --- a/ACMAS/app/ACMAS_Web/templates/profile.html +++ b/ACMAS/app/ACMAS_Web/templates/profile.html @@ -3,16 +3,26 @@ {% block title %}Profile{% endblock %} {% block content %} -
    -

    Hello {{user.username}}!

    - +
    +
    +
    +
    +
    +
    +
    + {% component "icon" icon="user" icon_type="mini" icon_class="w-20 h-20" %} +
    +
    +

    {{ user.username }}

    +

    {{ user.email }}

    +
    + + {% component "button" text="Change Password" component_type="secondary" value="" %} + +
    +
    +
    +
    +
    {% endblock%} diff --git a/ACMAS/app/ACMAS_Web/templates/register.html b/ACMAS/app/ACMAS_Web/templates/register.html index c3e2a83..3fac8df 100644 --- a/ACMAS/app/ACMAS_Web/templates/register.html +++ b/ACMAS/app/ACMAS_Web/templates/register.html @@ -3,14 +3,28 @@ {% block title %} Create an Account {% endblock %} {% block content %} -
    -
    +
    +
    +
    +
    +

    Register

    {% csrf_token %} - {{ form }} -
    - {% component "button" text="Register" component_type="primary" value="submit" %} +
    +
    +
    + {% component "field" component_type="text" placeholder="Enter username..." name="username" icon_name="academic-cap" %} + {% component "field" component_type="text" placeholder="Enter email..." name="email" icon_name="academic-cap" %} + {% component "field" component_type="password" placeholder="Enter password..." name="password" icon_name="academic-cap" %} + {% component "field" component_type="password" placeholder="Confirm password..." name="password" icon_name="academic-cap" %} +
    +
    +
    + {% component "button" text="Register" component_type="primary" value="submit" %} +
    +
    +
    {% endblock %} diff --git a/ACMAS/app/ACMAS_Web/templates/registration/login.html b/ACMAS/app/ACMAS_Web/templates/registration/login.html index 97dc71f..1fd016d 100644 --- a/ACMAS/app/ACMAS_Web/templates/registration/login.html +++ b/ACMAS/app/ACMAS_Web/templates/registration/login.html @@ -3,22 +3,28 @@ {% block title %}Login{% endblock %} {%block content%} -
    -
    +
    +
    +
    +
    +

    Login

    {% csrf_token %} - {{ form }} -
    - {% component "button" text="Login" component_type="primary" value="submit" %} +
    +
    + {% component "field" component_type="text" placeholder="Enter username..." name="username" icon_name="academic-cap" %} + {% component "field" component_type="password" placeholder="Enter password..." name="password" icon_name="academic-cap" %} +
    +
    + {% component "button" text="Login" component_type="primary" value="submit" %} +
    -
    -
    -

    - Don't have an account? Create one - - {% component "button" text="Here" component_type="secondary" value="" %} - -

    +
    +

    + Don't have an account? Create one here +

    +
    +
    {%endblock%} diff --git a/ACMAS/app/ACMAS_Web/templates/search-by-course.html b/ACMAS/app/ACMAS_Web/templates/search-by-course.html index cde6a89..d24eb59 100644 --- a/ACMAS/app/ACMAS_Web/templates/search-by-course.html +++ b/ACMAS/app/ACMAS_Web/templates/search-by-course.html @@ -14,91 +14,35 @@ {% block facebook_url %}www.acmas.systems/searchByCourse{% endblock %} {% block content %} -{% comment %}
    -

    Search by Course

    -
    -
    {% csrf_token %} - -
    - {% component "field" component_type="text" placeholder="Enter University" name="school" %} -
    -
    -
    - {% component "field" component_type="text" placeholder="Enter Course" name="course" %} -
    -
    - -
    -
    - -
    - {% component "button" text="Search" component_type="primary" value="Search" %} -
    -
    -
    -
    {% endcomment %} - -
    -
    -

    Search by Course

    -
    {% csrf_token %} - -
    -
    -
    - - - - -
    -
    -
    - - - - -
    -
    - -
    -
    +
    +

    Search by Course

    + {% csrf_token %} + +
    +
    + {% component "field" component_type="text" placeholder="Enter university..." name="school" icon_name="academic-cap" %} +
    + {% component "field" component_type="text" placeholder="Enter course..." name="course" icon_name="book-open" %} +
    +
    -
    - -
    -
    - {% comment %}
    - {% component "field" component_type="text" placeholder="Enter University" name="school" %}
    -
    -
    - {% component "field" component_type="text" placeholder="Enter Course" name="course" %} -
    -
    - -
    -
    {% endcomment %} - - {% comment %}
    - {% component "button" text="Search" component_type="primary" value="Search" %} -
    {% endcomment %} - -
    +
    +
    + {% component "button" text="Search" component_type="primary" value="Search" %} +
    +
    + +
    diff --git a/ACMAS/app/ACMAS_Web/templates/search-by-question.html b/ACMAS/app/ACMAS_Web/templates/search-by-question.html index 55dc591..bc97632 100644 --- a/ACMAS/app/ACMAS_Web/templates/search-by-question.html +++ b/ACMAS/app/ACMAS_Web/templates/search-by-question.html @@ -15,44 +15,18 @@ {% block facebook_url %}www.acmas.systems/searchByQuestion{% endblock %} {% block content %} - -{% comment %}
    -

    Search by Question

    -
    -
    {% csrf_token %} -
    - {% component "field" component_type="text" placeholder="Enter your question" name="question" %} -
    -
    - {% component "button" text="Search" component_type="primary" value="Search" %} -
    -
    -
    -
    {% endcomment %} -

    Search by Question

    {% csrf_token %} - {% comment %}
    - -
    {% endcomment %} -
    -
    - - - - -
    +
    + {% component "field" component_type="text" placeholder="Enter question..." name="question" icon_name="magnifying-glass" %}
    - + {% component "button" text="Search" component_type="primary" value="Search" %}
    - {% comment %}
    - {% component "button" text="Search" component_type="primary" value="Search" %} -
    {% endcomment %}
    diff --git a/ACMAS/app/ACMAS_Web/templates/search-results.html b/ACMAS/app/ACMAS_Web/templates/search-results.html index a148e00..a27ddc4 100644 --- a/ACMAS/app/ACMAS_Web/templates/search-results.html +++ b/ACMAS/app/ACMAS_Web/templates/search-results.html @@ -15,40 +15,45 @@ {% block facebook_url %}www.acmas.systems{% endblock %} {% block content %} -
    -

    Search Results

    -
    - {% if not files %} -
    -
    - - - +
    +
    +
    +
    +

    Search Results

    +
    + {% if not files %} +
    +
    + {% component "icon" icon="magnifying-glass" icon_type="mini" icon_class="w-6 h-6 flex-shrink-0 text-gray-400" %} +
    +

    Sorry, we couldn't find what you're looking for.

    -
    -

    Sorry, we couldn't find what you're looking for.

    + {% else %} +
    + {% for file in files %} +
    + {{ file.filename }} +
    + +
    +
    + {% endfor %}
    -
    + {% endif %} +
    + + {% if manual == True %} + + {% component "button" text="New Search" component_type="primary" value="" %} + + {% else %} + + {% component "button" text="New Search" component_type="primary" value="" %} + {% endif %} -
    - {% for file in files %} -
    - {{ file.filename }} -
    - -
    -
    - {% endfor %} +
    - {% if manual == True %} - - {% component "button" text="New Search" component_type="primary" value="" %} - - {% else %} - - {% component "button" text="New Search" component_type="primary" value="" %} - - {% endif %} +
    {% endblock %} diff --git a/ACMAS/app/ACMAS_Web/templates/upload-file.html b/ACMAS/app/ACMAS_Web/templates/upload-file.html index 89c2c8e..98c6259 100644 --- a/ACMAS/app/ACMAS_Web/templates/upload-file.html +++ b/ACMAS/app/ACMAS_Web/templates/upload-file.html @@ -29,23 +29,13 @@

    Anonymous ACMAS Upload

    Note: Anonymous uploads need to be approved by a moderator before being published to ACMAS
    {%endblock%} {% endif %} -
    {% csrf_token %} + {% csrf_token %}
    -
    - - - - -
    + {% component "field" component_type="text" placeholder="Enter university..." name="school" icon_name="academic-cap" %}
    -
    - - - - -
    + {% component "field" component_type="text" placeholder="Enter course..." name="course" icon_name="book-open" %}
    - - - - - - -
    -
    - -
    - {% component "field" component_type="input" placeholder="Upload File" name="fileUpload" %} -
    - {%if user.is_authenticated %} - {%block submitNew%} - -
    - {% component "button" text="Upload" component_type="primary" value="Upload" %} -
    - {%endblock%} - {% else %} - {%block submitQueue%} - -
    - -
    - {%endblock%} - {% endif %} - -
    -
    -{% endblock %} {% endcomment %} diff --git a/ACMAS/app/ACMAS_Web/templates/upload-manually.html b/ACMAS/app/ACMAS_Web/templates/upload-manually.html index 0c36d17..0420f67 100644 --- a/ACMAS/app/ACMAS_Web/templates/upload-manually.html +++ b/ACMAS/app/ACMAS_Web/templates/upload-manually.html @@ -14,81 +14,19 @@ {% block facebook_url %}www.acmas.systems/upload-manually{% endblock %} {% block content %} -{% comment %}
    - -

    ACMAS Upload

    -
    -
    {% csrf_token %} - -
    - {% component "field" component_type="text" placeholder="Enter University" name="school" %} -
    - -
    - {% component "field" component_type="text" placeholder="Enter Course" name="course" %} -
    - -
    - {% component "field" component_type="text" placeholder="Enter Question" name="question" %} -
    - -
    - {% component "field" component_type="text" placeholder="Enter Answer" name="answer" %} -
    - -
    -
    - - {% comment %} {% component "select" placeholder="Select assignment type" name="type" options="types" %} {% endcomment %} - {% comment %}
    -
    - -
    - {% component "button" text="Upload" component_type="primary" value="Upload" %} -
    -
    -
    -
    {% endcomment %} -

    ACMAS Upload

    -
    {% csrf_token %} + {% csrf_token %}
    -
    - - - - -
    -
    - - - - -
    -
    - - - - -
    -
    - - - - -
    + {% component "field" component_type="text" placeholder="Enter university..." name="school" icon_name="academic-cap" %} + {% component "field" component_type="text" placeholder="Enter course..." name="course" icon_name="book-open" %} + {% component "field" component_type="text" placeholder="Enter question..." name="question" icon_name="question-mark-circle" %} + {% component "field" component_type="text" placeholder="Enter answer..." name="answer" icon_name="light-bulb" %}