Skip to content

Commit

Permalink
Merge pull request #193 from Coders-HQ/email_templates
Browse files Browse the repository at this point in the history
Email templates + Assessment tab
  • Loading branch information
Musab0 authored May 26, 2022
2 parents 9bc6327 + 0d502da commit 40400f7
Show file tree
Hide file tree
Showing 13 changed files with 153 additions and 8 deletions.
22 changes: 22 additions & 0 deletions codershq/templates/_dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ <h3 class="text-xl font-semibold text-gray-900 lg:text-2xl dark:text-white">
<li class="my-px">
<span class="flex font-medium text-sm text-gray-400 px-4 my-4 uppercase">Project</span>
</li>
<li class="my-px">
<a href="/comingSoon2/" class="flex flex-row items-center h-12 px-4 rounded-lg text-gray-600 hover:bg-gray-100">
<span class="flex items-center justify-center text-lg text-gray-400">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/>
<path fill-rule="evenodd" d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5v11z"/>
</svg>
</span>
<span class="ml-3">Assessment</span>
</a>
</li>
<li class="my-px">
<a href="/events/" class="flex flex-row items-center h-12 px-4 rounded-lg text-gray-600 hover:bg-gray-100">
<span class="flex items-center justify-center text-lg text-gray-400">
Expand Down Expand Up @@ -229,6 +240,17 @@ <h3 class="text-xl font-semibold text-gray-900 lg:text-2xl dark:text-white">
<li class="my-px">
<span class="flex font-medium text-sm text-gray-400 px-4 my-4 uppercase">Project</span>
</li>
<li class="my-px">
<a href="/comingSoon2/" class="flex flex-row items-center h-12 px-4 rounded-lg text-gray-600 hover:bg-gray-100">
<span class="flex items-center justify-center text-lg text-gray-400">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path d="M15.502 1.94a.5.5 0 0 1 0 .706L14.459 3.69l-2-2L13.502.646a.5.5 0 0 1 .707 0l1.293 1.293zm-1.75 2.456-2-2L4.939 9.21a.5.5 0 0 0-.121.196l-.805 2.414a.25.25 0 0 0 .316.316l2.414-.805a.5.5 0 0 0 .196-.12l6.813-6.814z"/>
<path fill-rule="evenodd" d="M1 13.5A1.5 1.5 0 0 0 2.5 15h11a1.5 1.5 0 0 0 1.5-1.5v-6a.5.5 0 0 0-1 0v6a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11a.5.5 0 0 1 .5-.5H9a.5.5 0 0 0 0-1H2.5A1.5 1.5 0 0 0 1 2.5v11z"/>
</svg>
</span>
<span class="ml-3">Assessment</span>
</a>
</li>
<li class="my-px">
<a href="/events/" class="flex flex-row items-center h-12 px-4 rounded-lg text-gray-600 hover:bg-gray-100">
<span class="flex items-center justify-center text-lg text-gray-400">
Expand Down
25 changes: 25 additions & 0 deletions codershq/templates/account/_email.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% extends "base_without_dashboard.html" %}
{% load i18n static %}

{% block title %}{% block head_title %}{% endblock head_title %}{% endblock title %}

{% block content %}
<div class="min-h-full flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8">
<div class="max-w-md w-full space-y-8">
<div>
<img class="mx-auto h-12 w-auto" src="{% static 'images/logo/CHQ-Invert.png' %}" alt="Workflow">
<h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">
{% block large_text %}
{% endblock large_text %}
</h2>
</div>

{% block inner %}{% endblock %}

</div>
</div>




{% endblock %}
7 changes: 7 additions & 0 deletions codershq/templates/account/email/base_message.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% load i18n %}{% autoescape off %}{% blocktrans with site_name=current_site.name %}Hello from {{ site_name }}!{% endblocktrans %}

{% block content %}{% endblock %}

{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}Thank you for using {{ site_name }}!
{{ site_domain }}{% endblocktrans %}
{% endautoescape %}
39 changes: 39 additions & 0 deletions codershq/templates/account/email/email_confirmation_message.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{% extends "account/_email.html" %}
{% load i18n %}
{% load account %}

