Skip to content

Commit

Permalink
twelfth commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaji Ahmed committed Jun 30, 2024
1 parent 5d8cb73 commit 62426a7
Show file tree
Hide file tree
Showing 22 changed files with 238 additions and 139 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CivicHub
# Civic Hub
A repository of all that's civic and good

## Requirements
Expand Down
4 changes: 3 additions & 1 deletion app/static/app/styles.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

html, body { min-height: 100vh; }
html { font-size: 0.875rem; }

.eyebrow::after,
.eyebrow::before {
border-block-end: thin solid #dee2e6;
Expand Down
16 changes: 6 additions & 10 deletions app/templates/account/login.html
Original file line number Diff line number Diff line change
@@ -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 %}
Expand All @@ -9,16 +8,14 @@
<div class="row align-items-center justify-content-center h-100">
<div class="col-sm-11 col-md-8 col-lg-6 col-xl-4">
<div class="card card-body border-0">
<h1 class="card-title fw-light mb4">Welcome back</h1>
<p class="card-subtitle mb-4">Sign in to your account</p>
<h1 class="card-title fw-light">Welcome back</h1>
<p class="card-subtitle mb-4">Log in to your account, or <a href="{{ signup_url }}">Sign Up</a>.</p>
{% if not SOCIALACCOUNT_ONLY %}

{% if SOCIALACCOUNT_ENABLED %}
{% include "socialaccount/snippets/login.html" with page_layout="entrance" %}
{% endif %}
<form method="post" action="{% url 'account_login' %}">


{% csrf_token %}
<p>
<label class="form-label" for="id_login">Username</label>
Expand All @@ -28,12 +25,11 @@ <h1 class="card-title fw-light mb4">Welcome back</h1>
<label class="form-label" for="id_password">Password</label>
<input class="form-control" type="password" name="password" placeholder="********" autocomplete="current-password" required id="id_password">
</p>
<p><button class="btn btn-primary w-100" type="submit">Sign In</button></p>
<p><button class="btn btn-primary w-100" type="submit">Log In</button></p>
{% endif %}

