!!!

%html

  = render 'layouts/email_head'

  %body

    %table{:cellspacing => "0", :border => "0", :height => "100%", :bgcolor => "#ffffff", :cellpadding => "0", :width => "100%"}
      %tbody>
        %tr
          %td{:align => "center", :valign => "top"}
            %table{:cellspacing => "0", :cellpadding => "0", :width => "400"}
              %tbody
                - if @community
                  %tr
                    %td{:align => "left", :style => "padding-top: 20px; padding-bottom: 5px; border-bottom:1px dotted grey;"}
                      %font{:size => 5, :color => "grey", :face => "font-family:Helvetica Neue, Arial, Helvetica, Arial, sans-serif;", :style => "font-size:20px;line-height:28px;"}
                        = @community.full_name(I18n.locale)
                - if @recipient && ! @no_recipient_name
                  %tr
                    %td{:align => "left", :style => "padding-top: 20px; padding-bottom: 10px;"}
                      %font{body_font}
                        = t("emails.common.hey", :name => PersonViewUtils.person_display_name_for_type(@recipient, "first_name_only"))


                %span{id: SecureRandom.hex}
                  = yield

                - if @show_branding_info
                  = render :partial => "layouts/email_non_whitelabel_branding", locals: {link_to_sharetribe: "https://www.sharetribe.com/?utm_source=#{@current_community.ident}.sharetribe.com&utm_medium=email&utm_campaign=nowl-emails-auto"}
                - skip_unsubscribe_footer ||= false
                - if @recipient && @url_params && !skip_unsubscribe_footer
                  %tr
                    %td{:align => "left",  :style => "padding-top: 10px; padding-bottom: 30px;border-top:1px dotted grey;"}
                      %font{:size => 3, :color => "gray", :face => "font-family:Helvetica Neue, Arial, Helvetica, Arial, sans-serif;", :style => "font-size:12px;"}
                        = t("emails.welcome_email.welcome_email_footer_text", :settings_link => link_to(t("emails.welcome_email.settings_link_text"), notifications_person_settings_url(@recipient, @url_params))).html_safe
                        - if @email_type
                          = t("emails.common.or")
                          = link_to(t("emails.common.unsubscribe_from_these_emails"), unsubscribe_person_settings_url(@recipient, @url_params.merge({email_type: @email_type, auth: @unsubscribe_token}))) + "."
