Initial commit: Atomaste website

This commit is contained in:
2025-12-10 12:17:30 -05:00
commit 0b9e5d1605
19260 changed files with 5206382 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'burst_email_block' ) ) {
class burst_email_block {
public $title = '';
public $message = '';
public $url = '';
public function __construct() {
}
/**
* @return array
*/
public function get(): array {
return array(
'title' => $this->title,
'message' => $this->message,
'url' => $this->url,
);
}
}
}

View File

@@ -0,0 +1,338 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Class to send an e-mail
*/
if ( ! class_exists( 'burst_mail_reports' ) ) {
class burst_mail_reports {
public function __construct() {
add_action( 'burst_every_hour', [ $this, 'maybe_send_report' ] );
add_action( 'admin_init', [ $this, 'test_report' ] );
}
public function test_report() {
if ( ! isset( $_GET['burst_test_report'] ) ) {
return;
}
$frequency = $_GET['burst_test_report'] === 'monthly' ? 'monthly' : 'weekly';
$mailinglist = burst_get_option( 'email_reports_mailinglist' );
$emails = array();
foreach ( $mailinglist as $mailing ) {
if ( isset( $mailing['email'] ) ) {
$emails[] = $mailing['email'];
}
}
$this->send_report( $emails, $frequency );
}
/**
* @return void
*/
public function maybe_send_report(): void {
$last_report_sent = get_option( 'burst_last_report_sent' );
if ( $last_report_sent && time() - $last_report_sent < DAY_IN_SECONDS ) {
return;
}
$mailinglist = burst_get_option( 'email_reports_mailinglist' );
$mailinglist = is_array( $mailinglist ) ? $mailinglist : array();
$monthly_list = array();
$weekly_list = array();
foreach ( $mailinglist as $mailing ) {
if ( $mailing['frequency'] === 'monthly' ) {
$monthly_list[] = $mailing['email'];
} else {
$weekly_list[] = $mailing['email'];
}
}
// check if it is 08:00 and before 20:00, so you will receive the email in the morning
if ( date( 'H' ) >= 8 && date( 'H' ) < 20 ) {
// check if it is the first day of the week
$first_day_of_week = (int) get_option( 'start_of_week' ); // 1 = Monday, 0 = Sunday
if ( (int) date( 'N' ) === $first_day_of_week ) {
$this->send_report( $weekly_list, 'weekly' );
}
// check if it is the first day of the month
if ( (int) date( 'd' ) === 1 ) {
$this->send_report( $monthly_list, 'monthly' );
}
}
}
/**
* @param array $mailinglist
* @param string $frequency
*
* @return void
*/
private function send_report( $mailinglist, $frequency = 'weekly' ) {
global $wpdb;
require_once burst_path . 'mailer/class-mailer.php';
$mailer = new burst_mailer();
$mailer->to = $mailinglist;
if ( $frequency === 'monthly' ) {
$mailer->subject = sprintf( _x( 'Your monthly insights for %s are here!', 'domain name', 'burst-statistics' ), $mailer->pretty_domain );
$mailer->title = sprintf( _x( 'Your monthly insights for %s are here!', 'domain name', 'burst-statistics' ), '<br /><span style="font-size: 30px; font-weight: 700">' . $mailer->pretty_domain . '</span><br />' );
$mailer->message = ''; // start date - end date
// last month first and last day
$start = date( 'Y-m-01', strtotime( 'last month' ) );
$end = date( 'Y-m-t', strtotime( 'last month' ) );
// second to last month first and last day
$compare_start = date( 'Y-m-01', strtotime( '2 months ago' ) );
$compare_end = date( 'Y-m-t', strtotime( '2 months ago' ) );
// convert to correct unix
$date_start = BURST()->statistics->convert_date_to_unix( $start . ' 00:00:00' );
$date_end = BURST()->statistics->convert_date_to_unix( $end . ' 23:59:59' );
$compare_date_start = BURST()->statistics->convert_date_to_unix( $compare_start . ' 00:00:00' );
$compare_date_end = BURST()->statistics->convert_date_to_unix( $compare_end . ' 23:59:59' );
$wp_date_format = get_option( 'date_format' );
$mailer->message = sprintf( __( 'This report covers the period from %s to %s.', 'burst-statistics' ), date_i18n( $wp_date_format, $date_start ), date_i18n( $wp_date_format, $date_end ) );
} else {
$mailer->subject = sprintf( _x( 'Your weekly insights for %s are here!', 'domain name', 'burst-statistics' ), $mailer->pretty_domain );
$mailer->title = sprintf( _x( 'Your weekly insights for %s are here!', 'domain name', 'burst-statistics' ), '<br /><span style="font-size: 30px; font-weight: 700">' . $mailer->pretty_domain . '</span><br />' );
$week_start = (int) get_option( 'start_of_week' ); // 0 = Sunday, 1 = Monday, etc.
$weekdays = array( 'sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday' );
// last week first and last day based on wp start of the week
$start = date( 'Y-m-d', strtotime( 'last ' . $weekdays[ $week_start ] ) );
$end = date( 'Y-m-d', strtotime( 'last ' . $weekdays[ $week_start ] . ' +6 days' ) );
// if end is in the future we need to adjust both start and end to substract 7 days
if ( strtotime( $end ) > time() ) {
$start = date( 'Y-m-d', strtotime( 'last ' . $weekdays[ $week_start ] . ' -7 days' ) );
$end = date( 'Y-m-d', strtotime( 'last ' . $weekdays[ $week_start ] . ' -1 days' ) );
}
// second to last week first and last day based on wp start of the week
$compare_start = date( 'Y-m-d', strtotime( 'last ' . $weekdays[ $week_start ] . ' -14 days' ) );
$compare_end = date( 'Y-m-d', strtotime( 'last ' . $weekdays[ $week_start ] . ' -8 days' ) );
// convert to correct unix
$date_start = BURST()->statistics->convert_date_to_unix( $start . ' 00:00:00' );
$date_end = BURST()->statistics->convert_date_to_unix( $end . ' 23:59:59' );
$compare_date_start = BURST()->statistics->convert_date_to_unix( $compare_start . ' 00:00:00' );
$compare_date_end = BURST()->statistics->convert_date_to_unix( $compare_end . ' 23:59:59' );
$wp_date_format = get_option( 'date_format' );
$mailer->message = date_i18n( $wp_date_format, $date_start ) . ' - ' . date_i18n( $wp_date_format, $date_end );
}
$args = array(
'date_start' => $date_start,
'date_end' => $date_end,
'compare_date_start' => $compare_date_start,
'compare_date_end' => $compare_date_end,
);
$compare_data = BURST()->statistics->get_compare_data( $args );
// For current bounced sessions percentage calculation
if ( ( $compare_data['current']['sessions'] + $compare_data['current']['bounced_sessions'] ) > 0 ) {
$compare_data['current']['bounced_sessions'] = round(
$compare_data['current']['bounced_sessions'] /
( $compare_data['current']['sessions'] + $compare_data['current']['bounced_sessions'] ) * 100,
1
);
} else {
// Handle the case where the division would be by zero, for example, set to 0 or another default value
$compare_data['current']['bounced_sessions'] = 0; // or another appropriate value or handling
}
// For previous bounced sessions percentage calculation
if ( ( $compare_data['previous']['sessions'] + $compare_data['previous']['bounced_sessions'] ) > 0 ) {
$compare_data['previous']['bounced_sessions'] = round(
$compare_data['previous']['bounced_sessions'] /
( $compare_data['previous']['sessions'] + $compare_data['previous']['bounced_sessions'] ) * 100,
1
);
} else {
// Similarly, handle the case where the division would be by zero
$compare_data['previous']['bounced_sessions'] = 0; // or another appropriate value or handling
}
$types = array( 'pageviews', 'sessions', 'visitors', 'bounced_sessions' );
$compare = array();
foreach ( $types as $type ) {
$compare[] = $this->get_compare_row( $type, $compare_data );
}
$sql = BURST()->statistics->get_sql_table(
$args['date_start'],
$args['date_end'],
array(
'page_url',
'pageviews',
),
[],
'page_url',
'pageviews DESC'
);
$results = $wpdb->get_results( $sql, ARRAY_A );
// max five urls
$results = array_slice( $results, 0, 5 );
$urls = array(
'header' => array( __( 'Page', 'burst-statistics' ), __( 'Pageviews', 'burst-statistics' ) ),
);
foreach ( $results as $index => $row ) {
$urls[] = array( $row['page_url'], $row['pageviews'] );
}
$refferers_sql = BURST()->statistics->get_sql_table(
$args['date_start'],
$args['date_end'],
array(
'referrer',
'pageviews',
),
[],
'referrer',
'pageviews DESC'
);
$refferers_data = $wpdb->get_results( $refferers_sql, ARRAY_A );
// max five referrers
$refferers_data = array_slice( $refferers_data, 0, 5 );
$referrers = array(
'header' => array( __( 'Referrers', 'burst-statistics' ), __( 'Pageviews', 'burst-statistics' ) ),
);
foreach ( $refferers_data as $index => $row ) {
if ( $row['referrer'] !== 'Direct' ) {
$referrers[] = array( $row['referrer'], $row['pageviews'] );
}
}
update_option( 'burst_last_report_sent', time(), false );
$blocks = array(
[
'title' => __( 'Compare', 'burst-statistics' ),
'subtitle' => $frequency === 'weekly' ? __( 'vs. previous week', 'burst-statistics' ) : __( 'vs. previous month', 'burst-statistics' ),
'table' => $this->format_array_as_table( $compare ),
'url' => burst_admin_url( 'burst#statistics' ),
],
[
'title' => __( "Most visited pages", "burst-statistics" ),
'table' => $this->format_array_as_table( $urls ),
'url' => burst_admin_url( 'burst#statistics' ),
],
[
'title' => __( "Top referrers", "burst-statistics" ),
'table' => $this->format_array_as_table( $referrers ),
'url' => burst_admin_url( 'burst#statistics' ),
],
);
$blocks = apply_filters( 'burst_mail_reports_blocks', $blocks, $args['date_start'], $args['date_end'] );
$mailer->blocks = $blocks;
$attachment_id = burst_get_option( 'logo_attachment_id' );
if ( (int) $attachment_id > 0 ) {
$mailer->logo = wp_get_attachment_url( $attachment_id );
}
$mailer->send_mail_queue();
}
private function get_compare_row( $type, $compare_data ) {
$data = array(
'pageviews' => array(
'title' => __( 'Pageviews', 'burst-statistics' ),
),
'sessions' => array(
'title' => __( 'Sessions', 'burst-statistics' ),
),
'visitors' => array(
'title' => __( 'Visitors', 'burst-statistics' ),
),
'bounced_sessions' => array(
'title' => __( 'Bounce rate', 'burst-statistics' ),
),
);
$current = $compare_data['current'][ $type ];
$previous = $compare_data['previous'][ $type ];
$uplift = BURST()->statistics->calculate_uplift( $current, $previous );
$color = $uplift >= 0 ? '#2e8a37' : '#d7263d';
if ( $type === 'bounced_sessions' ) {
$color = $uplift > 0 ? '#d7263d' : '#2e8a37';
// add % after bounce rate
$current = $current . '%';
}
$uplift = $uplift > 0 ? '+' . $uplift : $uplift;
return array(
$data[ $type ]['title'],
'<span style="font-size: 13px; color: ' . esc_attr( $color ) . '">' . esc_html( $uplift ) . '%</span>&nbsp;' . '<span>' . esc_html( $current ) . '</span>',
);
}
/**
* @param array $array
* @param array $header
*
* @return string
*/
public function format_array_as_table( array $array ): string {
$html = '';
if ( isset( $array['header'] ) ) {
$row = $array['header'];
$html .= '<tr style="line-height: 32px">';
$first_row = true;
foreach ( $row as $column ) {
if ( $first_row ) {
$html .= '<th style="text-align: left; font-size: 14px; font-weight: 400">' . $column . '</th>';
} else {
$html .= '<th style="text-align: right; font-size: 14px; font-weight: 400">' . $column . '</th>';
}
$first_row = false;
}
$html .= '</tr>';
unset( $array['header'] );
}
foreach ( $array as $row ) {
$html .= '<tr style="line-height: 32px">';
$first_row = true;
foreach ( $row as $column ) {
if ( $first_row ) {
// max 45 characters add ...
if ( $column === null ) {
$column = __( 'Direct', 'burst-statistics' );
}
if ( ! is_numeric( $column ) ) {
if ( strlen( $column ) > 35 ) {
$column = substr( $column, 0, 35 ) . '...';
}
}
$html .= '<td style="width: fit-content; text-align: left;">' . $column . '</td>';
} else {
$html .= '<td style="width: fit-content; text-align: right;">' . $column . '</td>';
}
$first_row = false;
}
$html .= '</tr>';
}
return $html;
}
}
}

