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.
pull/14270/head
Germain 2022-10-21 18:44:00 +01:00 committed by GitHub
parent d24346f530
commit 1d45ad8b2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 673 additions and 722 deletions

View File

@ -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.

View File

@ -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>

View File

@ -1,12 +1,6 @@
<!DOCTYPE html> {% extends "_base.html" %}
<html lang="en"> {% block title %}Your account is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}.{% endblock %}
<head>
<meta charset="UTF-8"> {% block body %}
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <p>Your account is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}.</p>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> {% endblock %}
<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>

View File

@ -1,12 +1,6 @@
<!DOCTYPE html> {% extends "_base.html" %}
<html lang="en"> {% block title %}Your account has been successfully renewed and is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}.{% endblock %}
<head>
<meta charset="UTF-8"> {% block body %}
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <p>Your account has been successfully renewed and is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}.</p>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> {% endblock %}
<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>

View File

@ -1,14 +1,8 @@
<!DOCTYPE html> {% extends "_base.html" %}
<html lang="en"> {% block title %}Request to add an email address to your Matrix account{% endblock %}
<head>
<meta charset="UTF-8"> {% block body %}
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <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>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <a href="{{ link }}">{{ link }}</a>
<title>Request to add an email address to your Matrix account</title> <p>If this was not you, you can safely ignore this email. Thank you.</p>
</head> {% endblock %}
<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>

View File

@ -1,13 +1,7 @@
<!DOCTYPE html> {% extends "_base.html" %}
<html lang="en"> {% block title %}Request failed{% endblock %}
<head>
<meta charset="UTF-8"> {% block body %}
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <p>The request failed for the following reason: {{ failure_reason }}.</p>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <p>No changes have been made to your account.</p>
<title>Request failed</title> {% endblock %}
</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>

View File

@ -1,12 +1,6 @@
<!DOCTYPE html> {% extends "_base.html" %}
<html lang="en"> {% block title %}Your email has now been validated{% endblock %}
<head>
<meta charset="UTF-8"> {% block body %}
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <p>Your email has now been validated, please return to your client. You may now close this window.</p>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> {% endblock %}
<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>

View File

