refactor: twig templating

This commit is contained in:
Maël Gangloff 2024-08-21 19:03:31 +02:00
parent 220160241a
commit 5ddd42eded
No known key found for this signature in database
GPG Key ID: 11FDC81C24A7F629
7 changed files with 141 additions and 357 deletions

View File

@ -25,8 +25,9 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="manifest" href="/manifest.json"/>
<title>Domain Watchdog</title> <title>Domain Watchdog</title>
<link rel="manifest" href="/manifest.json"/>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
{{ encore_entry_link_tags('app') }} {{ encore_entry_link_tags('app') }}
</head> </head>
<body> <body>

View File

@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="en">
<head>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
}
.container {
max-width: 600px;
margin: 0 auto;
padding: 20px;
border: 1px solid #ddd;
border-radius: 5px;
background-color: #f9f9f9;
}
.header {
text-align: center;
margin-bottom: 20px;
}
.header h1 {
font-size: 24px;
color: {{ email_color|default('#0056b3') }};
}
.content {
margin-bottom: 20px;
}
.content p {
margin: 0 0 10px;
}
.footer {
text-align: center;
color: #777;
}
</style>
<title>{{ title|default('Domain Watchdog - Notification') }}</title>
</head>
<body>
<div class="container">
<div class="header">
<h1>{{ title|default('Domain Watchdog - Notification') }}</h1>
</div>
<div class="content">
{% block content %}{% endblock %}
</div>
<div class="footer">
{% block footer %}
<p>&copy; Domain Watchdog</p>
{% endblock %}
</div>
</div>
</body>
</html>

View File

@ -1,61 +1,8 @@
<!DOCTYPE html> {% extends "emails/base.html.twig" %}
<html lang="en">
<head>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
}
.container { {% set email_color = '#f9f9f9' %}
max-width: 600px; {% set title = 'Domain Watchdog Error' %}
margin: 0 auto; {% block content %}
padding: 20px;
border: 1px solid #ddd;
border-radius: 5px;
background-color: #f9f9f9;
}
.header {
text-align: center;
margin-bottom: 20px;
}
.header h1 {
font-size: 24px;
color: #d9534f;
}
.content {
margin-bottom: 20px;
}
.content p {
margin: 0 0 10px;
}
.footer {
text-align: center;
color: #777;
}
ul {
padding-left: 20px;
}
ul li {
margin-bottom: 10px;
}
</style>
<title>Domain Watchdog Error</title>
</head>
<body>
<div class="container">
<div class="header">
<h1>Domain Watchdog Error</h1>
</div>
<div class="content">
<p>Hello, <br/> <p>Hello, <br/>
We would like to inform you that an error occurred while ordering the following domain name:<br/> We would like to inform you that an error occurred while ordering the following domain name:<br/>
<strong>Domain name:</strong> {{ domain.ldhName }}<br/> <strong>Domain name:</strong> {{ domain.ldhName }}<br/>
@ -69,12 +16,5 @@
<br/><br/> <br/><br/>
<p>Thank you for your understanding,<br/> <p>Thank you for your understanding,<br/>
Sincerely,<br/> Sincerely,<br/>
Domain Watchdog<br/>
</p> </p>
</div> {% endblock %}
<div class="footer">
<p>&copy; Domain Watchdog</p>
</div>
</div>
</body>
</html>

View File

@ -1,61 +1,8 @@
<!DOCTYPE html> {% extends "emails/base.html.twig" %}
<html lang="en">
<head>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
}
.container { {% set email_color = '#f9f9f9' %}
max-width: 600px; {% set title = 'Domain Watchdog Error' %}
margin: 0 auto; {% block content %}
padding: 20px;
border: 1px solid #ddd;
border-radius: 5px;
background-color: #f9f9f9;
}
.header {
text-align: center;
margin-bottom: 20px;
}
.header h1 {
font-size: 24px;
color: #d9534f;
}
.content {
margin-bottom: 20px;
}
.content p {
margin: 0 0 10px;
}
.footer {
text-align: center;
color: #777;
}
ul {
padding-left: 20px;
}
ul li {
margin-bottom: 10px;
}
</style>
<title>Domain Watchdog Error</title>
</head>
<body>
<div class="container">
<div class="header">
<h1>Domain Watchdog Error</h1>
</div>
<div class="content">
<p>Hello, <br/> <p>Hello, <br/>
We would like to inform you that an error occurred while updating the information for the following domain We would like to inform you that an error occurred while updating the information for the following domain
name:<br/> name:<br/>
@ -69,13 +16,5 @@
<br/><br/> <br/><br/>
<p>Thank you for your understanding,<br/> <p>Thank you for your understanding,<br/>
Sincerely,<br/> Sincerely,<br/>
Domain Watchdog<br/>
</p> </p>
{% endblock %}
</div>
<div class="footer">
<p>&copy; Domain Watchdog</p>
</div>
</div>
</body>
</html>

View File

@ -1,53 +1,8 @@
<!DOCTYPE html> {% extends "emails/base.html.twig" %}
<html lang="en">
<head>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
}
.container { {% set email_color = '#0056b3' %}
max-width: 600px; {% set title = 'Domain Watchdog - Confirm Email' %}
margin: 0 auto; {% block content %}
padding: 20px;
border: 1px solid #ddd;
border-radius: 5px;
background-color: #f9f9f9;
}
.header {
text-align: center;
margin-bottom: 20px;
}
.header h1 {
font-size: 24px;
color: #0056b3;
}
.content {
margin-bottom: 20px;
}
.content p {
margin: 0 0 10px;
}
.footer {
text-align: center;
color: #777;
}
</style>
<title>Domain Watchdog - Confirm Email</title>
</head>
<body>
<div class="container">
<div class="header">
<h1>Domain Watchdog - Confirm Email</h1>
</div>
<div class="content">
<p>Hello, <br/> <p>Hello, <br/>
Please confirm your email address by clicking the following link: <br><br> Please confirm your email address by clicking the following link: <br><br>
<a href="{{ signedUrl|raw }}">Confirm my Email</a>. <a href="{{ signedUrl|raw }}">Confirm my Email</a>.
@ -55,12 +10,5 @@
<br/><br/> <br/><br/>
Thank you for your understanding,<br/> Thank you for your understanding,<br/>
Sincerely,<br/> Sincerely,<br/>
Domain Watchdog<br/>
</p> </p>
</div> {% endblock %}
<div class="footer">
<p>&copy; Domain Watchdog</p>
</div>
</div>
</body>
</html>

View File

@ -1,53 +1,8 @@
<!DOCTYPE html> {% extends "emails/base.html.twig" %}
<html lang="en">
<head>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
}
.container { {% set email_color = '#0056b3' %}
max-width: 600px; {% set title = 'Domain Watchdog - Domain Ordered' %}
margin: 0 auto; {% block content %}
padding: 20px;
border: 1px solid #ddd;
border-radius: 5px;
background-color: #f9f9f9;
}
.header {
text-align: center;
margin-bottom: 20px;
}
.header h1 {
font-size: 24px;
color: #0056b3;
}
.content {
margin-bottom: 20px;
}
.content p {
margin: 0 0 10px;
}
.footer {
text-align: center;
color: #777;
}
</style>
<title>Domain Watchdog - Domain Ordered</title>
</head>
<body>
<div class="container">
<div class="header">
<h1>Domain Watchdog - Domain Ordered</h1>
</div>
<div class="content">
<p>Hello, <br/> <p>Hello, <br/>
We are pleased to inform you that a domain name present in your Watchlist has been ordered using the We are pleased to inform you that a domain name present in your Watchlist has been ordered using the
connector you have chosen.<br/> connector you have chosen.<br/>
@ -56,12 +11,5 @@
<br/><br/> <br/><br/>
Thank you for your understanding,<br/> Thank you for your understanding,<br/>
Sincerely,<br/> Sincerely,<br/>
Domain Watchdog<br/>
</p> </p>
</div> {% endblock %}
<div class="footer">
<p>&copy; Domain Watchdog</p>
</div>
</div>
</body>
</html>

View File

@ -1,53 +1,8 @@
<!DOCTYPE html> {% extends "emails/base.html.twig" %}
<html lang="en">
<head>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
color: #333;
}
.container { {% set email_color = '#0056b3' %}
max-width: 600px; {% set title = 'Domain Watchdog Alert' %}
margin: 0 auto; {% block content %}
padding: 20px;
border: 1px solid #ddd;
border-radius: 5px;
background-color: #f9f9f9;
}
.header {
text-align: center;
margin-bottom: 20px;
}
.header h1 {
font-size: 24px;
color: #0056b3;
}
.content {
margin-bottom: 20px;
}
.content p {
margin: 0 0 10px;
}
.footer {
text-align: center;
color: #777;
}
</style>
<title>Domain Watchdog Alert</title>
</head>
<body>
<div class="container">
<div class="header">
<h1>Domain Watchdog Alert</h1>
</div>
<div class="content">
<p>Hello, <br/> <p>Hello, <br/>
We are pleased to inform you that a new action has been detected on a domain name in your watchlist.<br/> We are pleased to inform you that a new action has been detected on a domain name in your watchlist.<br/>
<strong>Domain name:</strong> {{ event.domain.ldhName }}<br/> <strong>Domain name:</strong> {{ event.domain.ldhName }}<br/>
@ -56,12 +11,5 @@
<br/><br/> <br/><br/>
Thank you for your understanding,<br/> Thank you for your understanding,<br/>
Sincerely,<br/> Sincerely,<br/>
Domain Watchdog<br/>
</p> </p>
</div> {% endblock %}
<div class="footer">
<p>&copy; Domain Watchdog</p>
</div>
</div>
</body>
</html>