View File

@@ -0,0 +1,203 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Class to send an e-mail
*/
if ( ! class_exists( 'burst_mailer' ) ) {
class burst_mailer {
public $logo;
public $to;
public $pretty_domain;
public $domain;
public $title;
public $subtitle;
public $headers;
public $message;
public $subject;
public $read_more;
public $button_text;
public $change_text;
public $sent_to_text;
public $what_now_text;
public $sent_by_text;
public $blocks;
public $error = '';
public $template_filename;
public $block_template_filename;
public $read_more_template_filename;
public function __construct() {
$this->pretty_domain = preg_replace( '/^https?:\/\//', '', site_url() );
$this->domain = '<a class="burst-intro-url" href="' . site_url() . '">' . $this->pretty_domain . '</a>';
$this->logo = burst_url . '/assets/img/burst-email-logo.png';
$this->sent_by_text = __( 'This e-mail is sent from your own WordPress website, which is:', 'burst-statistics' ) . ' ' . $this->pretty_domain . '.' . '<br />' .
__( "If you don't want to receive these e-mails in your inbox, please go to the Burst settings page on your website and disable the email report setting or contact the administrator of your website.", 'burst-statistics' );
$this->subject = sprintf( _x( "Your weekly insights for %s are here!", 'domain name', 'burst-statistics' ), $this->pretty_domain );
$this->button_text = __( 'See full report', 'burst-statistics' );
$this->title = sprintf( _x( "Your weekly insights for %s are here!", 'domain name', 'burst-statistics' ), '<br /><span style="font-size: 30px; font-weight: 700">' . $this->pretty_domain . '</span><br />' );
$this->what_now_text = __( 'Learn more', 'burst-statistics' );
$this->sent_to_text = __( 'This email was sent to', 'burst-statistics' );
$this->change_text = __( 'Why did I receive this email?', 'burst-statistics' );
$this->block_template_filename = apply_filters( 'burst_email_block_template', burst_path . '/mailer/templates/block.html' );
$this->read_more_template_filename = apply_filters( 'burst_email_readmore_template', burst_path . '/mailer/templates/read-more.html' );
$this->template_filename = apply_filters( 'burst_email_template', burst_path . '/mailer/templates/email.html' );
$this->message = '';
$read_more_template = file_get_contents( $this->read_more_template_filename );
$this->read_more = str_replace(
[
'{title}',
'{message}',
'{read_more_url}',
'{read_more_text}',
],
[
__( 'Find out more', 'burst-statistics' ),
sprintf( __( 'Dive deeper into your analytics and uncover new opportunities for %s.', 'burst-statistics' ), $this->pretty_domain ),
burst_admin_url( 'burst#statistics' ),
__( 'Explore your insights', 'burst-statistics' ),
],
$read_more_template
);
add_action( 'wp_mail_failed', [ $this, 'log_mailer_errors' ], 10, 1 );
}
public function log_mailer_errors( $wp_error ): void {
if ( is_wp_error( $wp_error ) ) {
$this->error = $wp_error->get_error_message();
}
}
/**
* Send an e-mail to all recipients
*
* @return void
*/
public function send_mail_queue() {
$to = $this->to;
if ( ! is_array( $to ) ) {
$to = [ $to ];
}
// max 10
$to = array_slice( $to, 0, 10 );
foreach ( $to as $email ) {
if ( ! is_email( $email ) ) {
continue;
}
$this->send_mail( $email );
}
}
/**
* Send an e-mail with the correct login URL
*
* @return array
*/
public function send_mail( $to ): array {
if ( empty( $this->message ) || empty( $this->subject ) ) {
$this->error = __( 'Email could not be sent. No message or subject set.', 'burst-statistics' );
}
if ( ! is_email( $to ) ) {
$this->error = __( 'Email address not valid', 'burst-statistics' );
}
$template = file_get_contents( $this->template_filename );
$block_html = '';
if ( is_array( $this->blocks ) && count( $this->blocks ) > 0 ) {
$block_template = file_get_contents( $this->block_template_filename );
foreach ( $this->blocks as $block ) {
// make sure all values are set
$block = wp_parse_args(
$block,
[
'title' => '',
'subtitle' => '',
'table' => '',
'url' => '',
]
);
$block_html .= str_replace(
array( '{title}', '{subtitle}', '{table}', '{url}' ),
array(
sanitize_text_field( $block['title'] ),
sanitize_text_field( $block['subtitle'] ),
wp_kses_post( $block['table'] ),
esc_url_raw( $block['url'] ),
),
$block_template
);
}
}
$username = burst_get_option( 'new_admin_user_login' );
$login_url = wp_login_url();
$body = str_replace(
array(
'{title}',
'{logo}',
'{message}',
'{warnings}',
'{read_more}',
'{email-address}',
'{learn-more}',
'{site_url}',
'{login_url}',
'{username}',
'{change_text}',
'{what_now}',
'{sent_to_text}',
'{sent_by_text}',
'{domain}',
),
array(
$this->title,
$this->logo,
wp_kses_post( $this->message ),
$block_html,
$this->read_more,
$to,
$this->button_text,
site_url(),
$login_url,
$username,
$this->change_text,
$this->what_now_text,
$this->sent_to_text,
$this->sent_by_text,
site_url(),
),
$template
);
$success = wp_mail( $to, sanitize_text_field( $this->subject ), $body, [ 'Content-Type: text/html; charset=UTF-8' ] );
if ( $success ) {
return array(
'success' => true,
'title' => __( 'Email verification', 'burst-statistics' ),
'message' => __( 'Email sent! Please check your mail', 'burst-statistics' ),
);
}
if ( empty( $this->error ) ) {
$this->error = __( 'Email could not be sent.', 'burst-statistics' );
} else {
$this->error = __( 'An error occurred:', 'burst-statistics' ) . '<br>' . $this->error;
}
return array(
'success' => false,
'title' => __( 'Email notification error', 'burst-statistics' ),
'message' => $this->error,
);
}
}
}