@ -1,8 +1,7 @@
<html> {% extends "_base.html" %}
<head> {% block title %}Success!{% endblock %}
<title>Success!</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> {% block header %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/_matrix/static/client/register/style.css"> <link rel="stylesheet" href="/_matrix/static/client/register/style.css">
<script> <script>
if (window.onAuthDone) { if (window.onAuthDone) {
@ -11,11 +10,12 @@ if (window.onAuthDone) {
window.opener.postMessage("authDone", "*"); window.opener.postMessage("authDone", "*");
} }
</script> </script>
</head> {% endblock %}
<body>
<div> {% block body %}
<div>
<p>Thank you</p> <p>Thank you</p>
<p>You may now close this window and return to the application</p> <p>You may now close this window and return to the application</p>
</div> </div>
</body>
</html> {% endblock %}

View File

@ -1,12 +1,5 @@
<!DOCTYPE html> {% block title %}Invalid renewal token.{% endblock %}
<html lang="en">
<head> {% block body %}
<meta charset="UTF-8"> <p>Invalid renewal token.</p>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> {% endblock %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Invalid renewal token.</title>
</head>
<body>
Invalid renewal token.
</body>
</html>

View File

@ -1,16 +1,16 @@
<!doctype html> {% extends "_base.html" %}
<html lang="en"> {% block title %}Notice of expiry{% endblock %}
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> {% block header %}
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <style type="text/css">
<style type="text/css">
{% include 'mail.css' without context %} {% include 'mail.css' without context %}
{% include "mail-%s.css" % app_name ignore missing without context %} {% include "mail-%s.css" % app_name ignore missing without context %}
{% include 'mail-expiry.css' without context %} {% include 'mail-expiry.css' without context %}
</style> </style>
</head> {% endblock %}
<body>
<table id="page"> {% block body %}
<table id="page">
<tr> <tr>
<td> </td> <td> </td>
<td id="inner"> <td id="inner">
@ -42,6 +42,5 @@
</td> </td>
<td> </td> <td> </td>
</tr> </tr>
</table> </table>
</body> {% endblock %}
</html>

View File

@ -1,15 +1,14 @@
<!doctype html> {% block title %}New activity in room{% endblock %}
<html lang="en">
<head> {% block header %}
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <style type="text/css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
{%- include 'mail.css' without context %} {%- include 'mail.css' without context %}
{%- include "mail-%s.css" % app_name ignore missing without context %} {%- include "mail-%s.css" % app_name ignore missing without context %}
</style> </style>
</head> {% endblock %}
<body>
<table id="page"> {% block body %}
<table id="page">
<tr> <tr>
<td> </td> <td> </td>
<td id="inner"> <td id="inner">
@ -54,6 +53,5 @@
</td> </td>
<td> </td> <td> </td>
</tr> </tr>
</table> </table>
</body> {% endblock %}
</html>

View File

@ -1,14 +1,9 @@
<html lang="en"> {% block title %}Password reset{% endblock %}
<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>
<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> {% 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>
<p>If this was not you, <strong>do not</strong> click the link above and instead contact your server administrator. Thank you.</p> <a href="{{ link }}">{{ link }}</a>
</body>
</html> <p>If this was not you, <strong>do not</strong> click the link above and instead contact your server administrator. Thank you.</p>
{% endblock %}

View File

@ -1,10 +1,6 @@
<html lang="en"> {% block title %}Password reset confirmation{% endblock %}
<head>
<title>Password reset confirmation</title> {% block body %}
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<!--Use a hidden form to resubmit the information necessary to reset the password--> <!--Use a hidden form to resubmit the information necessary to reset the password-->
<form method="post"> <form method="post">
<input type="hidden" name="sid" value="{{ sid }}"> <input type="hidden" name="sid" value="{{ sid }}">
@ -15,6 +11,4 @@
If you did not mean to do this, please close this page and your password will not be changed.</p> If you did not mean to do this, please close this page and your password will not be changed.</p>
<p><button type="submit">Confirm changing my password</button></p> <p><button type="submit">Confirm changing my password</button></p>
</form> </form>
</body> {% endblock %}
</html>

View File

@ -1,12 +1,6 @@
<html lang="en"> {% block title %}Password reset failure{% endblock %}
<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 body %}
<p>The request failed for the following reason: {{ failure_reason }}.</p>
<p>Your password has not been reset.</p> <p>Your password has not been reset.</p>
</body> {% endblock %}
</html>

View File

@ -1,9 +1,5 @@
<html lang="en"> {% block title %}Password reset success{% endblock %}
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> {% block body %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<p>Your email has now been validated, please return to your client to reset your password. You may now close this window.</p> <p>Your email has now been validated, please return to your client to reset your password. You may now close this window.</p>
</body> {% endblock %}
</html>

View File

@ -1,10 +1,7 @@
<html> {% block title %}Authentication{% endblock %}
<head>
<title>Authentication</title> {% block header %}
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <script src="https://www.recaptcha.net/recaptcha/api.js" async defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://www.recaptcha.net/recaptcha/api.js"
async defer></script>
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script> <script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<link rel="stylesheet" href="/_matrix/static/client/register/style.css"> <link rel="stylesheet" href="/_matrix/static/client/register/style.css">
<script> <script>
@ -12,8 +9,9 @@ function captchaDone() {
$('#registrationForm').submit(); $('#registrationForm').submit();
} }
</script> </script>
</head> {% endblock %}
<body>
{% block body %}
<form id="registrationForm" method="post" action="{{ myurl }}"> <form id="registrationForm" method="post" action="{{ myurl }}">
<div> <div>
{% if error is defined %} {% if error is defined %}
@ -37,5 +35,4 @@ function captchaDone() {
</div> </div>
</div> </div>
</form> </form>
</body> {% endblock %}
</html>

View File

@ -1,16 +1,11 @@
<html lang="en"> {% block title %}Registration{% endblock %}
<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>
<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> {% 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>
<p>If this was not you, you can safely disregard this email.</p> <a href="{{ link }}">Verify Your Email Address</a>
<p>Thank you.</p> <p>If this was not you, you can safely disregard this email.</p>
</body>
</html> <p>Thank you.</p>
{% endblock %}

View File

@ -1,9 +1,5 @@
<html lang="en"> {% block title %}Registration failure{% endblock %}
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> {% block body %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<p>Validation failed for the following reason: {{ failure_reason }}.</p> <p>Validation failed for the following reason: {{ failure_reason }}.</p>
</body> {% endblock %}
</html>

View File

@ -1,10 +1,5 @@
<html lang="en"> {% block title %}Your email has now been validated{% endblock %}
<head>
<title>Your email has now been validated</title> {% block body %}
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<p>Your email has now been validated, please return to your client. You may now close this window.</p> <p>Your email has now been validated, please return to your client. You may now close this window.</p>
</body> {% endblock %}
</html>

View File

@ -1,11 +1,10 @@
<html lang="en"> {% block title %}Authentication{% endblock %}
<head>
<title>Authentication</title> {% block header %}
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/_matrix/static/client/register/style.css"> <link rel="stylesheet" href="/_matrix/static/client/register/style.css">
</head> {% endblock %}
<body>
{% block body %}
<form id="registrationForm" method="post" action="{{ myurl }}"> <form id="registrationForm" method="post" action="{{ myurl }}">
<div> <div>
{% if error is defined %} {% if error is defined %}
@ -19,5 +18,4 @@
<input type="submit" value="Authenticate" /> <input type="submit" value="Authenticate" />
</div> </div>
</form> </form>
</body> {% endblock %}
</html>

View File

@ -1,14 +1,13 @@
<!DOCTYPE html> {% block title %}SSO account deactivated{% endblock %}
<html lang="en">
<head> {% block header %}
<meta charset="UTF-8"> <style type="text/css">
<title>SSO account deactivated</title>
<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 "sso.css" without context %} {% include "sso.css" without context %}
</style> </style>
</head> {% endblock %}
<body class="error_page">
{% block body %}
<div class="error_page">
<header> <header>
<h1>Your account has been deactivated</h1> <h1>Your account has been deactivated</h1>
<p> <p>
@ -20,6 +19,6 @@
administrator. administrator.
</p> </p>
</header> </header>
{% include "sso_footer.html" without context %} </div>
</body> {% include "sso_footer.html" without context %}
</html> {% endblock %}

View File

@ -1,11 +1,7 @@
<!DOCTYPE html> {% block title %}Create your account{% endblock %}
<html lang="en">
<head> {% block header %}
<title>Create your account</title> <script type="text/javascript">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script type="text/javascript">
let wasKeyboard = false; let wasKeyboard = false;
document.addEventListener("mousedown", function() { wasKeyboard = false; }); document.addEventListener("mousedown", function() { wasKeyboard = false; });
document.addEventListener("keydown", function() { wasKeyboard = true; }); document.addEventListener("keydown", function() { wasKeyboard = true; });
@ -16,8 +12,8 @@
document.body.classList.remove("keyboard-focus"); document.body.classList.remove("keyboard-focus");
} }
}); });
</script> </script>
<style type="text/css"> <style type="text/css">
{% include "sso.css" without context %} {% include "sso.css" without context %}
body.keyboard-focus :focus, body.keyboard-focus .username_input:focus-within { body.keyboard-focus :focus, body.keyboard-focus .username_input:focus-within {
@ -127,14 +123,15 @@
output.error { output.error {
color: #FE2928; color: #FE2928;
} }
</style> </style>
</head> {% endblock %}
<body>
<header> {% block body %}
<header>
<h1>Create your account</h1> <h1>Create your account</h1>
<p>This is required. Continue to create your account on {{ server_name }}. You can't change this later.</p> <p>This is required. Continue to create your account on {{ server_name }}. You can't change this later.</p>
</header> </header>
<main> <main>
<form method="post" class="form__input" id="form"> <form method="post" class="form__input" id="form">
<div class="username_input" id="username_input"> <div class="username_input" id="username_input">
<label for="field-username">Username (required)</label> <label for="field-username">Username (required)</label>
@ -180,10 +177,9 @@
</section> </section>
{% endif %} {% endif %}
</form> </form>
</main> </main>
{% include "sso_footer.html" without context %} {% include "sso_footer.html" without context %}
<script type="text/javascript"> <script type="text/javascript">
{% include "sso_auth_account_details.js" without context %} {% include "sso_auth_account_details.js" without context %}
</script> </script>
</body> {% endblock %}
</html>

View File

@ -1,15 +1,13 @@
<!DOCTYPE html> {% block title %}Authentication failed{% endblock %}
<html lang="en">
<head> {% block header %}
<meta charset="UTF-8"> <style type="text/css">
<title>Authentication failed</title>
<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 "sso.css" without context %} {% include "sso.css" without context %}
</style> </style>
</head> {% endblock %}
<body class="error_page">
{% block body %}
<div class="error_page">
<header> <header>
<h1>That doesn't look right</h1> <h1>That doesn't look right</h1>
<p> <p>
@ -22,6 +20,6 @@
the Identity Provider as when you log into your account. the Identity Provider as when you log into your account.
</p> </p>
</header> </header>
{% include "sso_footer.html" without context %} </div>
</body> {% include "sso_footer.html" without context %}
</html> {% endblock %}

View File

@ -1,16 +1,13 @@
<!DOCTYPE html> {% block title %}Confirm it's you{% endblock %}
<html lang="en">
<head> {% block header %}
<meta charset="UTF-8"> <style type="text/css">
<title>Confirm it's you</title>
<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 "sso.css" without context %} {% include "sso.css" without context %}
</style> </style>
</head> {% endblock %}
<body>
<header> {% block body %}
<header>
<h1>Confirm it's you to continue</h1> <h1>Confirm it's you to continue</h1>
<p> <p>
A client is trying to {{ description }}. To confirm this action A client is trying to {{ description }}. To confirm this action
@ -19,12 +16,11 @@
<p><strong> <p><strong>
If you did not expect this, your account may be compromised. If you did not expect this, your account may be compromised.
</strong></p> </strong></p>
</header> </header>
<main> <main>
<a href="{{ redirect_url }}" class="primary-button"> <a href="{{ redirect_url }}" class="primary-button">
Continue with {{ idp.idp_name }} Continue with {{ idp.idp_name }}
</a> </a>
</main> </main>
{% include "sso_footer.html" without context %} {% include "sso_footer.html" without context %}
</body> {% endblock %}
</html>

