New welcome email (#28883)
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
This commit is contained in:
parent
3389c41b58
commit
934cab7508
102 changed files with 619 additions and 318 deletions
|
@ -1,4 +1,7 @@
|
|||
%table.email-btn-table{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||
%tr
|
||||
%td.email-btn-td
|
||||
= link_to "#{text} ➜", url, class: 'email-btn-a email-btn-hover'
|
||||
- if defined?(has_arrow) && !has_arrow
|
||||
= link_to text, url, class: 'email-btn-a email-btn-hover'
|
||||
- else
|
||||
= link_to "#{text} ➜", url, class: 'email-btn-a email-btn-hover'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%table.email-w-full.email-checklist-wrapper-table{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||
%tr
|
||||
%td.email-checklist-wrapper-td
|
||||
%table.email-w-full.email-checklist-table{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||
%table.email-w-full.email-checklist-table{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation', class: ('email-checklist-checked' if defined?(checked) && checked) }
|
||||
%tr
|
||||
%td.email-checklist-td
|
||||
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||
|
@ -15,15 +15,25 @@
|
|||
- else
|
||||
= image_tag frontend_asset_url('images/mailer-new/welcome/checkbox-off.png'), alt: '', width: 20, height: 20
|
||||
%td.email-checklist-icons-step-td
|
||||
- if defined?(step_image_url)
|
||||
= image_tag step_image_url, alt: '', width: 40, height: 40
|
||||
- if defined?(key)
|
||||
= image_tag frontend_asset_url("images/mailer-new/welcome/#{key}-#{checked ? 'on' : 'off'}.png"), alt: '', width: 40, height: 40
|
||||
%td.email-checklist-text-td
|
||||
.email-desktop-flex
|
||||
/[if mso]
|
||||
<table border="0" cellpadding="0" cellspacing="0" align="center" style="width:100%;" role="presentation"><tr><td vertical-align:top;">
|
||||
%div
|
||||
- if defined?(title)
|
||||
%h3= title
|
||||
- if defined?(text)
|
||||
%p= text
|
||||
/[if mso]
|
||||
</td><td style="vertical-align:top;">
|
||||
%div
|
||||
- if defined?(button_text) && defined?(button_url) && defined?(checked) && !checked
|
||||
= render 'application/mailer/button', text: button_text, url: button_url
|
||||
- if defined?(show_apps_buttons) && show_apps_buttons
|
||||
.email-welcome-apps-btns
|
||||
= link_to image_tag(frontend_asset_url('images/mailer-new/welcome/btn-app-store.png'), alt: t('user_mailer.welcome.apps_ios_action'), width: 120, height: 40), 'https://apps.apple.com/app/mastodon-for-iphone-and-ipad/id1571998974'
|
||||
= link_to image_tag(frontend_asset_url('images/mailer-new/welcome/btn-google-play.png'), alt: t('user_mailer.welcome.apps_android_action'), width: 120, height: 40), 'https://play.google.com/store/apps/details?id=org.joinmastodon.android'
|
||||
- elsif defined?(button_text) && defined?(button_url) && defined?(checked) && !checked
|
||||
= render 'application/mailer/button', text: button_text, url: button_url, has_arrow: false
|
||||
/[if mso]
|
||||
</td></tr></table>
|
||||
|
|
32
app/views/application/mailer/_feature.html.haml
Normal file
32
app/views/application/mailer/_feature.html.haml
Normal file
|
@ -0,0 +1,32 @@
|
|||
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||
%tr
|
||||
%td.email-feature-wrapper-td
|
||||
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||
%tr
|
||||
%td.email-feature-td
|
||||
.email-desktop-flex{ class: ('email-dir-rtl' if defined?(text_first_on_desktop) && !text_first_on_desktop) }
|
||||
/[if mso]
|
||||
<table border="0" cellpadding="0" cellspacing="0" align="center" style="width:100%;" role="presentation"><tr><td style="width:50%; vertical-align:top;">
|
||||
.email-desktop-column
|
||||
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||
%tr
|
||||
%td.email-column-td
|
||||
- if defined?(feature_title)
|
||||
%h2.email-h2= feature_title
|
||||
- if defined?(feature_text)
|
||||
%p.email-p= feature_text
|
||||
- if defined?(feature_btn_url)
|
||||
= link_to '', href: feature_btn_url, class: 'email-link-with-arrow' do
|
||||
#{t('user_mailer.welcome.feature_action')}
|
||||
%span= '❯'
|
||||
/[if mso]
|
||||
</td><td style="width:50%; vertical-align:top;">
|
||||
.email-desktop-column
|
||||
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||
%tr
|
||||
%td.email-column-td
|
||||
- if defined?(key)
|
||||
%p{ class: ('email-desktop-text-right' if defined?(text_first_on_desktop) && text_first_on_desktop) }
|
||||
= image_tag frontend_asset_url("images/mailer-new/welcome/#{key}.png"), alt: '', width: 240, height: 230
|
||||
/[if mso]
|
||||
</td></tr></table>
|
15
app/views/application/mailer/_follow.html.haml
Normal file
15
app/views/application/mailer/_follow.html.haml
Normal file
|
@ -0,0 +1,15 @@
|
|||
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||
%tr
|
||||
%td.email-mini-wrapper-td
|
||||
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||
%tr
|
||||
%td.email-mini-td
|
||||
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||
%tr
|
||||
%td.email-mini-follow-img-td
|
||||
= image_tag full_asset_url(follow.account.avatar.url), alt: '', width: 40, height: 40
|
||||
%td.email-mini-follow-text-td
|
||||
%h3= follow.account.display_name.presence || follow.account.username
|
||||
%p @#{follow.account.pretty_acct}
|
||||
%td.email-mini-follow-btn-td
|
||||
= render 'application/mailer/button', text: t('user_mailer.welcome.follow_action'), url: web_url("@#{follow.account.acct}"), has_arrow: false
|
20
app/views/application/mailer/_hashtag.html.haml
Normal file
20
app/views/application/mailer/_hashtag.html.haml
Normal file
|
@ -0,0 +1,20 @@
|
|||
- accounts = hashtag.statuses.with_public_visibility.joins(:account).merge(Account.without_suspended.without_silenced).includes(:account).limit(3).map(&:account)
|
||||
|
||||
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||
%tr
|
||||
%td.email-mini-wrapper-td
|
||||
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||
%tr
|
||||
%td.email-mini-td
|
||||
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||
%tr
|
||||
%td.email-mini-hashtag-td{ height: 40 }
|
||||
%h3 ##{hashtag.display_name}
|
||||
%table.email-w-full{ cellspacing: 0, cellpadding: 0, border: 0, role: 'presentation' }
|
||||
%tr
|
||||
%td.email-mini-hashtag-img-td
|
||||
- accounts.each do |account|
|
||||
%span.email-mini-hashtag-img-span
|
||||
= image_tag full_asset_url(account.avatar.url), alt: '', width: 16, height: 16
|
||||
%td
|
||||
%p= t('user_mailer.welcome.hashtags_recent_count', people: number_with_delimiter(hashtag.history.aggregate(2.days.ago.to_date..Time.zone.today).accounts), days: 2)
|
Loading…
Add table
Add a link
Reference in a new issue