View File

@@ -0,0 +1 @@
<?php // You don't belong here.

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) Cosmin Popovici
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,255 @@
<!DOCTYPE html>
<html lang="en" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta charset="utf-8">
<meta name="x-apple-disable-message-reformatting">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no, url=no">
<meta name="color-scheme" content="light dark">
<meta name="supported-color-schemes" content="light dark">
<!--[if mso]>
<noscript>
<xml>
<o:OfficeDocumentSettings xmlns:o="urn:schemas-microsoft-com:office:office">
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
</noscript>
<style>
td,th,div,p,a,h1,h2,h3,h4,h5,h6 {font-family: "Segoe UI", sans-serif; mso-line-height-rule: exactly;}
</style>
<![endif]-->
<title>{title}</title>
<style>
@media (max-width: 600px) {
.sm-my-8 {
margin-top: 32px !important;
margin-bottom: 32px !important
}
}
</style>
</head>
<body style="margin: 0; width: 100%; background-color: #f0f0f1; padding: 0; -webkit-font-smoothing: antialiased; word-break: break-word">
<div style="display: none">
Here's your quick overview
&#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847; &#8199;&#65279;&#847;
</div>
<div role="article" aria-roledescription="email" aria-label="You're weekly insights for {domain} are here!" lang="en">
<div style="background-color: #f0f0f1; font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; color: #333">
<table align="center" cellpadding="0" cellspacing="0" role="none">
<tr>
<td style="width: 552px; max-width: 100%">
<div class="sm-my-8" style="margin-top: 48px; margin-bottom: 48px; text-align: center">
<img src="images/maizzle.png" width="70" alt="Logo" style="max-width: 100%; vertical-align: middle; line-height: 1">
</div>
<h1 style="text-align: center; font-size: 24px; font-weight: 400; color: #333">
You're weekly insights for <br>
<span style="font-size: 30px; font-weight: 700">{domain}</span> <br>
are here!
</h1>
<h2 style="margin: 32px 0 0; text-align: center; font-size: 16px; font-weight: 400">
Here's your quick overview:
</h2>
<table style="width: 100%; padding: 24px" cellpadding="0" cellspacing="0" role="none">
<tr>
<td style="border-radius: 8px; background-color: #ffffff; padding: 24px; font-size: 16px; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05)">
<h3 style="margin: 0; padding: 0;">
Compare
</h3>
<p style="margin: 0; padding-top: 4px; padding-bottom: 4px; font-size: 14px; color: #696969">vs. previous week</p>
<div role="separator" style="line-height: 24px">&zwj;</div>
<table style="width: 100%; font-weight: 700;" cellpadding="0" cellspacing="0" role="none">
<tr style="line-height: 32px">
<td style="width: 4px; padding-right: 16px">
x
</td>
<td style="width: 288px">
/
</td>
<td style="width: fit-content; text-align: right; font-size: 13px; color: #2e8a37">
20%
</td>
<td style="width: fit-content; text-align: right;">
20
</td>
</tr>
</table>
<p style="margin: 16px 0 0; text-align: right; font-size: 15px; font-weight: 700">
<a href="/" style="color: #696969;">
See full report
</a>
</p>
</td>
</tr>
<tr role="separator">
<td style="line-height: 20px">&zwj;</td>
</tr>
<tr>
<td style="border-radius: 8px; background-color: #ffffff; padding: 24px; font-size: 16px; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
<h3 style="margin: 0; padding: 0;">
Most viewed pages
</h3>
<p style="margin: 0; padding-top: 4px; padding-bottom: 4px; font-size: 14px; color: #696969;">Compared vs. previous week</p>
<div role="separator" style="line-height: 24px">&zwj;</div>
<table style="width: 100%; font-weight: 700;" cellpadding="0" cellspacing="0" role="none">
<tr style="line-height: 24px">
<th style="text-align: left; font-size: 14px; font-weight: 400">
Page
</th>
<th style="text-align: right; font-size: 14px; font-weight: 400;">
Pageviews
</th>
</tr>
<tr style="line-height: 32px;">
<td>
/
</td>
<td style="text-align: right;">
20
</td>
</tr>
<tr style="line-height: 32px;">
<td>
/url/
</td>
<td style="text-align: right;">
19
</td>
</tr>
</table>
<p style="margin: 16px 0 0; text-align: right; font-size: 15px; font-weight: 700;">
<a href="/" style="color: #696969;">
See full report
</a>
</p>
</td>
</tr>
<tr role="separator">
<td style="line-height: 20px;">&zwj;</td>
</tr>
<tr>
<td style="border-radius: 8px; background-color: #ffffff; padding: 24px; font-size: 16px; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
<h3 style="margin: 0; padding: 0;">
Top referrers
</h3>
<p style="margin: 0; padding-top: 4px; padding-bottom: 4px; font-size: 14px; color: #696969;">Compared vs. previous week</p>
<div role="separator" style="line-height: 24px">&zwj;</div>
<table style="width: 100%; font-weight: 700;" cellpadding="0" cellspacing="0" role="none">
<tr style="line-height: 24px;">
<th style="text-align: left; font-size: 14px; font-weight: 400;">
Page
</th>
<th style="text-align: right; font-size: 14px; font-weight: 400;">
Pageviews
</th>
</tr>
<tr style="line-height: 32px;">
<td>
/
</td>
<td style="text-align: right;">
20
</td>
</tr>
<tr style="line-height: 32px;">
<td>
/url/
</td>
<td style="text-align: right;">
19
</td>
</tr>
</table>
<p style="margin: 16px 0 0; text-align: right; font-size: 15px; font-weight: 700;">
<a href="/" style="color: #696969;">
See full report
</a>
</p>
</td>
</tr>
<tr role="separator">
<td style="line-height: 20px;">&zwj;</td>
</tr>
<tr>
<td style="border-radius: 8px; background-color: #ffffff; padding: 24px; font-size: 16px; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);">
<h3 style="margin: 0; padding: 0;">
Top viewing countries
</h3>
<p style="margin: 0; padding-top: 4px; padding-bottom: 4px; font-size: 14px; color: #696969;">Compared vs. previous week</p>
<div role="separator" style="line-height: 24px">&zwj;</div>
<table style="width: 100%; font-weight: 700;" cellpadding="0" cellspacing="0" role="none">
<tr style="line-height: 24px;">
<th style="text-align: left; font-size: 14px; font-weight: 400;">
Page
</th>
<th style="text-align: right; font-size: 14px; font-weight: 400;">
Pageviews
</th>
</tr>
<tr style="line-height: 32px;">
<td>
/
</td>
<td style="text-align: right;">
20
</td>
</tr>
<tr style="line-height: 32px;">
<td>
/url/
</td>
<td style="text-align: right;">
19
</td>
</tr>
</table>
<p style="margin: 16px 0 0; text-align: right; font-size: 15px; font-weight: 700;">
<a href="/" style="color: #696969;">
See full report
</a>
</p>
</td>
</tr>
<tr role="separator">
<td style="line-height: 20px;">&zwj;</td>
</tr>
<tr>
<td style="padding-left: 24px; padding-right: 24px; text-align: center; font-size: 12px">
<h2>
Discover all insights
</h2>
<p style="font-size: 16px; line-height: 24px; color: #333;">
Dive deeper into your analytics and uncover new opportunities for {domain}.
</p>
<p style="margin: 0 0 16px; text-transform: uppercase"></p>
<div>
<a href="https://maizzle.com" style="display: inline-block; border-radius: 4px; background-color: #007cba; padding: 16px 24px; font-size: 16px; font-weight: 600; line-height: 1; color: #ffffff; text-decoration: none">
<!--[if mso]>
<i style="mso-font-width: 150%; mso-text-raise: 30px" hidden>&emsp;</i>
<![endif]-->
<span style="mso-text-raise: 16px">
Explore your insights &rarr;
</span>
<!--[if mso]>
<i hidden style="mso-font-width: 150%;">&emsp;&#8203;</i>
<![endif]-->
</a>
</div>
<p></p>
<div role="separator" style="background-color: #a6a6a8; height: 1px; line-height: 1px; margin: 32px 0">&zwj;</div>
<p style="margin: 0; font-style: italic; line-height: 18px">
This e-mail is sent from your own Wordpress website: {domain}. If you don't want to receive these
e-mails in your inbox.
Please go to the Burst settings page on your website and disable the email report setting or contact
the administrator of your website.
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,27 @@
/** @type {import('@maizzle/framework').Config} */
/*
|-------------------------------------------------------------------------------
| Development config https://maizzle.com/docs/environments
|-------------------------------------------------------------------------------
|
| The exported object contains the default Maizzle settings for development.
| This is used when you run `maizzle build` or `maizzle serve` and it has
| the fastest build time, since most transformations are disabled.
|
*/
module.exports = {
build: {
templates: {
source: 'src/templates',
destination: {
path: 'build_local'
},
assets: {
source: 'src/images',
destination: 'images'
}
}
}
};

