UX: Add a separate "Sign Up" button

This commit is contained in:
Robin Ward
2014-08-12 13:47:01 -04:00
parent a62968c846
commit 1684ff3015
5 changed files with 14 additions and 4 deletions

View File

@ -44,6 +44,9 @@
<button {{action showLogin}} class='btn btn-primary btn-small login-button'> <button {{action showLogin}} class='btn btn-primary btn-small login-button'>
{{icon user}} {{i18n log_in}} {{icon user}} {{i18n log_in}}
</button> </button>
<button {{action showCreateAccount}} class='btn btn-primary btn-small sign-up-button'>
{{icon user}} {{i18n sign_up}}
</button>
{{/unless}} {{/unless}}
<ul class='icons clearfix' role='navigation'> <ul class='icons clearfix' role='navigation'>
{{#if currentUser}} {{#if currentUser}}

View File

@ -80,7 +80,9 @@
{{#if formSubmitted}} {{#if formSubmitted}}
&nbsp; <i class='fa fa-spinner fa-spin'></i> &nbsp; <i class='fa fa-spinner fa-spin'></i>
{{else}} {{else}}
&nbsp; <a {{action showLogin}}>{{i18n cancel}}</a> <button class="btn btn-large" id="login-link" {{action showLogin}}>
{{i18n log_in}}
</button>
{{/if}} {{/if}}
</div> </div>
{{/unless}} {{/unless}}

View File

@ -50,12 +50,17 @@
text-overflow: ellipsis; text-overflow: ellipsis;
} }
} }
button.login-button { button.login-button, button.sign-up-button {
float: left; float: left;
margin-top: 7px; margin-top: 7px;
padding: 6px 10px; padding: 6px 10px;
.fa { margin-right: 3px; } .fa { margin-right: 3px; }
} }
button.sign-up-button {
margin-left: 7px;
}
.icons { .icons {
float: left; float: left;
text-align: center; text-align: center;

View File

@ -97,6 +97,7 @@ en:
yes_value: "Yes" yes_value: "Yes"
generic_error: "Sorry, an error has occurred." generic_error: "Sorry, an error has occurred."
generic_error_with_reason: "An error occurred: %{error}" generic_error_with_reason: "An error occurred: %{error}"
sign_up: "Sign Up"
log_in: "Log In" log_in: "Log In"
age: "Age" age: "Age"
last_post: "Last Post" last_post: "Last Post"

View File

@ -26,8 +26,7 @@ test("sign in", function() {
test("create account", function() { test("create account", function() {
visit("/"); visit("/");
click("header .login-button"); click("header .sign-up-button");
click('#new-account-link');
andThen(function() { andThen(function() {
ok(exists('.create-account'), "it shows the create account modal"); ok(exists('.create-account'), "it shows the create account modal");