diff --git a/services/web/app/src/Features/StaticPages/HomeController.js b/services/web/app/src/Features/StaticPages/HomeController.js index 2a9a745b60..a0410f477d 100644 --- a/services/web/app/src/Features/StaticPages/HomeController.js +++ b/services/web/app/src/Features/StaticPages/HomeController.js @@ -21,6 +21,9 @@ const fs = require('fs') const ErrorController = require('../Errors/ErrorController') const SessionManager = require('../Authentication/SessionManager') +const SplitTestHandler = require('../SplitTests/SplitTestHandler') +const logger = require('@overleaf/logger') + const homepageExists = fs.existsSync( Path.join(__dirname, '/../../../views/external/home/v2.pug') ) @@ -38,9 +41,20 @@ module.exports = HomeController = { } }, - home(req, res, next) { + async home(req, res) { if (Features.hasFeature('homepage') && homepageExists) { - return res.render('external/home/v2') + try { + const highlightSSOAssignment = + await SplitTestHandler.promises.getAssignment(req, 'highlight-sso') + const highlightSSO = highlightSSOAssignment.variant === 'active' + return res.render('external/home/v2', { highlightSSO }) + } catch (err) { + logger.error( + { err }, + "error fetching 'highlight-sso' split test assignment" + ) + return res.render('external/home/v2', { highlightSSO: false }) + } } else { return res.redirect('/login') } diff --git a/services/web/frontend/stylesheets/app/homepage.less b/services/web/frontend/stylesheets/app/homepage.less index 9318f0d036..3d2a0b1372 100644 --- a/services/web/frontend/stylesheets/app/homepage.less +++ b/services/web/frontend/stylesheets/app/homepage.less @@ -195,6 +195,21 @@ } } +.hp-login-btn-large { + .hp-login-btn; + + min-width: 256px; + padding-left: 30px; + font-size: 20px; +} + +.hp-login-btn-icon-large { + .login-btn-icon; + + width: 32px; + height: 32px; +} + .hp-register-form-email-pwd { position: relative; } diff --git a/services/web/frontend/stylesheets/app/login-register.less b/services/web/frontend/stylesheets/app/login-register.less index 61af761ac0..c8af4c6424 100644 --- a/services/web/frontend/stylesheets/app/login-register.less +++ b/services/web/frontend/stylesheets/app/login-register.less @@ -155,3 +155,7 @@ .registration-message-details { font-size: 90%; } + +.registration-block-separator { + margin-bottom: 0px; +} diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 233f1a14b0..fc12404f12 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -174,6 +174,7 @@ "need_to_do_this_to_access_license": "You’ll need to do this in order to have access to the benefits from the __institutionName__ site license.", "institutional_login_not_supported": "Your university doesn’t support institutional login yet, but you can still register with your institutional email.", "institutional_login_unknown": "Sorry, we don’t know which institution issued that email address. You can browse our list of institutions to find yours, or you can just register using your email address and password here.", + "institutional_login_unknown_sso_highlight_variant": "Sorry, we don’t know which institution issued that email address. You can browse our list of institutions to find yours, or you can use one of the other options below.", "link_account": "Link Account", "link_accounts": "Link Accounts", "link_accounts_and_add_email": "Link Accounts and Add Email",