Skip to content

Commit de7bd6d

Browse files
authored
Merge pull request #67 from tvdeyen/new-login
New login screen that fit the new color theme
2 parents 7931ae2 + ec3484d commit de7bd6d

4 files changed

Lines changed: 46 additions & 8 deletions

File tree

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,34 @@
1+
body.user_sessions,
2+
body.passwords {
3+
background-color: $main-menu-bg-color;
4+
color: $white;
5+
6+
a {
7+
color: $white;
8+
}
9+
10+
#errors,
11+
.message.info {
12+
border-color: transparent;
13+
}
14+
15+
#errors {
16+
margin-left: 157px;
17+
}
18+
}
19+
120
#logo {
2-
width: 240px;
3-
height: 70px;
4-
margin: 0 0 1em 187px;
21+
width: 275px;
22+
height: auto;
23+
margin: 0 0 1em 164px;
524
}
625

726
.login_signup_box {
827
position: absolute;
928
width: 450px;
1029
top: 50%;
1130
left: 50%;
12-
transform: translate(-50%, -50%);
31+
transform: translate(-60%, -50%);
1332

1433
.no-js & {
1534
display: none;
@@ -18,4 +37,13 @@
1837
.message {
1938
margin-left: 157px;
2039
}
40+
41+
.link {
42+
text-align: right;
43+
}
44+
45+
button.secondary {
46+
color: $white;
47+
border-color: $white;
48+
}
2149
}

app/views/alchemy/passwords/edit.html.erb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
<%= f.hidden_field :reset_password_token %>
1515
<%= f.input :password, autofocus: true, label: Alchemy.t("New password") %>
1616
<%= f.input :password_confirmation, label: Alchemy.t("Confirm new password") %>
17+
<div class="input link">
18+
<small>
19+
<%= link_to Alchemy.t(:back), alchemy.login_path %>
20+
</small>
21+
</div>
1722
<%= f.submit Alchemy.t("Change password") %>
1823
<% end %>
1924
</div>

app/views/alchemy/passwords/new.html.erb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
<%= f.input :email,
1515
autofocus: true,
1616
input_html: {value: params[:email]} %>
17-
<%= f.submit Alchemy.t("Send reset instructions") %>
17+
<div class="input link">
18+
<small>
19+
<%= link_to Alchemy.t(:back), alchemy.login_path %>
20+
</small>
21+
</div>
22+
<%= f.submit Alchemy.t("Send reset instructions"), input_html: {class: 'secondary'} %>
1823
<% end %>
1924
</div>

app/views/alchemy/user_sessions/new.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<%= alchemy_form_for :user, url: {action: 'create'}, id: 'login' do |f| %>
44
<%= f.input Devise.authentication_keys.first, autofocus: true %>
55
<%= f.input :password %>
6-
<div class="input">
7-
<small class="hint">
6+
<div class="input link">
7+
<small>
88
<%= link_to Alchemy.t('Forgot your password?'), new_password_path %>
99
</small>
1010
</div>
1111
<div class="submit">
1212
<%= hidden_field_tag 'user_screensize' %>
13-
<button><%= Alchemy.t(:login) %></button>
13+
<button class="secondary"><%= Alchemy.t(:login) %></button>
1414
</div>
1515
<% end %>
1616
</div>

0 commit comments

Comments
 (0)