Skip to content

Commit

Permalink
Merge pull request #67 from tvdeyen/new-login
Browse files Browse the repository at this point in the history
New login screen that fit the new color theme
  • Loading branch information
tvdeyen authored Apr 5, 2018
2 parents 7931ae2 + ec3484d commit de7bd6d
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 8 deletions.
36 changes: 32 additions & 4 deletions app/assets/stylesheets/alchemy-devise/login.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
body.user_sessions,
body.passwords {
background-color: $main-menu-bg-color;
color: $white;

a {
color: $white;
}

#errors,
.message.info {
border-color: transparent;
}

#errors {
margin-left: 157px;
}
}

#logo {
width: 240px;
height: 70px;
margin: 0 0 1em 187px;
width: 275px;
height: auto;
margin: 0 0 1em 164px;
}

.login_signup_box {
position: absolute;
width: 450px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
transform: translate(-60%, -50%);

.no-js & {
display: none;
Expand All @@ -18,4 +37,13 @@
.message {
margin-left: 157px;
}

.link {
text-align: right;
}

button.secondary {
color: $white;
border-color: $white;
}
}
5 changes: 5 additions & 0 deletions app/views/alchemy/passwords/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
<%= f.hidden_field :reset_password_token %>
<%= f.input :password, autofocus: true, label: Alchemy.t("New password") %>
<%= f.input :password_confirmation, label: Alchemy.t("Confirm new password") %>
<div class="input link">
<small>
<%= link_to Alchemy.t(:back), alchemy.login_path %>
</small>
</div>
<%= f.submit Alchemy.t("Change password") %>
<% end %>
</div>
7 changes: 6 additions & 1 deletion app/views/alchemy/passwords/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
<%= f.input :email,
autofocus: true,
input_html: {value: params[:email]} %>
<%= f.submit Alchemy.t("Send reset instructions") %>
<div class="input link">
<small>
<%= link_to Alchemy.t(:back), alchemy.login_path %>
</small>
</div>
<%= f.submit Alchemy.t("Send reset instructions"), input_html: {class: 'secondary'} %>
<% end %>
</div>
6 changes: 3 additions & 3 deletions app/views/alchemy/user_sessions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<%= alchemy_form_for :user, url: {action: 'create'}, id: 'login' do |f| %>
<%= f.input Devise.authentication_keys.first, autofocus: true %>
<%= f.input :password %>
<div class="input">
<small class="hint">
<div class="input link">
<small>
<%= link_to Alchemy.t('Forgot your password?'), new_password_path %>
</small>
</div>
<div class="submit">
<%= hidden_field_tag 'user_screensize' %>
<button><%= Alchemy.t(:login) %></button>
<button class="secondary"><%= Alchemy.t(:login) %></button>
</div>
<% end %>
</div>
Expand Down

0 comments on commit de7bd6d

Please sign in to comment.