Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email template #496

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class User(ModelMixin):
""" user table definition """

_tablename_ = "users"
_tablename_ = "users"

# fields of the user table
id = db.Column(UUID(as_uuid=True), primary_key=True,
Expand Down
60 changes: 58 additions & 2 deletions templates/user/anonymous_user_to_project.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,67 @@ <h1 style="font-size: 24px; color: #333333; margin: 0 0 20px;">Hi there,</h1>
<p style="font-size: 16px; color: #333333; text-align: left; line-height: 1.5;">Cheers!<br>Crane Cloud Team</p>
</td>
</tr>

<tr>
<td align="left" valign="top" style="padding: 20px; border-top: 1px #ddd solid; margin-top: 20px;">
<!-- Connect with Us Text -->
<h3 style="font-size: 16px; color: #888; text-align: center; margin: 0 0 5px;">Connect with us</h3>

<!-- Social Media Icons -->
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td align="center" valign="middle" style="padding: 0 10px;">
<a href="" target="_blank" style="text-decoration: none;">
<i class="fab fa-facebook" style="font-size:30px;color:rgb(1, 101, 225)"></i>
</a>
</td>
<td align="center" valign="middle" style="padding: 0 10px;">
<a href="https://medium.com/cranecloud" target="_blank" style="text-decoration: none;">
<i class="fab fa-medium" style="font-size:24px;color:grey"></i>
</a>
</td>
<!-- <td align="center" valign="middle" style="padding: 0 10px;">
<a href="" target="_blank" style="text-decoration: none;">
<i class="fab fa-slack" style="font-size:24px;color:rgb(11, 184, 155)"></i>
</a>
</td> -->
<td align="center" valign="middle" style="padding: 0 10px;">
<a href="https://www.linkedin.com/company/cranecloud/" target="_blank" style="text-decoration: none;">
<i class="fab fa-linkedin" style="font-size:24px;color:rgb(10, 102, 194)"></i>
</a>
</td>
<td align="center" valign="middle" style="padding: 0 10px;">
<a href="" target="_blank" style="text-decoration: none;">
<i class="fab fa-instagram" style="font-size:24px;color:rgb(193, 53, 132)"></i>
</a>
</td>
<td align="center" valign="middle" style="padding: 0 10px;">
<a href="https://www.youtube.com/@cranecloud571" target="_blank" style="text-decoration: none;">
<i class="fab fa-youtube" style="font-size:24px;color:red"></i>
</a>
</td>
<td align="center" valign="middle" style="padding: 0 10px;">
<a href="https://twitter.com/cranecloud_io" target="_blank" style="text-decoration: none;">
<i class="fa-brands fa-x-twitter" style="font-size:24px;color:black"></i>
</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" valign="top" style="padding: 0 40px;">
<!-- Copyright Text -->
<p style="font-size: 12px; color: #555; text-align: center; margin: 0;">Copyright &copy; 2024 Crane Cloud Limited</p>
<p style="font-size: 12px; color: #555; margin: 10px">This email was meant for {{email}}. If you received this email by mistake, please disregard it. <br>If you have any questions or need further assistance, please contact our support team.</p>
</td>
</tr>
</table>
</td>
</tr>
</table>

<!-- Social Media and Copyright Section -->
<table width="600" cellpadding="0" cellspacing="0" border="0" align="center" style="background-color: #EAF0F3; border-radius: 10px; margin: 0px auto;">
<table width="600" cellpadding="0" cellspacing="0" border="0" align="center" style=" border-radius: 10px; margin: 0px auto;">
<tr>
<td align="left" valign="top" style="padding: 20px;">
<!-- Connect with Us Text -->
Expand Down Expand Up @@ -131,5 +186,6 @@ <h3 style="font-size: 18px; color: #333333; text-align: center; margin: 0 0 5px;
</td>
</tr>
</table>
</table>
</body>
</html>
151 changes: 151 additions & 0 deletions templates/user/database_cap_reached.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Database Full</title>
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
background-color: #EAF0F3;
}
.container {
max-width: 600px;
margin: 30px auto;
background-color: #ffffff;
border-radius: 10px;
padding: 40px;
box-sizing: border-box;
}
.logo-greeting {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
max-width: 80px;
}
.title {
font-size: 30px;
color: black;
}
.content {
text-align: center;
color: #333333;
}
.name{
text-align: left;
}
.content ul {
text-align: left;
margin-top: 0px;
}
.signature{
margin-top: 20px;
text-align: left;
margin-bottom: 40px;
}
.social-media-divider {
border: none;
border-top: 1px solid #ccc;
margin: 0;
width: 100%;
}
.social-media {
display: flex;
justify-content: center;
flex-direction: column;
align-items: center; /* Align items vertically in the center */
}
.social-media h3 {
display: block;
text-align: center;
color: #333333;
}
.social-media a-container {
display: flex;
justify-content: center;
}
.social-media a {
margin: 0 10px;
text-decoration: none;
color: inherit;
}
.social-media i {
font-size: 24px;
}
.copyright {
margin-top: 30px;
text-align: center;
font-size: 10px;
}
@media only screen and (max-width: 600px) {
/* body, p, a {
font-size: 14px !important;
} */
h1{
font-size: 20px !important;
}
.mobile-padding {
padding: 10px !important;
}
.mobile-margin {
margin: 10px !important;
}
.logo{
width: 60px;
height: 60px;
}
}
</style>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
</head>
<body>
<div class="container">
<div class="logo-greeting">
<img src="https://raw.githubusercontent.com/crane-cloud/frontend/develop/public/favicon.png" alt="Logo" class="logo">
<h1 class="title">Your Database is FULL!</h1>