<p class="text-center"><a href="/accounts/password/reset/">Forgot your password?</a></p>
<p class="text-center">Don't have an account yet? <a href="{{ signup_url }}">Sign Up</a></p>
<p class="text-center small mt3">By continuing, you agree to our <a href="/policies/terms/">Terms of Service</a> and <a href="/policies/privacy">Privacy Policy</a>.</p>
<p class="text-center"><a href="{% url 'account_reset_password' %}">Forgot your password?</a></p>
<p class="text-center small">By continuing, you agree to our <span class="text-nowrap"><a href="/policies/terms/">Terms of Service</a> and <a href="/policies/privacy">Privacy Policy</a></span>.</p>
</div>
</div>
</div>
Expand Down
51 changes: 26 additions & 25 deletions app/templates/account/password_reset.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
<article class="container h-100">
<div class="row align-items-center justify-content-center h-100">
<div class="col-sm-11 col-md-8 col-lg-6 col-xl-4">
<div class="card card-body border-0">
<h1 class="card-title fw-light">Password Reset</h1>
<p class="card-subtitle mb-4">Forgotten your password?</p>
<p>Enter your email address below, and we'll send you an email allowing you to reset it.</p>
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
{% url 'account_reset_password' as reset_url %}
<form method="post" action="{{ reset_url }}">
{% csrf_token %}
<p>
<label class="form-label" for="id_email">Email</label>
<input class="form-control" type="email" name="email" placeholder="Email address" autocomplete="email" maxlength="320" id="id_email" required>
</p>
<p><button class="btn btn-primary w-100" type="submit">Reset My Password</button></p>
</form>
<p class="text-center">Already have an account? <a href="{{ login_url }}">Sign In</a></p>
<p class="text-center">Don't have an account yet? <a href="{% url 'account_signup' %}">Sign Up</a></p>
<p class="text-center small">Please contact us if you have any trouble resetting your password.</p>
</div>
</div>
</div>
</article>
{% endblock page %}
23 changes: 23 additions & 0 deletions app/templates/account/password_reset_done.html
Original file line number Diff line number Diff line change
@@ -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 %}
<article class="container h-100">
<div class="row align-items-center justify-content-center h-100">
<div class="col-sm-11 col-md-8 col-lg-6 col-xl-4">
<div class="card card-body border-0">
<h1 class="card-title fw-light">Password Reset</h1>
<p class="card-subtitle mb-4">We have sent you an email.</p>
<p>If you have not received it please check your spam folder. Otherwise contact us if you do not receive it in a few minutes.</p>
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
</div>
</div>
</div>
</article>
{% endblock page %}
71 changes: 40 additions & 31 deletions app/templates/account/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,44 @@
{% trans "Signup" %}
{% endblock head_title %}
{% block page %}
{% element h1 %}
{% trans "Sign Up" %}
{% endelement %}
{% setvar link %}
<a href="{{ login_url }}">
{% endsetvar %}
{% setvar end_link %}
</a>
{% 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 %}
<article class="container h-100">
<div class="row align-items-center justify-content-center h-100">
<div class="col-sm-11 col-md-8 col-lg-6 col-xl-4">
<div class="card card-body border-0">
<h1 class="card-title fw-light">{% trans "Sign Up" %}</h1>
<p class="card-subtitle mb-4">
Already have an account? <a href="{{ login_url }}">Log in</a> here.
</p>
{% if SOCIALACCOUNT_ENABLED %}
{% include "socialaccount/snippets/login.html" %}
{% endif %}
{% if not SOCIALACCOUNT_ONLY %}
<form method="post" action="{% url 'account_signup' %}">
{% csrf_token %}
<p>
<label class="form-label" for="id_login">Username</label>
<input class="form-control" type="text" name="username" placeholder="Username" autocomplete="username" maxlength="150" required id="id_login">
</p>
{% comment %} <p>
<label class="form-label" for="id_login">Email (optional)</label>
<input class="form-control" type="email" name="email" placeholder="Email address" autocomplete="email" maxlength="320" id="id_email">
</p> {% endcomment %}
<p>
<label class="form-label" for="id_password1">Password</label>
<input class="form-control" type="password" name="password1" placeholder="********" required id="id_password1">
</p>
{% comment %} <p>
<label class="form-label" for="id_password2">Password (again)</label>
<input class="form-control" type="password" name="password2" placeholder="********" required id="id_password2">
</p> {% endcomment %}
<input type="hidden" name="password2" vaue="" >
<p><button class="btn btn-primary w-100" type="submit">Sign Up</button></p>
{% comment %} <p class="text-center"><a href="{% url 'account_reset_password' %}">Forgot your password?</a></p> {% endcomment %}
<p class="text-center small">By continuing, you agree to our <span class="text-nowrap"><a href="/policies/terms/">Terms of Service</a> and <a href="/policies/privacy">Privacy Policy</a></span>.</p>
</form>
{% endif %}
</div>
</div>
</div>
</article>
{% endblock page %}
2 changes: 1 addition & 1 deletion app/templates/app/activity/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Activities
{% endblock head_title %}
{% block content %}
<article class="container">
<article class="container-fluid">
<h1 class="fw-light mb-5">
ACTIVITIES
</h1>
Expand Down
2 changes: 1 addition & 1 deletion app/templates/app/explore.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% endblock head_title %}

