-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
acdba61
commit 690e928
Showing
14 changed files
with
253 additions
and
30 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
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,99 @@ | ||
body, | ||
input, | ||
textarea, | ||
a.button, | ||
a.button:visited, | ||
button { | ||
font-family: -apple-system, BlinkMacSystemFont, Calibri, sans-serif; | ||
color: #111; | ||
} | ||
|
||
body { | ||
font-size: 1rem; | ||
padding: 2rem; | ||
} | ||
|
||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6, | ||
ul, | ||
ol, | ||
p { | ||
max-width: 80ch; | ||
margin: 0 0 1rem 0; | ||
} | ||
|
||
h1:last-child, h2:last-child, h3:last-child, h4:last-child, h5:last-child, h6:last-child, ul:last-child, ol:last-child, p:last-child { | ||
margin-bottom: 0rem; | ||
} | ||
|
||
h1 { | ||
font-size: 2rem; | ||
margin-top: 2rem; | ||
} | ||
|
||
h1:first-child { | ||
margin-top: 0rem; | ||
} | ||
|
||
a, | ||
a:visited { | ||
color: #1d7195; | ||
} | ||
|
||
a:hover, | ||
a:focus { | ||
color: #15516a; | ||
} | ||
|
||
button, | ||
a.button { | ||
-webkit-appearance: none; | ||
-moz-appearance: none; | ||
appearance: none; | ||
cursor: inherit; | ||
font-size: 1rem; | ||
line-height: 1.5; | ||
border: 1px solid #aaa; | ||
border-radius: 5px; | ||
padding: 0.5em 0.75em; | ||
background: #e8e8e8; | ||
box-shadow: inset 0px 0.75em 0.75em rgba(255, 255, 255, 0.25); | ||
-webkit-text-decoration: none; | ||
text-decoration: none; | ||
} | ||
|
||
button.primary, a.button.primary { | ||
background: #111; | ||
border-color: #111; | ||
color: #fff; | ||
box-shadow: inset 0px 0.75em 0.75em rgba(255, 255, 255, 0.2); | ||
} | ||
|
||
button.primary:hover, a.button.primary:hover { | ||
box-shadow: inset 0px 0.75em 0.75em rgba(255, 255, 255, 0.1); | ||
} | ||
|
||
.buttons, | ||
table { | ||
margin: 1.5rem 0; | ||
} | ||
|
||
.buttons:last-child, table:last-child { | ||
margin-bottom: 0px; | ||
} | ||
|
||
table { | ||
border-collapse: collapse; | ||
border-top: 1px solid #ddd; | ||
} | ||
|
||
table th, | ||
table td { | ||
text-align: left; | ||
padding: 0.5rem 1rem 0.5rem 0; | ||
border-bottom: 1px solid #ddd; | ||
} |
File renamed without changes.
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,90 @@ | ||
body, | ||
input, | ||
textarea, | ||
a.button, | ||
a.button:visited, | ||
button { | ||
font-family: -apple-system, BlinkMacSystemFont, Calibri, sans-serif; | ||
color: #111; | ||
} | ||
|
||
body { | ||
font-size: 1rem; | ||
padding: 2rem; | ||
} | ||
|
||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6, | ||
ul, | ||
ol, | ||
p { | ||
max-width: 80ch; | ||
margin: 0 0 1rem 0; | ||
&:last-child { | ||
margin-bottom: 0rem; | ||
} | ||
} | ||
|
||
h1 { | ||
font-size: 2rem; | ||
margin-top: 2rem; | ||
&:first-child { | ||
margin-top: 0rem; | ||
} | ||
} | ||
|
||
a, | ||
a:visited { | ||
color: #1d7195; | ||
} | ||
a:hover, | ||
a:focus { | ||
color: #15516a; | ||
} | ||
|
||
button, | ||
a.button { | ||
appearance: none; | ||
cursor: inherit; | ||
font-size: 1rem; | ||
line-height: 1.5; | ||
border: 1px solid #aaa; | ||
border-radius: 5px; | ||
padding: 0.5em 0.75em; | ||
background: #e8e8e8; | ||
box-shadow: inset 0px 0.75em 0.75em rgba(255, 255, 255, 0.25); | ||
text-decoration: none; | ||
|
||
&.primary { | ||
background: #111; | ||
border-color: #111; | ||
color: #fff; | ||
box-shadow: inset 0px 0.75em 0.75em rgba(255, 255, 255, 0.2); | ||
&:hover { | ||
box-shadow: inset 0px 0.75em 0.75em rgba(255, 255, 255, 0.1); | ||
} | ||
} | ||
} | ||
|
||
.buttons, | ||
table { | ||
margin: 1.5rem 0; | ||
&:last-child { | ||
margin-bottom: 0px; | ||
} | ||
} | ||
|
||
table { | ||
border-collapse: collapse; | ||
border-top: 1px solid #ddd; | ||
th, | ||
td { | ||
text-align: left; | ||
padding: 0.5rem 1rem 0.5rem 0; | ||
border-bottom: 1px solid #ddd; | ||
} | ||
} |
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,23 +2,19 @@ | |
|
||
class AdminMailer < ApplicationMailer | ||
default from: proc { "\"Pages\" <[email protected]>" } | ||
layout false | ||
layout "pages_core/mailer" | ||
|
||
def account_recovery(user, url) | ||
@user = user | ||
@url = url | ||
mail( | ||
to: @user.email, | ||
subject: "Recover your account on #{PagesCore.config(:site_name)}" | ||
) | ||
mail(to: @user.email, | ||
subject: "Recover your account on #{PagesCore.config(:site_name)}") | ||
end | ||
|
||
def invite(invite, url) | ||
@invite = invite | ||
@url = url | ||
mail( | ||
to: @invite.email, | ||
subject: "#{PagesCore.config(:site_name)} has invited you to Pages" | ||
) | ||
mail(to: @invite.email, | ||
subject: "#{PagesCore.config(:site_name)} has invited you to Pages") | ||
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,20 @@ | ||
<h1> | ||
Recover your account | ||
</h1> | ||
<p> | ||
Hi, <%= @user.name %>! | ||
</p> | ||
<p> | ||
We've received a request to recover your account on | ||
<%= PagesCore.config(:site_name) %>. | ||
</p> | ||
<p> | ||
Please click the following link to continue:<br> | ||
<%= link_to(@url, @url) %> | ||
</p> | ||
<p> | ||
The link will expire in 24 hours. | ||
</p> | ||
<p> | ||
If you do not want to recover your password, please ignore this email. | ||
</p> |
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,11 @@ | ||
<h1> | ||
Welcome! | ||
</h1> | ||
<p> | ||
<%= @invite.user.name %> has invited you to Pages on | ||
<%= PagesCore.config(:site_name) %>.<br> | ||
Click the button below to create your account and get started. | ||
</p> | ||
<div class="buttons"> | ||
<%= link_to("Create account", @url, class: "primary button") %> | ||
</div> |
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,11 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<%= stylesheet_link_tag "pages_core/mailer" %> | ||
</head> | ||
|
||
<body> | ||
<%= yield %> | ||
</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
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