From 523565fb21ba5fbbae50a1d1274ce3d00e164d36 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 8 Jan 2020 17:22:01 +0100 Subject: [PATCH] Use bootstrap grid for signup page This allows us to have the two sections one above the other on small screens, with the call to action text first, and then side-by-side above the sm breakpoint with the cta on the right. --- app/assets/stylesheets/common.scss | 12 --- app/assets/stylesheets/small.scss | 13 --- app/views/users/new.html.erb | 132 +++++++++++++++-------------- 3 files changed, 68 insertions(+), 89 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 607ea4bf6..197e678a2 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -1404,18 +1404,6 @@ tr.turn:hover { /* Overrides for pages that use new layout conventions */ -.users-new, -.users-create { - .content-body .content-inner { - padding: 0; - - .message { - margin-top: 80px; - padding: 20px; - } - } -} - .users-new, .users-create, .users-terms, diff --git a/app/assets/stylesheets/small.scss b/app/assets/stylesheets/small.scss index 12e21c7d8..f6126391a 100644 --- a/app/assets/stylesheets/small.scss +++ b/app/assets/stylesheets/small.scss @@ -182,19 +182,6 @@ body.small { top: auto; } - /* Rules for the sign-up page */ - - &.user-new, - &.user-create { - .col6 { - width: 100%; - } - - .aside { - display: none; - } - } - &.site-about #content .attr h1 { font-size: 28px; } diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index f4ff16408..5acaa4e95 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -8,75 +8,79 @@
<% end %> -<%= form_for current_user, :url => { :action => "create" }, :html => { :class => "standard-form fillL col6 inner22" } do |f| %> - <%= hidden_field_tag("referer", h(@referer)) unless @referer.nil? %> +
+
+

<%= t ".about.header" %>

+ <%= t ".about.html" %> +
-
-
- - <%= f.email_field(:email, :tabindex => 1) %> - <%= f.error_message_on(:email) %> -
-
- - <%= f.email_field(:email_confirmation, :tabindex => 2) %> - <%= f.error_message_on(:email_confirmation) %> -
- <%= t(".not_displayed_publicly_html") %> -
+
+ <%= form_for current_user, :url => { :action => "create" }, :html => { :class => "standard-form" } do |f| %> + <%= hidden_field_tag("referer", h(@referer)) unless @referer.nil? %> -
-
- - <%= f.text_field(:display_name, :tabindex => 3) %> - <%= f.error_message_on(:display_name) %> -
- <%= t ".display name description" %> -
+
+
+ + <%= f.email_field(:email, :tabindex => 1) %> + <%= f.error_message_on(:email) %> +
+
+ + <%= f.email_field(:email_confirmation, :tabindex => 2) %> + <%= f.error_message_on(:email_confirmation) %> +
+ <%= t(".not_displayed_publicly_html") %> +
-
-
- - <%= f.select(:auth_provider, Auth::PROVIDERS, :default => "", :tabindex => 4) %> - <%= f.text_field(:auth_uid, :tabindex => 5) %> - <%= f.error_message_on(:auth_uid) %> -
- <%= t ".auth no password" %> -
+
+
+ + <%= f.text_field(:display_name, :tabindex => 3) %> + <%= f.error_message_on(:display_name) %> +
+ <%= t ".display name description" %> +
-
-
- - <%= f.password_field(:pass_crypt, :tabindex => 6) %> - <%= f.error_message_on(:pass_crypt) %> -
-
- - <%= f.password_field(:pass_crypt_confirmation, :tabindex => 7) %> - <%= f.error_message_on(:pass_crypt_confirmation) %> -
-
+
+
+ + <%= f.select(:auth_provider, Auth::PROVIDERS, :default => "", :tabindex => 4) %> + <%= f.text_field(:auth_uid, :tabindex => 5) %> + <%= f.error_message_on(:auth_uid) %> +
+ <%= t ".auth no password" %> +
-
- <%= link_to t(".use external auth"), "#", :id => "auth_enable" %> -
+
+
+ + <%= f.password_field(:pass_crypt, :tabindex => 6) %> + <%= f.error_message_on(:pass_crypt) %> +
+
+ + <%= f.password_field(:pass_crypt_confirmation, :tabindex => 7) %> + <%= f.error_message_on(:pass_crypt_confirmation) %> +
+
- <%= submit_tag t(".continue"), :tabindex => 8 %> -<% end %> +
+ <%= link_to t(".use external auth"), "#", :id => "auth_enable" %> +
-
-

<%= t ".about.header" %>

- <%= t ".about.html" %> + <%= submit_tag t(".continue"), :tabindex => 8 %> + <% end %> +
-- 2.43.2