From c5d00f4b12a78b78e8643b232d51f555a77c38c6 Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Mon, 22 Aug 2022 10:34:29 +0100 Subject: [PATCH 01/16] Template header and footer to fragments --- .../templates/account_previously_renewed.html | 18 +- synapse/res/templates/account_renewed.html | 19 +- synapse/res/templates/add_threepid.html | 22 +- .../res/templates/add_threepid_failure.html | 20 +- .../res/templates/add_threepid_success.html | 18 +- synapse/res/templates/auth_success.html | 25 +- synapse/res/templates/fragments/footer.html | 2 + synapse/res/templates/fragments/header.html | 9 + synapse/res/templates/invalid_token.html | 18 +- synapse/res/templates/notice_expiry.html | 90 ++--- synapse/res/templates/notif_mail.html | 113 +++--- synapse/res/templates/password_reset.html | 18 +- .../password_reset_confirmation.html | 14 +- .../res/templates/password_reset_failure.html | 15 +- .../res/templates/password_reset_success.html | 13 +- synapse/res/templates/recaptcha.html | 31 +- synapse/res/templates/registration.html | 21 +- .../res/templates/registration_failure.html | 13 +- .../res/templates/registration_success.html | 14 +- synapse/res/templates/registration_token.html | 15 +- .../templates/sso_account_deactivated.html | 48 ++- .../templates/sso_auth_account_details.html | 372 +++++++++--------- synapse/res/templates/sso_auth_bad_user.html | 50 ++- synapse/res/templates/sso_auth_confirm.html | 55 ++- synapse/res/templates/sso_auth_success.html | 52 ++- synapse/res/templates/sso_error.html | 35 +- .../res/templates/sso_login_idp_picker.html | 113 +++--- .../res/templates/sso_new_user_consent.html | 58 ++- .../res/templates/sso_redirect_confirm.html | 72 ++-- synapse/res/templates/terms.html | 18 +- 30 files changed, 629 insertions(+), 752 deletions(-) create mode 100644 synapse/res/templates/fragments/footer.html create mode 100644 synapse/res/templates/fragments/header.html diff --git a/synapse/res/templates/account_previously_renewed.html b/synapse/res/templates/account_previously_renewed.html index bd4f7cea97a0..e3aa490c2ced 100644 --- a/synapse/res/templates/account_previously_renewed.html +++ b/synapse/res/templates/account_previously_renewed.html @@ -1,12 +1,6 @@ - - - - - - - Your account is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}. - - - Your account is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}. - - \ No newline at end of file +{% include "fragments/header.html" without context %} + + +

Your account is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}.

+ +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/account_renewed.html b/synapse/res/templates/account_renewed.html index 57b319f37584..6c6a05a8c1bd 100644 --- a/synapse/res/templates/account_renewed.html +++ b/synapse/res/templates/account_renewed.html @@ -1,12 +1,7 @@ - - - - - - - Your account has been successfully renewed and is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}. - - - Your account has been successfully renewed and is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}. - - \ No newline at end of file +{% include "fragments/header.html" without context %} + + +

Your account has been successfully renewed and is valid until {{ expiration_ts|format_ts("%d-%m-%Y") }}.

+ +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/add_threepid.html b/synapse/res/templates/add_threepid.html index 71f2215b7aea..564e4707bdf3 100644 --- a/synapse/res/templates/add_threepid.html +++ b/synapse/res/templates/add_threepid.html @@ -1,14 +1,8 @@ - - - - - - - Request to add an email address to your Matrix account - - -

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:

- {{ link }} -

If this was not you, you can safely ignore this email. Thank you.

- - +{% include "fragments/header.html" without context %} + + +

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:

+{{ link }} +

If this was not you, you can safely ignore this email. Thank you.

+ +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/add_threepid_failure.html b/synapse/res/templates/add_threepid_failure.html index bd627ee9ceca..c5ef7ede64b7 100644 --- a/synapse/res/templates/add_threepid_failure.html +++ b/synapse/res/templates/add_threepid_failure.html @@ -1,13 +1,7 @@ - - - - - - - Request failed - - -

The request failed for the following reason: {{ failure_reason }}.

-

No changes have been made to your account.

- - +{% include "fragments/header.html" without context %} + + +

The request failed for the following reason: {{ failure_reason }}.

+

No changes have been made to your account.

+ +{% include "fragments/footer.html" without context %} diff --git a/synapse/res/templates/add_threepid_success.html b/synapse/res/templates/add_threepid_success.html index 49170c138ea0..eb4592d9d526 100644 --- a/synapse/res/templates/add_threepid_success.html +++ b/synapse/res/templates/add_threepid_success.html @@ -1,12 +1,6 @@ - - - - - - - Your email has now been validated - - -

Your email has now been validated, please return to your client. You may now close this window.

- - \ No newline at end of file +{% include "fragments/header.html" without context %} + + +

Your email has now been validated, please return to your client. You may now close this window.

+ +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/auth_success.html b/synapse/res/templates/auth_success.html index 2d6ac44a0ec7..96b57d502f81 100644 --- a/synapse/res/templates/auth_success.html +++ b/synapse/res/templates/auth_success.html @@ -1,21 +1,18 @@ - - -Success! - - +{% include "fragments/header.html" without context %} + + +
+

Thank you

+

You may now close this window and return to the application

+
+ - - -
-

Thank you

-

You may now close this window and return to the application

-
- - + +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/fragments/footer.html b/synapse/res/templates/fragments/footer.html new file mode 100644 index 000000000000..691287b6e353 --- /dev/null +++ b/synapse/res/templates/fragments/footer.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/synapse/res/templates/fragments/header.html b/synapse/res/templates/fragments/header.html new file mode 100644 index 000000000000..25484fc902cb --- /dev/null +++ b/synapse/res/templates/fragments/header.html @@ -0,0 +1,9 @@ + + + + + + + {{ title }} + + \ No newline at end of file diff --git a/synapse/res/templates/invalid_token.html b/synapse/res/templates/invalid_token.html index 2c7c384fe332..3a687bf1b106 100644 --- a/synapse/res/templates/invalid_token.html +++ b/synapse/res/templates/invalid_token.html @@ -1,12 +1,6 @@ - - - - - - - Invalid renewal token. - - - Invalid renewal token. - - +{% include "fragments/header.html" without context %} + + +

Invalid renewal token.