View File

@ -1,29 +1,25 @@
<!DOCTYPE html> {% block title %}Authentication successful{% endblock %}
<html lang="en">
<head> {% block header %}
<meta charset="UTF-8"> <style type="text/css">
<title>Authentication successful</title>
<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 "sso.css" without context %} {% include "sso.css" without context %}
</style> </style>
<script> <script>
if (window.onAuthDone) { if (window.onAuthDone) {
window.onAuthDone(); window.onAuthDone();
} else if (window.opener && window.opener.postMessage) { } else if (window.opener && window.opener.postMessage) {
window.opener.postMessage("authDone", "*"); window.opener.postMessage("authDone", "*");
} }
</script> </script>
</head> {% endblock %}
<body>
<header> {% block body %}
<header>
<h1>Thank you</h1> <h1>Thank you</h1>
<p> <p>
Now we know its you, you can close this window and return to the Now we know its you, you can close this window and return to the
application. application.
</p> </p>
</header> </header>
{% include "sso_footer.html" without context %} {% include "sso_footer.html" without context %}
</body> {% endblock %}
</html>

View File

@ -1,19 +1,19 @@
<!DOCTYPE html> {% block title %}Authentication failed{% endblock %}
<html lang="en">
<head> {% block header %}
<meta charset="UTF-8"> {% if error == "unauthorised" %}
<title>Authentication failed</title> <style type="text/css">
<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 "sso.css" without context %} {% include "sso.css" without context %}
#error_code { #error_code {
margin-top: 56px; margin-top: 56px;
} }
</style> </style>
</head> {% endif %}
<body class="error_page"> {% endblock %}
{% block body %}
<div class="error_page">
{# If an error of unauthorised is returned it means we have actively rejected their login #} {# If an error of unauthorised is returned it means we have actively rejected their login #}
{% if error == "unauthorised" %} {% if error == "unauthorised" %}
<header> <header>
@ -66,5 +66,5 @@
} }
</script> </script>
{% endif %} {% endif %}
</body> </div>
</html> {% endblock %}

