Skip to content

Commit 8ec9e27

Browse files
authored
Merge pull request #46 from kwood6319/general-ui
footer and login/sign-up ui
2 parents 9cf17e9 + 6135bc1 commit 8ec9e27

8 files changed

Lines changed: 68 additions & 48 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
footer {
2+
background-color: $pink;
3+
color: white;
4+
height: 20vh;
5+
width: 100%;
6+
margin-top: 8rem;
7+
display: flex;
8+
align-items: center;
9+
justify-content: center;
10+
bottom: 0;
11+
}

app/assets/stylesheets/components/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
@import "form_legend_clear";
55
@import "navbar";
66
@import "status_badge";
7+
@import "footer";
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
<h2>Forgot your password?</h2>
2-
3-
<%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
4-
<%= f.error_notification %>
5-
6-
<div class="form-inputs">
7-
<%= f.input :email,
1+
<div class="row w-100 my-5 px-3 d-flex justify-content-center">
2+
<div class="col-lg-6 col-mg-6 col-sm-12">
3+
<h2>Forgot your password?</h2>
4+
<%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
5+
<%= f.error_notification %>
6+
<div class="form-inputs">
7+
<%= f.input :email,
88
required: true,
99
autofocus: true,
1010
input_html: { autocomplete: "email" } %>
11+
</div>
12+
<div class="form-actions">
13+
<%= f.button :submit, "Send me password reset instructions" %>
14+
</div>
15+
<% end %>
16+
<%= render "devise/shared/links" %>
1117
</div>
12-
13-
<div class="form-actions">
14-
<%= f.button :submit, "Send me password reset instructions" %>
15-
</div>
16-
<% end %>
17-
18-
<%= render "devise/shared/links" %>
18+
</div>
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
<h2>Sign up</h2>
2-
3-
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
4-
<%= f.error_notification %>
5-
6-
<div class="form-inputs">
7-
<%= f.input :email,
1+
<div class="row w-100 my-5 px-3 d-flex justify-content-center">
2+
<div class="col-lg-6 col-mg-6 col-sm-12">
3+
<h2>Sign up</h2>
4+
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
5+
<%= f.error_notification %>
6+
<div class="form-inputs">
7+
<%= f.input :email,
88
required: true,
99
autofocus: true,
1010
input_html: { autocomplete: "email" }%>
11-
<%= f.input :password,
11+
<%= f.input :password,
1212
required: true,
1313
hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length),
1414
input_html: { autocomplete: "new-password" } %>
15-
<%= f.input :password_confirmation,
15+
<%= f.input :password_confirmation,
1616
required: true,
1717
input_html: { autocomplete: "new-password" } %>
18+
</div>
19+
<div class="form-actions">
20+
<%= f.button :submit, "Sign up" %>
21+
</div>
22+
<% end %>
23+
<%= render "devise/shared/links" %>
1824
</div>
19-
20-
<div class="form-actions">
21-
<%= f.button :submit, "Sign up" %>
22-
</div>
23-
<% end %>
24-
25-
<%= render "devise/shared/links" %>
25+
</div>
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
<h2>Log in</h2>
2-
3-
<%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
4-
<div class="form-inputs">
5-
<%= f.input :email,
1+
<div class="row w-100 my-5 px-3 d-flex justify-content-center">
2+
<div class="col-lg-6 col-mg-6 col-sm-12">
3+
<h2>Log in</h2>
4+
<%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
5+
<div class="form-inputs">
6+
<%= f.input :email,
67
required: false,
78
autofocus: true,
89
input_html: { autocomplete: "email" } %>
9-
<%= f.input :password,
10+
<%= f.input :password,
1011
required: false,
1112
input_html: { autocomplete: "current-password" } %>
12-
<%= f.input :remember_me, as: :boolean if devise_mapping.rememberable? %>
13+
<%= f.input :remember_me, as: :boolean if devise_mapping.rememberable? %>
14+
</div>
15+
<div class="form-actions">
16+
<%= f.button :submit, "Log in" %>
17+
</div>
18+
<% end %>
19+
<%= render "devise/shared/links" %>
1320
</div>
14-
15-
<div class="form-actions">
16-
<%= f.button :submit, "Log in" %>
17-
</div>
18-
<% end %>
19-
20-
<%= render "devise/shared/links" %>
21+
</div>

app/views/layouts/application.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
<%= render "shared/navbar" %>
2323
<%= render "shared/flashes" %>
2424
<%= yield %>
25+
<%= render "shared/footer" %>
2526
</body>
2627
</html>

app/views/pages/home.html.erb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
<h1>Pages#home</h1>
2-
<h3> For testing purposes: </h3>
3-
<p> <%= link_to "Charity#index", charities_path %>
4-
<p> <%= link_to "Donor#index", donors_path %> </p>
1+
<div class="container my-5">
2+
<h1>Ki-For</h1>
3+
<p>This is a home page</p>
4+
<h3> For testing purposes: </h3>
5+
<p> <%= link_to "Charity#index", charities_path %>
6+
<p> <%= link_to "Donor#index", donors_path %> </p>
7+
</div>

app/views/shared/_footer.html.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<footer>
2+
<span>Copyright © <%= Date.today.year %>, KiFor</span>
3+
</footer>

0 commit comments

Comments
 (0)