This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve aesthetics and reusability of HTML templates. (#13652)
Use a base template to create a cohesive feel across the HTML templates provided by Synapse. Adds basic styling to the base template for a more user-friendly look and feel.
- Loading branch information
1 parent
d24346f
commit 1d45ad8
Showing
31 changed files
with
691 additions
and
740 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Improve aesthetics of HTML templates. Note that these changes do not retroactively apply to templates which have been [customised](https://matrix-org.github.io/synapse/latest/templates.html#templates) by server admins. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>{% block title %}{% endblock %}</title> | ||
<style type="text/css"> | ||
{%- include 'style.css' without context %} | ||
</style> | ||
{% block header %}{% endblock %} | ||
</head> | ||
<body> | ||
<header class="mx_Header"> | ||
{% if app_name == "Riot" %} | ||
<img src="http://riot.im/img/external/riot-logo-email.png" width="83" height="83" alt="[Riot]"/> | ||
{% elif app_name == "Vector" %} | ||
<img src="http://matrix.org/img/vector-logo-email.png" width="64" height="83" alt="[Vector]"/> | ||
{% elif app_name == "Element" %} | ||
<img src="https://static.element.io/images/email-logo.png" width="83" height="83" alt="[Element]"/> | ||
{% else %} | ||
<img src="http://matrix.org/img/matrix-120x51.png" width="120" height="51" alt="[matrix]"/> | ||
{% endif %} | ||
</header> | ||
|
||
{% block body %}{% endblock %} | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Your account is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}.</title> | ||
</head> | ||
<body> | ||
Your account is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}. | ||
</body> | ||
</html> | ||
{% extends "_base.html" %} | ||
{% block title %}Your account is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}.{% endblock %} | ||
|
||
{% block body %} | ||
<p>Your account is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}.</p> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Your account has been successfully renewed and is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}.</title> | ||
</head> | ||
<body> | ||
Your account has been successfully renewed and is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}. | ||
</body> | ||
</html> | ||
{% extends "_base.html" %} | ||
{% block title %}Your account has been successfully renewed and is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}.{% endblock %} | ||
|
||
{% block body %} | ||
<p>Your account has been successfully renewed and is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}.</p> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Request to add an email address to your Matrix account</title> | ||
</head> | ||
<body> | ||
<p>A request to add an email address to your Matrix account has been received. If this was you, please click the link below to confirm adding this email:</p> | ||
<a href="{{ link }}">{{ link }}</a> | ||
<p>If this was not you, you can safely ignore this email. Thank you.</p> | ||
</body> | ||
</html> | ||
{% extends "_base.html" %} | ||
{% block title %}Request to add an email address to your Matrix account{% endblock %} | ||
|
||
{% block body %} | ||
<p>A request to add an email address to your Matrix account has been received. If this was you, please click the link below to confirm adding this email:</p> | ||
<a href="{{ link }}">{{ link }}</a> | ||
<p>If this was not you, you can safely ignore this email. Thank you.</p> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Request failed</title> | ||
</head> | ||
<body> | ||
<p>The request failed for the following reason: {{ failure_reason }}.</p> | ||
<p>No changes have been made to your account.</p> | ||
</body> | ||
</html> | ||
{% extends "_base.html" %} | ||
{% block title %}Request failed{% endblock %} | ||
|
||
{% block body %} | ||
<p>The request failed for the following reason: {{ failure_reason }}.</p> | ||
<p>No changes have been made to your account.</p> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Your email has now been validated</title> | ||
</head> | ||
<body> | ||
<p>Your email has now been validated, please return to your client. You may now close this window.</p> | ||
</body> | ||
</html> | ||
{% extends "_base.html" %} | ||
{% block title %}Your email has now been validated{% endblock %} | ||
|
||
{% block body %} | ||
<p>Your email has now been validated, please return to your client. You may now close this window.</p> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
<html> | ||
<head> | ||
<title>Success!</title> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
{% extends "_base.html" %} | ||
{% block title %}Success!{% endblock %} | ||
|
||
{% block header %} | ||
<link rel="stylesheet" href="/_matrix/static/client/register/style.css"> | ||
<script> | ||
if (window.onAuthDone) { | ||
window.onAuthDone(); | ||
} else if (window.opener && window.opener.postMessage) { | ||
window.opener.postMessage("authDone", "*"); | ||
window.opener.postMessage("authDone", "*"); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<div> | ||
<p>Thank you</p> | ||
<p>You may now close this window and return to the application</p> | ||
</div> | ||
</body> | ||
</html> | ||
{% endblock %} | ||
|
||
{% block body %} | ||
<div> | ||
<p>Thank you</p> | ||
<p>You may now close this window and return to the application</p> | ||
</div> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,5 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Invalid renewal token.</title> | ||
</head> | ||
<body> | ||
Invalid renewal token. | ||
</body> | ||
</html> | ||
{% block title %}Invalid renewal token.{% endblock %} | ||
|
||
{% block body %} | ||
<p>Invalid renewal token.</p> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,46 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<style type="text/css"> | ||
{% include 'mail.css' without context %} | ||
{% include "mail-%s.css" % app_name ignore missing without context %} | ||
{% include 'mail-expiry.css' without context %} | ||
</style> | ||
</head> | ||
<body> | ||
<table id="page"> | ||
<tr> | ||
<td> </td> | ||
<td id="inner"> | ||
<table class="header"> | ||
<tr> | ||
<td> | ||
<div class="salutation">Hi {{ display_name }},</div> | ||
</td> | ||
<td class="logo"> | ||
{% if app_name == "Riot" %} | ||
<img src="http://riot.im/img/external/riot-logo-email.png" width="83" height="83" alt="[Riot]"/> | ||
{% elif app_name == "Vector" %} | ||
<img src="http://matrix.org/img/vector-logo-email.png" width="64" height="83" alt="[Vector]"/> | ||
{% elif app_name == "Element" %} | ||
<img src="https://static.element.io/images/email-logo.png" width="83" height="83" alt="[Element]"/> | ||
{% else %} | ||
<img src="http://matrix.org/img/matrix-120x51.png" width="120" height="51" alt="[matrix]"/> | ||
{% endif %} | ||
</td> | ||
</tr> | ||
<tr> | ||
<td colspan="2"> | ||
<div class="noticetext">Your account will expire on {{ expiration_ts|format_ts("%d-%m-%Y") }}. This means that you will lose access to your account after this date.</div> | ||
<div class="noticetext">To extend the validity of your account, please click on the link below (or copy and paste it into a new browser tab):</div> | ||
<div class="noticetext"><a href="{{ url }}">{{ url }}</a></div> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
<td> </td> | ||
</tr> | ||
</table> | ||
</body> | ||
</html> | ||
{% extends "_base.html" %} | ||
{% block title %}Notice of expiry{% endblock %} | ||
|
||
{% block header %} | ||
<style type="text/css"> | ||
{% include 'mail.css' without context %} | ||
{% include "mail-%s.css" % app_name ignore missing without context %} | ||
{% include 'mail-expiry.css' without context %} | ||
</style> | ||
{% endblock %} | ||
|
||
{% block body %} | ||
<table id="page"> | ||
<tr> | ||
<td> </td> | ||
<td id="inner"> | ||
<table class="header"> | ||
<tr> | ||
<td> | ||
<div class="salutation">Hi {{ display_name }},</div> | ||
</td> | ||
<td class="logo"> | ||
{% if app_name == "Riot" %} | ||
<img src="http://riot.im/img/external/riot-logo-email.png" width="83" height="83" alt="[Riot]"/> | ||
{% elif app_name == "Vector" %} | ||
<img src="http://matrix.org/img/vector-logo-email.png" width="64" height="83" alt="[Vector]"/> | ||
{% elif app_name == "Element" %} | ||
<img src="https://static.element.io/images/email-logo.png" width="83" height="83" alt="[Element]"/> | ||
{% else %} | ||
<img src="http://matrix.org/img/matrix-120x51.png" width="120" height="51" alt="[matrix]"/> | ||
{% endif %} | ||
</td> | ||
</tr> | ||
<tr> | ||
<td colspan="2"> | ||
<div class="noticetext">Your account will expire on {{ expiration_ts|format_ts("%d-%m-%Y") }}. This means that you will lose access to your account after this date.</div> | ||
<div class="noticetext">To extend the validity of your account, please click on the link below (or copy and paste it into a new browser tab):</div> | ||
<div class="noticetext"><a href="{{ url }}">{{ url }}</a></div> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
<td> </td> | ||
</tr> | ||
</table> | ||
{% endblock %} |
Oops, something went wrong.