</div>
<div class="content">
<h3 class="name">Hello, {{name}}</h3>
<p>We're writing to inform you that your database has <b>reached its allocated limit.</b> This means you may experience disruptions in your service.</p>
<p style="text-align: left;">This is because:</p>
<ul>
<li>You cannot add data in existing projects.</li>
<li>You cannot update data in existing projects.</li>
<li>You can only view data in existing projects.</li>
</ul>
<p style="text-align: left; margin-top: 20px;">Please take immediate action to restore service. If you need further assistance, contact our support team.</p>
</div>
<div class="content">
<p>You can always get more storage by <br><br><a href="">Purchasing here</a>.</p>
<h2>Not ready to get more storage?</h2> <a href="">Delete files to free up space</a>.
<p class="signature">Cheers!<br>Crane Cloud Team</p>
</div>

<hr class="social-media-divider">

<div class="social-media">
<h3>Connect with us</h3>

<div class="a-container">
<a href=""><i class="fab fa-facebook" target="_blank" style="font-size:30px;color:rgb(1, 101, 225)" ></i></a>
<a href="https://medium.com/cranecloud" target="_blank" ><i class="fab fa-medium" style="font-size:24px;color:grey"></i></a>
<a href="https://www.linkedin.com/company/cranecloud/"><i class="fab fa-linkedin" style="font-size:24px;color:rgb(10, 102, 194)"></i></a>
<a href=""><i class="fab fa-instagram" target="_blank" style="font-size:24px;color:rgb(193, 53, 132)"></i></a>
<a href="https://www.youtube.com/@cranecloud571" target="_blank"><i class="fab fa-youtube" style="font-size:24px;color:red"></i></a>
<a href="https://twitter.com/cranecloud_io" target="_blank"><i class="fa-brands fa-x-twitter" style="font-size:24px;color:black"></i></a>
</div>

