From 199f8a3cd7fc220cfc53988647292414ce44ba64 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 11 Nov 2024 12:07:46 +0530 Subject: [PATCH 1/2] delete functionality --- cl8/templates/_profile.html | 17 ++- cl8/templates/_profile_edit.html | 7 + cl8/templates/account/account_delete.html | 35 +++++ .../account/account_delete_message.html | 59 +++++++++ cl8/templates/pages/_paginated_profiles.html | 10 ++ cl8/users/api/views.py | 2 +- requirements.txt | 66 ++++++++++ theme/templates/base.html | 123 +++++++++--------- 8 files changed, 254 insertions(+), 65 deletions(-) create mode 100644 cl8/templates/account/account_delete.html create mode 100644 cl8/templates/account/account_delete_message.html create mode 100644 requirements.txt diff --git a/cl8/templates/_profile.html b/cl8/templates/_profile.html index 3e90c8e..9e306f4 100644 --- a/cl8/templates/_profile.html +++ b/cl8/templates/_profile.html @@ -70,7 +70,7 @@

{{ tag_group }}

{% for tag_dict in tags %} @@ -83,7 +83,7 @@

{{ tag_group }}

{% for tag_dict in ungrouped_tags %} @@ -131,4 +131,17 @@

{{ tag_group }}

}) }) +document.querySelectorAll('.tagsClass').forEach(item => { + + // Get the tag name from the data attribute + const tagName = item.getAttribute('data-tag-name'); + // Check if the tag name contains 'ibm' (case-sensitive) + if (tagName.indexOf('IB1') !== -1) { + // Apply the outline style + item.style.border = '1px solid #ff4d11'; + item.style.outline = 'none'; // Optional: remove default outline if necessary + } + + }) + diff --git a/cl8/templates/_profile_edit.html b/cl8/templates/_profile_edit.html index 8c66032..db273d8 100644 --- a/cl8/templates/_profile_edit.html +++ b/cl8/templates/_profile_edit.html @@ -67,6 +67,13 @@

When 'visible' is checked, your profile will show up in searches

+ + + + + diff --git a/cl8/templates/account/account_delete.html b/cl8/templates/account/account_delete.html new file mode 100644 index 0000000..6771250 --- /dev/null +++ b/cl8/templates/account/account_delete.html @@ -0,0 +1,35 @@ +{% extends "account/base.html" %} +{% load i18n %} +{% load account %} +{% block head_title %} {% trans "Delete Account" %} {% endblock %} {% block inner %} +
+
+
+

{% trans "Permanently delete account" %}

+ +
+

+ {% trans "This will permanently delete your account. If you want to rejoin, we will have to re-invite you." %} +

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

+ {% blocktrans %}Please contact us if you would like to discuss anything{% endblocktrans %} +

+
+
+
+
+{% endblock %} \ No newline at end of file diff --git a/cl8/templates/account/account_delete_message.html b/cl8/templates/account/account_delete_message.html new file mode 100644 index 0000000..17b4579 --- /dev/null +++ b/cl8/templates/account/account_delete_message.html @@ -0,0 +1,59 @@ +{% extends "account/base.html" %} +{% load i18n %} +{% load account %} +{% block head_title %} {% trans "Delete Message" %} {% endblock %} {% block inner %} + +
+
+
+

{% trans "Account deleted" %}

+ +
+

+ {% trans "Your account has been removed." %} +

+

+ {% trans "If you would like to rejoin, just email us" %} +

+ +

+ {% blocktrans %}constellation@ib1.org{% endblocktrans %} +

+
+
+
+
+{% endblock %} + diff --git a/cl8/templates/pages/_paginated_profiles.html b/cl8/templates/pages/_paginated_profiles.html index 8f4c408..71c30bd 100644 --- a/cl8/templates/pages/_paginated_profiles.html +++ b/cl8/templates/pages/_paginated_profiles.html @@ -66,6 +66,16 @@

document.querySelectorAll('.listButton').forEach(item => { + // Get the tag name from the data attribute + const tagName = item.getAttribute('data-tag-name'); + // Check if the tag name contains 'ibm' (case-sensitive) + if (tagName.indexOf('IB1') !== -1) { + // Apply the outline style + item.style.border = '1px solid #ff4d11'; + item.style.outline = 'none'; // Optional: remove default outline if necessary + } + + item.addEventListener('click', event => { // we can't just bubble up a 'click' event to the parent elements diff --git a/cl8/users/api/views.py b/cl8/users/api/views.py index eaf91fe..6bc6128 100755 --- a/cl8/users/api/views.py +++ b/cl8/users/api/views.py @@ -595,7 +595,7 @@ def send_default_email(self, email): This mail can be safely ignored if you did not initiate this action. - If it was you, please contact us and we can add you. + If it was you, please contatc us and we can add you. Thank you! diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d0fcb19 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,66 @@ +# Main dependencies +pytz +python-slugify +argon2-cffi +whitenoise +psycopg2-binary +django-environ +django-model-utils +django-allauth +djangorestframework +django-taggit +dj-taggit-serializer +django-cors-headers +drfpasswordless +django-storages[boto3] +django-anymail[mailgun] +Pillow +Django~=4.2.0 +gunicorn +sentry-sdk +django-stubs +django-extensions +django-mjml +sorl-thumbnail +django-taggit-labels +django-debug-toolbar +slackclient +typing-extensions +pytest-mock +django-upgrade +django-browser-reload +django-tailwind +django-filter +django-autocomplete-light +django-htmx +django-gravatar2 +markdown +markdown-it-py +gspread +rich +shortuuid +django-widget-tweaks +ipdb +airtable-python +pyairtable +pytest-watch + +# Development dependencies +mypy +pytest +pytest-sugar +pytest-django +pytest-notifier +flake8 +flake8-isort +coverage +django-coverage-plugin +pylint-django +pre-commit +factory-boy +black +djlint +pdbpp +pytest-factoryboy +awscli +awscli-plugin-endpoint diff --git a/theme/templates/base.html b/theme/templates/base.html index 6747712..b237197 100755 --- a/theme/templates/base.html +++ b/theme/templates/base.html @@ -1,67 +1,66 @@ {% load static tailwind_tags %} - - {{ constellation.site.name }} - - - - {% tailwind_css %} - - -{% if request.constellation.favicon %} - -{% else %} - -{% endif %} - -{% comment %} -

- Breakpoint: - mobile - - - - - - - -

-{% endcomment %} -
- {% block nav %} - {% include "_nav_menu.html" %} - {% endblock nav %} -
-
- {% block content %} -
-
+ + {{ constellation.site.name }} + + + + {% tailwind_css %} + + + {% if request.constellation.favicon %} + + {% else %} + + {% endif %} + {% comment %} +

+ Breakpoint: + mobile + + + + + + + +

+ {% endcomment %} +

- {% block inner %} -

Django + Tailwind = ❤️

- {% endblock inner %} + {% block nav %} + {% include "_nav_menu.html" %} + {% endblock nav %}
-
-
- {% endblock content %} - - {% block scripts %} - {% endblock scripts %} - -
- - +
+ {% block content %} +
+
+
+ {% block inner %} +

Django + Tailwind = ❤️

+ {% endblock inner %} +
+
+
+ {% endblock content %} + + {% block scripts %} + {% endblock scripts %} + + + From 9ab3b94ed5c71d5f07afc43d90d38fb4f86e21a0 Mon Sep 17 00:00:00 2001 From: Marcus Bointon Date: Sun, 10 Nov 2024 09:47:58 +0100 Subject: [PATCH 2/2] HTML cleanup (cherry picked from commit 43d9a5a940edc514527b276adff3a33c86aa6b32) --- theme/templates/base.html | 123 +++++++++++++++++++------------------- 1 file changed, 62 insertions(+), 61 deletions(-) diff --git a/theme/templates/base.html b/theme/templates/base.html index b237197..6747712 100755 --- a/theme/templates/base.html +++ b/theme/templates/base.html @@ -1,66 +1,67 @@ {% load static tailwind_tags %} - - {{ constellation.site.name }} - - - - {% tailwind_css %} - - - {% if request.constellation.favicon %} - - {% else %} - - {% endif %} - {% comment %} -

- Breakpoint: - mobile - - - - - - - -

- {% endcomment %} - + + {{ constellation.site.name }} + + + + {% tailwind_css %} + + +{% if request.constellation.favicon %} + +{% else %} + +{% endif %} + +{% comment %} +

+ Breakpoint: + mobile + + + + + + + +

+{% endcomment %} +
+ {% block nav %} + {% include "_nav_menu.html" %} + {% endblock nav %} +
+
+ {% block content %} +
+
- {% block nav %} - {% include "_nav_menu.html" %} - {% endblock nav %} + {% block inner %} +

Django + Tailwind = ❤️

+ {% endblock inner %}
-
- {% block content %} -
-
-
- {% block inner %} -

Django + Tailwind = ❤️

- {% endblock inner %} -
-
-
- {% endblock content %} - - {% block scripts %} - {% endblock scripts %} - - - +
+
+ {% endblock content %} + + {% block scripts %} + {% endblock scripts %} + +
+ +