{% block content %}
<article class="container">
<article class="container-fluid">
<h1 class="fw-light mb-5">
EXPLORE
</h1>
Expand Down
5 changes: 1 addition & 4 deletions app/templates/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
Welcome
{% endblock head_title %}
{% block content %}
<article class="container">
<h1 class="fw-light mb-5 borderimg">
WELCOME
</h1>
<article class="container-xxl">
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 row-cols-xxl-4 g-3">
{% include 'app/activity/grid.html' with activities=activities %}
</div>
Expand Down
3 changes: 1 addition & 2 deletions app/templates/app/layout/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CivicHub | {% block head_title %}{% endblock %}</title>
<title>Civic Hub / {% block head_title %}{% endblock %}</title>
<link rel="icon" href="{% static 'app/favicon.ico' %}">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css">
Expand All @@ -15,7 +15,6 @@
{% block page %}{% endblock %}
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
<script src="https://unpkg.com/[email protected]"></script>
<script src="//unpkg.com/alpinejs" defer></script>
{% block scripts %}{% endblock scripts %}
</body>
</html>
2 changes: 1 addition & 1 deletion app/templates/app/layout/drawer.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvasExample" aria-labelledby="offcanvasExampleLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasExampleLabel">CivicHub</h5>
<h5 class="offcanvas-title" id="offcanvasExampleLabel">Civic Hub</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
Expand Down
39 changes: 19 additions & 20 deletions app/templates/app/layout/footer.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
<nav class="navbar navbar-expand-xl bg-transparent">
<div class="container">
<nav class="navbar navbar-expand bg-transparent">
<div class="container-fluid">
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link" href="{% url 'app:about' %}">About</a></li>
<li class="nav-item dropup">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Policies
</a>
<ul class="dropdown-menu dropdown-menuend">
<li><a class="dropdown-item" href="{% url 'app:policy_detail' 'privacy' %}">Privacy policy</a></li>
<li><a class="dropdown-item" href="{% url 'app:policy_detail' 'content' %}">Content policy</a></li>
<li><a class="dropdown-item" href="{% url 'app:policy_detail' 'terms' %}">Terms of use</a></li>
<li><a class="dropdown-item" href="{% url 'app:policy_detail' 'conduct' %}">Code of conduct</a></li>
</ul>
</li>
<li class="nav-item"><a class="nav-link" href="{% url 'app:contact' %}">Contact us</a></li>
</ul>
<span class="navbar-text">
Except where otherwise <a href="/policies/">noted</a>, content on this site is licensed <br> under
Except where otherwise <a href="/policies/">noted</a>, content on this site is licensed under
<a href="https://creativecommons.org/licenses/by/4.0/?ref=chooser-v1" target="_blank" rel="license noopener noreferrer">
Creative Commons Attribution 4.0 International</a>
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
Expand Down Expand Up @@ -47,22 +62,6 @@
</g>
</svg>
</span>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="/about">About CivicHub</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/policies/privacy/">Privacy policy</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/policies/content/">Content policy</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/policies/terms/">Terms of Use</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/policies/conduct/">Code of conduct</a>
</li>
</ul>

</div>
</nav>
16 changes: 8 additions & 8 deletions app/templates/app/layout/navbar.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="top"></div>
<nav class="navbar navbar-expand-lg bg-white fixedtop" data-bs-theme="light">
<div class="container">
<nav class="navbar navbar-expand-lg">
<div class="container-fluid">

<button class="btn" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasExample" aria-controls="offcanvasExample">
<span class="navbar-toggler-icon"></span>
Expand Down Expand Up @@ -41,10 +41,10 @@
<li class="nav-item"><a class="nav-link {% if 'explore' in request.path %} active{% endif %}" href="{% url 'app:explore' %}">Explore</a></li>
<li class="nav-item"><a class="nav-link {% if 'nearby' in request.path %} active {% endif %}" href="{% url 'app:nearby' %}">Nearby</a></li>
{% if user.is_authenticated %}
<li class="nav-item dropdown ms-3">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false" title="{{ user.get_full_name }}">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle py-1" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false" title="{{ user.get_full_name }}">
{% if user.socialaccount_set.all.0.get_avatar_url %}
<img src="{{ user.socialaccount_set.all.0.get_avatar_url }}" class="rounded-circle" height="28" />
<img src="{{ user.socialaccount_set.all.0.get_avatar_url }}" class="rounded-circle" height="32" />
{% else %}
<i class="bi bi-person-circle" style="font-size:1.25rem;"></i>
{% endif %}
Expand All @@ -66,12 +66,12 @@
</li>
</ul>
</li>
{% else %}
<li class="nav-item"><a class="nav-link" href="{% url 'account_login' %}">Login</a></li>
{% endif %}
</ul>
</div>

{% if not user.is_authenticated %}
<a class="btn btn-primary ms-3" href="{% url 'account_login' %}">Log in</a>
{% endif %}
</div>
</nav>

Expand Down
6 changes: 3 additions & 3 deletions app/templates/app/nearby.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
{% endblock scripts %}

{% block content %}
<article class="container">
{% comment %} <h1 class="fw-light mb-5">
<article class="container-fluid">
<h1 class="fw-light mb-5">
NEARBY
</h1> {% endcomment %}
</h1>
<div class="ratio ratio-16x9">
{% comment %} <div id="map" class="h-100"></div> {% endcomment %}
<iframe src="https://www.google.com/maps/embed?pb=!1m16!1m12!1m3!1d13271.759809459092!2d73.07594429486035!3d33.73636883361621!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!2m1!1sRestaurants!5e0!3m2!1sen!2s!4v1717054893446!5m2!1sen!2s" width="1600" height="900" class="object-fit-xxl-contain" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
Expand Down
Loading

0 comments on commit 62426a7

Please sign in to comment.