From fdb995186522c93896d414cb418850f239d8ed49 Mon Sep 17 00:00:00 2001 From: PH Tools Date: Thu, 12 Dec 2024 18:04:31 -0500 Subject: [PATCH] Assembly Layers Add/Edit/Delete --- PH_Materials/templates/account/login.html | 14 ++-- PH_Materials/templates/account/logout.html | 6 +- PH_Materials/templates/account/signup.html | 18 ++--- static/css/styles.css | 11 ++- webportal/templates/webportal/assemblies.html | 8 +- webportal/templates/webportal/index.html | 12 +-- .../partials/assemblies/assembly.html | 80 ++++++++++++------- .../partials/assemblies/sidebar.html | 26 +++--- .../partials/materials/container.html | 6 +- .../webportal/partials/materials/create.html | 2 +- .../webportal/partials/materials/details.html | 14 ++-- .../webportal/partials/materials/import.html | 2 +- .../webportal/partials/materials/sidebar.html | 12 +-- .../webportal/partials/materials/table.html | 6 +- .../webportal/partials/materials/update.html | 2 +- .../templates/webportal/partials/navbar.html | 10 +-- 16 files changed, 129 insertions(+), 100 deletions(-) diff --git a/PH_Materials/templates/account/login.html b/PH_Materials/templates/account/login.html index 71f0531..8068829 100644 --- a/PH_Materials/templates/account/login.html +++ b/PH_Materials/templates/account/login.html @@ -7,7 +7,7 @@ {% block content %} -

{% trans "Sign In" %}

+

{% trans "Sign In" %}

{% get_providers as socialaccount_providers %} @@ -29,7 +29,7 @@

+

{% blocktrans %}If you do not have an account yet, please create one: Create an Account {% endblocktrans %} @@ -40,20 +40,20 @@

- {{ form.login|add_label_class:"text-white mb-4" }} - {% render_field form.login class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" %} + {{ form.login|add_label_class:" mb-4" }} + {% render_field form.login class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark: dark:focus:ring-blue-500 dark:focus:border-blue-500" %}
- {{ form.password|add_label_class:"text-white mb-2" }} - {% render_field form.password class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" %} + {{ form.password|add_label_class:" mb-2" }} + {% render_field form.password class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark: dark:focus:ring-blue-500 dark:focus:border-blue-500" %}
{% if redirect_field_value %} {% endif %} - diff --git a/PH_Materials/templates/account/logout.html b/PH_Materials/templates/account/logout.html index 0d01c89..4bcb6e0 100644 --- a/PH_Materials/templates/account/logout.html +++ b/PH_Materials/templates/account/logout.html @@ -5,8 +5,8 @@ {% block head_title %}{% trans "Sign Out" %}{% endblock %} {% block content %} -
-

{% trans "Sign Out" %}

+
+

{% trans "Sign Out" %}

{% trans 'Are you sure you want to sign out?' %}

@@ -17,7 +17,7 @@

{% trans "Sign Out" %} {% endif %} - diff --git a/PH_Materials/templates/account/signup.html b/PH_Materials/templates/account/signup.html index 320e5a2..30b4979 100644 --- a/PH_Materials/templates/account/signup.html +++ b/PH_Materials/templates/account/signup.html @@ -5,9 +5,9 @@ {% block head_title %}{% trans "Signup" %}{% endblock %} {% block content %} -

{% trans "Sign Up" %}

+

{% trans "Sign Up" %}

-

+

{% blocktrans %}Already have an account? Then please sign in. {% endblocktrans %} @@ -27,25 +27,25 @@

- {{ form.username|add_label_class:"text-white mb-4" }} - {% render_field form.username class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" %} + {{ form.username|add_label_class:" mb-4" }} + {% render_field form.username class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark: dark:focus:ring-blue-500 dark:focus:border-blue-500" %}

- {{ form.password1|add_label_class:"text-white mb-2" }} - {% render_field form.password1 class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" %} + {{ form.password1|add_label_class:" mb-2" }} + {% render_field form.password1 class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark: dark:focus:ring-blue-500 dark:focus:border-blue-500" %}
- {{ form.password2|add_label_class:"text-white mb-2" }} - {% render_field form.password2 class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" %} + {{ form.password2|add_label_class:" mb-2" }} + {% render_field form.password2 class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark: dark:focus:ring-blue-500 dark:focus:border-blue-500" %}
{% if redirect_field_value %} {% endif %} - diff --git a/static/css/styles.css b/static/css/styles.css index 60370c4..609c071 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1,10 +1,13 @@ +:root { + --cell-color: rgb(255, 255, 204); + --cell-important: rgb(204, 255, 204); +} + nav { - color: white; - background: rgb(22, 8, 42); - border-bottom: 0.5px solid white; + border-bottom: 0.5px solid rgb(167, 167, 167); } body { - background: radial-gradient(circle at 0% 10%, rgb(22, 8, 42) 20%, rgb(114, 74, 170) 200%); + background: radial-gradient(circle at 170% -10%, rgb(99, 102, 241) -10%, rgb(250, 250, 250) 60%); min-height: 100vh; } \ No newline at end of file diff --git a/webportal/templates/webportal/assemblies.html b/webportal/templates/webportal/assemblies.html index 527f118..3ae32e0 100644 --- a/webportal/templates/webportal/assemblies.html +++ b/webportal/templates/webportal/assemblies.html @@ -7,9 +7,9 @@ {% block content %} -
+
-

+

