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
Improve aesthetics and reusability of HTML templates #13652
Merged
clokep
merged 18 commits into
matrix-org:develop
from
germain-gg:gsouquet/template-styling
Oct 21, 2022
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
c5d00f4
Template header and footer to fragments
germain-gg 6fce9e9
Move existing fragments to correct folder
germain-gg 3eb56fd
Move static assets to their own folder
germain-gg d405c4f
Set title variable and pass it to the context
germain-gg 441d69f
move sso footer to fragments folder
germain-gg 8e27b0c
Add basic styling for templates
germain-gg 08899ec
Add changelog entry
germain-gg 1a0232f
escape title variable
germain-gg 1b02a93
lint fix changelog entry
germain-gg 600ff84
Merge remote-tracking branch 'origin/develop' into gsouquet/template-…
clokep 5b40a4e
Switch to a base template.
clokep 17caf24
Move notif fragments back out.
clokep 7288400
Move other fragments back.
clokep 6cecd5a
Move static files back.
clokep 8687721
Remove further unintentional changes.
clokep fd2e629
Merge remote-tracking branch 'origin/develop' into gsouquet/template-…
clokep e09affb
Inline styles instead of linking to them.
clokep cbc3003
Clarify changelog.
clokep File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]"/> | ||
clokep marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{% 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 %} | ||
clokep marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
{% 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> | ||
{% 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> | ||
</body> | ||
</html> | ||
{% 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> | ||
{% 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> | ||
</body> | ||
</html> | ||
{% 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> | ||
{% 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> | ||
</body> | ||
</html> | ||
{% 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
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
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
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,9 @@ | ||
<html lang="en"> | ||
<head> | ||
<title>Password reset</title> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
</head> | ||
<body> | ||
{% block title %}Password reset{% endblock %} | ||
|
||
{% block body %} | ||
<p>A password reset request has been received for your Matrix account. If this was you, please click the link below to confirm resetting your password:</p> | ||
|
||
<a href="{{ link }}">{{ link }}</a> | ||
|
||
<p>If this was not you, <strong>do not</strong> click the link above and instead contact your server administrator. Thank you.</p> | ||
</body> | ||
</html> | ||
{% 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
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 @@ | ||
<html lang="en"> | ||
<head> | ||
<title>Password reset failure</title> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
</head> | ||
<body> | ||
<p>The request failed for the following reason: {{ failure_reason }}.</p> | ||
{% block title %}Password reset failure{% endblock %} | ||
|
||
{% block body %} | ||
<p>The request failed for the following reason: {{ failure_reason }}.</p> | ||
<p>Your password has not been reset.</p> | ||
</body> | ||
</html> | ||
{% 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,9 +1,5 @@ | ||
<html lang="en"> | ||
<head> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
</head> | ||
<body> | ||
{% block title %}Password reset success{% endblock %} | ||
|
||
{% block body %} | ||
<p>Your email has now been validated, please return to your client to reset your password. You may now close this window.</p> | ||
</body> | ||
</html> | ||
{% 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
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,16 +1,11 @@ | ||
<html lang="en"> | ||
<head> | ||
<title>Registration</title> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
</head> | ||
<body> | ||
{% block title %}Registration{% endblock %} | ||
|
||
{% block body %} | ||
<p>You have asked us to register this email with a new Matrix account. If this was you, please click the link below to confirm your email address:</p> | ||
|
||
<a href="{{ link }}">Verify Your Email Address</a> | ||
|
||
<p>If this was not you, you can safely disregard this email.</p> | ||
|
||
<p>Thank you.</p> | ||
</body> | ||
</html> | ||
{% 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,9 +1,5 @@ | ||
<html lang="en"> | ||
<head> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
</head> | ||
<body> | ||
{% block title %}Registration failure{% endblock %} | ||
|
||
{% block body %} | ||
<p>Validation failed for the following reason: {{ failure_reason }}.</p> | ||
</body> | ||
</html> | ||
{% 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,10 +1,5 @@ | ||
<html lang="en"> | ||
<head> | ||
<title>Your email has now been validated</title> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
</head> | ||
<body> | ||
{% 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> | ||
</body> | ||
</html> | ||
{% endblock %} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these all be https://?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just leaving them how they are today... 🤷