View File

@@ -0,0 +1,26 @@
/** @type {import('@maizzle/framework').Config} */
/*
|-------------------------------------------------------------------------------
| Production config https://maizzle.com/docs/environments
|-------------------------------------------------------------------------------
|
| This is where you define settings that optimize your emails for production.
| These will be merged on top of the base config.js, so you only need to
| specify the options that are changing.
|
*/
module.exports = {
build: {
templates: {
destination: {
path: 'build_production'
}
}
},
inlineCSS: true,
removeUnusedCSS: true,
shorthandCSS: true,
prettify: true
};

View File

@@ -0,0 +1,28 @@
<script props>
module.exports = {
align: {
left: 'text-left',
center: 'text-center',
right: 'text-right',
}[props.align],
href: props.href,
msoPt: props['mso-pt'] || '16px',
msoPb: props['mso-pb'] || '30px',
}
</script>
<div class="{{ align }}">
<a
attributes
href="{{ href }}"
class="inline-block py-4 px-6 text-base leading-none font-semibold rounded text-slate-50 bg-indigo-700 [text-decoration:none]"
>
<outlook>
<i class="mso-font-width-[150%]" style="mso-text-raise: {{ msoPb }};" hidden>&emsp;</i>
</outlook>
<span style="mso-text-raise: {{ msoPt }}"><content /></span>
<outlook>
<i class="mso-font-width-[150%]" hidden>&emsp;&#8203;</i>
</outlook>
</a>
</div>