+ +{% include "fragments/footer.html" without context %} diff --git a/synapse/res/templates/notice_expiry.html b/synapse/res/templates/notice_expiry.html index 865f9f7adab1..aa947b7e0f04 100644 --- a/synapse/res/templates/notice_expiry.html +++ b/synapse/res/templates/notice_expiry.html @@ -1,47 +1,43 @@ - - - - - - - - - - - - - - -
- - - - - - - - -
-
Hi {{ display_name }},
-
-
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.
-
To extend the validity of your account, please click on the link below (or copy and paste it into a new browser tab):
- -
-
- - +{% include "fragments/header.html" without context %} + + + + + + + + +
+ + + + + + + + +
+
Hi {{ display_name }},
+
+
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.
+
To extend the validity of your account, please click on the link below (or copy and paste it into a new browser tab):
+ +
+
+ + +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/notif_mail.html b/synapse/res/templates/notif_mail.html index 9dba0c025342..58539d187d6c 100644 --- a/synapse/res/templates/notif_mail.html +++ b/synapse/res/templates/notif_mail.html @@ -1,59 +1,54 @@ - - - - - - - - - - - - - - -
- - - - - -
-
Hi {{ user_display_name }},
-
{{ summary_text }}
-
- {%- for room in rooms %} - {%- include 'room.html' with context %} - {%- endfor %} - -
- - +{% include "fragments/header.html" without context %} + + + + + + + +
+ + + + + +
+
Hi {{ user_display_name }},
+
{{ summary_text }}
+
+ {%- for room in rooms %} + {%- include 'room.html' with context %} + {%- endfor %} + +
+ + +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/password_reset.html b/synapse/res/templates/password_reset.html index a8bdce357b42..9d6832a7bcab 100644 --- a/synapse/res/templates/password_reset.html +++ b/synapse/res/templates/password_reset.html @@ -1,14 +1,8 @@ - - - Password reset - - - - -

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:

+{% include "fragments/header.html" without context %} - {{ link }} + +

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:

+{{ link }} +

If this was not you, do not click the link above and instead contact your server administrator. Thank you.

-

If this was not you, do not click the link above and instead contact your server administrator. Thank you.

- - +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/password_reset_confirmation.html b/synapse/res/templates/password_reset_confirmation.html index 2e3fd2ec1e84..6374dfec5392 100644 --- a/synapse/res/templates/password_reset_confirmation.html +++ b/synapse/res/templates/password_reset_confirmation.html @@ -1,10 +1,7 @@ - - - Password reset confirmation - - - - +{% include "fragments/header.html" without context %} + + +
@@ -15,6 +12,5 @@ If you did not mean to do this, please close this page and your password will not be changed.

- - +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/password_reset_failure.html b/synapse/res/templates/password_reset_failure.html index 2d59c463f053..fe2b79a5ff69 100644 --- a/synapse/res/templates/password_reset_failure.html +++ b/synapse/res/templates/password_reset_failure.html @@ -1,12 +1,7 @@ - - - Password reset failure - - - - -

The request failed for the following reason: {{ failure_reason }}.

+{% include "fragments/header.html" without context %} + +

The request failed for the following reason: {{ failure_reason }}.

Your password has not been reset.

- - + +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/password_reset_success.html b/synapse/res/templates/password_reset_success.html index 5165bd1fa26d..f2ca02fa9806 100644 --- a/synapse/res/templates/password_reset_success.html +++ b/synapse/res/templates/password_reset_success.html @@ -1,9 +1,6 @@ - - - - - - +{% include "fragments/header.html" without context %} + +

Your email has now been validated, please return to your client to reset your password. You may now close this window.

- - + +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/recaptcha.html b/synapse/res/templates/recaptcha.html index 615d3239c6c9..bdcfebbf1c73 100644 --- a/synapse/res/templates/recaptcha.html +++ b/synapse/res/templates/recaptcha.html @@ -1,19 +1,6 @@ - - -Authentication - - - - - - - - +{% include "fragments/header.html" without context %} + +
{% if error is defined %} @@ -37,5 +24,13 @@
- - + + + + + +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/registration.html b/synapse/res/templates/registration.html index 20e831ff4a65..9c2350588614 100644 --- a/synapse/res/templates/registration.html +++ b/synapse/res/templates/registration.html @@ -1,16 +1,9 @@ - - - Registration - - - - -

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:

+{% include "fragments/header.html" without context %} - Verify Your Email Address + +

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:

+Verify Your Email Address +

If this was not you, you can safely disregard this email.

+

Thank you.

-

If this was not you, you can safely disregard this email.

- -

Thank you.

- - +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/registration_failure.html b/synapse/res/templates/registration_failure.html index a6ed22bc901a..3a7febf25c19 100644 --- a/synapse/res/templates/registration_failure.html +++ b/synapse/res/templates/registration_failure.html @@ -1,9 +1,6 @@ - - - - - - +{% include "fragments/header.html" without context %} + +

Validation failed for the following reason: {{ failure_reason }}.

- - + +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/registration_success.html b/synapse/res/templates/registration_success.html index d51d5549d85b..d05396ec5737 100644 --- a/synapse/res/templates/registration_success.html +++ b/synapse/res/templates/registration_success.html @@ -1,10 +1,6 @@ - - - Your email has now been validated - - - - +{% include "fragments/header.html" without context %} + +

Your email has now been validated, please return to your client. You may now close this window.

- - + +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/registration_token.html b/synapse/res/templates/registration_token.html index 59a98f564c6b..551fd3be97d8 100644 --- a/synapse/res/templates/registration_token.html +++ b/synapse/res/templates/registration_token.html @@ -1,11 +1,6 @@ - - -Authentication - - - - - +{% include "fragments/header.html" without context %} + +
{% if error is defined %} @@ -19,5 +14,5 @@
- - + +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/sso_account_deactivated.html b/synapse/res/templates/sso_account_deactivated.html index 075f801ceca6..91676173fa51 100644 --- a/synapse/res/templates/sso_account_deactivated.html +++ b/synapse/res/templates/sso_account_deactivated.html @@ -1,25 +1,23 @@ - - - - - SSO account deactivated - - - - -
-

Your account has been deactivated

-

- No account found -

-

- Your account might have been deactivated by the server administrator. - You can either try to create a new account or contact the server’s - administrator. -

-
- {% include "sso_footer.html" without context %} - - +{% include "fragments/header.html" without context %} + + +
+
+

Your account has been deactivated

+

+ No account found +

+

+ Your account might have been deactivated by the server administrator. + You can either try to create a new account or contact the server’s + administrator. +

+
+
+ +{% include "sso_footer.html" without context %} + + +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/sso_auth_account_details.html b/synapse/res/templates/sso_auth_account_details.html index 2d1db386e1b4..2909444485cb 100644 --- a/synapse/res/templates/sso_auth_account_details.html +++ b/synapse/res/templates/sso_auth_account_details.html @@ -1,189 +1,185 @@ - - - - Create your account - - - - - - - -
-

Create your account

-

This is required. Continue to create your account on {{ server_name }}. You can't change this later.

-
-
-
-
- -
@
- -
:{{ server_name }}
+{% include "fragments/header.html" without context %} + + + +
+

Create your account

+

This is required. Continue to create your account on {{ server_name }}. You can't change this later.

+
+
+ +
+ +
@
+ +
:{{ server_name }}
+
+ + + {% if user_attributes.avatar_url or user_attributes.display_name or user_attributes.emails %} +
+