View File

@ -1,11 +1,7 @@
<!DOCTYPE html> {% block title %}Choose identity provider{% endblock %}
<html lang="en">
<head> {% block header %}
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <style type="text/css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<title>Choose identity provider</title>
<style type="text/css">
{% include "sso.css" without context %} {% include "sso.css" without context %}
.providers { .providers {
@ -37,14 +33,15 @@
.providers a span { .providers a span {
flex: 1; flex: 1;
} }
</style> </style>
</head> {% endblock %}
<body>
<header> {% block body %}
<header>
<h1>Log in to {{ server_name }} </h1> <h1>Log in to {{ server_name }} </h1>
<p>Choose an identity provider to log in</p> <p>Choose an identity provider to log in</p>
</header> </header>
<main> <main>
<ul class="providers"> <ul class="providers">
{% for p in providers %} {% for p in providers %}
<li> <li>
@ -57,7 +54,6 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</main> </main>
{% include "sso_footer.html" without context %} {% include "sso_footer.html" without context %}
</body> {% endblock %}
</html>

View File

@ -1,24 +1,21 @@
<!DOCTYPE html> {% block title %}Agree to terms and conditions{% endblock %}
<html lang="en">
<head> {% block header %}
<meta charset="UTF-8"> <style type="text/css">
<title>Agree to terms and conditions</title>
<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 "sso.css" without context %} {% include "sso.css" without context %}
#consent_form { #consent_form {
margin-top: 56px; margin-top: 56px;
} }
</style> </style>
</head> {% endblock %}
<body>
<header> {% block body %}
<header>
<h1>Your account is nearly ready</h1> <h1>Your account is nearly ready</h1>
<p>Agree to the terms to create your account.</p> <p>Agree to the terms to create your account.</p>
</header> </header>
<main> <main>
{% include "sso_partial_profile.html" %} {% include "sso_partial_profile.html" %}
<form method="post" action="{{my_url}}" id="consent_form"> <form method="post" action="{{my_url}}" id="consent_form">
<p> <p>
@ -27,7 +24,6 @@
</p> </p>
<input type="submit" class="primary-button" value="Continue"/> <input type="submit" class="primary-button" value="Continue"/>
</form> </form>
</main> </main>
{% include "sso_footer.html" without context %} {% include "sso_footer.html" without context %}
</body> {% endblock %}
</html>

