From d84d04498bb8efa9a72bcdad926b353b39d762af Mon Sep 17 00:00:00 2001 From: Niklas_Koehnecke Date: Mon, 19 Nov 2018 18:56:57 +0100 Subject: [PATCH] rough design for startpage --- app/views/devise/sessions/new.html.erb | 74 ++++++++++++++++------- app/views/layouts/application.html.erb | 2 +- spec/views/landing/index.html.erb_spec.rb | 7 --- 3 files changed, 52 insertions(+), 31 deletions(-) delete mode 100644 spec/views/landing/index.html.erb_spec.rb diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index caeb1955..8c40a726 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -1,34 +1,62 @@ -

Log in

<% flash.each do |key, value| %> - <%= content_tag :div, value, class: "flash #{key}" %> +
+ <%= content_tag :div, value %> +
<% end %> -<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> -
- <%= f.label :email %>
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %> -
+
+
+
  • +
      This website does stuff
    +
      some more stuff
    +
      LOROR IPSUM
    +
      LOROR IPSUM
    +
      LOROR IPSUM
    +
      LOROR IPSUM
    +
  • +
    +
    +
    -
    - <%= f.label :password %>
    - <%= f.password_field :password, autocomplete: "current-password" %> +
    +

    Log in

    - <% if devise_mapping.rememberable? -%> -
    - <%= f.check_box :remember_me %> - <%= f.label :remember_me %> -
    - <% end -%> -
    - <%= f.submit "Log in" %> + +
    + <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> +
    + <%= f.email_field :email, autofocus: true, autocomplete: "email", placeholder: :email, class: 'form-control' %> +
    + +
    + <%= f_password_field = f.password_field :password, autocomplete: "current-password", placeholder: :password, class: 'form-control' + f_password_field %> +
    + + <% if devise_mapping.rememberable? -%> +
    +
    + <%= f.check_box :remember_me, class: 'form-check-input' %> + <%= f.label :remember_me, class: 'form-check-label' %> +
    +
    + <% end -%> +
    + <%= f.submit "Log in", class: 'btn btn-block btn-primary float-right' %> + +
    + + <% end -%> +
    -<% end %> -
    - +
    - -<%= render "devise/shared/links" %> +
    +
    +
    \ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 31cefb02..524698bb 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -12,7 +12,7 @@
    <%= render "navbar" %>
    -
    +
    <%= yield %>
    <%= yield :modals %> diff --git a/spec/views/landing/index.html.erb_spec.rb b/spec/views/landing/index.html.erb_spec.rb deleted file mode 100644 index 16a0e191..00000000 --- a/spec/views/landing/index.html.erb_spec.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -RSpec.describe 'landing/index.html.erb', type: :view do - pending "add some examples to (or delete) #{__FILE__}" -end