{% if idp.idp_icon %}{% endif %}Optional data from {{ idp.idp_name }}

+ {% if user_attributes.avatar_url %} +
- {% include "sso_footer.html" without context %} - - - + + + {% endif %} + {% if user_attributes.display_name %} + + {% endif %} + {% for email in user_attributes.emails %} + + {% endfor %} + + {% endif %} + +
+{% include "sso_footer.html" without context %} + + + + + +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/sso_auth_bad_user.html b/synapse/res/templates/sso_auth_bad_user.html index 94403fc3ce80..a4e4af4f47c8 100644 --- a/synapse/res/templates/sso_auth_bad_user.html +++ b/synapse/res/templates/sso_auth_bad_user.html @@ -1,27 +1,23 @@ - - - - - Authentication failed - - - - - -
-

That doesn't look right

-

- We were unable to validate your {{ server_name }} account - via single sign‑on (SSO), because the SSO Identity - Provider returned different details than when you logged in. -

-

- Try the operation again, and ensure that you use the same details on - the Identity Provider as when you log into your account. -

-
- {% include "sso_footer.html" without context %} - - +{% include "fragments/header.html" without context %} + + +
+
+

That doesn't look right

+

+ We were unable to validate your {{ server_name }} account + via single sign‑on (SSO), because the SSO Identity + Provider returned different details than when you logged in. +

+

+ Try the operation again, and ensure that you use the same details on + the Identity Provider as when you log into your account. +

+
+
+ +{% include "sso_footer.html" without context %} + +{% include "fragments/footer.html" without context %} diff --git a/synapse/res/templates/sso_auth_confirm.html b/synapse/res/templates/sso_auth_confirm.html index aa1c974a6b1c..9e578254e7d5 100644 --- a/synapse/res/templates/sso_auth_confirm.html +++ b/synapse/res/templates/sso_auth_confirm.html @@ -1,30 +1,25 @@ - - - - - Confirm it's you - - - - - -
-

Confirm it's you to continue

-

- A client is trying to {{ description }}. To confirm this action - re-authorize your account with single sign-on. -

-

- If you did not expect this, your account may be compromised. -

-
-
- - Continue with {{ idp.idp_name }} - -
- {% include "sso_footer.html" without context %} - - +{% include "fragments/header.html" without context %} + + + +
+

Confirm it's you to continue

+

+ A client is trying to {{ description }}. To confirm this action + re-authorize your account with single sign-on. +

+

+ If you did not expect this, your account may be compromised. +

