<?php namespace MailPoet\Config\PopulatorData\Templates; if (!defined('ABSPATH')) exit; use MailPoet\WP\Functions as WPFunctions; class Minimal { private $template_image_url; private $social_icon_url; public function __construct($assets_url) { $this->template_image_url = 'https://ps.w.org/mailpoet/assets/newsletter-templates/minimal'; $this->social_icon_url = $assets_url . '/img/newsletter_editor/social-icons'; } public function get() { return [ 'name' => __("Minimal", 'mailpoet'), 'categories' => json_encode(['welcome', 'all']), 'readonly' => 1, 'thumbnail' => $this->getThumbnail(), 'body' => json_encode($this->getBody()), ]; } private function getThumbnail() { return $this->template_image_url . '/thumbnail.20190411-1500.jpg'; } private function getBody() { return [ 'content' => [ 'type' => 'container', 'orientation' => 'vertical', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'container', 'orientation' => 'horizontal', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'container', 'orientation' => 'vertical', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'spacer', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', 'height' => '29px', ], ], ], ], ], ], ], 1 => [ 'type' => 'container', 'orientation' => 'horizontal', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => '#303c54', ], ], 'blocks' => [ 0 => [ 'type' => 'container', 'orientation' => 'vertical', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'spacer', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', 'height' => '60px', ], ], ], 1 => [ 'type' => 'image', 'link' => '', 'src' => $this->template_image_url . '/Minimal-Logo1.png', 'alt' => 'Minimal-Logo1', 'fullWidth' => false, 'width' => '590px', 'height' => '93px', 'styles' => [ 'block' => [ 'textAlign' => 'center', ], ], ], 2 => [ 'type' => 'spacer', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', 'height' => '60px', ], ], ], ], ], 1 => [ 'type' => 'container', 'orientation' => 'vertical', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'spacer', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', 'height' => '80px', ], ], ], 1 => [ 'type' => 'text', 'text' => '<p style="text-align: right;"><span style="color: #8b9cbc;">EST.2009</span></p>', ], ], ], ], ], 2 => [ 'type' => 'container', 'orientation' => 'horizontal', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => '#ffffff', ], ], 'blocks' => [ 0 => [ 'type' => 'container', 'orientation' => 'vertical', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'spacer', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', 'height' => '41px', ], ], ], 1 => [ 'type' => 'text', 'text' => '<h2>Welcome to Minimal, Kim.</h2>', ], 2 => [ 'type' => 'text', 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur nec nisi quis ex pulvinar molestie. Sed pulvinar placerat justo eu viverra. Pellentesque in interdum eros, a venenatis velit. Fusce finibus convallis augue, ut viverra felis placerat in. Curabitur et commodo ipsum. Mauris tellus metus, tristique vel sollicitudin ut, malesuada in augue. Aliquam ultricies purus vel commodo vehicula. Cras sollicitudin nunc facilisis neque tristique sagittis.</p> <p></p> <p>Maecenas iaculis, lacus malesuada dictum dapibus, justo justo molestie lorem, ac dapibus magna urna vel arcu. Aliquam erat volutpat. Sed bibendum, ipsum sed ullamcorper blandit, eros odio interdum nibh, non venenatis metus lacus vitae lectus.</p>', ], 3 => [ 'type' => 'divider', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', 'padding' => '30px', 'borderStyle' => 'dotted', 'borderWidth' => '2px', 'borderColor' => '#d9d9d9', ], ], ], 4 => [ 'type' => 'text', 'text' => '<h2>Some of our recent stories</h2>', ], ], ], ], ], 3 => [ 'type' => 'container', 'orientation' => 'horizontal', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'container', 'orientation' => 'vertical', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'image', 'link' => '', 'src' => $this->template_image_url . '/plasma-stingray111-800x533.jpg', 'alt' => 'plasma-stingray111-800x533', 'fullWidth' => false, 'width' => '800px', 'height' => '533px', 'styles' => [ 'block' => [ 'textAlign' => 'center', ], ], ], ], ], 1 => [ 'type' => 'container', 'orientation' => 'vertical', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'text', 'text' => '<h3>Story Title Goes Here</h3> <p><span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur nec nisi quis ex pulvinar molestie. Sed pulvinar placerat justo eu viverra.</span></p> <p><span></span></p> <p><strong><a href="https://wordpress.org/">Read More</a></strong></p>', ], ], ], ], ], 4 => [ 'type' => 'container', 'orientation' => 'horizontal', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'container', 'orientation' => 'vertical', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'image', 'link' => '', 'src' => $this->template_image_url . '/gettyimages-578313682-800x533.jpg', 'alt' => 'gettyimages-578313682-800x533', 'fullWidth' => false, 'width' => '800px', 'height' => '533px', 'styles' => [ 'block' => [ 'textAlign' => 'center', ], ], ], ], ], 1 => [ 'type' => 'container', 'orientation' => 'vertical', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'text', 'text' => '<h3>Story Title Goes Here</h3> <p><span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur nec nisi quis ex pulvinar molestie. Sed pulvinar placerat justo eu viverra.</span></p> <p><span></span></p> <p><strong><a href="https://wordpress.org/">Read More</a></strong></p>', ], ], ], ], ], 5 => [ 'type' => 'container', 'orientation' => 'horizontal', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'container', 'orientation' => 'vertical', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'image', 'link' => '', 'src' => $this->template_image_url . '/5_what_to_do_p352m1141746-800x533.jpg', 'alt' => '5_what_to_do_p352m1141746-800x533', 'fullWidth' => false, 'width' => '800px', 'height' => '533px', 'styles' => [ 'block' => [ 'textAlign' => 'center', ], ], ], ], ], 1 => [ 'type' => 'container', 'orientation' => 'vertical', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'text', 'text' => '<h3>Story Title Goes Here</h3> <p><span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur nec nisi quis ex pulvinar molestie. Sed pulvinar placerat justo eu viverra.</span></p> <p><span></span></p> <p><strong><a href="https://wordpress.org/">Read More</a></strong></p>', ], ], ], ], ], 6 => [ 'type' => 'container', 'orientation' => 'horizontal', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'container', 'orientation' => 'vertical', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'spacer', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', 'height' => '35px', ], ], ], ], ], ], ], 7 => [ 'type' => 'container', 'orientation' => 'horizontal', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => '#f3f3f3', ], ], 'blocks' => [ 0 => [ 'type' => 'container', 'orientation' => 'vertical', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'spacer', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', 'height' => '47px', ], ], ], 1 => [ 'type' => 'image', 'link' => '', 'src' => $this->template_image_url . '/Minimal-Logo-Small.png', 'alt' => 'Minimal-Logo-Small', 'fullWidth' => false, 'width' => '120px', 'height' => '23px', 'styles' => [ 'block' => [ 'textAlign' => 'center', ], ], ], ], ], 1 => [ 'type' => 'container', 'orientation' => 'vertical', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'spacer', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', 'height' => '40px', ], ], ], 1 => [ 'type' => 'social', 'iconSet' => 'full-symbol-color', 'icons' => [ 0 => [ 'type' => 'socialIcon', 'iconType' => 'facebook', 'link' => 'http://www.facebook.com', 'image' => $this->social_icon_url . '/06-full-symbol-color/Facebook.png?mailpoet_version=3.0.0-rc.2.0.0', 'height' => '32px', 'width' => '32px', 'text' => 'Facebook', ], 1 => [ 'type' => 'socialIcon', 'iconType' => 'twitter', 'link' => 'http://www.twitter.com', 'image' => $this->social_icon_url . '/06-full-symbol-color/Twitter.png?mailpoet_version=3.0.0-rc.2.0.0', 'height' => '32px', 'width' => '32px', 'text' => 'Twitter', ], 2 => [ 'type' => 'socialIcon', 'iconType' => 'instagram', 'link' => 'http://instagram.com', 'image' => $this->social_icon_url . '/06-full-symbol-color/Instagram.png?mailpoet_version=3.0.0-rc.2.0.0', 'height' => '32px', 'width' => '32px', 'text' => 'Instagram', ], ], ], ], ], 2 => [ 'type' => 'container', 'orientation' => 'vertical', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'spacer', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', 'height' => '20px', ], ], ], 1 => [ 'type' => 'footer', 'text' => '<p><span style="color: #808080;"><a href="[link:subscription_unsubscribe_url]" style="color: #808080;">'.__("Unsubscribe", 'mailpoet').'</a></span></p> <p><span style="color: #808080;"><a href="[link:subscription_manage_url]" style="color: #808080;">'.__("Manage your subscription", 'mailpoet').'</a></span><br /><span style="color: #999999;">'.__("Add your postal address here!", 'mailpoet').'</span></p>', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], 'text' => [ 'fontColor' => '#222222', 'fontFamily' => 'Arial', 'fontSize' => '12px', 'textAlign' => 'left', ], 'link' => [ 'fontColor' => '#6cb7d4', 'textDecoration' => 'none', ], ], ], ], ], ], ], 8 => [ 'type' => 'container', 'orientation' => 'horizontal', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => '#f3f3f3', ], ], 'blocks' => [ 0 => [ 'type' => 'container', 'orientation' => 'vertical', 'image' => [ 'src' => null, 'display' => 'scale', ], 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], ], 'blocks' => [ 0 => [ 'type' => 'spacer', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', 'height' => '20px', ], ], ], ], ], ], ], ], ], 'globalStyles' => [ 'text' => [ 'fontColor' => '#000000', 'fontFamily' => 'Georgia', 'fontSize' => '15px', ], 'h1' => [ 'fontColor' => '#111111', 'fontFamily' => 'Georgia', 'fontSize' => '30px', ], 'h2' => [ 'fontColor' => '#222222', 'fontFamily' => 'Georgia', 'fontSize' => '24px', ], 'h3' => [ 'fontColor' => '#333333', 'fontFamily' => 'Georgia', 'fontSize' => '22px', ], 'link' => [ 'fontColor' => '#303c54', 'textDecoration' => 'underline', ], 'wrapper' => [ 'backgroundColor' => '#ffffff', ], 'body' => [ 'backgroundColor' => '#ffffff', ], ], 'blockDefaults' => [ 'automatedLatestContent' => [ 'amount' => '5', 'withLayout' => false, 'contentType' => 'post', 'inclusionType' => 'include', 'displayType' => 'excerpt', 'titleFormat' => 'h1', 'titleAlignment' => 'left', 'titleIsLink' => false, 'imageFullWidth' => false, 'featuredImagePosition' => 'belowTitle', 'showAuthor' => 'no', 'authorPrecededBy' => 'Author:', 'showCategories' => 'no', 'categoriesPrecededBy' => 'Categories:', 'readMoreType' => 'button', 'readMoreText' => 'Read more', 'readMoreButton' => [ 'text' => 'Read more', 'url' => '[postLink]', 'context' => 'automatedLatestContent.readMoreButton', 'styles' => [ 'block' => [ 'backgroundColor' => '#2ea1cd', 'borderColor' => '#0074a2', 'borderWidth' => '1px', 'borderRadius' => '5px', 'borderStyle' => 'solid', 'width' => '180px', 'lineHeight' => '40px', 'fontColor' => '#ffffff', 'fontFamily' => 'Verdana', 'fontSize' => '18px', 'fontWeight' => 'normal', 'textAlign' => 'center', ], ], ], 'sortBy' => 'newest', 'showDivider' => true, 'divider' => [ 'context' => 'automatedLatestContent.divider', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', 'padding' => '13px', 'borderStyle' => 'solid', 'borderWidth' => '3px', 'borderColor' => '#aaaaaa', ], ], ], 'backgroundColor' => '#ffffff', 'backgroundColorAlternate' => '#eeeeee', ], 'automatedLatestContentLayout' => [ 'amount' => '5', 'withLayout' => true, 'contentType' => 'post', 'inclusionType' => 'include', 'displayType' => 'excerpt', 'titleFormat' => 'h1', 'titleAlignment' => 'left', 'titleIsLink' => false, 'imageFullWidth' => false, 'featuredImagePosition' => 'alternate', 'showAuthor' => 'no', 'authorPrecededBy' => 'Author:', 'showCategories' => 'no', 'categoriesPrecededBy' => 'Categories:', 'readMoreType' => 'button', 'readMoreText' => 'Read more', 'readMoreButton' => [ 'text' => 'Read more', 'url' => '[postLink]', 'context' => 'automatedLatestContentLayout.readMoreButton', 'styles' => [ 'block' => [ 'backgroundColor' => '#2ea1cd', 'borderColor' => '#0074a2', 'borderWidth' => '1px', 'borderRadius' => '5px', 'borderStyle' => 'solid', 'width' => '180px', 'lineHeight' => '40px', 'fontColor' => '#ffffff', 'fontFamily' => 'Verdana', 'fontSize' => '18px', 'fontWeight' => 'normal', 'textAlign' => 'center', ], ], ], 'sortBy' => 'newest', 'showDivider' => true, 'divider' => [ 'context' => 'automatedLatestContentLayout.divider', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', 'padding' => '13px', 'borderStyle' => 'solid', 'borderWidth' => '3px', 'borderColor' => '#aaaaaa', ], ], ], 'backgroundColor' => '#ffffff', 'backgroundColorAlternate' => '#eeeeee', ], 'button' => [ 'text' => 'Button', 'url' => '', 'styles' => [ 'block' => [ 'backgroundColor' => '#2ea1cd', 'borderColor' => '#0074a2', 'borderWidth' => '1px', 'borderRadius' => '5px', 'borderStyle' => 'solid', 'width' => '180px', 'lineHeight' => '40px', 'fontColor' => '#ffffff', 'fontFamily' => 'Verdana', 'fontSize' => '18px', 'fontWeight' => 'normal', 'textAlign' => 'center', ], ], ], 'divider' => [ 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', 'padding' => '30px', 'borderStyle' => 'dotted', 'borderWidth' => '2px', 'borderColor' => '#d9d9d9', ], ], 'type' => 'divider', ], 'footer' => [ 'text' => '<p><a href="[link:subscription_unsubscribe_url]">'.__("Unsubscribe", 'mailpoet').'</a> | <a href="[link:subscription_manage_url]">'.__("Manage your subscription", 'mailpoet').'</a><br />'.__("Add your postal address here!", 'mailpoet').'</p>', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], 'text' => [ 'fontColor' => '#222222', 'fontFamily' => 'Arial', 'fontSize' => '12px', 'textAlign' => 'center', ], 'link' => [ 'fontColor' => '#6cb7d4', 'textDecoration' => 'none', ], ], ], 'posts' => [ 'amount' => '10', 'withLayout' => true, 'contentType' => 'post', 'postStatus' => 'publish', 'inclusionType' => 'include', 'displayType' => 'excerpt', 'titleFormat' => 'h1', 'titleAlignment' => 'left', 'titleIsLink' => false, 'imageFullWidth' => false, 'featuredImagePosition' => 'alternate', 'showAuthor' => 'no', 'authorPrecededBy' => 'Author:', 'showCategories' => 'no', 'categoriesPrecededBy' => 'Categories:', 'readMoreType' => 'link', 'readMoreText' => 'Read more', 'readMoreButton' => [ 'text' => 'Read more', 'url' => '[postLink]', 'context' => 'posts.readMoreButton', 'styles' => [ 'block' => [ 'backgroundColor' => '#2ea1cd', 'borderColor' => '#0074a2', 'borderWidth' => '1px', 'borderRadius' => '5px', 'borderStyle' => 'solid', 'width' => '180px', 'lineHeight' => '40px', 'fontColor' => '#ffffff', 'fontFamily' => 'Verdana', 'fontSize' => '18px', 'fontWeight' => 'normal', 'textAlign' => 'center', ], ], ], 'sortBy' => 'newest', 'showDivider' => true, 'divider' => [ 'context' => 'posts.divider', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', 'padding' => '13px', 'borderStyle' => 'solid', 'borderWidth' => '3px', 'borderColor' => '#aaaaaa', ], ], ], 'backgroundColor' => '#ffffff', 'backgroundColorAlternate' => '#eeeeee', ], 'social' => [ 'iconSet' => 'default', 'icons' => [ 0 => [ 'type' => 'socialIcon', 'iconType' => 'facebook', 'link' => 'http://www.facebook.com', 'image' => $this->social_icon_url . '/01-social/Facebook.png?mailpoet_version=3.8.1', 'height' => '32px', 'width' => '32px', 'text' => 'Facebook', ], 1 => [ 'type' => 'socialIcon', 'iconType' => 'twitter', 'link' => 'http://www.twitter.com', 'image' => $this->social_icon_url . '/01-social/Twitter.png?mailpoet_version=3.8.1', 'height' => '32px', 'width' => '32px', 'text' => 'Twitter', ], ], ], 'spacer' => [ 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', 'height' => '29px', ], ], 'type' => 'spacer', ], 'header' => [ 'text' => '<a href="[link:newsletter_view_in_browser_url]">'.__("View this in your browser.", 'mailpoet').'</a>', 'styles' => [ 'block' => [ 'backgroundColor' => 'transparent', ], 'text' => [ 'fontColor' => '#222222', 'fontFamily' => 'Arial', 'fontSize' => '12px', 'textAlign' => 'center', ], 'link' => [ 'fontColor' => '#6cb7d4', 'textDecoration' => 'underline', ], ], ], ], ]; } }