View File

@@ -0,0 +1,30 @@
<script props>
// https://maizzle.com/docs/components/divider
module.exports = {
height: props.height || '1px',
color: props.color, // any CSS color value
top: props.top, // top margin
bottom: props.bottom, // bottom margin
left: props.left, // left margin
right: props.right, // right margin
spaceY: props['space-y'] || '24px', // top and bottom margin
spaceX: props['space-x'], // right and left margin
hasBgClass: props.class && props.class.split(' ').some(c => c.startsWith('bg-')),
}
</script>
<div
role="separator"
class="{{ (!color && !hasBgClass) && 'bg-slate-300' }}"
style="height: {{ height }};
line-height: {{ height }};
{{ color && `background-color: ${color}` }};
margin: 0;
{{ spaceY && `margin-top: ${spaceY}; margin-bottom: ${spaceY}` }};
{{ spaceX && `margin-left: ${spaceX}; margin-right: ${spaceX}` }};
{{ top && `margin-top: ${top}` }};
{{ bottom && `margin-bottom: ${bottom}` }};
{{ left && `margin-left: ${left}` }};
{{ right && `margin-right: ${right}` }};
"
>&zwj;</div>

View File

@@ -0,0 +1,20 @@
<script props>
// https://maizzle.com/docs/components/spacer
module.exports = {
height: props.height,
msoHeight: props['mso-height'],
}
</script>
<if condition="height">
<div
attributes
role="separator"
style="{{ height && `line-height: ${height}` }};
{{ msoHeight && `mso-line-height-alt: ${msoHeight}` }};
"
>&zwj;</div>
</if>
<else>
<div role="separator">&zwj;</div>
</else>

