From 59eb527ae990754f68956d27ce1bbeb8f8d92ad2 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Mon, 18 Nov 2013 12:40:49 +0100 Subject: [PATCH] Update log in pages to new layout --- app/assets/stylesheets/application.css | 2 +- app/assets/stylesheets/users.sass | 19 ++++++++++ app/views/sessions/new.html.slim | 13 ++++--- app/views/users/new.html.slim | 48 +++++++++++++------------- 4 files changed, 50 insertions(+), 32 deletions(-) create mode 100644 app/assets/stylesheets/users.sass diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 294a744..ee8778c 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -10,7 +10,7 @@ *= require asciicasts *= require pages *= require profile - *= require new-user + *= require users *= require preview *= require player */ diff --git a/app/assets/stylesheets/users.sass b/app/assets/stylesheets/users.sass new file mode 100644 index 0000000..22c03fb --- /dev/null +++ b/app/assets/stylesheets/users.sass @@ -0,0 +1,19 @@ +.new-user + .new_user + margin-top: 30px + + #user_nickname + width: 200px + +.returning-user + border-left: 1px solid #bbb + padding-left: 30px + + ul.login + list-style: none + padding: 0 + margin: 20px 0 + + li + display: inline-block + margin-right: 15px diff --git a/app/views/sessions/new.html.slim b/app/views/sessions/new.html.slim index ff6751c..1c5215b 100644 --- a/app/views/sessions/new.html.slim +++ b/app/views/sessions/new.html.slim @@ -1,9 +1,8 @@ -section.supplimental - .wrapper - h1 Sign in +.container + .row + .col-md-12 + h1 Sign in - p Sign in using your email address by clicking on the button below: + p Sign in using your email address by clicking on the button below: - = link_to image_tag('email_sign_in_black.png', :title => "Sign in with your email"), '#', :id => 'persona-button' - - .vertical-expander + = link_to image_tag('email_sign_in_black.png', :title => "Sign in with your email"), '#', :id => 'persona-button' diff --git a/app/views/users/new.html.slim b/app/views/users/new.html.slim index 7ff2e37..cdc35b8 100644 --- a/app/views/users/new.html.slim +++ b/app/views/users/new.html.slim @@ -1,8 +1,7 @@ -section.supplimental - .wrapper - - .new-user - h2 New user? +.container + .row + .col-md-6.new-user + h1 New user? p ' Every Asciinema user gets a profile page at @@ -12,27 +11,28 @@ section.supplimental strong username ' . Pick a desired username below. - = simple_form_for @user, :url => user_path do |f| - p = f.input :nickname, label: 'Pick a username:', required: true, input_html: { 'data-behavior' => 'focus' } - p.actions = f.button :submit, 'Start recording' + = form_for @user, url: user_path do |f| + .form-group + = f.label :nickname, 'Pick a username:' + = f.text_field :nickname, required: true, 'class' => 'form-control', 'data-behavior' => 'focus' + .form-group + = f.submit 'Start recording', class: 'btn btn-primary' - .returning-user - h2 Returning user? + .col-md-6.returning-user + h1 Returning user? - p - ' There is no account associated with the email - strong = @user.email - ' . + p + ' There is no account associated with the email + strong = @user.email + ' . - p - ' However, if you have been previously signing in to Asciinema via - ' Github or Twitter then click a proper button below so we can locate - ' your existing account: + p + ' However, if you have been previously signing in to Asciinema via + ' Github or Twitter then click a proper button below so we can locate + ' your existing account: - ul.login - li = link_to "Sign in via Github", github_auth_path, :class => 'btn-auth btn-github' - li = link_to "Sign in via Twitter", twitter_auth_path, :class => 'btn-auth btn-twitter' + ul.login + li = link_to "Sign in via Github", github_auth_path, :class => 'btn-auth btn-github' + li = link_to "Sign in via Twitter", twitter_auth_path, :class => 'btn-auth btn-twitter' - p Note: this is one-time task. You won't be asked to do it again. - - .vertical-expander + p Note: this is one-time task. You won't be asked to do it again.