Skip to:
Content

BuddyPress.org

Changeset 11785


Ignore:
Timestamp:
01/02/2018 05:12:20 PM (7 years ago)
Author:
djpaul
Message:

Emails: merge in updates from upstream template.

Fixes #7650

Location:
trunk/src/bp-templates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/assets/emails/single-bp-email.php

    r11784 r11785  
    2020The MIT License (MIT)
    2121
    22 Copyright (c) 2013 Ted Goas
     22Copyright (c) 2017 Ted Goas
    2323
    2424Permission is hereby granted, free of charge, to any person obtaining a copy of
     
    4545$settings = bp_email_get_appearance_settings();
    4646
    47 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    48 <html xmlns="http://www.w3.org/1999/xhtml">
     47?><!DOCTYPE html>
     48<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
    4949<head>
    5050    <meta charset="<?php echo esc_attr( get_bloginfo( 'charset' ) ); ?>">
    5151    <meta name="viewport" content="width=device-width"> <!-- Forcing initial-scale shouldn't be necessary -->
    5252    <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- Use the latest (edge) version of IE rendering engine -->
     53    <meta name="x-apple-disable-message-reformatting">  <!-- Disable auto-scale in iOS 10 Mail entirely -->
     54    <title></title> <!-- The title tag shows in email notifications, like Android 4.4. -->
    5355
    5456    <!-- CSS Reset -->
     
    7072        }
    7173
    72         /* What it does: Forces Outlook.com to display emails full width. */
    73         .ExternalClass {
    74             width: 100%;
    75         }
    76 
    7774        /* What is does: Centers email on Android 4.4 */
    7875        div[style*="margin: 16px 0"] {
     
    106103        }
    107104
    108         /* What it does: Overrides styles added when Yahoo's auto-senses a link. */
    109         .yshortcuts a {
    110             border-bottom: none !important;
    111         }
    112 
    113         /* What it does: A work-around for iOS meddling in triggered links. */
    114         a[x-apple-data-detectors] {
     105        /* What it does: A work-around for email clients meddling in triggered links. */
     106        *[x-apple-data-detectors],  /* iOS */
     107        .x-gmail-data-detectors,    /* Gmail */
     108        .x-gmail-data-detectors *,
     109        .aBn {
     110            border-bottom: 0 !important;
     111            cursor: default !important;
    115112            color: inherit !important;
    116             text-decoration: underline !important;
     113            text-decoration: none !important;
     114            font-size: inherit !important;
     115            font-family: inherit !important;
     116            font-weight: inherit !important;
     117            line-height: inherit !important;
     118        }
     119
     120        /* What it does: Prevents Gmail from displaying an download button on large, non-linked images. */
     121        .a6S {
     122            display: none !important;
     123            opacity: 0.01 !important;
     124        }
     125
     126        /* If the above doesn't work, add a .g-img class to any image in question. */
     127            img.g-img + div {
     128            display: none !important;
     129        }
     130
     131        /* What it does: Prevents underlining the button text in Windows 10 */
     132        .button-link {
     133            text-decoration: none !important;
    117134        }
    118135    </style>
    119136
    120137</head>
    121 <body class="email_bg" width="100%" height="100%" bgcolor="<?php echo esc_attr( $settings['email_bg'] ); ?>" style="Margin: 0;">
     138<body class="email_bg" width="100%" bgcolor="<?php echo esc_attr( $settings['email_bg'] ); ?>" style="margin: 0; mso-line-height-rule: exactly;">
    122139<table cellpadding="0" cellspacing="0" border="0" height="100%" width="100%" bgcolor="<?php echo esc_attr( $settings['email_bg'] ); ?>" style="border-collapse:collapse;" class="email_bg"><tr><td valign="top">
    123     <center style="width: 100%;">
     140    <center style="width: 100%; text-align: left;">
    124141
    125142        <!-- Visually Hidden Preheader Text : BEGIN -->
     
    129146        <!-- Visually Hidden Preheader Text : END -->
    130147
    131         <div style="max-width: 600px;">
    132             <!--[if (gte mso 9)|(IE)]>
    133             <table cellspacing="0" cellpadding="0" border="0" width="600" align="center">
     148        <div style="max-width: 600px; margin: auto;" class="email-container">
     149            <!--[if mso]>
     150            <table role="presentation" cellspacing="0" cellpadding="0" border="0" width="600" align="center">
    134151            <tr>
    135152            <td>
     
    137154
    138155            <!-- Email Header : BEGIN -->
    139             <table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 600px; border-top: 7px solid <?php echo esc_attr( $settings['highlight_color'] ); ?>" bgcolor="<?php echo esc_attr( $settings['header_bg'] ); ?>" class="header_bg">
     156            <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 600px; border-top: 7px solid <?php echo esc_attr( $settings['highlight_color'] ); ?>" bgcolor="<?php echo esc_attr( $settings['header_bg'] ); ?>" class="header_bg">
    140157                <tr>
    141158                    <td style="text-align: center; padding: 15px 0; font-family: sans-serif; mso-height-rule: exactly; font-weight: bold; color: <?php echo esc_attr( $settings['header_text_color'] ); ?>; font-size: <?php echo esc_attr( $settings['header_text_size'] . 'px' ); ?>" class="header_text_color header_text_size">
     
    163180
    164181            <!-- Email Body : BEGIN -->
    165             <table cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="<?php echo esc_attr( $settings['body_bg'] ); ?>" width="100%" style="max-width: 600px; border-radius: 5px;" class="body_bg">
     182            <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="<?php echo esc_attr( $settings['body_bg'] ); ?>" width="100%" style="max-width: 600px; border-radius: 5px;" class="body_bg">
    166183
    167184                <!-- 1 Column Text : BEGIN -->
    168185                <tr>
    169186                    <td>
    170                         <table cellspacing="0" cellpadding="0" border="0" width="100%">
     187                        <table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
    171188                            <tr>
    172189                                <td style="padding: 20px; font-family: sans-serif; mso-height-rule: exactly; line-height: <?php echo esc_attr( floor( $settings['body_text_size'] * 1.618 ) . 'px' ) ?>; color: <?php echo esc_attr( $settings['body_text_color'] ); ?>; font-size: <?php echo esc_attr( $settings['body_text_size'] . 'px' ); ?>" class="body_text_color body_text_size">
     
    186203            <!-- Email Footer : BEGIN -->
    187204            <br>
    188             <table cellspacing="0" cellpadding="0" border="0" align="left" width="100%" style="max-width: 600px; border-radius: 5px;" bgcolor="<?php echo esc_attr( $settings['footer_bg'] ); ?>" class="footer_bg">
     205            <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="left" width="100%" style="max-width: 600px; border-radius: 5px;" bgcolor="<?php echo esc_attr( $settings['footer_bg'] ); ?>" class="footer_bg">
    189206                <tr>
    190207                    <td style="padding: 20px; width: 100%; font-size: <?php echo esc_attr( $settings['footer_text_size'] . 'px' ); ?>; font-family: sans-serif; mso-height-rule: exactly; line-height: <?php echo esc_attr( floor( $settings['footer_text_size'] * 1.618 ) . 'px' ) ?>; text-align: left; color: <?php echo esc_attr( $settings['footer_text_color'] ); ?>;" class="footer_text_color footer_text_size">
     
    215232            <!-- Email Footer : END -->
    216233
    217             <!--[if (gte mso 9)|(IE)]>
     234            <!--[if mso]>
    218235            </td>
    219236            </tr>
  • trunk/src/bp-templates/bp-nouveau/buddypress/assets/emails/single-bp-email.php

    r11784 r11785  
    2020The MIT License (MIT)
    2121
    22 Copyright (c) 2013 Ted Goas
     22Copyright (c) 2017 Ted Goas
    2323
    2424Permission is hereby granted, free of charge, to any person obtaining a copy of
     
    4545$settings = bp_email_get_appearance_settings();
    4646
    47 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    48 <html xmlns="http://www.w3.org/1999/xhtml">
     47?><!DOCTYPE html>
     48<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
    4949<head>
    5050    <meta charset="<?php echo esc_attr( get_bloginfo( 'charset' ) ); ?>">
    5151    <meta name="viewport" content="width=device-width"> <!-- Forcing initial-scale shouldn't be necessary -->
    5252    <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- Use the latest (edge) version of IE rendering engine -->
     53    <meta name="x-apple-disable-message-reformatting">  <!-- Disable auto-scale in iOS 10 Mail entirely -->
     54    <title></title> <!-- The title tag shows in email notifications, like Android 4.4. -->
    5355
    5456    <!-- CSS Reset -->
     
    7072        }
    7173
    72         /* What it does: Forces Outlook.com to display emails full width. */
    73         .ExternalClass {
    74             width: 100%;
    75         }
    76 
    7774        /* What is does: Centers email on Android 4.4 */
    7875        div[style*="margin: 16px 0"] {
     
    106103        }
    107104
    108         /* What it does: Overrides styles added when Yahoo's auto-senses a link. */
    109         .yshortcuts a {
    110             border-bottom: none !important;
    111         }
    112 
    113         /* What it does: A work-around for iOS meddling in triggered links. */
    114         a[x-apple-data-detectors] {
     105        /* What it does: A work-around for email clients meddling in triggered links. */
     106        *[x-apple-data-detectors],  /* iOS */
     107        .x-gmail-data-detectors,    /* Gmail */
     108        .x-gmail-data-detectors *,
     109        .aBn {
     110            border-bottom: 0 !important;
     111            cursor: default !important;
    115112            color: inherit !important;
    116             text-decoration: underline !important;
     113            text-decoration: none !important;
     114            font-size: inherit !important;
     115            font-family: inherit !important;
     116            font-weight: inherit !important;
     117            line-height: inherit !important;
     118        }
     119
     120        /* What it does: Prevents Gmail from displaying an download button on large, non-linked images. */
     121        .a6S {
     122            display: none !important;
     123            opacity: 0.01 !important;
     124        }
     125
     126        /* If the above doesn't work, add a .g-img class to any image in question. */
     127            img.g-img + div {
     128            display: none !important;
     129        }
     130
     131        /* What it does: Prevents underlining the button text in Windows 10 */
     132        .button-link {
     133            text-decoration: none !important;
    117134        }
    118135    </style>
    119136
    120137</head>
    121 <body class="email_bg" width="100%" height="100%" bgcolor="<?php echo esc_attr( $settings['email_bg'] ); ?>" style="Margin: 0;">
     138<body class="email_bg" width="100%" bgcolor="<?php echo esc_attr( $settings['email_bg'] ); ?>" style="margin: 0; mso-line-height-rule: exactly;">
    122139<table cellpadding="0" cellspacing="0" border="0" height="100%" width="100%" bgcolor="<?php echo esc_attr( $settings['email_bg'] ); ?>" style="border-collapse:collapse;" class="email_bg"><tr><td valign="top">
    123     <center style="width: 100%;">
     140    <center style="width: 100%; text-align: left;">
    124141
    125142        <!-- Visually Hidden Preheader Text : BEGIN -->
     
    129146        <!-- Visually Hidden Preheader Text : END -->
    130147
    131         <div style="max-width: 600px;">
    132             <!--[if (gte mso 9)|(IE)]>
    133             <table cellspacing="0" cellpadding="0" border="0" width="600" align="center">
     148        <div style="max-width: 600px; margin: auto;" class="email-container">
     149            <!--[if mso]>
     150            <table role="presentation" cellspacing="0" cellpadding="0" border="0" width="600" align="center">
    134151            <tr>
    135152            <td>
     
    137154
    138155            <!-- Email Header : BEGIN -->
    139             <table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 600px; border-top: 7px solid <?php echo esc_attr( $settings['highlight_color'] ); ?>" bgcolor="<?php echo esc_attr( $settings['header_bg'] ); ?>" class="header_bg">
     156            <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 600px; border-top: 7px solid <?php echo esc_attr( $settings['highlight_color'] ); ?>" bgcolor="<?php echo esc_attr( $settings['header_bg'] ); ?>" class="header_bg">
    140157                <tr>
    141158                    <td style="text-align: center; padding: 15px 0; font-family: sans-serif; mso-height-rule: exactly; font-weight: bold; color: <?php echo esc_attr( $settings['header_text_color'] ); ?>; font-size: <?php echo esc_attr( $settings['header_text_size'] . 'px' ); ?>" class="header_text_color header_text_size">
     
    163180
    164181            <!-- Email Body : BEGIN -->
    165             <table cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="<?php echo esc_attr( $settings['body_bg'] ); ?>" width="100%" style="max-width: 600px; border-radius: 5px;" class="body_bg">
     182            <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="<?php echo esc_attr( $settings['body_bg'] ); ?>" width="100%" style="max-width: 600px; border-radius: 5px;" class="body_bg">
    166183
    167184                <!-- 1 Column Text : BEGIN -->
    168185                <tr>
    169186                    <td>
    170                         <table cellspacing="0" cellpadding="0" border="0" width="100%">
     187                        <table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%">
    171188                            <tr>
    172189                                <td style="padding: 20px; font-family: sans-serif; mso-height-rule: exactly; line-height: <?php echo esc_attr( floor( $settings['body_text_size'] * 1.618 ) . 'px' ) ?>; color: <?php echo esc_attr( $settings['body_text_color'] ); ?>; font-size: <?php echo esc_attr( $settings['body_text_size'] . 'px' ); ?>" class="body_text_color body_text_size">
     
    186203            <!-- Email Footer : BEGIN -->
    187204            <br>
    188             <table cellspacing="0" cellpadding="0" border="0" align="left" width="100%" style="max-width: 600px; border-radius: 5px;" bgcolor="<?php echo esc_attr( $settings['footer_bg'] ); ?>" class="footer_bg">
     205            <table role="presentation" cellspacing="0" cellpadding="0" border="0" align="left" width="100%" style="max-width: 600px; border-radius: 5px;" bgcolor="<?php echo esc_attr( $settings['footer_bg'] ); ?>" class="footer_bg">
    189206                <tr>
    190207                    <td style="padding: 20px; width: 100%; font-size: <?php echo esc_attr( $settings['footer_text_size'] . 'px' ); ?>; font-family: sans-serif; mso-height-rule: exactly; line-height: <?php echo esc_attr( floor( $settings['footer_text_size'] * 1.618 ) . 'px' ) ?>; text-align: left; color: <?php echo esc_attr( $settings['footer_text_color'] ); ?>;" class="footer_text_color footer_text_size">
     
    215232            <!-- Email Footer : END -->
    216233
    217             <!--[if (gte mso 9)|(IE)]>
     234            <!--[if mso]>
    218235            </td>
    219236            </tr>
Note: See TracChangeset for help on using the changeset viewer.