-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into aws-deploy
- Loading branch information
Showing
54 changed files
with
542 additions
and
247 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 |
---|---|---|
@@ -0,0 +1,167 @@ | ||
@mixin User-links { | ||
height: 100px; | ||
text-align: center; | ||
padding-top: 40px; | ||
display: flex; | ||
justify-content: space-between; | ||
&__root { | ||
width: 200px; | ||
font-size: 30px; | ||
display: block; | ||
text-decoration: none; | ||
margin: 0 auto; | ||
} | ||
} | ||
|
||
@mixin User-button-base { | ||
margin: 0 auto; | ||
font-size: 14px; | ||
line-height: 50px; | ||
height: 50px; | ||
width: 370px; | ||
margin-top: 15px; | ||
border: 1px solid transparent; | ||
position: relative; | ||
i { | ||
font-size: 26px; | ||
position: absolute; | ||
top: 10px; | ||
left: 16px; | ||
} | ||
} | ||
|
||
.User-Account-page { | ||
background-color: #eee; | ||
&__header { | ||
@include User-links; | ||
&__user-manage, &__login-out { | ||
@include User-links; | ||
float: right; | ||
} | ||
} | ||
&__content { | ||
display: block; | ||
background-color: #eeeeee; | ||
.User-contents { | ||
height: 100vh; | ||
width: 700px; | ||
background-color: #f8f8f8; | ||
margin: 0 auto; | ||
&__head { | ||
font-size: 15px; | ||
font-weight: bold; | ||
text-align: center; | ||
padding: 40px 65px; | ||
border-bottom: solid 1px #eeeeee; | ||
&__comment { | ||
margin-bottom: 10px; | ||
} | ||
&__create { | ||
display: block; | ||
margin: 0 auto; | ||
width: 370px; | ||
border: solid 1px #0099e8; | ||
background-color: #0099e8; | ||
line-height: 40px; | ||
text-decoration: none; | ||
color: #fff; | ||
} | ||
} | ||
&__inner { | ||
padding: 40px 65px; | ||
display: grid; | ||
&__facebook { | ||
@include User-button-base; | ||
background-color: #385185; | ||
color: #fff; | ||
} | ||
&__google { | ||
@include User-button-base; | ||
background-color: #fff; | ||
color: #222222; | ||
border: solid 1px #222222; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
form { | ||
padding: 25px 165px 35px; | ||
.User-field { | ||
margin-bottom: 10px; | ||
&__label { | ||
padding: 10px 0; | ||
letter-spacing: 1px; | ||
font-size: 14px; | ||
font-weight: 200; | ||
display: contents; | ||
} | ||
span { | ||
background-color: #ea352d; | ||
color: #f8f8f8; | ||
margin: 0 0 0 4px; | ||
padding: 2px 4px; | ||
font-size: 15px; | ||
} | ||
&__input { | ||
input { | ||
width: 100%; | ||
margin: 25px 0; | ||
padding: 10px; | ||
letter-spacing: 1px; | ||
margin-top: 8px; | ||
} | ||
} | ||
} | ||
.User-actions { | ||
margin: 24px 0; | ||
display: grid; | ||
&__btn { | ||
display: inline-block; | ||
background-color: #3ccace; | ||
color: #fff; | ||
height: 50px; | ||
padding: 0 30px; | ||
line-height: 50px; | ||
letter-spacing: 1px; | ||
text-align: center; | ||
border-radius: 2px; | ||
} | ||
} | ||
.User-pw__missing { | ||
display: block; | ||
margin: 40px 0 0; | ||
a { | ||
text-decoration: none; | ||
color: #0099e8; | ||
} | ||
a:hover { | ||
text-decoration: underline; | ||
} | ||
} | ||
} | ||
.User-page-footer { | ||
width: 460px; | ||
height: 220px; | ||
margin: 0 auto; | ||
&__bar { | ||
display: flex; | ||
padding: 20px 0 30px 0; | ||
margin: 0 auto; | ||
li { | ||
margin: 0 0 0 50px; | ||
font-size: 10px; | ||
list-style: none; | ||
} | ||
} | ||
&__root { | ||
height: 60px; | ||
display: block; | ||
margin: 0 auto; | ||
} | ||
&__logo { | ||
text-align: center; | ||
padding: 20px 0 0 0; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
@import 'font-awesome'; | ||
@import 'reset'; | ||
@import 'details'; | ||
@import './users'; |
This file was deleted.
Oops, something went wrong.
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,2 +1,16 @@ | ||
class ApplicationController < ActionController::Base | ||
end | ||
before_action :basic_auth, if: :production? | ||
protect_from_forgery with: :exception | ||
|
||
private | ||
|
||
def production? | ||
Rails.env.production? | ||
end | ||
|
||
def basic_auth | ||
authenticate_or_request_with_http_basic do |username, password| | ||
username == ENV["BASIC_AUTH_USER"] && password == ENV["BASIC_AUTH_PASSWORD"] | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class Delivery < ApplicationRecord | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class Image < ApplicationRecord | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class Item < ApplicationRecord | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class Order < ApplicationRecord | ||
end |
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
%h2 Resend confirmation instructions | ||
= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| | ||
= render "devise/shared/error_messages", resource: resource | ||
.field | ||
= f.label :email | ||
%br/ | ||
= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) | ||
.actions | ||
= f.submit "Resend confirmation instructions" | ||
= render "devise/shared/links" |
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
%p | ||
Welcome #{@email}! | ||
%p You can confirm your account email through the link below: | ||
%p= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) |
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
%p | ||
Hello #{@email}! | ||
- if @resource.try(:unconfirmed_email?) | ||
%p | ||
We're contacting you to notify you that your email is being changed to #{@resource.unconfirmed_email}. | ||
- else | ||
%p | ||
We're contacting you to notify you that your email has been changed to #{@resource.email}. |
This file was deleted.
Oops, something went wrong.
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,3 @@ | ||
%p | ||
Hello #{@resource.email}! | ||
%p We're contacting you to notify you that your password has been changed. |
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
app/views/devise/mailer/reset_password_instructions.html.haml
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,6 @@ | ||
%p | ||
Hello #{@resource.email}! | ||
%p Someone has requested a link to change your password. You can do this through the link below. | ||
%p= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) | ||
%p If you didn't request this, please ignore this email. | ||
%p Your password won't change until you access the link above and create a new one. |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
%p | ||
Hello #{@resource.email}! | ||
%p Your account has been locked due to an excessive number of unsuccessful sign in attempts. | ||
%p Click the link below to unlock your account: | ||
%p= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) |
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
%h2 Change your password | ||
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| | ||
= render "devise/shared/error_messages", resource: resource | ||
= f.hidden_field :reset_password_token | ||
.field | ||
= f.label :password, "New password" | ||
%br/ | ||
- if @minimum_password_length | ||
%em | ||
(#{@minimum_password_length} characters minimum) | ||
%br/ | ||
= f.password_field :password, autofocus: true, autocomplete: "new-password" | ||
.field | ||
= f.label :password_confirmation, "Confirm new password" | ||
%br/ | ||
= f.password_field :password_confirmation, autocomplete: "new-password" | ||
.actions | ||
= f.submit "Change my password" | ||
= render "devise/shared/links" |
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
%h2 Forgot your password? | ||
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| | ||
= render "devise/shared/error_messages", resource: resource | ||
.field | ||
= f.label :email | ||
%br/ | ||
= f.email_field :email, autofocus: true, autocomplete: "email" | ||
.actions | ||
= f.submit "Send me reset password instructions" | ||
= render "devise/shared/links" |
Oops, something went wrong.