From 67a909711d0cf6528da97aa564acecbf300ffb47 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 29 Apr 2021 14:39:22 +0530 Subject: [PATCH] slightly better layout for disabled register page --- customize.dist/pages/register.js | 84 ++++++++++--------- .../src/less2/pages/page-register.less | 3 + 2 files changed, 47 insertions(+), 40 deletions(-) diff --git a/customize.dist/pages/register.js b/customize.dist/pages/register.js index 46ffc7f7a..b8f82116d 100644 --- a/customize.dist/pages/register.js +++ b/customize.dist/pages/register.js @@ -23,8 +23,8 @@ define([ Pages.infopageTopbar(), h('div.container.cp-container', [ h('div.row.cp-page-title', h('h1', Msg.register_header)), - h('div.row.cp-register-det', content), - ]), + //h('div.row.cp-register-det', content), + ].concat(content)), ]), Pages.infopageFooter(), ]; @@ -33,49 +33,53 @@ define([ if (Config.restrictRegistration) { Msg.register_closed = "This instance does not allow registration at the moment."; // XXX return frame([ - h('h4', Msg.register_closed) + h('div.cp-restricted-registration', [ + h('p', Msg.register_closed), + ]) ]); } return frame([ - h('div#data.hidden.col-md-6', [ - h('h2', Msg.register_notes_title), - Pages.setHTML(h('div.cp-register-notes'), Msg.register_notes) - ]), - h('div.cp-reg-form.col-md-6', [ - h('img.img-fluid', { - src: '/customize/images/swallow-the-key.png?' + urlArgs - }), - h('div#userForm.form-group.hidden', [ - h('a', { - href: '/features.html' - }, Msg.register_whyRegister), - h('input.form-control#username', { - type: 'text', - autocomplete: 'off', - autocorrect: 'off', - autocapitalize: 'off', - spellcheck: false, - placeholder: Msg.login_username, - autofocus: true, - }), - h('input.form-control#password', { - type: 'password', - placeholder: Msg.login_password, - }), - h('input.form-control#password-confirm', { - type: 'password', - placeholder: Msg.login_confirm, + h('div.row.cp-register-det', [ + h('div#data.hidden.col-md-6', [ + h('h2', Msg.register_notes_title), + Pages.setHTML(h('div.cp-register-notes'), Msg.register_notes) + ]), + h('div.cp-reg-form.col-md-6', [ + h('img.img-fluid', { + src: '/customize/images/swallow-the-key.png?' + urlArgs }), - h('div.checkbox-container', [ - UI.createCheckbox('import-recent', Msg.register_importRecent, true) - ]), - h('div.checkbox-container', [ - tos, - ]), - h('button#register', Msg.login_register) - ]) - ]), + h('div#userForm.form-group.hidden', [ + h('a', { + href: '/features.html' + }, Msg.register_whyRegister), + h('input.form-control#username', { + type: 'text', + autocomplete: 'off', + autocorrect: 'off', + autocapitalize: 'off', + spellcheck: false, + placeholder: Msg.login_username, + autofocus: true, + }), + h('input.form-control#password', { + type: 'password', + placeholder: Msg.login_password, + }), + h('input.form-control#password-confirm', { + type: 'password', + placeholder: Msg.login_confirm, + }), + h('div.checkbox-container', [ + UI.createCheckbox('import-recent', Msg.register_importRecent, true) + ]), + h('div.checkbox-container', [ + tos, + ]), + h('button#register', Msg.login_register) + ]) + ]), + ]) ]); }; diff --git a/customize.dist/src/less2/pages/page-register.less b/customize.dist/src/less2/pages/page-register.less index ce4309822..1ce8bbd5f 100644 --- a/customize.dist/src/less2/pages/page-register.less +++ b/customize.dist/src/less2/pages/page-register.less @@ -52,6 +52,9 @@ } } + .cp-restricted-registration { + text-align: center !important; + } .cp-register-det { #data {