forked from makersacademy/acebook-rails-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from NenehB/personal_details
Personal details
- Loading branch information
Showing
12 changed files
with
253 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ def update | |
redirect_to posts_url | ||
end | ||
|
||
|
||
private | ||
|
||
def post_params | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,130 @@ | ||
<h1>Log In</h1> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700" rel="stylesheet"> | ||
<title>Bootstrap Sign up Form with Icons</title> | ||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | ||
<style> | ||
body { | ||
color: #999; | ||
background: #f5f5f5; | ||
font-family: 'Roboto', sans-serif; | ||
} | ||
.form-control, .form-control:focus, .input-group-addon { | ||
border-color: #e1e1e1; | ||
} | ||
.form-control, .btn { | ||
border-radius: 3px; | ||
} | ||
.signup-form { | ||
width: 390px; | ||
margin: 0 auto; | ||
padding: 30px 0; | ||
} | ||
.signup-form form { | ||
color: #999; | ||
border-radius: 3px; | ||
margin-bottom: 15px; | ||
background: #fff; | ||
box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3); | ||
padding: 30px; | ||
} | ||
.signup-form h2 { | ||
color: #333; | ||
font-weight: bold; | ||
margin-top: 0; | ||
} | ||
.signup-form hr { | ||
margin: 0 -30px 20px; | ||
} | ||
.signup-form .form-group { | ||
margin-bottom: 20px; | ||
} | ||
.signup-form label { | ||
font-weight: normal; | ||
font-size: 13px; | ||
} | ||
.signup-form .form-control { | ||
min-height: 38px; | ||
box-shadow: none !important; | ||
} | ||
.signup-form .input-group-addon { | ||
max-width: 42px; | ||
text-align: center; | ||
} | ||
.signup-form input[type="checkbox"] { | ||
margin-top: 2px; | ||
} | ||
.signup-form .btn{ | ||
font-size: 16px; | ||
font-weight: bold; | ||
background: #19aa8d; | ||
border: none; | ||
min-width: 140px; | ||
} | ||
.signup-form .btn:hover, .signup-form .btn:focus { | ||
background: #179b81; | ||
outline: none; | ||
} | ||
.signup-form a { | ||
color: #fff; | ||
text-decoration: underline; | ||
} | ||
.signup-form a:hover { | ||
text-decoration: none; | ||
} | ||
.signup-form form a { | ||
color: #19aa8d; | ||
text-decoration: none; | ||
} | ||
.signup-form form a:hover { | ||
text-decoration: underline; | ||
} | ||
.signup-form .fa { | ||
font-size: 21px; | ||
} | ||
.signup-form .fa-paper-plane { | ||
font-size: 18px; | ||
} | ||
.signup-form .fa-check { | ||
color: #fff; | ||
left: 17px; | ||
top: 18px; | ||
font-size: 7px; | ||
position: absolute; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="signup-form"> | ||
<%= form_tag sessions_path do %> | ||
<h2>Sign in</h2> | ||
<p>Please fill in this form to sign in!</p> | ||
<hr> | ||
<div class="field"> | ||
<span><i class="fa fa-paper-plane"></i></span> | ||
<%= label_tag :email %> | ||
<%= text_field_tag :email, params[:email] %> | ||
</div> | ||
|
||
<div class="field"> | ||
<span ><i class="fa fa-lock"></i></span> | ||
<%= label_tag :password %> | ||
<%= password_field_tag :password %> | ||
</div> | ||
<br> | ||
<div class="actions" ><%= submit_tag "Log In" %></div> | ||
<br> | ||
<hr> | ||
Dont have an account? Click to <%= link_to "Sign Up", sign_up_path %> | ||
<% end %> | ||
</div> | ||
</body> | ||
</html> | ||
|
||
<%= form_tag sessions_path do %> | ||
<div class="field"> | ||
<%= label_tag :email %><br /> | ||
<%= text_field_tag :email, params[:email] %> | ||
</div> | ||
<div class="field"> | ||
<%= label_tag :password %><br /> | ||
<%= password_field_tag :password %> | ||
</div> | ||
<div class="actions"><%= submit_tag "Log In" %></div> | ||
<% end %> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<!-- Required meta tags --> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<!-- Bootstrap CSS --> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | ||
|
||
</head> | ||
<body> | ||
|
||
<nav class="navbar navbar-dark bg-primary"> | ||
<div class="container-fluid"> | ||
<a class="navbar-brand">Acebook</a> | ||
<form class="d-flex"> | ||
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search"> | ||
<button class="btn btn-outline-success" type="submit">Search</button> | ||
</form> | ||
</div> | ||
</nav> | ||
|
||
<ul class="nav justify-content-end"> | ||
<li class="nav-item"> | ||
<a class="nav-link active" aria-current="page" href="/posts">Home</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="/users/index">Profile</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="#">Settings</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a class="nav-link" <%= link_to "Log Out", logout_path %></a> | ||
</li> | ||
</ul> | ||
|
||
|
||
<br> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="container "> | ||
<div class ="row offset-2"> | ||
<div class="card shadow p-3 mb-5 bg-white rounded" style="width: 100rem;"> | ||
<div class="card-body "> | ||
<h3> Personal Detail </h3> | ||
<p>Name: <%= current_user.first_name %> </p> | ||
<p>Surname: <%= current_user.surname %> </p> | ||
<p>Email: <%= current_user.email %> </p> | ||
<p>Gender: <%= current_user.gender %> </p> | ||
<p>Date of birth: <%= current_user.dob %> </p> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class ChangingDobToDate < ActiveRecord::Migration[6.0] | ||
def change | ||
change_column :users, :dob, :date, using: 'dob::date' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters