Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit e6b8471

Browse files
committed
Merge pull request #19 from appirio-tech/mobile-tips
Move tips under form fields for screen less than 915px wide
2 parents 92fbb74 + ad7b144 commit e6b8471

File tree

2 files changed

+39
-30
lines changed

2 files changed

+39
-30
lines changed

app/account/register/register.jade

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
form(name="registerForm", role="form", ng-submit="registerForm.$valid && vm.register()", novalidate)
55
.first-last-names
6-
input(ng-model="vm.firstname", maxlength="35", name="firstname", placeholder="First Name", type="text", required)
6+
input(ng-model="vm.firstname", maxlength="64", name="firstname", placeholder="First Name", type="text", required)
77

8-
input(ng-model="vm.lastname", maxlength="35", name="lastname", placeholder="Last Name", type="text", required)
8+
input(ng-model="vm.lastname", maxlength="64", name="lastname", placeholder="Last Name", type="text", required)
99

1010
//- Show errors for first and last names once we know whether we can handle accents and other languages
1111
//- .form-errors
@@ -23,6 +23,17 @@
2323
.validation-bar(ng-class="{ 'error-bar': (registerForm.username.$error.usernameIsFree || registerForm.username.$error.minlength || registerForm.username.$error.maxlength), 'success-bar': (registerForm.username.$valid && !registerForm.username.$error.usernameIsFree) }")
2424
input(ng-model="vm.username", ng-model-options="{ debounce: {'default': 500} }", ng-focus="vm.usernameTips = true", ng-blur="vm.usernameTips = false", ng-minlength="2", ng-maxlength="15", name="username", placeholder="Username", type="text", username-is-free, required)
2525

26+
.tips.username-tips(ng-show="vm.usernameTips")
27+
h3 Username Tips:
28+
29+
p This will be public to other members
30+
31+
p Between 2 and 15 characters
32+
33+
p Can contain numbers and letters
34+
35+
p You can always change it later
36+
2637
.form-errors
2738
p.login-error(ng-show="registerForm.username.$error.usernameIsFree") This username already exists.
2839

@@ -31,42 +42,31 @@
3142
.validation-bar(ng-class="{ 'error-bar': (registerForm.email.$dirty && registerForm.email.$invalid), 'success-bar': (registerForm.email.$valid) }")
3243
input(ng-model="vm.email", ng-focus="vm.emailTips = true", ng-blur="vm.emailTips = false", name="email", placeholder="Enter Your Email", type="email", required)
3344

45+
.tips.email-tips(ng-show="vm.emailTips")
46+
h3 Email Tips:
47+
48+
p This will be private and not shared with anyone.
49+
50+
p We will occasionally send you emails related to your account or interests.
51+
3452
.form-errors
3553
p.login-error(ng-show="registerForm.email.$dirty && registerForm.email.$invalid") Please enter a valid email address.
3654

3755
.validation-bar(ng-class="{ 'success-bar': (registerForm.password.$valid) }")
3856
input(ng-model="vm.password", ng-focus="vm.passwordTips = true", ng-blur="vm.passwordTips = false", name="password", placeholder="Create Password", type="password", ng-minlength="8", ng-maxlength="64", has-letter, has-symbol, has-number, required)
3957

40-
button(type="submit", ng-disabled="registerForm.$invalid", ng-class="{'enabled-button': registerForm.$valid}") Join Now
41-
42-
.tips.username-tips(ng-show="vm.usernameTips")
43-
h3 Username Tips:
44-
45-
p This will be public to other members
46-
47-
p Between 2 and 15 characters
48-
49-
p Can contain numbers and letters
50-
51-
p You can always change it later
58+
.tips.password-tips(ng-show="vm.passwordTips")
59+
h3 Password Tips:
5260

53-
.tips.email-tips(ng-show="vm.emailTips")
54-
h3 Email Tips:
61+
p(ng-class="{ 'has-length-between-range': (registerForm.password.$dirty && !registerForm.password.$error.minlength && !registerForm.password.$error.maxlength && !registerForm.password.$error.required) }") Must be between 8 and 64 characters
5562

56-
p This will be private and not shared with anyone.
63+
p(ng-class="{ 'has-letter': (registerForm.password.$dirty && !registerForm.password.$error.hasLetter) }") At least one letter
5764

58-
p We will occasionally send you emails related to your account or interests.
65+
p(ng-class="{ 'has-symbol': (registerForm.password.$dirty && !registerForm.password.$error.hasSymbol) }") At least one symbol
5966

60-
.tips.password-tips(ng-show="vm.passwordTips")
61-
h3 Password Tips:
67+
p(ng-class="{ 'has-number': (registerForm.password.$dirty && !registerForm.password.$error.hasNumber) }") At least one number
6268

63-
p(ng-class="{ 'has-length-between-range': (registerForm.password.$dirty && !registerForm.password.$error.minlength && !registerForm.password.$error.maxlength && !registerForm.password.$error.required) }") Must be between 8 and 64 characters
64-
65-
p(ng-class="{ 'has-letter': (registerForm.password.$dirty && !registerForm.password.$error.hasLetter) }") At least one letter
66-
67-
p(ng-class="{ 'has-symbol': (registerForm.password.$dirty && !registerForm.password.$error.hasSymbol) }") At least one symbol
68-
69-
p(ng-class="{ 'has-number': (registerForm.password.$dirty && !registerForm.password.$error.hasNumber) }") At least one number
69+
button(type="submit", ng-disabled="registerForm.$invalid", ng-class="{'enabled-button': registerForm.$valid}") Join Now
7070

7171
section.terms
7272
p By clicking "JOIN NOW" I agree to Topcoder's

assets/css/account/register.scss

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@
4646
position: absolute;
4747
width: 320px;
4848
text-align: left;
49+
top: 13px;
50+
@media only screen and (max-width: 915px) {
51+
position: initial;
52+
margin-left: 5px;
53+
width: 300px;
54+
}
4955

5056
h3, p {
5157
margin-bottom: 10px;
@@ -54,13 +60,19 @@
5460
h3 {
5561
@include source-sans-semi-bold;
5662
font-size: 18px;
63+
@media only screen and (max-width: 915px) {
64+
font-size: 15px;
65+
}
5766
}
5867

5968
h3:before {
6069
font-family: 'FontAwesome';
6170
content: '\f053';
6271
display: inline-block;
6372
width: 20px;
73+
@media only screen and (max-width: 915px) {
74+
display: none;
75+
}
6476
}
6577

6678
p {
@@ -81,12 +93,10 @@
8193
}
8294

8395
.username-tips {
84-
top: 219px;
8596
left: 330px;
8697
}
8798

8899
.email-tips {
89-
top: 270px;
90100
left: 330px;
91101

92102
p:last-child {
@@ -95,7 +105,6 @@
95105
}
96106

97107
.password-tips {
98-
top: 322px;
99108
left: 330px;
100109

101110
p:before {

0 commit comments

Comments
 (0)