Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

portico: Reorder login page to prioritize credentials and alt paths.

Alya Abbott9c1f64408ed1
diff --git a/templates/zerver/login.html b/templates/zerver/login.html
index 95b41f5ec78..bb3345bea03 100644
--- a/templates/zerver/login.html
+++ b/templates/zerver/login.html
@@ -35,22 +35,6 @@ page can be easily identified in it's respective JavaScript file. -->
{% endif %}
<div class="right-side">
- {% if realm_web_public_access_enabled %}
- <div class="login-social">
- <form class="anonymous_access_form form-inline" action="/" method="post">
- {{ csrf_input }}
- <input type="hidden" name="next" value="{{ next }}" />
- <button class="full-width anonymous-access-button">
- <i class="zulip-icon zulip-icon-preview" aria-hidden="true"></i>
- {{ _('View without an account') }}
- </button>
- </form>
- </div>
- {% if no_auth_enabled %}
- {% else %}
- <div class="or"><span>{{ _('OR') }}</span></div>
- {% endif %}
- {% endif %}
{% if no_auth_enabled %}
<div class="alert">
<p>
@@ -154,9 +138,19 @@ page can be easily identified in it's respective JavaScript file. -->
{% endfor %}
<div class="actions signup-link-wrapper">
- {{ _("Don't have an account?")}}
+ <div class="signup-link-text">{{ _("Don't have an account?") }}</div>
+ {% if realm_web_public_access_enabled %}
+ <form class="anonymous_access_form form-inline" action="/" method="post">
+ {{ csrf_input }}
+ <input type="hidden" name="next" value="{{ next }}" />
+ <button class="full-width anonymous-access-button">
+ <i class="zulip-icon zulip-icon-preview" aria-hidden="true"></i>
+ {{ _('View without an account') }}
+ </button>
+ </form>
+ {% endif %}
{% if not register_link_disabled %}
- <a class="register-link float-right" href="/register/{% if next %}?next={{ next|urlencode }}{% endif %}">{{ _('Sign up') }}</a>
+ <a class="register-link" href="/register/{% if next %}?next={{ next|urlencode }}{% endif %}">{{ _('Or sign up') }}</a>
{% endif %}
</div>
{% endif %}
diff --git a/web/styles/portico/portico_signin.css b/web/styles/portico/portico_signin.css
index bcc86b94b27..a2b6af63d7c 100644
--- a/web/styles/portico/portico_signin.css
+++ b/web/styles/portico/portico_signin.css
@@ -965,11 +965,22 @@ button#register_auth_button_gitlab {
&.signup-link-wrapper {
font-weight: normal;
- float: right;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 12px;
+ text-align: center;
.register-link {
font-size: 1rem;
- margin-left: 5px;
+ }
+
+ .anonymous_access_form {
+ width: 100%;
+
+ & button {
+ margin: 0;
+ }
}
}
}