Skip to content

Commit

Permalink
Merge pull request #84 from enpitut2018/local_root
Browse files Browse the repository at this point in the history
Local root
  • Loading branch information
kousukeuo authored Dec 14, 2018
2 parents 3332d32 + b2b8868 commit 7adcc48
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 25 deletions.
Binary file added app/assets/images/step1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/step2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/step3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/steps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/title.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@import "bootstrap";
@import "simplemde/dist/simplemde.min";

body {
#hakohugu {
font-size: .875rem;
padding-top:80px;
}
Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "bootstrap";
25 changes: 25 additions & 0 deletions app/assets/stylesheets/sessions.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
// Place all the styles related to the Sessions controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

.back{ background-color: #ABD8DA;}
.container-fulid{
width:100%
}
.gedan_block{text-align: center;}
.jodan_block{
text-align: center;
background-color: #009FA4;
width : 100%;
}
.step{
width : 80%;
height:auto
}
.title{
width : 25%;
height:auto
}
.hugu{
position: absolute;
left:26%;
width:10%;
height:auto
}
1 change: 1 addition & 0 deletions app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class SessionsController < ApplicationController
def new
render :layout => nil
end

def create
Expand Down
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 @@

<body>
<%= render 'layouts/header' %>
<div class="container">
<div class="container" id="hakohugu">
<% flash.each do |message_type, message| %>
<div class="alert alert-<%= message_type %>"><%= message %></div>
<% end %>
Expand Down
65 changes: 42 additions & 23 deletions app/views/sessions/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,25 +1,44 @@
<div class="container">
<div class="starter-template">
<h1>ログイン</h1>
</div>

<%= form_for(:session, url: login_path) do |f| %>

<div class="form-group">
<%= f.label :eメール %>
<%= f.email_field :email , class: 'form-control'%>
</div>

<div class="form-group">
<%= f.label :password %>
<%= f.password_field :password , class: 'form-control'%>
</div>

<div class="form-group">
<%= f.submit "ログイン", class: "btn btn-primary" %>
</div>

<!DOCTYPE html>
<html lang="ja">
<head>
<title>Cogito</title>
<meta charset="utf-8">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>
<body>
<div class = "back">
<div class="container-fulid">
<div class="jodan_block">
<br>
<%= image_tag('hakohugu.png',:class => "hugu") %>

<%= image_tag('title.png',:class => "title") %><br><br><br>
<%= image_tag('steps.png' ,:class => "step") %>
<br><br>
</div>
<div class = "gedan_block">
<br><br>
<%= form_for(:session, url: login_path) do |f| %>
<div class="form-group">
<%= f.label :eメール %>
<%= f.email_field :email , class: 'form-control ' %>
</div>
<div class="form-group">
<%= f.label :password %>
<%= f.password_field :password , class: 'form-control ' %>
</div>
<div class="form-group">
<%= f.submit "ログイン", class: "btn btn-primary" %>
</div>

<% end %>

<p>アカウントの新規作成はこちら <%= link_to "新規作成", new_user_path %></p>
</div>
<p>アカウントの新規作成は <%= link_to "こちら", new_user_path %></p>
</div>
</div>
</div>
</body>
</html>

0 comments on commit 7adcc48

Please sign in to comment.