Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions app/assets/stylesheets/devise.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
.container {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
background-color: #f9f9f9;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
min-height: 100vh;
margin: 0;
}

.auth-container {
background: white;
padding: 2.5rem;
border-radius: 16px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
width: 100%;
max-width: 420px;
}

.auth-title {
font-size: 1.8rem;
font-weight: bold;
margin-bottom: 1.5rem;
text-align: center;
}

form {
margin-bottom: 1.5rem;
}

.input {
margin-bottom: 1rem;
text-align: left;
}

.input label {
display: block;
margin-bottom: 0.5rem;
font-weight: 500;
}

.input input[type="email"] {
width: 94%;
padding: 0.75rem;
border: 1px solid #ccc;
border-radius: 8px;
font-size: 1rem;
}
.input_password input[type="password"] {
width: 94%;
padding: 0.75rem;
border: 1px solid #ccc;
border-radius: 8px;
font-size: 1rem;
}

.submit input[type="submit"] {
width: 100%;
background: linear-gradient(to right, #1e3a8a, #3b82f6);
color: white;
padding: 0.75rem;
border: none;
border-radius: 8px;
font-weight: bold;
font-size: 1rem;
cursor: pointer;
transition: background 0.3s ease;
}

.submit input[type="submit"]:hover {
background: linear-gradient(to right, #1e40af, #2563eb);
}
18 changes: 18 additions & 0 deletions app/views/devise/confirmations/new.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<div class="container">
<div class="auth-container">
<h2 class="auth-title"><%= t("devise.confirmations.new.title") %></h2>

<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %>

<div class="input">
<%= f.label :email, t("activerecord.attributes.#{resource_name}.email") %>
<%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
</div>

<div class="submit">
<%= f.submit t("devise.confirmations.new.resend_confirmation_instructions") %>
</div>
<% end %>
</div>
</div>
43 changes: 43 additions & 0 deletions app/views/devise/mailer/confirmation_instructions.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<style>
@media only screen and (max-width: 600px) {
.container {
padding: 20px !important;
}
h1 {
font-size: 24px !important;
}
p, a {
font-size: 16px !important;
}
}
</style>
</head>
<body style="margin: 0; padding: 0; font-family: sans-serif;">
<div class="container" style="max-width: 600px; padding: 40px;">
<h1 style="color: #333;"><%= t("devise.mailer.confirmation_instructions.subject") %></h1>

<p style="color: #555;">
<%= t("devise.mailer.confirmation_instructions.greeting", recipient: @resource.email) %>
</p>

<p style="color: #555;">
<%= t("devise.mailer.confirmation_instructions.instruction") %>
</p>

<p>
<a href="<%= confirmation_url(@resource, confirmation_token: @token) %>"
style="display: inline-block; background-color: #3b82f6; color: white; padding: 12px 24px; text-decoration: none; border-radius: 4px;">
<%= t("devise.mailer.confirmation_instructions.action") %>
</a>
</p>

<p style="color: #999; font-size: 12px; margin-top: 20px;">
<%= t("devise.mailer.reset_password_instructions.instruction_2") %>
</p>
</div>
</body>
</html>
35 changes: 35 additions & 0 deletions app/views/devise/mailer/reset_password_instructions.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<style>
@media only screen and (max-width: 600px) {
.container {
padding: 20px !important;
}
h1 {
font-size: 24px !important;
}
p, a {
font-size: 16px !important;
}
}
</style>
</head>
<body style="margin: 0; padding: 0; font-family: sans-serif; ">
<div class="container" style="max-width: 600px; padding: 40px;">
<h1 style="color: #333;"><%= t("devise.mailer.reset_password_instructions.subject") %></h1>
<p style="color: #555;"><%= t("devise.mailer.reset_password_instructions.greeting", recipient: @resource.email) %></p>
<p style="color: #555;"><%= t("devise.mailer.reset_password_instructions.instruction") %></p>
<p>
<a href="<%= edit_password_url(@resource, reset_password_token: @token) %>"
style="display: inline-block; background-color: #3b82f6; color: white; padding: 12px 24px; text-decoration: none; border-radius: 4px;">
<%= t("devise.mailer.reset_password_instructions.action") %>
</a>
</p>
<p style="color: #999; font-size: 12px; margin-top: 20px;">
<%= t("devise.mailer.reset_password_instructions.instruction_2") %>
</p>
</div>
</body>
</html>
27 changes: 27 additions & 0 deletions app/views/devise/passwords/edit.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<div class="container">
<div class="auth-container">
<h2 class="auth-title"><%= t("devise.passwords.edit.change_your_password") %></h2>

<%= 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 %>

<div class="input_password">
<p><%= f.label :password, t("devise.passwords.edit.new_password") %></p>
<% if @minimum_password_length %>
<p><em>(<%= t("devise.passwords.edit.minimum_length", count: @minimum_password_length) %>)</em></p>
<% end %>
<p><%= f.password_field :password, autofocus: true, autocomplete: "new-password" %></p>
</div>

<div class="input_password">
<p><%= f.label :password_confirmation, t("devise.passwords.edit.confirm_new_password") %></p>
<p><%= f.password_field :password_confirmation, autocomplete: "new-password" %></p>
</div>

<div class="submit">
<%= f.submit t("devise.passwords.edit.change_my_password") %>
</div>
<% end %>
</div>
</div>
18 changes: 18 additions & 0 deletions app/views/devise/passwords/new.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<div class="container">
<div class="auth-container">
<h2 class="auth-title"><%= t("devise.passwords.new.forgot_your_password") %></h2>

<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %>

<div class="input">
<p><%= f.label :email, t("devise.passwords.new.email") %></p>
<p><%= f.email_field :email, autofocus: true, autocomplete: "email" %></p>
</div>

<div class="submit">
<%= f.submit t("devise.passwords.new.send_me_reset_password_instructions") %>
</div>
<% end %>
</div>
</div>
11 changes: 7 additions & 4 deletions config/locales/pt-BR/devise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pt-BR:
confirmations:
confirmed: A sua conta foi confirmada com sucesso.
new:
title: Confirmação de e-mail
resend_confirmation_instructions: Reenviar instruções de confirmação
send_instructions: Dentro de minutos, você receberá um email com as instruções de confirmação da sua conta.
send_paranoid_instructions: Se o seu e-mail existir em nosso banco de dados, você receberá um email com instruções sobre como confirmar sua conta em alguns minutos.
Expand All @@ -50,8 +51,8 @@ pt-BR:
confirmation_instructions:
action: Confirmar minha conta
greeting: Bem-vindo %{recipient}!
instruction: "Você pode confirmar sua conta através do link abaixo:"
subject: Instruções de confirmação
instruction: "Você pode confirmar sua conta através do link abaixo"
subject: Confirmação de conta
email_changed:
greeting: Olá %{recipient}!
message: Estamos entrando em contato para notificá-lo de que seu e-mail está sendo alterado para %{email}.
Expand All @@ -64,10 +65,10 @@ pt-BR:
reset_password_instructions:
action: Redefinir minha senha
greeting: Olá %{recipient}!
instruction: Alguém fez o pedido para redefinir sua senha, e você pode fazer isso clicando no link abaixo.
instruction: Recebemos uma solicitação para redefinir sua senha, click no botão abaixo para contiuar.
instruction_2: Se você não fez este pedido, por favor ignore este e-mail.
instruction_3: Sua senha não será alterada até que você acesse o link acima e crie uma nova.
subject: Instruções de redefinição de senha
subject: Redefinição de senha
unlock_instructions:
action: Desbloquear minha conta
greeting: Olá %{recipient}!
Expand All @@ -79,11 +80,13 @@ pt-BR:
success: Autorizado com sucesso de uma conta de %{kind}.
passwords:
edit:
minimum_length: "%{count} caracteres no mínimo"
change_my_password: Alterar minha senha
change_your_password: Alterar sua senha
confirm_new_password: Confirme sua nova senha
new_password: Nova senha
new:
email: E-mail
forgot_your_password: Esqueceu sua senha?
send_me_reset_password_instructions: Enviar instruções para redefinição da senha
no_token: Você não pode acessar esta página sem estar logado. Se você veio de um email de redefinição de senha, por favor certifique-se de ter digitado a URL corretamente.
Expand Down