-
+
+
{% include 'webportal/partials/assemblies/sidebar.html' %} {% include 'webportal/partials/assemblies/assembly.html' %} diff --git a/webportal/templates/webportal/index.html b/webportal/templates/webportal/index.html index ae00fd0..93ce8da 100644 --- a/webportal/templates/webportal/index.html +++ b/webportal/templates/webportal/index.html @@ -2,7 +2,7 @@ {% block content %} -

+

Welcome!

@@ -10,11 +10,11 @@

- + -

+

Welcome, {{ user.username }}

@@ -22,13 +22,13 @@

- + Materials - + @@ -42,6 +42,6 @@

{% lorem %}

+

{% lorem %}

{% endblock content %} \ No newline at end of file diff --git a/webportal/templates/webportal/partials/assemblies/assembly.html b/webportal/templates/webportal/partials/assemblies/assembly.html index 0661871..b978823 100644 --- a/webportal/templates/webportal/partials/assemblies/assembly.html +++ b/webportal/templates/webportal/partials/assemblies/assembly.html @@ -2,48 +2,58 @@ {% if assembly %} {% block assembly-name %} -
-
- -
+
+
+
Assembly:
+
+ +
+
{% endblock %} {% block assembly-detail-view %} -
- +
+
+
-
+
Thickness [M]
+
Layer Material
+
+
{% for layer in layers %} {% block layer %} -
- +
+
diff --git a/webportal/templates/webportal/partials/assemblies/sidebar.html b/webportal/templates/webportal/partials/assemblies/sidebar.html index fad4842..aa0f7c2 100644 --- a/webportal/templates/webportal/partials/assemblies/sidebar.html +++ b/webportal/templates/webportal/partials/assemblies/sidebar.html @@ -1,7 +1,17 @@ {% load widget_tweaks %} {% load partials %} -
+
+ +
+ +
+ +
{% block assembly-sidebar-list %} @@ -9,10 +19,10 @@ {% for assembly in assemblies %}
  • \ No newline at end of file diff --git a/webportal/templates/webportal/partials/materials/container.html b/webportal/templates/webportal/partials/materials/container.html index b3609d3..f37d466 100644 --- a/webportal/templates/webportal/partials/materials/container.html +++ b/webportal/templates/webportal/partials/materials/container.html @@ -1,8 +1,8 @@ {% load widget_tweaks %} -
    +
    -

    +

    +
    {% include 'webportal/partials/materials/sidebar.html' %} diff --git a/webportal/templates/webportal/partials/materials/create.html b/webportal/templates/webportal/partials/materials/create.html index 81a2140..617ae6a 100644 --- a/webportal/templates/webportal/partials/materials/create.html +++ b/webportal/templates/webportal/partials/materials/create.html @@ -1,6 +1,6 @@ {% load widget_tweaks %} -

    +

    Create New Material:

    diff --git a/webportal/templates/webportal/partials/materials/details.html b/webportal/templates/webportal/partials/materials/details.html index 94a3d1a..85bc453 100644 --- a/webportal/templates/webportal/partials/materials/details.html +++ b/webportal/templates/webportal/partials/materials/details.html @@ -1,13 +1,13 @@ {% load widget_tweaks %}
    - {{ form.category|add_label_class:"label text-white" }} + {{ form.category|add_label_class:"label " }} {% render_field form.category class="text-black"%}
    - {{ form.name|add_label_class:"label text-white" }} + {{ form.name|add_label_class:"label " }} {% render_field form.name class="input text-black" %} {% for error in form.name.errors %} @@ -16,7 +16,7 @@
    - {{ form.conductivity|add_label_class:"label text-white" }} + {{ form.conductivity|add_label_class:"label " }} {% render_field form.conductivity class="input text-black" %} {% for error in form.conductivity.errors %} @@ -25,7 +25,7 @@
    - {{ form.emissivity|add_label_class:"label text-white" }} + {{ form.emissivity|add_label_class:"label " }} {% render_field form.emissivity class="input text-black" %} {% for error in form.emissivity.errors %} @@ -34,17 +34,17 @@
    - {{ form.source|add_label_class:"label text-white" }} + {{ form.source|add_label_class:"label " }} {% render_field form.source class="input text-black" %}
    - {{ form.comments|add_label_class:"label text-white" }} + {{ form.comments|add_label_class:"label " }} {% render_field form.comments class="input text-black" %}
    - {{ form.color_argb|add_label_class:"label text-white" }} + {{ form.color_argb|add_label_class:"label " }} {% render_field form.color_argb class="input text-black" %}
    diff --git a/webportal/templates/webportal/partials/materials/import.html b/webportal/templates/webportal/partials/materials/import.html index 3ae3a39..60a26d3 100644 --- a/webportal/templates/webportal/partials/materials/import.html +++ b/webportal/templates/webportal/partials/materials/import.html @@ -1,6 +1,6 @@ {% load widget_tweaks %} -

    +

    Import Materials:

    diff --git a/webportal/templates/webportal/partials/materials/sidebar.html b/webportal/templates/webportal/partials/materials/sidebar.html index fa18491..21afd59 100644 --- a/webportal/templates/webportal/partials/materials/sidebar.html +++ b/webportal/templates/webportal/partials/materials/sidebar.html @@ -10,8 +10,8 @@ >
    - {{ filter.form.category|add_label_class:"label text-white" }} - {% render_field filter.form.category class="text-s text-white-300 border-gray-300 rounded focus:ring-green-500" %} + {{ filter.form.category|add_label_class:"label " }} + {% render_field filter.form.category class="text-s -300 border-gray-300 rounded focus:ring-green-500" %}
    -
    +
    -
    +