From 62426a77701b93c561923683d7af35bef5d7dc06 Mon Sep 17 00:00:00 2001 From: Shaji Ahmed Date: Sun, 30 Jun 2024 20:40:56 +0500 Subject: [PATCH] twelfth commit --- README.md | 2 +- app/static/app/styles.css | 4 +- app/templates/account/login.html | 16 ++--- app/templates/account/password_reset.html | 51 ++++++------- .../account/password_reset_done.html | 23 ++++++ app/templates/account/signup.html | 71 +++++++++++-------- app/templates/app/activity/list.html | 2 +- app/templates/app/explore.html | 2 +- app/templates/app/index.html | 5 +- app/templates/app/layout/base.html | 3 +- app/templates/app/layout/drawer.html | 2 +- app/templates/app/layout/footer.html | 39 +++++----- app/templates/app/layout/navbar.html | 16 ++--- app/templates/app/nearby.html | 6 +- app/templates/app/policies/content.html | 42 +++++++++++ app/templates/app/policies/index.html | 16 +++++ app/templates/app/user/detail.html | 2 +- app/urls.py | 4 ++ app/views.py | 47 ++++++------ project/settings.py | 10 +++ project/urls.py | 4 +- requirements.txt | 10 ++- 22 files changed, 238 insertions(+), 139 deletions(-) create mode 100644 app/templates/account/password_reset_done.html create mode 100644 app/templates/app/policies/content.html create mode 100644 app/templates/app/policies/index.html diff --git a/README.md b/README.md index 8db2286..8c42928 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# CivicHub +# Civic Hub A repository of all that's civic and good ## Requirements diff --git a/app/static/app/styles.css b/app/static/app/styles.css index 524d103..cadf4fb 100644 --- a/app/static/app/styles.css +++ b/app/static/app/styles.css @@ -1,4 +1,6 @@ - +html, body { min-height: 100vh; } +html { font-size: 0.875rem; } + .eyebrow::after, .eyebrow::before { border-block-end: thin solid #dee2e6; diff --git a/app/templates/account/login.html b/app/templates/account/login.html index d036358..8df6a98 100644 --- a/app/templates/account/login.html +++ b/app/templates/account/login.html @@ -1,6 +1,5 @@ {% extends "app/layout/base.html" %} -{% load i18n %} -{% load allauth account %} +{% load i18n allauth account %} {% block head_title %} {% trans "Sign In" %} {% endblock head_title %} @@ -9,16 +8,14 @@
-

Welcome back

-

Sign in to your account

+

Welcome back

+

Log in to your account, or Sign Up.

{% if not SOCIALACCOUNT_ONLY %} {% if SOCIALACCOUNT_ENABLED %} {% include "socialaccount/snippets/login.html" with page_layout="entrance" %} {% endif %}
- - {% csrf_token %}

@@ -28,12 +25,11 @@

Welcome back

-

+

{% endif %} -

Forgot your password?

-

Don't have an account yet? Sign Up

-

By continuing, you agree to our Terms of Service and Privacy Policy.

+

Forgot your password?

+

By continuing, you agree to our Terms of Service and Privacy Policy.

diff --git a/app/templates/account/password_reset.html b/app/templates/account/password_reset.html index 3c3052b..1201f79 100644 --- a/app/templates/account/password_reset.html +++ b/app/templates/account/password_reset.html @@ -4,29 +4,30 @@ {% trans "Password Reset" %} {% endblock head_title %} {% block page %} - {% element h1 %} - {% trans "Password Reset" %} - {% endelement %} - {% if user.is_authenticated %} - {% include "account/snippets/already_logged_in.html" %} - {% endif %} - {% element p %} - {% trans "Forgotten your password? Enter your email address below, and we'll send you an email allowing you to reset it." %} - {% endelement %} - {% url 'account_reset_password' as reset_url %} - {% element form form=form method="post" action=reset_url %} - {% slot body %} - {% csrf_token %} - {% element fields form=form %} - {% endelement %} - {% endslot %} - {% slot actions %} - {% element button type="submit" %} - {% trans 'Reset My Password' %} - {% endelement %} - {% endslot %} - {% endelement %} - {% element p %} - {% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %} - {% endelement %} +
+
+
+
+

Password Reset

+

Forgotten your password?

+

Enter your email address below, and we'll send you an email allowing you to reset it.

+ {% if user.is_authenticated %} + {% include "account/snippets/already_logged_in.html" %} + {% endif %} + {% url 'account_reset_password' as reset_url %} + + {% csrf_token %} +

+ + +

+

+ +

Already have an account? Sign In

+

Don't have an account yet? Sign Up

+

Please contact us if you have any trouble resetting your password.