View File

@ -1,11 +1,7 @@
<!DOCTYPE html> {% block title %}Continue to your account{% endblock %}
<html lang="en">
<head> {% block header %}
<meta charset="UTF-8"> <style type="text/css">
<title>Continue to your account</title>
<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 "sso.css" without context %} {% include "sso.css" without context %}
.confirm-trust { .confirm-trust {
@ -25,17 +21,18 @@
display: block; display: block;
float: left; float: left;
} }
</style> </style>
</head> {% endblock %}
<body>
<header> {% block body %}
<header>
<h1>Continue to your account</h1> <h1>Continue to your account</h1>
</header> </header>
<main> <main>
{% include "sso_partial_profile.html" %} {% include "sso_partial_profile.html" %}
<p class="confirm-trust">Continuing will grant <strong>{{ display_url }}</strong> access to your account.</p> <p class="confirm-trust">Continuing will grant <strong>{{ display_url }}</strong> access to your account.</p>
<a href="{{ redirect_url }}" class="primary-button">Continue</a> <a href="{{ redirect_url }}" class="primary-button">Continue</a>
</main> </main>
{% include "sso_footer.html" without context %} {% include "sso_footer.html" without context %}
</body>
</html> {% endblock %}

View File

@ -0,0 +1,29 @@
html {
height: 100%;
}
body {
background: #f9fafb;
max-width: 680px;
margin: auto;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
.mx_Header {
border-bottom: 3px solid #ddd;
margin-bottom: 1rem;
padding-top: 1rem;
padding-bottom: 1rem;
text-align: center;
}
@media screen and (max-width: 1120px) {
body {
font-size: 20px;
}
h1 { font-size: 1rem; }
h2 { font-size: .9rem; }
h3 { font-size: .85rem; }
h4 { font-size: .8rem; }
}

View File

@ -1,11 +1,10 @@
<html> {% block title %}Authentication{% endblock %}
<head>
<title>Authentication</title> {% block header %}
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/_matrix/static/client/register/style.css"> <link rel="stylesheet" href="/_matrix/static/client/register/style.css">
</head> {% endblock %}
<body>
{% block body %}
<form id="registrationForm" method="post" action="{{ myurl }}"> <form id="registrationForm" method="post" action="{{ myurl }}">
<div> <div>
{% if error is defined %} {% if error is defined %}
@ -19,5 +18,4 @@
<input type="submit" value="Agree" /> <input type="submit" value="Agree" />
</div> </div>
</form> </form>
</body> {% endblock %}
</html>