View File

@@ -0,0 +1,13 @@
<script props>
module.exports = {
width: props.width || '600px',
image: props.image || 'https://via.placeholder.com/600x400'
}
</script>
<!--[if mso]>
<v:rect stroke="f" fillcolor="none" style="width: {{ width }}" xmlns:v="urn:schemas-microsoft-com:vml">
<v:fill type="frame" src="{{{ image }}}" />
<v:textbox inset="0,0,0,0" style="mso-fit-shape-to-text: true"><div><![endif]-->
<content />
<!--[if mso]></div></v:textbox></v:rect><![endif]-->

View File

@@ -0,0 +1,14 @@
<script props>
module.exports = {
width: props.width || '600px',
height: props.height || '400px',
image: props.image || 'https://via.placeholder.com/600x400'
}
</script>
<!--[if mso]>
<v:image src="{{{ image }}}" style="width: {{ width }}; height: {{ height }};" xmlns:v="urn:schemas-microsoft-com:vml" />
<v:rect fill="f" stroke="f" style="position: absolute; width: {{ width }}; height: {{ height }};" xmlns:v="urn:schemas-microsoft-com:vml">
<v:textbox inset="0,0,0,0"><div><![endif]-->
<content />
<!--[if mso]></div></v:textbox></v:rect><![endif]-->

View File

@@ -0,0 +1,12 @@
/*
* Here is where you can add your global email CSS resets.
*
* We use a custom, email-specific CSS reset, instead
* of Tailwind's web-optimized `base` layer.
*
* Styles defined here will be inlined.
*/
img {
@apply max-w-full leading-none align-middle;
}

View File

@@ -0,0 +1,17 @@
/* Your custom CSS resets for email */
@import "resets";
/* Tailwind CSS components */
@import "tailwindcss/components";
/**
* @import here any custom CSS components - that is, CSS that
* you'd want loaded before the Tailwind utilities, so the
* utilities can still override them.
*/
/* Tailwind CSS utility classes */
@import "tailwindcss/utilities";
/* Your custom utility classes */
@import "utilities";

View File

