Skip to content
Merged
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
8 changes: 8 additions & 0 deletions src/app/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
"title": "Welcome to Ideological Atlas!",
"verify_text": "To get started, please verify your email address by clicking the button below:"
},
"register_google": {
"button": "Go to App",
"intro": "You have successfully registered using your Google account. Your identity has been automatically verified, so you can now access all features.",
"salutation": "Best regards,",
"subject": "Welcome to Ideological Atlas!",
"team": "The Ideological Atlas Team",
"title": "Registration Successful"
},
"registration_reminder_30_days": {
"button": "Verify and Save Account",
"fallback_text": "Direct link:",
Expand Down
8 changes: 8 additions & 0 deletions src/app/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
"title": "\u00a1Bienvenido a Ideological Atlas!",
"verify_text": "Para comenzar, por favor verifica tu direcci\u00f3n de correo electr\u00f3nico haciendo clic en el bot\u00f3n de abajo:"
},
"register_google": {
"button": "Ir a la aplicaci\u00f3n",
"intro": "Te has registrado correctamente utilizando tu cuenta de Google. Tu identidad ha sido verificada autom\u00e1ticamente, por lo que ya puedes acceder a todas las funcionalidades.",
"salutation": "Un saludo,",
"subject": "\u00a1Bienvenido a Ideological Atlas!",
"team": "El equipo de Ideological Atlas",
"title": "Registro Exitoso"
},
"registration_reminder_30_days": {
"button": "Verificar y Salvar Cuenta",
"fallback_text": "Enlace directo:",
Expand Down
2 changes: 2 additions & 0 deletions src/app/services/email_engine.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
import logging
from datetime import datetime
from pathlib import Path

import resend
Expand Down Expand Up @@ -56,6 +57,7 @@ def _render_template(
"site_url": settings.BASE_SITE_URL,
"project_name": settings.PROJECT_NAME,
"t": translations,
"year": datetime.now().year,
}
final_context = {**global_context, **specific_context}

Expand Down
19 changes: 19 additions & 0 deletions src/templates/register_google/content.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{% extends "base.html" %}

{% block subject %}{{ t.register_google.subject }}{% endblock %}

{% block content %}
<h1 style="color: #1F4E79; margin-top: 0;">{{ t.register_google.title }}</h1>
<p>
{{ t.register_google.intro|safe }}
</p>
<p style="text-align: center; padding: 20px 0;">
<a href="{{site_url}}" style="background-color: #1F4E79; color: #ffffff; padding: 12px 25px; text-decoration: none; border-radius: 5px; font-weight: bold; display: inline-block;">
{{ t.register_google.button }}
</a>
</p>
<p style="margin-top: 30px; border-top: 1px solid #eeeeee; padding-top: 20px;">
{{ t.register_google.salutation }}<br>
<strong>{{ t.register_google.team }}</strong>
</p>
{% endblock %}
67 changes: 67 additions & 0 deletions src/templates/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/* Global Colors */
:root {
--primary-color: #1F4E79;
--danger-color: #D9534F;
--neutral-color: #555555;
--white-color: #ffffff;
--bg-body: #f4f4f4;
--text-main: #333333;
--border-color: #eeeeee;
}

body {
background-color: #f4f4f4;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Headings */
h1 {
margin-top: 0;
}

.text-primary { color: #1F4E79; }
.text-danger { color: #D9534F; }
.text-neutral { color: #555555; }

/* Buttons */
.btn {
color: #ffffff !important;
padding: 12px 25px;
text-decoration: none;
border-radius: 5px;
font-weight: bold;
display: inline-block;
}

.btn-primary { background-color: #1F4E79; }
.btn-danger { background-color: #D9534F; }
.btn-neutral { background-color: #555555; }

/* Links */
.link-fallback {
word-break: break-all;
font-size: 14px;
}

/* Utilities */
.text-center { text-align: center; }
.py-20 { padding: 20px 0; }
.mt-30 { margin-top: 30px; }
.border-top { border-top: 1px solid #eeeeee; }
.pt-20 { padding-top: 20px; }

/* Layout specific */
.email-container {
background-color: #ffffff;
max-width: 600px;
width: 100%;
border-radius: 8px;
overflow: hidden;
box-shadow: 0px 2px 8px rgba(0,0,0,0.05);
}

.content-cell {
padding: 30px;
color: #333333;
font-size: 16px;
}