+
+
+ + Continue with {{ idp.idp_name }} + +
+ +{% include "sso_footer.html" without context %} + +{% include "includes/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/sso_auth_success.html b/synapse/res/templates/sso_auth_success.html index 4898af6011f6..e4179e484b32 100644 --- a/synapse/res/templates/sso_auth_success.html +++ b/synapse/res/templates/sso_auth_success.html @@ -1,29 +1,23 @@ - - - - - Authentication successful - - - - - - -
-

Thank you

-

- Now we know it’s you, you can close this window and return to the - application. -

-
- {% include "sso_footer.html" without context %} - - +{% include "fragments/header.html" without context %} + + +
+

Thank you

+

+ Now we know it’s you, you can close this window and return to the + application. +

+
+ + +{% include "sso_footer.html" without context %} + +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/sso_error.html b/synapse/res/templates/sso_error.html index 19992ff2add9..4fa88d1fd2e2 100644 --- a/synapse/res/templates/sso_error.html +++ b/synapse/res/templates/sso_error.html @@ -1,19 +1,7 @@ - - - - - Authentication failed - - - - - + +
{# If an error of unauthorised is returned it means we have actively rejected their login #} {% if error == "unauthorised" %}
@@ -40,7 +28,15 @@

There was an error

{% include "sso_footer.html" without context %} + + + {% endif %} - - + + +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/sso_login_idp_picker.html b/synapse/res/templates/sso_login_idp_picker.html index 56fabfa3d2e5..b34e3ef1fa20 100644 --- a/synapse/res/templates/sso_login_idp_picker.html +++ b/synapse/res/templates/sso_login_idp_picker.html @@ -1,63 +1,58 @@ - - - - - - - Choose identity provider - - - -
-

Log in to {{ server_name }}

-

Choose an identity provider to log in

-
-
- -
- {% include "sso_footer.html" without context %} - - + .providers li { + margin: 12px; + } + + .providers a { + display: block; + border-radius: 4px; + border: 1px solid #17191C; + padding: 8px; + text-align: center; + text-decoration: none; + color: #17191C; + display: flex; + align-items: center; + font-weight: bold; + } + + .providers a img { + width: 24px; + height: 24px; + } + .providers a span { + flex: 1; + } + + + {% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/sso_new_user_consent.html b/synapse/res/templates/sso_new_user_consent.html index 523f64c4fcdf..513a96982255 100644 --- a/synapse/res/templates/sso_new_user_consent.html +++ b/synapse/res/templates/sso_new_user_consent.html @@ -1,33 +1,27 @@ - - - - - Agree to terms and conditions - - - - - -
-

Your account is nearly ready

-

Agree to the terms to create your account.

-
-
- {% include "sso_partial_profile.html" %} - -
- {% include "sso_footer.html" without context %} - - + +
+

Your account is nearly ready

+

Agree to the terms to create your account.

+
+
+ {% include "sso_partial_profile.html" %} + +
+{% include "sso_footer.html" without context %} + + +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/sso_redirect_confirm.html b/synapse/res/templates/sso_redirect_confirm.html index 1049a9bd9267..1fac1fc11ba8 100644 --- a/synapse/res/templates/sso_redirect_confirm.html +++ b/synapse/res/templates/sso_redirect_confirm.html @@ -1,41 +1,35 @@ - - - - - Continue to your account - - - - - -
-

Continue to your account

-
-
- {% include "sso_partial_profile.html" %} -

Continuing will grant {{ display_url }} access to your account.

- Continue -
- {% include "sso_footer.html" without context %} - - + .confirm-trust { + margin: 34px 0; + color: #8D99A5; + } + .confirm-trust strong { + color: #17191C; + } + + .confirm-trust::before { + content: ""; + background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNi41IDlDMTYuNSAxMy4xNDIxIDEzLjE0MjEgMTYuNSA5IDE2LjVDNC44NTc4NiAxNi41IDEuNSAxMy4xNDIxIDEuNSA5QzEuNSA0Ljg1Nzg2IDQuODU3ODYgMS41IDkgMS41QzEzLjE0MjEgMS41IDE2LjUgNC44NTc4NiAxNi41IDlaTTcuMjUgOUM3LjI1IDkuNDY1OTYgNy41Njg2OSA5Ljg1NzQ4IDggOS45Njg1VjEyLjM3NUM4IDEyLjkyNzMgOC40NDc3MiAxMy4zNzUgOSAxMy4zNzVIMTAuMTI1QzEwLjY3NzMgMTMuMzc1IDExLjEyNSAxMi45MjczIDExLjEyNSAxMi4zNzVDMTEuMTI1IDExLjgyMjcgMTAuNjc3MyAxMS4zNzUgMTAuMTI1IDExLjM3NUgxMFY5QzEwIDguOTY1NDggOS45OTgyNSA4LjkzMTM3IDkuOTk0ODQgOC44OTc3NkM5Ljk0MzYzIDguMzkzNSA5LjUxNzc3IDggOSA4SDguMjVDNy42OTc3MiA4IDcuMjUgOC40NDc3MiA3LjI1IDlaTTkgNy41QzkuNjIxMzIgNy41IDEwLjEyNSA2Ljk5NjMyIDEwLjEyNSA2LjM3NUMxMC4xMjUgNS43NTM2OCA5LjYyMTMyIDUuMjUgOSA1LjI1QzguMzc4NjggNS4yNSA3Ljg3NSA1Ljc1MzY4IDcuODc1IDYuMzc1QzcuODc1IDYuOTk2MzIgOC4zNzg2OCA3LjUgOSA3LjVaIiBmaWxsPSIjQzFDNkNEIi8+Cjwvc3ZnPgoK'); + background-repeat: no-repeat; + width: 24px; + height: 24px; + display: block; + float: left; + } + + +{% include "fragments/footer.html" without context %} \ No newline at end of file diff --git a/synapse/res/templates/terms.html b/synapse/res/templates/terms.html index 2081d990ab0d..253cb9ecf62f 100644 --- a/synapse/res/templates/terms.html +++ b/synapse/res/templates/terms.html @@ -1,15 +1,10 @@ - - -Authentication - - - - - +{% include "fragments/header.html" without context %} + +
{% if error is defined %} -

Error: {{ error }}

+

Error: {{ error }}

{% endif %}

Please click the button below if you agree to the @@ -19,5 +14,6 @@

- - + + +{% include "fragments/footer.html" without context %} \ No newline at end of file From 6fce9e9c6841bf69e27f14f1ea484fa000c7a619 Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Mon, 22 Aug 2022 10:38:30 +0100 Subject: [PATCH 02/16] Move existing fragments to correct folder --- synapse/res/templates/{ => fragments}/notif.html | 0 synapse/res/templates/{ => fragments}/notif.txt | 0 synapse/res/templates/{ => fragments}/room.html | 2 +- synapse/res/templates/{ => fragments}/room.txt | 2 +- synapse/res/templates/{ => fragments}/sso_partial_profile.html | 0 synapse/res/templates/notif_mail.html | 2 +- synapse/res/templates/notif_mail.txt | 2 +- synapse/res/templates/sso_new_user_consent.html | 2 +- synapse/res/templates/sso_redirect_confirm.html | 2 +- 9 files changed, 6 insertions(+), 6 deletions(-) rename synapse/res/templates/{ => fragments}/notif.html (100%) rename synapse/res/templates/{ => fragments}/notif.txt (100%) rename synapse/res/templates/{ => fragments}/room.html (94%) rename synapse/res/templates/{ => fragments}/room.txt (74%) rename synapse/res/templates/{ => fragments}/sso_partial_profile.html (100%) diff --git a/synapse/res/templates/notif.html b/synapse/res/templates/fragments/notif.html similarity index 100% rename from synapse/res/templates/notif.html rename to synapse/res/templates/fragments/notif.html diff --git a/synapse/res/templates/notif.txt b/synapse/res/templates/fragments/notif.txt similarity index 100% rename from synapse/res/templates/notif.txt rename to synapse/res/templates/fragments/notif.txt diff --git a/synapse/res/templates/room.html b/synapse/res/templates/fragments/room.html similarity index 94% rename from synapse/res/templates/room.html rename to synapse/res/templates/fragments/room.html index 4fc6f6ac9b31..bd0c92142e5f 100644 --- a/synapse/res/templates/room.html +++ b/synapse/res/templates/fragments/room.html @@ -27,7 +27,7 @@ {%- else %} {%- for notif in room.notifs %} - {%- include 'notif.html' with context %} + {%- include 'fragments/notif.html' with context %} {%- endfor %} {%- endif %} diff --git a/synapse/res/templates/room.txt b/synapse/res/templates/fragments/room.txt similarity index 74% rename from synapse/res/templates/room.txt rename to synapse/res/templates/fragments/room.txt index df841e9e6f00..300d1d92b778 100644 --- a/synapse/res/templates/room.txt +++ b/synapse/res/templates/fragments/room.txt @@ -4,6 +4,6 @@ You've been invited, join at {{ room.link }} {%- else %} {%- for notif in room.notifs %} - {%- include 'notif.txt' with context %} + {%- include 'fragments/notif.txt' with context %} {%- endfor %} {%- endif %} diff --git a/synapse/res/templates/sso_partial_profile.html b/synapse/res/templates/fragments/sso_partial_profile.html similarity index 100% rename from synapse/res/templates/sso_partial_profile.html rename to synapse/res/templates/fragments/sso_partial_profile.html diff --git a/synapse/res/templates/notif_mail.html b/synapse/res/templates/notif_mail.html index 58539d187d6c..41285837821c 100644 --- a/synapse/res/templates/notif_mail.html +++ b/synapse/res/templates/notif_mail.html @@ -24,7 +24,7 @@ {%- for room in rooms %} - {%- include 'room.html' with context %} + {%- include 'fragments/room.html' with context %} {%- endfor %} {% include "sso_footer.html" without context %} diff --git a/synapse/res/templates/sso_auth_confirm.html b/synapse/res/templates/sso_auth_confirm.html index 9e578254e7d5..349eacb6276b 100644 --- a/synapse/res/templates/sso_auth_confirm.html +++ b/synapse/res/templates/sso_auth_confirm.html @@ -18,7 +18,7 @@

Confirm it's you to continue

{% include "sso_footer.html" without context %} diff --git a/synapse/res/templates/sso_auth_success.html b/synapse/res/templates/sso_auth_success.html index e4179e484b32..9d0e07a2bf35 100644 --- a/synapse/res/templates/sso_auth_success.html +++ b/synapse/res/templates/sso_auth_success.html @@ -16,7 +16,7 @@

Thank you

} {% include "sso_footer.html" without context %} diff --git a/synapse/res/templates/sso_error.html b/synapse/res/templates/sso_error.html index 4fa88d1fd2e2..e56641f32f40 100644 --- a/synapse/res/templates/sso_error.html +++ b/synapse/res/templates/sso_error.html @@ -31,7 +31,7 @@

There was an error

diff --git a/synapse/res/templates/sso_auth_account_details.html b/synapse/res/templates/sso_auth_account_details.html index a350cc10b0e0..04d4395c6255 100644 --- a/synapse/res/templates/sso_auth_account_details.html +++ b/synapse/res/templates/sso_auth_account_details.html @@ -52,7 +52,7 @@

{% if idp.idp_icon %}{% {% endif %} -{% include "sso_footer.html" without context %} +{% include "fragments/sso_footer.html" without context %} - -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/fragments/footer.html b/synapse/res/templates/fragments/footer.html deleted file mode 100644 index 691287b6e353..000000000000 --- a/synapse/res/templates/fragments/footer.html +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/synapse/res/templates/invalid_token.html b/synapse/res/templates/invalid_token.html index dad77042750a..24f41a67091e 100644 --- a/synapse/res/templates/invalid_token.html +++ b/synapse/res/templates/invalid_token.html @@ -1,6 +1,6 @@ {% set title = 'Invalid renewal token.' %} -{% include "fragments/header.html" with context %} +{% block body %}

Invalid renewal token.

-{% include "fragments/footer.html" without context %} +{% endblock %} diff --git a/synapse/res/templates/notice_expiry.html b/synapse/res/templates/notice_expiry.html index 6f2636f179d5..e85c2cc04d8d 100644 --- a/synapse/res/templates/notice_expiry.html +++ b/synapse/res/templates/notice_expiry.html @@ -1,6 +1,7 @@ -{% set title = 'Notice of expiry' %} -{% include "fragments/header.html" with context %} +{% extends "_base.html" %} +{% block title %}Notice of expiry{% endblock %} +{% block body %} @@ -39,5 +40,4 @@ {% include "static/css/mail-%s.css" % app_name ignore missing without context %} {% include 'static/css/mail-expiry.css' without context %} - -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/notif_mail.html b/synapse/res/templates/notif_mail.html index 2e12795a3987..7c4e844c899c 100644 --- a/synapse/res/templates/notif_mail.html +++ b/synapse/res/templates/notif_mail.html @@ -1,6 +1,6 @@ -{% set title = 'New activity in room' %} -{% include "fragments/header.html" with context %} +{% block title %}New activity in room{% endblock %} +{% block body %}
@@ -51,5 +51,4 @@ {%- include 'static/css/mail.css' without context %} {%- include "static/css/mail-%s.css" % app_name ignore missing without context %} - -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/password_reset.html b/synapse/res/templates/password_reset.html index 4bc6470b9a0a..bca79c0d53bd 100644 --- a/synapse/res/templates/password_reset.html +++ b/synapse/res/templates/password_reset.html @@ -1,8 +1,7 @@ -{% set title = 'Password reset' %} -{% include "fragments/header.html" with context %} +{% block title %}Password reset{% endblock %} +{% block body %}

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:

{{ link }}

If this was not you, do not click the link above and instead contact your server administrator. Thank you.

- -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/password_reset_confirmation.html b/synapse/res/templates/password_reset_confirmation.html index d6a04c71ca2b..0eac64b6a868 100644 --- a/synapse/res/templates/password_reset_confirmation.html +++ b/synapse/res/templates/password_reset_confirmation.html @@ -1,6 +1,6 @@ -{% set title = 'Password reset confirmation' %} -{% include "fragments/header.html" with context %} +{% block title %}Password reset confirmation{% endblock %} +{% block body %} @@ -11,5 +11,4 @@ If you did not mean to do this, please close this page and your password will not be changed.

- -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/password_reset_failure.html b/synapse/res/templates/password_reset_failure.html index aa68e20964f7..977babdb4063 100644 --- a/synapse/res/templates/password_reset_failure.html +++ b/synapse/res/templates/password_reset_failure.html @@ -1,7 +1,6 @@ -{% set title = 'Password reset failure' %} -{% include "fragments/header.html" with context %} +{% block title %}Password reset failure{% endblock %} +{% block body %}

The request failed for the following reason: {{ failure_reason }}.

Your password has not been reset.

- -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/password_reset_success.html b/synapse/res/templates/password_reset_success.html index 25892a20548c..0e99fad7ffc6 100644 --- a/synapse/res/templates/password_reset_success.html +++ b/synapse/res/templates/password_reset_success.html @@ -1,6 +1,5 @@ -{% set title = 'Password reset success' %} -{% include "fragments/header.html" with context %} +{% block title %}Password reset success{% endblock %} +{% block body %}

Your email has now been validated, please return to your client to reset your password. You may now close this window.

- -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/recaptcha.html b/synapse/res/templates/recaptcha.html index 371a1d7fadd8..ed17713ab369 100644 --- a/synapse/res/templates/recaptcha.html +++ b/synapse/res/templates/recaptcha.html @@ -1,6 +1,6 @@ -{% set title = 'Authentication' %} -{% include "fragments/header.html" with context %} +{% block title %}Authentication{% endblock %} +{% block body %}
{% if error is defined %} @@ -32,5 +32,4 @@ $('#registrationForm').submit(); } - -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} \ No newline at end of file diff --git a/synapse/res/templates/registration.html b/synapse/res/templates/registration.html index d5cbeaf3c887..47245cd52367 100644 --- a/synapse/res/templates/registration.html +++ b/synapse/res/templates/registration.html @@ -1,9 +1,8 @@ -{% set title = 'Registration' %} -{% include "fragments/header.html" with context %} +{% block title %}Registration{% endblock %} +{% block body %}

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:

Verify Your Email Address

If this was not you, you can safely disregard this email.

Thank you.

- -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/registration_failure.html b/synapse/res/templates/registration_failure.html index 2c6d2332a046..3debe9301dd9 100644 --- a/synapse/res/templates/registration_failure.html +++ b/synapse/res/templates/registration_failure.html @@ -1,6 +1,5 @@ -{% set title = 'Registration failure' %} -{% include "fragments/header.html" with context %} +{% block title %}Registration failure{% endblock %} +{% block body %}

Validation failed for the following reason: {{ failure_reason }}.

- -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/registration_success.html b/synapse/res/templates/registration_success.html index d6b60eda2676..e2dd020a9edf 100644 --- a/synapse/res/templates/registration_success.html +++ b/synapse/res/templates/registration_success.html @@ -1,6 +1,5 @@ -{% set title = 'Your email has now been validated' %} -{% include "fragments/header.html" with context %} +{% block title %}Your email has now been validated{% endblock %} +{% block body %}

Your email has now been validated, please return to your client. You may now close this window.

- -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/registration_token.html b/synapse/res/templates/registration_token.html index fba36ab5f7ab..cd6763230139 100644 --- a/synapse/res/templates/registration_token.html +++ b/synapse/res/templates/registration_token.html @@ -1,6 +1,6 @@ -{% set title = 'Authentication' %} -{% include "fragments/header.html" with context %} +{% block title %}Authentication{% endblock %} +{% block body %}
{% if error is defined %} @@ -14,5 +14,4 @@
- -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/sso_account_deactivated.html b/synapse/res/templates/sso_account_deactivated.html index 28ba9062c7c1..cc153a8fffc9 100644 --- a/synapse/res/templates/sso_account_deactivated.html +++ b/synapse/res/templates/sso_account_deactivated.html @@ -1,6 +1,6 @@ -{% set title = 'SSO account deactivated' %} -{% include "fragments/header.html" with context %} +{% block title %}SSO account deactivated{% endblock %} +{% block body %}

Your account has been deactivated

@@ -19,5 +19,4 @@

Your account has been deactivated

- -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/sso_auth_account_details.html b/synapse/res/templates/sso_auth_account_details.html index 04d4395c6255..51e0c06cb5aa 100644 --- a/synapse/res/templates/sso_auth_account_details.html +++ b/synapse/res/templates/sso_auth_account_details.html @@ -1,6 +1,6 @@ -{% set title = 'Create your account' %} -{% include "fragments/header.html" with context %} +{% block title %}Create your account{% endblock %} +{% block body %}

Create your account

This is required. Continue to create your account on {{ server_name }}. You can't change this later.

@@ -52,7 +52,7 @@

{% if idp.idp_icon %}{% {% endif %} -{% include "fragments/sso_footer.html" without context %} +{% include "fragments/sso_footer.html" %} - -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/sso_auth_bad_user.html b/synapse/res/templates/sso_auth_bad_user.html index a59472a9a27e..251f9a0ce8a7 100644 --- a/synapse/res/templates/sso_auth_bad_user.html +++ b/synapse/res/templates/sso_auth_bad_user.html @@ -1,6 +1,6 @@ -{% set title = 'Authentication failed' %} -{% include "fragments/header.html" with context %} +{% block title %}Authentication failed{% endblock %} +{% block body %}

That doesn't look right

@@ -19,5 +19,4 @@

That doesn't look right

{% include "static/css/sso.css" without context %} {% include "fragments/sso_footer.html" without context %} - -{% include "fragments/footer.html" without context %} +{% endblock %} diff --git a/synapse/res/templates/sso_auth_confirm.html b/synapse/res/templates/sso_auth_confirm.html index bc07434b06f5..a7eb27451538 100644 --- a/synapse/res/templates/sso_auth_confirm.html +++ b/synapse/res/templates/sso_auth_confirm.html @@ -1,6 +1,6 @@ -{% set title = 'Confirm it\'s you' %} -{% include "fragments/header.html" with context %} +{% block title %}Confirm it's you{% endblock %} +{% block body %}

Confirm it's you to continue

@@ -20,5 +20,4 @@

Confirm it's you to continue

{% include "static/css/sso.css" without context %} {% include "fragments/sso_footer.html" without context %} - -{% include "includes/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/sso_auth_success.html b/synapse/res/templates/sso_auth_success.html index d8312d843b3d..8843edd3e804 100644 --- a/synapse/res/templates/sso_auth_success.html +++ b/synapse/res/templates/sso_auth_success.html @@ -1,6 +1,6 @@ -{% set title = 'Authentication successful' %} -{% include "fragments/header.html" with context %} +{% block title %}Authentication successful{% endblock %} +{% block body %}

Thank you

@@ -19,5 +19,4 @@

Thank you

{% include "static/css/sso.css" without context %} {% include "fragments/sso_footer.html" without context %} - -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/sso_error.html b/synapse/res/templates/sso_error.html index 67307f04ed5d..8f1558ad2eec 100644 --- a/synapse/res/templates/sso_error.html +++ b/synapse/res/templates/sso_error.html @@ -1,6 +1,6 @@ -{% set title = 'Authentication failed' %} -{% include "fragments/header.html" with context %} +{% block title %}Authentication failed{% endblock %} +{% block body %}
{# If an error of unauthorised is returned it means we have actively rejected their login #} {% if error == "unauthorised" %} @@ -63,5 +63,4 @@

There was an error

{% endif %}
- -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/sso_login_idp_picker.html b/synapse/res/templates/sso_login_idp_picker.html index c9aeea9f7818..363f21141355 100644 --- a/synapse/res/templates/sso_login_idp_picker.html +++ b/synapse/res/templates/sso_login_idp_picker.html @@ -1,6 +1,6 @@ -{% set title = 'Choose identity provider' %} -{% include "fragments/header.html" with context %} +{% block title %}Choose identity provider{% endblock %} +{% block body %}

Log in to {{ server_name }}

Choose an identity provider to log in

@@ -53,5 +53,4 @@

Log in to {{ server_name }}

flex: 1; } - - {% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/sso_new_user_consent.html b/synapse/res/templates/sso_new_user_consent.html index 7ff1b7db34ef..5f554a6a0835 100644 --- a/synapse/res/templates/sso_new_user_consent.html +++ b/synapse/res/templates/sso_new_user_consent.html @@ -1,6 +1,6 @@ -{% set title = 'Agree to terms and conditions' %} -{% include "fragments/header.html" with context %} +{% block title %}Agree to terms and conditions{% endblock %} +{% block body %}

Your account is nearly ready

Agree to the terms to create your account.

@@ -23,5 +23,4 @@

Your account is nearly ready

margin-top: 56px; } - -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/sso_redirect_confirm.html b/synapse/res/templates/sso_redirect_confirm.html index ec34217623b3..4398aa739df2 100644 --- a/synapse/res/templates/sso_redirect_confirm.html +++ b/synapse/res/templates/sso_redirect_confirm.html @@ -1,6 +1,6 @@ -{% set title = 'Continue to your account' %} -{% include "fragments/header.html" with context %} +{% block title %}Continue to your account{% endblock %} +{% block body %}

Continue to your account

@@ -31,5 +31,4 @@

Continue to your account

float: left; } - -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} diff --git a/synapse/res/templates/terms.html b/synapse/res/templates/terms.html index 002de00ef8b3..183b700c6ce7 100644 --- a/synapse/res/templates/terms.html +++ b/synapse/res/templates/terms.html @@ -1,6 +1,6 @@ -{% set title = 'Authentication' %} -{% include "fragments/header.html" with context %} +{% block title %}Authentication{% endblock %} +{% block body %}
{% if error is defined %} @@ -15,5 +15,4 @@
- -{% include "fragments/footer.html" without context %} \ No newline at end of file +{% endblock %} From 17caf24348862ef1203a1ce9dc157dbcb9fc8eb0 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 19 Oct 2022 14:16:39 -0400 Subject: [PATCH 11/16] Move notif fragments back out. --- synapse/res/templates/{fragments => }/notif.html | 0 synapse/res/templates/{fragments => }/notif.txt | 0 synapse/res/templates/notif_mail.html | 2 +- synapse/res/templates/notif_mail.txt | 2 +- synapse/res/templates/{fragments => }/room.html | 2 +- synapse/res/templates/{fragments => }/room.txt | 2 +- 6 files changed, 4 insertions(+), 4 deletions(-) rename synapse/res/templates/{fragments => }/notif.html (100%) rename synapse/res/templates/{fragments => }/notif.txt (100%) rename synapse/res/templates/{fragments => }/room.html (94%) rename synapse/res/templates/{fragments => }/room.txt (74%) diff --git a/synapse/res/templates/fragments/notif.html b/synapse/res/templates/notif.html similarity index 100% rename from synapse/res/templates/fragments/notif.html rename to synapse/res/templates/notif.html diff --git a/synapse/res/templates/fragments/notif.txt b/synapse/res/templates/notif.txt similarity index 100% rename from synapse/res/templates/fragments/notif.txt rename to synapse/res/templates/notif.txt diff --git a/synapse/res/templates/notif_mail.html b/synapse/res/templates/notif_mail.html index 7c4e844c899c..0985d9817541 100644 --- a/synapse/res/templates/notif_mail.html +++ b/synapse/res/templates/notif_mail.html @@ -25,7 +25,7 @@

{%- for room in rooms %} - {%- include 'fragments/room.html' with context %} + {%- include 'room.html' with context %} {%- endfor %} -{% include "fragments/sso_footer.html" without context %} +{% include "sso_footer.html" without context %} diff --git a/synapse/res/templates/sso_auth_account_details.html b/synapse/res/templates/sso_auth_account_details.html index 51e0c06cb5aa..96307edf010e 100644 --- a/synapse/res/templates/sso_auth_account_details.html +++ b/synapse/res/templates/sso_auth_account_details.html @@ -52,7 +52,7 @@

{% if idp.idp_icon %}{% {% endif %} -{% include "fragments/sso_footer.html" %} +{% include "sso_footer.html" %} {% endblock %} diff --git a/synapse/res/templates/static/js/sso_auth_account_details.js b/synapse/res/templates/sso_auth_account_details.js similarity index 100% rename from synapse/res/templates/static/js/sso_auth_account_details.js rename to synapse/res/templates/sso_auth_account_details.js diff --git a/synapse/res/templates/sso_auth_bad_user.html b/synapse/res/templates/sso_auth_bad_user.html index d941576c3af5..70be9f2f2761 100644 --- a/synapse/res/templates/sso_auth_bad_user.html +++ b/synapse/res/templates/sso_auth_bad_user.html @@ -16,7 +16,7 @@

That doesn't look right

{% include "sso_footer.html" without context %} {% endblock %} diff --git a/synapse/res/templates/sso_auth_confirm.html b/synapse/res/templates/sso_auth_confirm.html index 66ff9666c09c..ad69f83e26e6 100644 --- a/synapse/res/templates/sso_auth_confirm.html +++ b/synapse/res/templates/sso_auth_confirm.html @@ -17,7 +17,7 @@

Confirm it's you to continue

{% include "sso_footer.html" without context %} {% endblock %} diff --git a/synapse/res/templates/sso_auth_success.html b/synapse/res/templates/sso_auth_success.html index d2bb4e477714..4c70a1a04090 100644 --- a/synapse/res/templates/sso_auth_success.html +++ b/synapse/res/templates/sso_auth_success.html @@ -16,7 +16,7 @@

Thank you

} {% include "sso_footer.html" without context %} {% endblock %} diff --git a/synapse/res/templates/sso_error.html b/synapse/res/templates/sso_error.html index 7591fc363340..6220e4aa59da 100644 --- a/synapse/res/templates/sso_error.html +++ b/synapse/res/templates/sso_error.html @@ -31,7 +31,7 @@

There was an error

+{% endblock %} + {% block body %} @@ -35,9 +43,4 @@
- {% endblock %} diff --git a/synapse/res/templates/notif_mail.html b/synapse/res/templates/notif_mail.html index fb57065337b1..939d40315fb6 100644 --- a/synapse/res/templates/notif_mail.html +++ b/synapse/res/templates/notif_mail.html @@ -1,5 +1,12 @@ {% block title %}New activity in room{% endblock %} +{% block header %} + +{% endblock %} + {% block body %} @@ -47,8 +54,4 @@
- {% endblock %} diff --git a/synapse/res/templates/password_reset.html b/synapse/res/templates/password_reset.html index bca79c0d53bd..de5a9ec68f36 100644 --- a/synapse/res/templates/password_reset.html +++ b/synapse/res/templates/password_reset.html @@ -2,6 +2,8 @@ {% block body %}

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:

+ {{ link }} +

If this was not you, do not click the link above and instead contact your server administrator. Thank you.

{% endblock %} diff --git a/synapse/res/templates/recaptcha.html b/synapse/res/templates/recaptcha.html index ed17713ab369..feaf3f6aed77 100644 --- a/synapse/res/templates/recaptcha.html +++ b/synapse/res/templates/recaptcha.html @@ -1,5 +1,16 @@ {% block title %}Authentication{% endblock %} +{% block header %} + + + + +{% endblock %} + {% block body %}
@@ -24,12 +35,4 @@
- - - - {% endblock %} \ No newline at end of file diff --git a/synapse/res/templates/registration.html b/synapse/res/templates/registration.html index 47245cd52367..189960a832df 100644 --- a/synapse/res/templates/registration.html +++ b/synapse/res/templates/registration.html @@ -2,7 +2,10 @@ {% block body %}

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:

+ Verify Your Email Address +

If this was not you, you can safely disregard this email.

+

Thank you.

{% endblock %} diff --git a/synapse/res/templates/registration_token.html b/synapse/res/templates/registration_token.html index cd6763230139..2ee5866ba582 100644 --- a/synapse/res/templates/registration_token.html +++ b/synapse/res/templates/registration_token.html @@ -1,5 +1,9 @@ {% block title %}Authentication{% endblock %} +{% block header %} + +{% endblock %} + {% block body %}
diff --git a/synapse/res/templates/sso_account_deactivated.html b/synapse/res/templates/sso_account_deactivated.html index 8be79a28d3d2..c63422984013 100644 --- a/synapse/res/templates/sso_account_deactivated.html +++ b/synapse/res/templates/sso_account_deactivated.html @@ -1,5 +1,11 @@ {% block title %}SSO account deactivated{% endblock %} +{% block header %} + +{% endblock %} + {% block body %}
@@ -14,9 +20,5 @@

Your account has been deactivated

- {% include "sso_footer.html" without context %} - {% endblock %} diff --git a/synapse/res/templates/sso_auth_account_details.html b/synapse/res/templates/sso_auth_account_details.html index 536167555ee9..b51633337306 100644 --- a/synapse/res/templates/sso_auth_account_details.html +++ b/synapse/res/templates/sso_auth_account_details.html @@ -1,58 +1,6 @@ {% block title %}Create your account{% endblock %} -{% block body %} -
-

Create your account

-

This is required. Continue to create your account on {{ server_name }}. You can't change this later.

-
-
- -
- -
@
- -
:{{ server_name }}
-
- - - {% if user_attributes.avatar_url or user_attributes.display_name or user_attributes.emails %} -
-

{% if idp.idp_icon %}{% endif %}Optional data from {{ idp.idp_name }}

- {% if user_attributes.avatar_url %} - - {% endif %} - {% if user_attributes.display_name %} - - {% endif %} - {% for email in user_attributes.emails %} - - {% endfor %} -
- {% endif %} - -
-{% include "sso_footer.html" %} +{% block header %} diff --git a/synapse/res/templates/sso_auth_bad_user.html b/synapse/res/templates/sso_auth_bad_user.html index 70be9f2f2761..69fdcc9ef0b0 100644 --- a/synapse/res/templates/sso_auth_bad_user.html +++ b/synapse/res/templates/sso_auth_bad_user.html @@ -1,5 +1,11 @@ {% block title %}Authentication failed{% endblock %} +{% block header %} + +{% endblock %} + {% block body %}
@@ -15,8 +21,5 @@

That doesn't look right

- {% include "sso_footer.html" without context %} {% endblock %} diff --git a/synapse/res/templates/sso_auth_confirm.html b/synapse/res/templates/sso_auth_confirm.html index ad69f83e26e6..2d106e0ae476 100644 --- a/synapse/res/templates/sso_auth_confirm.html +++ b/synapse/res/templates/sso_auth_confirm.html @@ -1,5 +1,11 @@ {% block title %}Confirm it's you{% endblock %} +{% block header %} + +{% endblock %} + {% block body %}

Confirm it's you to continue

@@ -16,8 +22,5 @@

Confirm it's you to continue

Continue with {{ idp.idp_name }} - {% include "sso_footer.html" without context %} {% endblock %} diff --git a/synapse/res/templates/sso_auth_success.html b/synapse/res/templates/sso_auth_success.html index 4c70a1a04090..56150eaefe65 100644 --- a/synapse/res/templates/sso_auth_success.html +++ b/synapse/res/templates/sso_auth_success.html @@ -1,5 +1,18 @@ {% block title %}Authentication successful{% endblock %} +{% block header %} + + +{% endblock %} + {% block body %}

Thank you

@@ -8,15 +21,5 @@

Thank you

application.

- - {% include "sso_footer.html" without context %} {% endblock %} diff --git a/synapse/res/templates/sso_error.html b/synapse/res/templates/sso_error.html index 6220e4aa59da..e394a92623ad 100644 --- a/synapse/res/templates/sso_error.html +++ b/synapse/res/templates/sso_error.html @@ -1,5 +1,17 @@ {% block title %}Authentication failed{% endblock %} +{% block header %} +{% if error == "unauthorised" %} + +{% endif %} +{% endblock %} + {% block body %}
{# If an error of unauthorised is returned it means we have actively rejected their login #} @@ -28,15 +40,7 @@

There was an error

{% include "sso_footer.html" without context %} - - - + {% endif %}
{% endblock %} diff --git a/synapse/res/templates/sso_login_idp_picker.html b/synapse/res/templates/sso_login_idp_picker.html index 0dfc4fb5f533..a2772ca9ef65 100644 --- a/synapse/res/templates/sso_login_idp_picker.html +++ b/synapse/res/templates/sso_login_idp_picker.html @@ -1,25 +1,6 @@ {% block title %}Choose identity provider{% endblock %} -{% block body %} -
-

Log in to {{ server_name }}

-

Choose an identity provider to log in

-
-
- -
-{% include "sso_footer.html" without context %} +{% block header %} {% endblock %} + +{% block body %} +
+

Log in to {{ server_name }}

+

Choose an identity provider to log in

+
+
+ +
+{% include "sso_footer.html" without context %} +{% endblock %} diff --git a/synapse/res/templates/sso_new_user_consent.html b/synapse/res/templates/sso_new_user_consent.html index 0cd7783a3bb9..126887d26c4a 100644 --- a/synapse/res/templates/sso_new_user_consent.html +++ b/synapse/res/templates/sso_new_user_consent.html @@ -1,5 +1,15 @@ {% block title %}Agree to terms and conditions{% endblock %} +{% block header %} + +{% endblock %} + {% block body %}

Your account is nearly ready

@@ -16,11 +26,4 @@

Your account is nearly ready

{% include "sso_footer.html" without context %} - {% endblock %} diff --git a/synapse/res/templates/sso_redirect_confirm.html b/synapse/res/templates/sso_redirect_confirm.html index 9b84f4d27990..887ee0d294e2 100644 --- a/synapse/res/templates/sso_redirect_confirm.html +++ b/synapse/res/templates/sso_redirect_confirm.html @@ -1,15 +1,6 @@ {% block title %}Continue to your account{% endblock %} -{% block body %} -
-

Continue to your account

-
-
- {% include "sso_partial_profile.html" %} -

Continuing will grant {{ display_url }} access to your account.

- Continue -
-{% include "sso_footer.html" without context %} +{% block header %} {% endblock %} + +{% block body %} +
+

Continue to your account

+
+
+ {% include "sso_partial_profile.html" %} +

Continuing will grant {{ display_url }} access to your account.

+ Continue +
+{% include "sso_footer.html" without context %} + +{% endblock %} diff --git a/synapse/res/templates/terms.html b/synapse/res/templates/terms.html index 183b700c6ce7..977c3d0bc728 100644 --- a/synapse/res/templates/terms.html +++ b/synapse/res/templates/terms.html @@ -1,10 +1,14 @@ {% block title %}Authentication{% endblock %} +{% block header %} + +{% endblock %} + {% block body %}
{% if error is defined %} -

Error: {{ error }}

+

Error: {{ error }}

{% endif %}

Please click the button below if you agree to the @@ -14,5 +18,4 @@

- {% endblock %} From e09affb5232b4d064be6698ef1435570342940b8 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Fri, 21 Oct 2022 10:10:00 -0400 Subject: [PATCH 15/16] Inline styles instead of linking to them. --- synapse/res/templates/_base.html | 4 +++- synapse/res/templates/style.css | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/synapse/res/templates/_base.html b/synapse/res/templates/_base.html index d917c5761203..46439fce6aa6 100644 --- a/synapse/res/templates/_base.html +++ b/synapse/res/templates/_base.html @@ -5,7 +5,9 @@ {% block title %}{% endblock %} - + {% block header %}{% endblock %} diff --git a/synapse/res/templates/style.css b/synapse/res/templates/style.css index bf07595afffd..097b235ae564 100644 --- a/synapse/res/templates/style.css +++ b/synapse/res/templates/style.css @@ -26,5 +26,4 @@ body { h2 { font-size: .9rem; } h3 { font-size: .85rem; } h4 { font-size: .8rem; } - -} \ No newline at end of file +} From cbc30032972ac8742b736a71c4a7e8019f1fa984 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Fri, 21 Oct 2022 13:08:01 -0400 Subject: [PATCH 16/16] Clarify changelog. Co-authored-by: David Robertson --- changelog.d/13652.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/13652.feature b/changelog.d/13652.feature index af4364221d83..bc7f2926dc1d 100644 --- a/changelog.d/13652.feature +++ b/changelog.d/13652.feature @@ -1 +1 @@ -Improve aesthetics of HTML templates. \ No newline at end of file +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. \ No newline at end of file