Skip to content

Commit

Permalink
rough design for startpage
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasKoehnecke committed Nov 19, 2018
1 parent 36d00dc commit d84d044
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 31 deletions.
74 changes: 51 additions & 23 deletions app/views/devise/sessions/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,34 +1,62 @@
<h2>Log in</h2>
<% flash.each do |key, value| %>
<%= content_tag :div, value, class: "flash #{key}" %>
<div class="alert alert-danger">
<%= content_tag :div, value %>
</div>
<% end %>

<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="field">
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
</div>
<div class='row'>
<div class='col-7'>
<li>
<ul>This website does stuff</ul>
<ul>some more stuff</ul>
<ul>LOROR IPSUM</ul>
<ul>LOROR IPSUM</ul>
<ul>LOROR IPSUM</ul>
<ul>LOROR IPSUM</ul>
</li>
</div>
<div class='col-5'>
<div class='card' >

<div class="field">
<%= f.label :password %><br />
<%= f.password_field :password, autocomplete: "current-password" %>
<div class="card-header">
<h2>Log in</h2>
</div>

<% if devise_mapping.rememberable? -%>
<div class="field">
<%= f.check_box :remember_me %>
<%= f.label :remember_me %>
</div>
<% end -%>

<div class="actions">
<%= f.submit "Log in" %>

<div class="card-body">
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="form-group input-group">
<%= f.email_field :email, autofocus: true, autocomplete: "email", placeholder: :email, class: 'form-control' %>
</div>

<div class="form-group input-group">
<%= f_password_field = f.password_field :password, autocomplete: "current-password", placeholder: :password, class: 'form-control'
f_password_field %>
</div>

<% if devise_mapping.rememberable? -%>
<div class="form-group">
<div class="form-check">
<%= f.check_box :remember_me, class: 'form-check-input' %>
<%= f.label :remember_me, class: 'form-check-label' %>
</div>
</div>
<% end -%>
<div class="form-group actions">
<%= f.submit "Log in", class: 'btn btn-block btn-primary float-right' %>
<button class='btn btn-block btn-secondary float-right' id="oauth">Sign in using OAuth</button>
</div>

<% end -%>

</div>
<% end %>

<div>
<button id="oauth">Sign in using OAuth</button>
<div class='card-footer'>
<%= render "devise/shared/links" %>
</div>
</div>

<%= render "devise/shared/links" %>
</div>
</div>
</div>
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div id="content">
<%= render "navbar" %>
<div class="container" style="margin-top: 50px">
<div class="col-md-12">
<div class="col-lg-12">
<%= yield %>
</div>
<%= yield :modals %>
Expand Down
7 changes: 0 additions & 7 deletions spec/views/landing/index.html.erb_spec.rb

This file was deleted.

0 comments on commit d84d044

Please sign in to comment.