diff --git a/.gitignore b/.gitignore index eca05bb..da83347 100644 --- a/.gitignore +++ b/.gitignore @@ -37,7 +37,7 @@ tmux*log /.bundle/ /vendor/bundle /lib/bundler/man/ -/vendor/assets +/vendor/assets/* bower_components/ node_modules/ .DS_Store diff --git a/Gemfile b/Gemfile index 651faee..667035c 100644 --- a/Gemfile +++ b/Gemfile @@ -19,6 +19,10 @@ gem 'uglifier', '>= 1.3.0' gem 'bourbon' gem 'neat' +# Foundation for Emails +gem 'inky-rb', require: 'inky' +gem 'premailer-rails' + group :development do gem 'better_errors' gem 'rack-livereload' diff --git a/Gemfile.lock b/Gemfile.lock index a704484..31a7bcb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -38,6 +38,7 @@ GEM i18n (~> 0.7) minitest (~> 5.1) tzinfo (~> 1.1) + addressable (2.4.0) ansi (1.5.0) arel (7.1.0) ast (2.3.0) @@ -57,6 +58,8 @@ GEM choice (0.2.0) coderay (1.1.1) concurrent-ruby (1.0.2) + css_parser (1.4.5) + addressable debug_inspector (0.0.2) docile (1.1.5) domain_name (0.5.20160615) @@ -71,6 +74,7 @@ GEM figaro (1.1.1) thor (~> 0.14) formatador (0.2.5) + foundation_emails (2.2.0.0) globalid (0.3.6) activesupport (>= 4.1.0) guard (2.14.0) @@ -97,10 +101,13 @@ GEM guard-shell (0.7.1) guard (>= 2.0.0) guard-compat (~> 1.0) + htmlentities (4.3.4) http-cookie (1.0.2) domain_name (~> 0.5) http_parser.rb (0.6.0) i18n (0.7.0) + inky-rb (1.3.6.1) + foundation_emails (~> 2) jbuilder (2.6.0) activesupport (>= 3.0.0, < 5.1) multi_json (~> 1.2) @@ -151,6 +158,12 @@ GEM ast (~> 2.2) pkg-config (1.1.7) powerpack (0.1.1) + premailer (1.8.7) + css_parser (>= 1.4.5) + htmlentities (>= 4.0.0) + premailer-rails (1.9.4) + actionmailer (>= 3, < 6) + premailer (~> 1.7, >= 1.7.9) pry (0.10.4) coderay (~> 1.1.0) method_source (~> 0.8.1) @@ -281,6 +294,7 @@ DEPENDENCIES guard-minitest guard-rubocop guard-shell + inky-rb jbuilder (~> 2.6) jquery-rails json (~> 2.0.2) @@ -289,6 +303,7 @@ DEPENDENCIES minitest-reporters mysql2 (>= 0.3.18, < 0.5) neat + premailer-rails pry-byebug pry-rails puma (~> 3.0) diff --git a/app/assets/images/perficientdigital-logo.jpg b/app/assets/images/perficientdigital-logo.jpg new file mode 100644 index 0000000..a11f67e Binary files /dev/null and b/app/assets/images/perficientdigital-logo.jpg differ diff --git a/app/assets/images/yellowslant-left.jpg b/app/assets/images/yellowslant-left.jpg new file mode 100644 index 0000000..df14cd0 Binary files /dev/null and b/app/assets/images/yellowslant-left.jpg differ diff --git a/app/assets/images/yellowslant-right.jpg b/app/assets/images/yellowslant-right.jpg new file mode 100644 index 0000000..de838e0 Binary files /dev/null and b/app/assets/images/yellowslant-right.jpg differ diff --git a/app/assets/stylesheets/mailers/custom-mailer-styles.scss b/app/assets/stylesheets/mailers/custom-mailer-styles.scss new file mode 100644 index 0000000..c4f1c9f --- /dev/null +++ b/app/assets/stylesheets/mailers/custom-mailer-styles.scss @@ -0,0 +1,47 @@ +a { + text-decoration: underline; + color: $success-color; +} + +.email-container { + .email-heading th { + font-family: 'Lato', Helvetica Neue, Helvetica, Ariel, sans-serif; + .prft-slash { + font-size: 100px; + font-weight: 200; + color: $success-color; + vertical-align: middle; + } + .email-title { + text-transform: uppercase; + font-weight: 700; + font-size:18px; + vertical-align: sub; + } + } + .email-body * { + font-family: 'Lato', Helvetica Neue, Helvetica, Ariel, sans-serif; + font-size: 16px; + line-height: 1.5em; + padding-bottom: 20px; + font-weight:300; + word-break: break-word; + strong { + font-weight:bold; + } + } + .email-copyright { + font-family: 'Lato', Helvetica Neue, Helvetica, Ariel, sans-serif; + font-size: 10px; + color: #909090; + vertical-align: bottom; + } + .email-logo { + text-align: right; + vertical-align: bottom; + } + .email-bg { + background:#fef035 !important; + background-color:#fef035 !important; + } +} diff --git a/app/assets/stylesheets/mailers/foundation_global_overrides.scss b/app/assets/stylesheets/mailers/foundation_global_overrides.scss new file mode 100644 index 0000000..de181b3 --- /dev/null +++ b/app/assets/stylesheets/mailers/foundation_global_overrides.scss @@ -0,0 +1,6 @@ +// foundation overrides + +$success-color: #EF0734; +$global-width: 600px; +$body-font-family: inherit; +$body-background: #ffffff; diff --git a/app/assets/stylesheets/mailers/foundation_vendor_manifest.scss b/app/assets/stylesheets/mailers/foundation_vendor_manifest.scss new file mode 100644 index 0000000..3667674 --- /dev/null +++ b/app/assets/stylesheets/mailers/foundation_vendor_manifest.scss @@ -0,0 +1,18 @@ +@import 'foundation-emails/scss/util/util', + 'foundation-emails/scss/global', + + 'foundation_global_overrides', + + 'foundation-emails/scss/components/normalize', + 'foundation-emails/scss/grid/grid', + 'foundation-emails/scss/grid/block-grid', + 'foundation-emails/scss/components/alignment', + 'foundation-emails/scss/components/visibility', + 'foundation-emails/scss/components/typography', + 'foundation-emails/scss/components/button', + 'foundation-emails/scss/components/callout', + 'foundation-emails/scss/components/thumbnail', + 'foundation-emails/scss/components/menu', + 'foundation-emails/scss/components/outlook-first', + 'foundation-emails/scss/components/media-query'; +@import 'custom-mailer-styles'; diff --git a/app/views/candidate_mailer/reminder.html.erb b/app/views/candidate_mailer/reminder.html.erb deleted file mode 100644 index af7393c..0000000 --- a/app/views/candidate_mailer/reminder.html.erb +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - -
-
PERFICIENT/digital Skills Assessment Test
-


-
-

Dear <%= @candidate.name %>,

-

- Thank you for taking the Skills Assessment Test. However, it looks like you have not submitted it - yet. If you are having trouble, please reach out to your recruiter: - <%= mail_to @candidate.recruiter.email %> -

-

- You can return to the test here: - <%= link_to nil, root_url %>. -
- Your Test ID is: <%= @candidate.test_hash %> -

-
-


-


-
 
-
diff --git a/app/views/candidate_mailer/reminder.html.inky b/app/views/candidate_mailer/reminder.html.inky new file mode 100644 index 0000000..9919514 --- /dev/null +++ b/app/views/candidate_mailer/reminder.html.inky @@ -0,0 +1,16 @@ + + +

Dear <%= @candidate.name %>,

+

+ Thank you for taking the Skills Assessment Test. However, it looks like you have not submitted it + yet. If you are having trouble, please reach out to your recruiter: + <%= mail_to @candidate.recruiter.email %> +

+

+ You can return to the test here: + <%= link_to nil, root_url %>. +
+ Your Test ID is: <%= @candidate.test_hash %> +

+
+
diff --git a/app/views/candidate_mailer/submitted.html.erb b/app/views/candidate_mailer/submitted.html.erb deleted file mode 100644 index 11e4679..0000000 --- a/app/views/candidate_mailer/submitted.html.erb +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - -
-
PERFICIENT/digital Skills Assessment Test
-


-
-

Dear <%= @candidate.name %>,

-

Thank you for taking the Skills Assessment Test. Your recruiter will be in touch.

-
-


-


-
 
-
diff --git a/app/views/candidate_mailer/submitted.html.inky b/app/views/candidate_mailer/submitted.html.inky new file mode 100644 index 0000000..10d6e6d --- /dev/null +++ b/app/views/candidate_mailer/submitted.html.inky @@ -0,0 +1,6 @@ + + +

Dear <%= @candidate.name %>,

+

Thank you for taking the Skills Assessment Test. Your recruiter will be in touch.

+
+
\ No newline at end of file diff --git a/app/views/candidate_mailer/welcome.html.erb b/app/views/candidate_mailer/welcome.html.erb deleted file mode 100644 index 63218f4..0000000 --- a/app/views/candidate_mailer/welcome.html.erb +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -
-
PERFICIENT/digital
-


-
-

Hello there! You have been invited to take our Skills Assessment Test.

-

-
-

- Please visit <%= link_to nil, login_url(@candidate.test_hash) %> to begin your test. -

-
-

-

- Or, visit <%= link_to nil, root_url %> and enter your Test ID to begin your test. - Your Test ID is: <%= @candidate.test_hash %>.

- Once we have evaluated your answers, your recruiter will be in touch. Good luck! -

-
-


-


-
 
-
diff --git a/app/views/candidate_mailer/welcome.html.inky b/app/views/candidate_mailer/welcome.html.inky new file mode 100644 index 0000000..3137d9b --- /dev/null +++ b/app/views/candidate_mailer/welcome.html.inky @@ -0,0 +1,18 @@ + + +

Hello there! You have been invited to take our Skills Assessment Test.

+ + + + +
+ Please visit <%= link_to nil, login_url(@candidate.test_hash) %> to begin your test. +
+

+  
+ Or, visit <%= link_to nil, root_url %> and enter your Test ID to begin your test. + Your Test ID is: <%= @candidate.test_hash %>. + Once we have evaluated your answers, your recruiter will be in touch. Good luck! +

+
+
\ No newline at end of file diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 9e37c00..1dd9704 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,5 +1,6 @@ + diff --git a/app/views/layouts/mailer.html.inky b/app/views/layouts/mailer.html.inky new file mode 100644 index 0000000..2969c38 --- /dev/null +++ b/app/views/layouts/mailer.html.inky @@ -0,0 +1,58 @@ + + + + + + <%= stylesheet_link_tag "mailers/foundation_vendor_manifest" %> + + + + + + + +
+
+ +
+
+ + diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/old_mailer_1470948990.html.erb similarity index 100% rename from app/views/layouts/mailer.html.erb rename to app/views/layouts/old_mailer_1470948990.html.erb diff --git a/app/views/recruiter_mailer/candidate_created.html.erb b/app/views/recruiter_mailer/candidate_created.html.erb deleted file mode 100644 index 8132ca9..0000000 --- a/app/views/recruiter_mailer/candidate_created.html.erb +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - -
-
PERFICIENT/digital Skills Assessment Test
-


-
-

The following candidate has been invited to take the Skills Assessment Test:

-

- Candidate name: <%= @candidate.name %>
- Candidate email: <%= @candidate.email %>
- Candidate ID: <%= @candidate.test_hash %>
- Years of experience: <%= @candidate.experience %> Years
-

- -

You will be notified when the candidate has finished taking the test.

-
-


-


-
 
-
diff --git a/app/views/recruiter_mailer/candidate_created.html.inky b/app/views/recruiter_mailer/candidate_created.html.inky new file mode 100644 index 0000000..0a9cc9e --- /dev/null +++ b/app/views/recruiter_mailer/candidate_created.html.inky @@ -0,0 +1,14 @@ + + + +

The following candidate has been invited to take the Skills Assessment Test:

+

+ Candidate name: <%= @candidate.name %>
+ Candidate email: <%= @candidate.email %>
+ Candidate ID: <%= @candidate.test_hash %>
+ Years of experience: <%= @candidate.experience %> Years
+

+ +

You will be notified when the candidate has finished taking the test.

+
+
\ No newline at end of file diff --git a/app/views/recruiter_mailer/candidate_submitted.html.erb b/app/views/recruiter_mailer/candidate_submitted.html.erb deleted file mode 100644 index 2745ce3..0000000 --- a/app/views/recruiter_mailer/candidate_submitted.html.erb +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - -
-
PERFICIENT/digital Skills Assessment Test
-


-
-

<%= @candidate.name %> has completed the Skills Assessment Test.

-

Martin Ridgway will let you know if we would like to interview this candidate.

-
-


-


-
 
-
diff --git a/app/views/recruiter_mailer/candidate_submitted.html.inky b/app/views/recruiter_mailer/candidate_submitted.html.inky new file mode 100644 index 0000000..c4c8b4b --- /dev/null +++ b/app/views/recruiter_mailer/candidate_submitted.html.inky @@ -0,0 +1,6 @@ + + +

<%= @candidate.name %> has completed the Skills Assessment Test.

+

Martin Ridgway will let you know if we would like to interview this candidate.

+
+
\ No newline at end of file diff --git a/app/views/reviewer_mailer/candidate_submission.html.erb b/app/views/reviewer_mailer/candidate_submission.html.erb deleted file mode 100644 index f18337c..0000000 --- a/app/views/reviewer_mailer/candidate_submission.html.erb +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - -
-
PERFICIENT/digital Skills Assessment Test Results
-


-
-

Candidate <%= @candidate.test_hash %> has completed the Skills Assessment Test.

-

You can view the results here: <%= link_to nil, review_test_url(@candidate.test_hash) %>.

-
diff --git a/app/views/reviewer_mailer/candidate_submission.html.inky b/app/views/reviewer_mailer/candidate_submission.html.inky new file mode 100644 index 0000000..4f61e26 --- /dev/null +++ b/app/views/reviewer_mailer/candidate_submission.html.inky @@ -0,0 +1,6 @@ + + +

Candidate <%= @candidate.test_hash %> has completed the Skills Assessment Test.

+

You can view the results here: <%= link_to nil, review_test_url(@candidate.test_hash) %>.

+
+
\ No newline at end of file diff --git a/bower.json b/bower.json index f05a02e..34e7316 100644 --- a/bower.json +++ b/bower.json @@ -9,7 +9,8 @@ "jquery-validate": "", "tota11y": "", "modernizr-lite": "*", - "html5shiv": "^3.7.3" + "html5shiv": "^3.7.3", + "foundation-emails": "^2.2.1" }, "ignore": [ "**/.*", diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 3ef4dab..2cf352a 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -11,5 +11,5 @@ Rails.application.config.assets.version = '1.0' # Rails.application.config.assets.precompile += %w( search.js ) Rails.application.config.assets.precompile += ['vendor/assets/**/*'] - Rails.application.config.assets.precompile += %w(ie9.js) +Rails.application.config.assets.precompile += %w(mailers/foundation_vendor_manifest.scss)