<div class="copyright">
<p>Copyright &copy; 2024 Crane Cloud Limited</p>
<p>This email was meant for {{email}}. If you received this email by mistake, please disregard it. <br>If you have any questions or need further assistance, please contact our support team.</p>
</div>
</div>
</div>
</body>
</html>
151 changes: 151 additions & 0 deletions templates/user/database_usage_reminder.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Database Usage</title>
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
background-color: #EAF0F3;
}
.container {
max-width: 600px;
margin: 30px auto;
background-color: #ffffff;
border-radius: 10px;
padding: 40px;
box-sizing: border-box;
}
.logo-greeting {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
max-width: 80px;
}
.title {
font-size: 30px;
color: black;
}
.content {
text-align: center;
color: #333333;
}
.name{
text-align: left;
}
.content ul {
text-align: left;
margin-top: 0px;
}
.signature{
margin-top: 20px;
text-align: left;
margin-bottom: 40px;
}
.social-media-divider {
border: none;
border-top: 1px solid #ccc;
margin: 0;
width: 100%;
}
.social-media {
display: flex;
justify-content: center;
flex-direction: column;
align-items: center; /* Align items vertically in the center */
}
.social-media h3 {
display: block;
text-align: center;
color: #333333;
}
.social-media a-container {
display: flex;
justify-content: center;
}
.social-media a {
margin: 0 10px;
text-decoration: none;
color: inherit;
}
.social-media i {
font-size: 24px;
}
.copyright {
margin-top: 30px;
text-align: center;
font-size: 10px;
}
@media only screen and (max-width: 600px) {
/* body, p, a {
font-size: 14px !important;
} */
h1{
font-size: 20px !important;
}
.mobile-padding {
padding: 10px !important;
}
.mobile-margin {
margin: 10px !important;
}
.logo{
width: 60px;
height: 60px;
}
}
</style>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
</head>
<body>
<div class="container">
<div class="logo-greeting">
<img src="https://raw.githubusercontent.com/crane-cloud/frontend/develop/public/favicon.png" alt="Logo" class="logo">
<h1 class="title">Database Usage Reminder</h1>
</div>
<div class="content">
<h3 class="name">Hello, {{name}}</h3>
<p>We've noticed that your database <b>{{database_name}}</b> in the project <b>{{project_name}}</b> is approaching the allocated limit. You have used <b>{{usage_percentage}}%</b> of your <b>{{database_limit}}</b>.</p>

<p style="text-align: left; margin-top: 20px;">If you use up your allocated size, the following implications will apply:</p>
<ul>
<li>You will not be able to add data in the database.</li>
<li>You will not be able to update data the database.</li>
<li>You will only view data in this database.</li>
</ul>
<p style="text-align: left; margin-top: 20px;">If you need further assistance or wish to increase your database limit, please contact our support team.</p>
</div>
<div class="content">
<p>Remember that you can always get more storage by <br><br><a href="">Purchasing here</a>.</p>
<h2>Not ready to get more storage?</h2> <a href="">Delete files to free up space</a>.
<p class="signature">Best regards,<br>Crane Cloud Team</p>
</div>

<hr class="social-media-divider">
<div class="social-media">
<h3>Connect with us</h3>

<div class="a-container">
<a href=""><i class="fab fa-facebook" target="_blank" style="font-size:30px;color:rgb(1, 101, 225)" ></i></a>
<a href="https://medium.com/cranecloud" target="_blank" ><i class="fab fa-medium" style="font-size:24px;color:grey"></i></a>
<a href="https://www.linkedin.com/company/cranecloud/"><i class="fab fa-linkedin" style="font-size:24px;color:rgb(10, 102, 194)"></i></a>
<a href=""><i class="fab fa-instagram" target="_blank" style="font-size:24px;color:rgb(193, 53, 132)"></i></a>
<a href="https://www.youtube.com/@cranecloud571" target="_blank"><i class="fab fa-youtube" style="font-size:24px;color:red"></i></a>
<a href="https://twitter.com/cranecloud_io" target="_blank"><i class="fa-brands fa-x-twitter" style="font-size:24px;color:black"></i></a>
</div>

<div class="copyright">
<p>Copyright &copy; 2024 Crane Cloud Limited</p>
<p>This email was meant for {{email}}. If you received this email by mistake, please disregard it. <br>If you have any questions or need further assistance, please contact our support team.</p>
</div>

</div>
</div>
</body>
</html>
Loading