@@ -0,0 +1,15 @@
/*
* Here is where you can define your custom utility classes.
*
* We wrap them in the `utilities` @layer directive, so
* that Tailwind moves them to the correct location.
*
* More info:
* https://tailwindcss.com/docs/functions-and-directives#layer
*/
@layer utilities {
.break-word {
word-break: break-word;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@@ -0,0 +1,43 @@
<!DOCTYPE {{{ page.doctype || 'html' }}}>
<html lang="{{ page.language || 'en' }}" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta charset="{{ page.charset || 'utf-8' }}">
<meta name="x-apple-disable-message-reformatting">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no, url=no">
<meta name="color-scheme" content="light dark">
<meta name="supported-color-schemes" content="light dark">
<!--[if mso]>
<noscript>
<xml>
<o:OfficeDocumentSettings xmlns:o="urn:schemas-microsoft-com:office:office">
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
</noscript>
<style>
td,th,div,p,a,h1,h2,h3,h4,h5,h6 {font-family: "Segoe UI", sans-serif; mso-line-height-rule: exactly;}
</style>
<![endif]-->
<if condition="page.title">
<title>{{{ page.title }}}</title>
</if>
<style>
{{{ page.css }}}
</style>
<stack name="head" />
</head>
<body class="m-0 p-0 w-full [word-break:break-word] [-webkit-font-smoothing:antialiased] {{ page.bodyClass || '' }}">
<if condition="page.preheader">
<div class="hidden">
{{{ page.preheader }}}
<each loop="item in Array.from(Array(150))">&#8199;&#65279;&#847; </each>
</div>
</if>
<div role="article" aria-roledescription="email" aria-label="{{{ page.title || '' }}}" lang="{{ page.language || 'en' }}">
<content />
</div>
</body>
</html>

View File

@@ -0,0 +1,247 @@
---
title: "You're weekly insights for
{domain}
are here!"
preheader: "Here's your quick overview"
bodyClass: bg-grey-100
---
<x-main>
<div class="bg-grey-100 text-black font-sans">
<table align="center">
<tr>
<td class="w-[552px] max-w-full">
<div class="my-12 sm:my-8 text-center">
<img src="images/maizzle.png" width="70" alt="Logo">
</div>
<h1 class="text-center text-black font-normal text-2xl">
You're weekly insights for <br/>
<span class="text-3xl font-bold">{domain}</span> <br/>
are here!
</h1>
<h2 class="text-center m-0 mt-8 text-base font-normal text-gray-600">
Here's your quick overview:
</h2>
<table class="w-full p-6">
<!-- First block - Compare -->
<tr>
<td class="p-6 text-base text-slate-700 bg-white rounded-lg shadow-sm">
<h3 class="p-0 m-0">
Compare
</h3>
<p class="py-1 m-0 text-sm text-grey-800">vs. previous week</p>
<x-spacer height="24px"/>
<table class="font-bold text-l w-full">
<tr class="leading-8">
<td class="w-1 pr-4">
x
</td>
<td class="w-72">
/
</td>
<td class="text-right w-fit text-green text-2xs">
20%
</td>
<td class="text-right w-fit">
20
</td>
</tr>
</table>
<p class="m-0 mt-4 text-right text-2sm font-bold">
<a href="/" class="text-grey-800 text-md">
See full report
</a>
</p>
</td>
</tr>
<tr role="separator">
<td class="leading-5">&zwj;</td>
</tr>
<!-- Second block - Most viewed -->
<tr>
<td class="p-6 text-base text-slate-700 bg-white rounded-lg shadow-sm">
<h3 class="p-0 m-0">
Most viewed pages
</h3>
<p class="py-1 m-0 text-sm text-grey-800">Compared vs. previous week</p>
<x-spacer height="24px"/>
<table class="font-bold text-l w-full">
<tr class="leading-6">
<th class="font-normal text-sm text-left">
Page
</th>
<th class="font-normal text-sm text-right">
Pageviews
</th>
</tr>
<tr class="leading-8">
<td>
/
</td>
<td class="text-right">
20
</td>
</tr>
<tr class="leading-8">
<td>
/url/
</td>
<td class="text-right">
19
</td>
</tr>
</table>
<p class="m-0 mt-4 text-right text-2sm font-bold">
<a href="/" class="text-grey-800 text-md">
See full report
</a>
</p>
</td>
</tr>
<tr role="separator">
<td class="leading-5">&zwj;</td>
</tr>
<!-- Third block - Top referrers -->
<tr>
<td class="p-6 text-base text-slate-700 bg-white rounded-lg shadow-sm">
<h3 class="p-0 m-0">
Top referrers
</h3>
<p class="py-1 m-0 text-sm text-grey-800">Compared vs. previous week</p>
<x-spacer height="24px"/>
<table class="font-bold text-l w-full">
<tr class="leading-6">
<th class="font-normal text-sm text-left">
Page
</th>
<th class="font-normal text-sm text-right">
Pageviews
</th>
</tr>
<tr class="leading-8">
<td>
/
</td>
<td class="text-right">
20
</td>
</tr>
<tr class="leading-8">
<td>
/url/
</td>
<td class="text-right">
19
</td>
</tr>
</table>
<p class="m-0 mt-4 text-right text-2sm font-bold">
<a href="/" class="text-grey-800 text-md">
See full report
</a>
</p>
</td>
</tr>
<tr role="separator">
<td class="leading-5">&zwj;</td>
</tr>
<!-- Fourth block - Top countries -->
<tr>
<td class="p-6 text-base text-slate-700 bg-white rounded-lg shadow-sm">
<h3 class="p-0 m-0">
Top viewing countries
</h3>
<p class="py-1 m-0 text-sm text-grey-800">Compared vs. previous week</p>
<x-spacer height="24px"/>
<table class="font-bold text-l w-full">
<tr class="leading-6">
<th class="font-normal text-sm text-left">
Page
</th>
<th class="font-normal text-sm text-right">
Pageviews
</th>
</tr>
<tr class="leading-8">
<td>
/
</td>
<td class="text-right">
20
</td>
</tr>
<tr class="leading-8">
<td>
/url/
</td>
<td class="text-right">
19
</td>
</tr>
</table>
<p class="m-0 mt-4 text-right text-2sm font-bold">
<a href="/" class="text-grey-800 text-md">
See full report
</a>
</p>
</td>
</tr>
<tr role="separator">
<td class="leading-5">&zwj;</td>
</tr>
<tr>
<td class="text-center text-slate-600 text-xs px-6">
<h2>
Discover all insights
</h2>
<p class="text-black text-base leading-6">
Dive deeper into your analytics and uncover new opportunities for {domain}.
</p>
<p class="m-0 mb-4 uppercase">
<x-button class="bg-wpBlue text-white" href="https://maizzle.com">
Explore your insights &rarr;
</x-button>
</p>
<!-- <x-spacer height="24px" />-->
<x-divider space-y="32px" class="bg-grey-500"/>
<p class="m-0 leading-4.5 italic">
This e-mail is sent from your own Wordpress website: {domain}. If you don't want to receive these
e-mails in your inbox.
Please go to the Burst settings page on your website and disable the email report setting or contact
the administrator of your website.
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</x-main>

View File

@@ -0,0 +1,175 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
theme: {
screens: {
sm: {max: '600px'},
xs: {max: '425px'}
},
colors: {
wpGray: '#f0f0f1',
white: '#ffffff',
black: '#333',
yellow: '#f4bf3e',
blue: '#009fff',
darkBlue: '#1E73BE',
green: '#2e8a37',
red: '#D7263D',
pink: '#E35899',
orange: '#f39c12',
wpBlue: '#007cba',
yellowFaded: '#fdf4df',
blueFaded: '#ecf8fe',
darkBlueFaded: '#ebf2f9',
greenFaded: '#ecf4ed',
redFaded: '#fbebed',
pinkFaded: '#fceff5',
orangeFaded: '#fef5ea',
wpBlueFaded: '#c6e0ef',
grey: {
100: '#f0f0f1',
200: '#f7f7f7',
300: '#ededed',
400: '#f0f0f1',
500: '#a6a6a8',
600: '#8c8c8e',
700: '#737373',
800: '#696969',
900: '#404041'
}
},
borderRadius: {
none: '0px',
sm: '5px',
DEFAULT: '8px',
lg: '12px'
},
extend: {
spacing: {
screen: '100vw',
full: '100%',
0: '0',
0.5: '2px',
1: '4px',
1.5: '6px',
2: '8px',
2.5: '10px',
3: '12px',
3.5: '14px',
4: '16px',
4.5: '18px',
5: '20px',
5.5: '22px',
6: '24px',
6.5: '26px',
7: '28px',
7.5: '30px',
8: '32px',
8.5: '34px',
9: '36px',
9.5: '38px',
10: '40px',
11: '44px',
12: '48px',
14: '56px',
16: '64px',
20: '80px',
24: '96px',
28: '112px',
32: '128px',
36: '144px',
40: '160px',
44: '176px',
48: '192px',
52: '208px',
56: '224px',
60: '240px',
64: '256px',
72: '288px',
80: '320px',
96: '384px'
},
borderRadius: {
none: '0px',
sm: '2px',
DEFAULT: '4px',
md: '6px',
lg: '8px',
xl: '12px',
'2xl': '16px',
'3xl': '24px'
},
boxShadow: {
sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
DEFAULT: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)',
md: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)',
lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)',
xl: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)',
'2xl': '0 25px 50px -12px rgba(0, 0, 0, 0.25)',
inner: 'inset 0 2px 4px 0 rgba(0, 0, 0, 0.05)'
},
fontFamily: {
sans: [ 'ui-sans-serif', 'system-ui', '-apple-system', '"Segoe UI"', 'sans-serif' ],
serif: [ 'ui-serif', 'Georgia', 'Cambria', '"Times New Roman"', 'Times', 'serif' ],
mono: [ 'ui-monospace', 'Menlo', 'Consolas', 'monospace' ]
},
fontSize: {
0: '0',
xxs: '11px',
xs: '12px',
'2xs': '13px',
sm: '14px',
'2sm': '15px',
base: '16px',
lg: '18px',
xl: '20px',
'2xl': '24px',
'3xl': '30px',
'4xl': '36px',
'5xl': '48px',
'6xl': '60px',
'7xl': '72px',
'8xl': '96px',
'9xl': '128px'
},
letterSpacing: theme => ({
...theme( 'width' )
}),
lineHeight: theme => ({
...theme( 'width' )
}),
maxWidth: theme => ({
...theme( 'width' ),
xs: '160px',
sm: '192px',
md: '224px',
lg: '256px',
xl: '288px',
'2xl': '336px',
'3xl': '384px',
'4xl': '448px',
'5xl': '512px',
'6xl': '576px',
'7xl': '640px'
}),
minHeight: theme => ({
...theme( 'width' )
}),
minWidth: theme => ({
...theme( 'width' )
})
}
},
corePlugins: {
preflight: false,
backgroundOpacity: false,
borderOpacity: false,
divideOpacity: false,
placeholderOpacity: false,
textOpacity: false
},
plugins: [
require( 'tailwindcss-mso' ),
require( 'tailwindcss-box-shadow' ),
require( 'tailwindcss-email-variants' )
]
};