{% block inner %}
{% user_display user as user_display %}{% blocktrans with site_name=current_site.name site_domain=current_site.domain %}
<div class="flex items-center justify-center min-h-screen p-5 bg-blue-100 min-w-screen">
<div class="max-w-xl p-8 text-center text-gray-800 bg-white shadow-xl lg:max-w-3xl rounded-3xl lg:p-12">
<!-- <h3 class="text-2xl">Welcome to {{ site_domain }} {{ site_name }}!</h3> -->
<h3 class="text-2xl">Welcome to CodersHQ 👋</h3>
<div class="flex justify-center">
<svg xmlns="http://www.w3.org/2000/svg" class="w-24 h-24 text-green-400" fill="none"
viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1"
d="M3 19v-8.93a2 2 0 01.89-1.664l7-4.666a2 2 0 012.22 0l7 4.666A2 2 0 0121 10.07V19M3 19a2 2 0 002 2h14a2 2 0 002-2M3 19l6.75-4.5M21 19l-6.75-4.5M3 10l6.75 4.5M21 10l-6.75 4.5m0 0l-1.14.76a2 2 0 01-2.22 0l-1.14-.76" />
</svg>
</div>

<p>{{ user_display }}, We're happy you're here. Let's get your email address verified:</p>
<div class="mt-4">

<a href="{{ activate_url }}"
class="inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-500 hover:bg-blue-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500">
Click to Verify Email
</a>


<p class="mt-4 text-sm">If you’re having trouble clicking the "Verify Email Address" button, copy and paste the URL below into your web browser:
<a href="#" class="text-blue-600 underline">{{ activate_url }}</a>
</p>
<p class="mt-4 text-sm">
If you have not used this email to signup to codershq.ae, please ignore this email.
</p>
</div>
</div>
</div>
{% endblocktrans %}
{%endblock%}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% include "account/email/email_confirmation_message.html" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% include "account/email/email_confirmation_subject.txt" %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% extends "account/email/base_message.txt" %}
{% load i18n %}

{% block content %}{% autoescape off %}{% blocktrans %}You're receiving this e-mail because you or someone else has requested a password for your user account.
It can be safely ignored if you did not request a password reset. Click the link below to reset your password.{% endblocktrans %}

{{ password_reset_url }}{% if username %}

{% blocktrans %}In case you forgot, your username is {{ username }}.{% endblocktrans %}{% endif %}{% endautoescape %}{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Password Reset E-mail{% endblocktrans %}
{% endautoescape %}
12 changes: 12 additions & 0 deletions codershq/templates/account/email/unknown_account_message.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% extends "account/email/base_message.txt" %}
{% load i18n %}

{% block content %}{% autoescape off %}{% blocktrans %}You are receiving this e-mail because you or someone else has requested a
password for your user account. However, we do not have any record of a user
with email {{ email }} in our database.

This mail can be safely ignored if you did not request a password reset.

If it was you, you can sign up for an account using the link below.{% endblocktrans %}

{{ signup_url }}{% endautoescape %}{% endblock %}
4 changes: 4 additions & 0 deletions codershq/templates/account/email/unknown_account_subject.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% load i18n %}
{% autoescape off %}
{% blocktrans %}Password Reset E-mail{% endblocktrans %}
{% endautoescape %}
23 changes: 23 additions & 0 deletions codershq/templates/pages/comingSoon2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{% extends "base.html" %}
{% load static compress%}


{% block navigation %}
<!-- {% include "pages/nav_dark.html" %} -->
{% endblock navigation %}

{% block content %}



<div class="card text-center" >

<div class="card-body">
<br>
<h1 class="card-title">Coming Soon</h1>
<br>
<p class="card-text">Stay tuned!</p>
</div>

</div>
{% endblock content %}
6 changes: 6 additions & 0 deletions config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
TemplateView.as_view(template_name="pages/comingSoon.html"),
name="comingSoon",
),
path(
"comingSoon2/",
TemplateView.as_view(template_name="pages/comingSoon2.html"),
name="comingSoon2",
),
# Django Admin, use {% url 'admin:index' %}
path(settings.ADMIN_URL, admin.site.urls),
# User management
Expand All @@ -42,6 +47,7 @@
path("challenge/", include("codershq.challenge.urls", namespace="challenge")),
path("companies/", include("codershq.companies.urls", namespace="companies")),
path("events/", include("codershq.events.urls", namespace="events")),

path("api/", include("codershq.api.urls", namespace="api")),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

Expand Down

0 comments on commit 40400f7

Please sign in to comment.