From 996fbe51d0eda5725583e0af930bc0d00ce5be41 Mon Sep 17 00:00:00 2001 From: Nuwan Date: Fri, 1 Nov 2024 20:18:05 +0530 Subject: [PATCH] new email template chages this email template is used for the emails with the new design which is used in the beta site. --- .../user_mailer/new_musicians_match.html.erb | 183 ++++++++---------- .../views/layouts/user_mailer_beta.html.erb | 96 +++++---- web/Gemfile.alt | 2 + web/app/assets/images/email/fb-icon.svg | 9 + .../assets/images/email/instagram-icon.svg | 28 +++ web/app/assets/images/email/linkedin-icon.svg | 10 + web/app/assets/images/email/tiktok-icon.svg | 10 + .../assets/images/email/twitter-x-icon.svg | 13 ++ web/app/assets/images/email/youtube-icon.svg | 7 + web/config/environments/development.rb | 2 + 10 files changed, 220 insertions(+), 140 deletions(-) create mode 100755 web/app/assets/images/email/fb-icon.svg create mode 100755 web/app/assets/images/email/instagram-icon.svg create mode 100755 web/app/assets/images/email/linkedin-icon.svg create mode 100755 web/app/assets/images/email/tiktok-icon.svg create mode 100755 web/app/assets/images/email/twitter-x-icon.svg create mode 100755 web/app/assets/images/email/youtube-icon.svg diff --git a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/new_musicians_match.html.erb b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/new_musicians_match.html.erb index abc7a4c80..9662fdf67 100644 --- a/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/new_musicians_match.html.erb +++ b/ruby/lib/jam_ruby/app/views/jam_ruby/user_mailer/new_musicians_match.html.erb @@ -1,24 +1,75 @@ - -
- -

- Hi <%= @user.first_name -%>, -

-

- The following musicians have joined JamKazam within the last week and have low internet - latency to you that will support enjoyable sessions. If you'd like to make more musical connections, - we encourage you to use the links below to send these new users a welcome message and - perhaps arrange a session to play together. -

- <% - @musicians_data.each do | data | -%> - <% - musicians = data[:musicians] - latencies = data[:latencies] - musicians.each do |musician| - latency = latencies.find{|l| l[:user_id] == musician.id } - -%> -
-
- <%= image_tag musician.photo_url.blank?? "avatar.png" : musician.photo_url, height: '32', width: '32', host: APP_CONFIG.action_mailer.assets_host -%> -
-
-
<%= musician.first_name %> <%= musician.last_name %>
-
Latency To You: <%= latency_info(latency) %>
- <% if musician.last_active_timestamp -%> -
Last Active On: <%= time_ago_in_words(Time.at(musician.last_active_timestamp)) %> ago
- <% end -%> -
-
- <% musician.musician_instruments.each do |mi| -%> -
- <%= mi.description %>: <%= @instrument_proficiencies[mi.proficiency_level.to_s.to_sym] %> -
- <% end -%> -
- -
- <% end -%> - <% end -%> -
-

- To find great musical matches across the entire JamKazam commiunity and make new connections, use the button below to access our musician search feature. - This let you filter JamKazammers by latency, instruments, skill level, genre interests, last active day and more. -

-
- -
\ No newline at end of file + transition: color 0.15s ease-in-out, + background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, + box-shadow 0.15s ease-in-out; + " + >Search JamKazam Musicians + \ No newline at end of file diff --git a/ruby/lib/jam_ruby/app/views/layouts/user_mailer_beta.html.erb b/ruby/lib/jam_ruby/app/views/layouts/user_mailer_beta.html.erb index f226c6b54..d5417be56 100644 --- a/ruby/lib/jam_ruby/app/views/layouts/user_mailer_beta.html.erb +++ b/ruby/lib/jam_ruby/app/views/layouts/user_mailer_beta.html.erb @@ -1,38 +1,64 @@ - - - - - JamKazam + + + + + + JamKazam + + +
+
+
+ " alt="JamKazam" /> +
- - - - - - <%= yield -%> - - +
+ +
+ + + \ No newline at end of file diff --git a/web/Gemfile.alt b/web/Gemfile.alt index 24664efa5..df438d16e 100644 --- a/web/Gemfile.alt +++ b/web/Gemfile.alt @@ -159,6 +159,8 @@ gem 'logging', '1.7.2' gem 'rack-cors', '~> 1.0', '>= 1.0.6' +gem 'mailcatcher' + if ENV['FASTER_PATH'] == '1' # https://github.com/danielpclark/faster_path diff --git a/web/app/assets/images/email/fb-icon.svg b/web/app/assets/images/email/fb-icon.svg new file mode 100755 index 000000000..60f41bfbb --- /dev/null +++ b/web/app/assets/images/email/fb-icon.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/web/app/assets/images/email/instagram-icon.svg b/web/app/assets/images/email/instagram-icon.svg new file mode 100755 index 000000000..754b285b1 --- /dev/null +++ b/web/app/assets/images/email/instagram-icon.svg @@ -0,0 +1,28 @@ + + + + + + + + + diff --git a/web/app/assets/images/email/linkedin-icon.svg b/web/app/assets/images/email/linkedin-icon.svg new file mode 100755 index 000000000..41fd6d1d1 --- /dev/null +++ b/web/app/assets/images/email/linkedin-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/web/app/assets/images/email/tiktok-icon.svg b/web/app/assets/images/email/tiktok-icon.svg new file mode 100755 index 000000000..8d0b1a99f --- /dev/null +++ b/web/app/assets/images/email/tiktok-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/web/app/assets/images/email/twitter-x-icon.svg b/web/app/assets/images/email/twitter-x-icon.svg new file mode 100755 index 000000000..b46e5f7dc --- /dev/null +++ b/web/app/assets/images/email/twitter-x-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/web/app/assets/images/email/youtube-icon.svg b/web/app/assets/images/email/youtube-icon.svg new file mode 100755 index 000000000..1aeb81fba --- /dev/null +++ b/web/app/assets/images/email/youtube-icon.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/web/config/environments/development.rb b/web/config/environments/development.rb index 7ae4c4ef4..0c8e8bd91 100644 --- a/web/config/environments/development.rb +++ b/web/config/environments/development.rb @@ -26,6 +26,8 @@ SampleApp::Application.configure do # Don't care if the mailer can't send config.action_mailer.raise_delivery_errors = false + config.action_mailer.delivery_method = :smtp + config.action_mailer.smtp_settings = { address: '127.0.0.1', port: 1025, domain: '127.0.0.1' } # Print deprecation notices to the Rails logger config.active_support.deprecation = :log