View File

@@ -0,0 +1,20 @@
<tr>
<td style="border-radius: 8px; background-color: #ffffff; padding: 24px; font-size: 16px; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05)">
<h3 style="margin: 0; padding: 0;">
{title}
</h3>
<p style="margin: 0; padding-top: 4px; padding-bottom: 4px; font-size: 14px; color: #696969">{subtitle}</p>
<div role="separator" style="line-height: 24px">&zwj;</div>
<table style="width: 100%; font-weight: 700;" cellpadding="0" cellspacing="0" role="none">
{table}
</table>
<p style="margin: 16px 0 0; text-align: right; font-size: 15px; font-weight: 700">
<a href="{url}" style="color: #696969;">
{learn-more}
</a>
</p>
</td>
</tr>
<tr role="separator">
<td style="line-height: 20px">&zwj;</td>
</tr>

View File

@@ -0,0 +1,74 @@
<!DOCTYPE html>
<html lang="en" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta charset="utf-8">
<meta name="x-apple-disable-message-reformatting">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no, url=no">
<meta name="color-scheme" content="light dark">
<meta name="supported-color-schemes" content="light dark">
<!--[if mso]>
<noscript>
<xml>
<o:OfficeDocumentSettings xmlns:o="urn:schemas-microsoft-com:office:office">
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
</noscript>
<style>
td,th,div,p,a,h1,h2,h3,h4,h5,h6 {font-family: "Segoe UI", sans-serif; mso-line-height-rule: exactly;}
</style>
<![endif]-->
<title>{title}</title>
<style>
@media (max-width: 600px) {
.sm-my-8 {
margin-top: 32px !important;
margin-bottom: 32px !important
}
}
</style>
</head>
<body style="margin: 0; width: 100%; background-color: #f0f0f1; padding: 0; -webkit-font-smoothing: antialiased; word-break: break-word">
<div style="display: none">
{message}
</div>
<div role="article" aria-roledescription="email" aria-label="You're weekly insights for {domain} are here!" lang="en">
<div style="background-color: #f0f0f1; font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; color: #333">
<table align="center" cellpadding="0" cellspacing="0" role="none">
<tr>
<td style="width: 552px; max-width: 100%">
<div class="sm-my-8" style="margin-top: 48px; margin-bottom: 48px; text-align: center">
<img src="{logo}" height="40" alt="Logo" style="max-width: 100%; vertical-align: middle; line-height: 1">
</div>
<h1 style="text-align: center; font-size: 24px; line-height: 1.25; font-weight: 400; color: #333">
{title}
<!-- You're weekly insights for <br>-->
<!-- <span style="font-size: 30px; font-weight: 700">{domain}</span> <br>-->
<!-- are here!-->
</h1>
<h2 style="margin: 32px 0 0; text-align: center; font-size: 16px; font-weight: 400">
{message}
</h2>
<table style="width: 100%; padding: 24px" cellpadding="0" cellspacing="0" role="none">
{warnings}
<tr>
<td style="padding-left: 24px; padding-right: 24px; text-align: center; font-size: 12px">
{read_more}
<div role="separator" style="background-color: #a6a6a8; height: 1px; line-height: 1px; margin: 32px 0">&zwj;</div>
<p style="margin: 0; font-style: italic; line-height: 18px">
{sent_by_text}
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1 @@
<?php // You don't belong here.

View File

@@ -0,0 +1,20 @@
<h2>
{title}
</h2>
<p style="font-size: 16px; line-height: 24px; color: #333;">
{message}
</p>
<p style="margin: 0 0 16px; text-transform: uppercase"></p>
<div>
<a href="{read_more_url}" style="display: inline-block; border-radius: 4px; background-color: #007cba; padding: 16px 24px; font-size: 16px; font-weight: 600; line-height: 1; color: #ffffff; text-decoration: none">
<!--[if mso]>
<i style="mso-font-width: 150%; mso-text-raise: 30px" hidden>&emsp;</i>
<![endif]-->
<span style="mso-text-raise: 16px">
{read_more_text}
</span>
<!--[if mso]>
<i hidden style="mso-font-width: 150%;">&emsp;&#8203;</i>
<![endif]-->
</a>
</div>