+
+
+
+
{% endblock page %} diff --git a/app/templates/account/password_reset_done.html b/app/templates/account/password_reset_done.html new file mode 100644 index 0000000..a2c5767 --- /dev/null +++ b/app/templates/account/password_reset_done.html @@ -0,0 +1,23 @@ +{% extends "app/layout/base.html" %} +{% load i18n %} +{% load allauth %} +{% load account %} +{% block head_title %} + {% trans "Password Reset" %} +{% endblock head_title %} +{% block page %} +
+
+
+
+

Password Reset

+

We have sent you an email.

+

If you have not received it please check your spam folder. Otherwise contact us if you do not receive it in a few minutes.

+ {% if user.is_authenticated %} + {% include "account/snippets/already_logged_in.html" %} + {% endif %} +
+
+
+
+{% endblock page %} diff --git a/app/templates/account/signup.html b/app/templates/account/signup.html index c73c034..70bf9cd 100644 --- a/app/templates/account/signup.html +++ b/app/templates/account/signup.html @@ -4,35 +4,44 @@ {% trans "Signup" %} {% endblock head_title %} {% block page %} - {% element h1 %} - {% trans "Sign Up" %} - {% endelement %} - {% setvar link %} - - {% endsetvar %} - {% setvar end_link %} - - {% endsetvar %} - {% element p %} - {% blocktranslate %}Already have an account? Then please {{ link }}sign in{{ end_link }}.{% endblocktranslate %} - {% endelement %} - {% if not SOCIALACCOUNT_ONLY %} - {% url 'account_signup' as action_url %} - {% element form form=form method="post" action=action_url tags="entrance,signup" %} - {% slot body %} - {% csrf_token %} - {% element fields form=form unlabeled=True %} - {% endelement %} - {{ redirect_field }} - {% endslot %} - {% slot actions %} - {% element button tags="prominent,signup" type="submit" %} - {% trans "Sign Up" %} - {% endelement %} - {% endslot %} - {% endelement %} - {% endif %} - {% if SOCIALACCOUNT_ENABLED %} - {% include "socialaccount/snippets/login.html" with page_layout="entrance" %} - {% endif %} +
+
+
+
+

{% trans "Sign Up" %}

+

+ Already have an account? Log in here. +

+ {% if SOCIALACCOUNT_ENABLED %} + {% include "socialaccount/snippets/login.html" %} + {% endif %} + {% if not SOCIALACCOUNT_ONLY %} +
+ {% csrf_token %} +

+ + +

+ {% comment %}

+ + +

{% endcomment %} +

+ + +

+ {% comment %}

+ + +

{% endcomment %} + +

+ {% comment %}

Forgot your password?

{% endcomment %} +

By continuing, you agree to our Terms of Service and Privacy Policy.

+
+ {% endif %} +
+
+
+
{% endblock page %} diff --git a/app/templates/app/activity/list.html b/app/templates/app/activity/list.html index 00d87a0..61f7267 100644 --- a/app/templates/app/activity/list.html +++ b/app/templates/app/activity/list.html @@ -3,7 +3,7 @@ Activities {% endblock head_title %} {% block content %} -
+

ACTIVITIES

diff --git a/app/templates/app/explore.html b/app/templates/app/explore.html index 0f0dce4..3363d38 100644 --- a/app/templates/app/explore.html +++ b/app/templates/app/explore.html @@ -5,7 +5,7 @@ {% endblock head_title %} {% block content %} -
+

EXPLORE

diff --git a/app/templates/app/index.html b/app/templates/app/index.html index 1d3c635..e16aa2e 100644 --- a/app/templates/app/index.html +++ b/app/templates/app/index.html @@ -4,10 +4,7 @@ Welcome {% endblock head_title %} {% block content %} -
-

- WELCOME -

+
{% include 'app/activity/grid.html' with activities=activities %}
diff --git a/app/templates/app/layout/base.html b/app/templates/app/layout/base.html index 803c5a8..1ad8f2c 100644 --- a/app/templates/app/layout/base.html +++ b/app/templates/app/layout/base.html @@ -4,7 +4,7 @@ - CivicHub | {% block head_title %}{% endblock %} + Civic Hub / {% block head_title %}{% endblock %} @@ -15,7 +15,6 @@ {% block page %}{% endblock %} - {% block scripts %}{% endblock scripts %} \ No newline at end of file diff --git a/app/templates/app/layout/drawer.html b/app/templates/app/layout/drawer.html index 063cd05..dc67aca 100644 --- a/app/templates/app/layout/drawer.html +++ b/app/templates/app/layout/drawer.html @@ -1,6 +1,6 @@
-
CivicHub
+
Civic Hub
diff --git a/app/templates/app/layout/footer.html b/app/templates/app/layout/footer.html index 6710fb4..2c263a4 100644 --- a/app/templates/app/layout/footer.html +++ b/app/templates/app/layout/footer.html @@ -1,7 +1,22 @@ -