Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Improve styling and wording of SSO redirect confirm template
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Feb 1, 2021
1 parent f24f540 commit 868f224
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 6 deletions.
83 changes: 83 additions & 0 deletions synapse/res/templates/sso.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
body {
font-family: "Inter", "Helvetica", "Arial", sans-serif;
font-size: 14px;
color: #17191C;
}

header {
max-width: 480px;
width: 100%;
margin: 24px auto;
text-align: center;
}

header p {
color: #737D8C;
line-height: 24px;
}

h1 {
font-size: 24px;
}

h2 {
font-size: 14px;
}

h2 img {
vertical-align: middle;
margin-right: 8px;
width: 24px;
height: 24px;
}

label {
cursor: pointer;
}

main {
max-width: 360px;
width: 100%;
margin: 24px auto;
}

.primary-button {
border: none;
text-decoration: none;
padding: 12px;
color: white;
background-color: #418DED;
font-weight: bold;
display: block;
border-radius: 12px;
width: 100%;
margin: 16px 0;
cursor: pointer;
text-align: center;
}

.profile {
display: flex;
justify-content: center;
margin: 24px 0;
}

.profile .avatar {
width: 36px;
height: 36px;
border-radius: 100%;
display: block;
margin-right: 8px;
}

.profile .display-name {
font-weight: bold;
margin-bottom: 4px;
}
.profile .user-id {
color: #737D8C;
}

.profile .display-name, .profile .user-id {
line-height: 18px;
}
34 changes: 28 additions & 6 deletions synapse/res/templates/sso_redirect_confirm.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,34 @@
<head>
<meta charset="UTF-8">
<title>SSO redirect confirmation</title>
<meta name="viewport" content="width=device-width, user-scalable=no">
<style type="text/css">
{% include "sso.css" without context %}
</style>
</head>
<body>
<p>The application at <span style="font-weight:bold">{{ display_url | e }}</span> is requesting full access to your <span style="font-weight:bold">{{ server_name }}</span> Matrix account.</p>
<p>If you don't recognise this address, you should ignore this and close this tab.</p>
<p>
<a href="{{ redirect_url | e }}">I trust this address</a>
</p>
<header>
<!-- {% if new_user %} -->
<h1>Your account is now ready</h1>
<p>You've made your account on {{ server_name | e }}.</p>
<!-- {% else %} -->
<h1>Log in</h1>
<!-- {% endif %} -->
<p>Continue to confirm you trust <strong>{{ display_url | e }}</strong>.</p>
</header>
<main>
<!-- {% if user_profile.avatar_url and user_profile.display_name %} -->
<div class="profile">
<img src="{{ user_profile.avatar_url | mxc_to_http(64, 64) }}" class="avatar" />
<div class="profile-details">
<!-- {% if user_profile.display_name %} -->
<div class="display-name">{{ user_profile.display_name | e }}</div>
<!-- {% endif %} -->
<div class="user-id">{{ user_id | e }}</div>
</div>
</div>
<!-- {% endif %} -->
<a href="{{ redirect_url | e }}" class="primary-button"/>Continue</a>
</main>
</body>
</html>
</html>

0 comments on commit 868f224

Please sign in to comment.