Files
piratepoet/lib/Config/PopulatorData/Templates/RealEstate.php
Pavel Dohnal 31067364f6 Add spacers to templates
[MAILPOET-1480]
2018-09-20 10:04:08 +02:00

1118 lines
46 KiB
PHP

<?php
namespace MailPoet\Config\PopulatorData\Templates;
if(!defined('ABSPATH')) exit;
class RealEstate {
private $template_image_url;
private $social_icon_url;
function __construct($assets_url) {
$this->template_image_url = 'https://ps.w.org/mailpoet/assets/newsletter-templates/real-estate';
$this->social_icon_url = $assets_url . '/img/newsletter_editor/social-icons';
}
function get() {
return array(
'name' => __("Real Estate", 'mailpoet'),
'categories' => json_encode(['welcome', 'sample']),
'readonly' => 1,
'thumbnail' => $this->getThumbnail(),
'body' => json_encode($this->getBody()),
);
}
private function getThumbnail() {
return $this->template_image_url . '/real-estate.jpg';
}
private function getBody() {
return array (
'content' =>
array (
'type' => 'container',
'orientation' => 'vertical',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'container',
'orientation' => 'horizontal',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => '#8691be',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'container',
'orientation' => 'vertical',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
),
),
'blocks' =>
array (
array(
"type" => "spacer",
"styles" => array(
"block" => array(
"backgroundColor" => "transparent",
"height" => "20px",
),
),
),
),
),
1 =>
array (
'type' => 'container',
'orientation' => 'vertical',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'image',
'link' => '',
'src' => $this->template_image_url . '/Property-Logo-1-150x84.jpg',
'alt' => 'Property-Logo-1',
'fullWidth' => false,
'width' => '150px',
'height' => '84px',
'styles' =>
array (
'block' =>
array (
'textAlign' => 'center',
),
),
),
),
),
2 =>
array (
'type' => 'container',
'orientation' => 'vertical',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'spacer',
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '25px',
),
),
),
1 =>
array (
'type' => 'social',
'iconSet' => 'full-symbol-grey',
'icons' =>
array (
0 =>
array (
'type' => 'socialIcon',
'iconType' => 'facebook',
'link' => 'http://www.facebook.com',
'image' => $this->social_icon_url . '/08-full-symbol-grey/Facebook.png?mailpoet_version=3.0.0-rc.2.0.0',
'height' => '32px',
'width' => '32px',
'text' => 'Facebook',
),
1 =>
array (
'type' => 'socialIcon',
'iconType' => 'twitter',
'link' => 'http://www.twitter.com',
'image' => $this->social_icon_url . '/08-full-symbol-grey/Twitter.png?mailpoet_version=3.0.0-rc.2.0.0',
'height' => '32px',
'width' => '32px',
'text' => 'Twitter',
),
2 =>
array (
'type' => 'socialIcon',
'iconType' => 'website',
'link' => '',
'image' => $this->social_icon_url . '/08-full-symbol-grey/Website.png?mailpoet_version=3.0.0-rc.2.0.0',
'height' => '32px',
'width' => '32px',
'text' => 'Website',
),
3 =>
array (
'type' => 'socialIcon',
'iconType' => 'instagram',
'link' => 'http://instagram.com',
'image' => $this->social_icon_url . '/08-full-symbol-grey/Instagram.png?mailpoet_version=3.0.0-rc.2.0.0',
'height' => '32px',
'width' => '32px',
'text' => 'Instagram',
),
),
),
),
),
),
),
1 =>
array (
'type' => 'container',
'orientation' => 'horizontal',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => '#8691be',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'container',
'orientation' => 'vertical',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'spacer',
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '25px',
),
),
),
1 =>
array (
'type' => 'text',
'text' => '<p style="text-align: center;"><strong><span style="color: #ffffff;">TAKING&nbsp;THE WORRY OUT OF REAL ESTATE</span></strong></p>',
),
2 =>
array (
'type' => 'spacer',
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
),
),
),
3 =>
array (
'type' => 'text',
'text' => '<h1 style="text-align: center;"><span style="color: #ffffff;">Welcome Home</span></h1>',
),
),
),
),
),
2 =>
array (
'type' => 'container',
'orientation' => 'horizontal',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => '#ffffff',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'container',
'orientation' => 'vertical',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'image',
'link' => '',
'src' => $this->template_image_url . '/Property-Header.jpg',
'alt' => 'Property-Header',
'fullWidth' => true,
'width' => '1280px',
'height' => '782px',
'styles' =>
array (
'block' =>
array (
'textAlign' => 'center',
),
),
),
1 =>
array (
'type' => 'spacer',
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '35px',
),
),
),
2 =>
array (
'type' => 'text',
'text' => '<h3 style="text-align: center;">We\'re here to help you move</h3>',
),
3 =>
array (
'type' => 'spacer',
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
),
),
),
),
),
),
),
3 =>
array (
'type' => 'container',
'orientation' => 'horizontal',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'container',
'orientation' => 'vertical',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'image',
'link' => '',
'src' => $this->template_image_url . '/Property-Icon-1.png',
'alt' => 'Property-Icon-1',
'fullWidth' => false,
'width' => '48px',
'height' => '48px',
'styles' =>
array (
'block' =>
array (
'textAlign' => 'center',
),
),
),
1 =>
array (
'type' => 'text',
'text' => '<p style="text-align: center; font-size: 12px;"><span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur nec nisi quis ex.</span></p>',
),
),
),
1 =>
array (
'type' => 'container',
'orientation' => 'vertical',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'image',
'link' => '',
'src' => $this->template_image_url . '/Property-Icon-2.png',
'alt' => 'Property-Icon-2',
'fullWidth' => false,
'width' => '48px',
'height' => '48px',
'styles' =>
array (
'block' =>
array (
'textAlign' => 'center',
),
),
),
1 =>
array (
'type' => 'text',
'text' => '<p style="text-align: center; font-size: 12px;"><span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur nec nisi quis ex.</span></p>',
),
),
),
2 =>
array (
'type' => 'container',
'orientation' => 'vertical',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'image',
'link' => '',
'src' => $this->template_image_url . '/Property-Icon-3.png',
'alt' => 'Property-Icon-3',
'fullWidth' => false,
'width' => '48px',
'height' => '48px',
'styles' =>
array (
'block' =>
array (
'textAlign' => 'center',
),
),
),
1 =>
array (
'type' => 'text',
'text' => '<p style="text-align: center; font-size: 12px;"><span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur nec nisi quis ex.</span></p>',
),
),
),
),
),
4 =>
array (
'type' => 'container',
'orientation' => 'horizontal',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => '#ffffff',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'container',
'orientation' => 'vertical',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'divider',
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '22.5px',
'borderStyle' => 'solid',
'borderWidth' => '1px',
'borderColor' => '#8691be',
),
),
),
1 =>
array (
'type' => 'spacer',
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
),
),
),
),
),
),
),
5 =>
array (
'type' => 'container',
'orientation' => 'horizontal',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'container',
'orientation' => 'vertical',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'text',
'text' => '<p style="text-align: center;"><span style="color: #333333;">We\'d love to keep you updated with our latest news. </span></p>
<p style="text-align: center;"><span style="color: #333333;">Sign up to our newsletter now and you\'ll never miss a thing.</span></p>',
),
1 =>
array (
'type' => 'button',
'text' => 'Sign Up Now',
'url' => '',
'styles' =>
array (
'block' =>
array (
'backgroundColor' => '#8691be',
'borderColor' => '#0074a2',
'borderWidth' => '0px',
'borderRadius' => '40px',
'borderStyle' => 'solid',
'width' => '180px',
'lineHeight' => '40px',
'fontColor' => '#ffffff',
'fontFamily' => 'Arial',
'fontSize' => '18px',
'fontWeight' => 'bold',
'textAlign' => 'center',
),
),
),
2 =>
array (
'type' => 'spacer',
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '24px',
),
),
),
),
),
),
),
6 =>
array (
'type' => 'container',
'orientation' => 'horizontal',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => '#6a7087',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'container',
'orientation' => 'vertical',
'image' =>
array (
'src' => NULL,
'display' => 'scale',
),
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
),
),
'blocks' =>
array (
0 =>
array (
'type' => 'spacer',
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '25px',
),
),
),
1 =>
array (
'type' => 'footer',
'text' => '<p><strong><span style="color: #ffffff;"><a href="[link:subscription_unsubscribe_url]" style="color: #ffffff;">Unsubscribe</a> | <a href="[link:subscription_manage_url]" style="color: #ffffff;">Manage subscription</a></span></strong><br /><span style="color: #ffffff;">Add your postal address here!</span></p>',
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
),
'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'none',
),
),
),
2 =>
array (
'type' => 'spacer',
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '30px',
),
),
),
),
),
),
),
),
),
'globalStyles' =>
array (
'text' =>
array (
'fontColor' => '#000000',
'fontFamily' => 'Arial',
'fontSize' => '15px',
),
'h1' =>
array (
'fontColor' => '#111111',
'fontFamily' => 'Arial',
'fontSize' => '40px',
),
'h2' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '24px',
),
'h3' =>
array (
'fontColor' => '#333333',
'fontFamily' => 'Arial',
'fontSize' => '22px',
),
'link' =>
array (
'fontColor' => '#21759B',
'textDecoration' => 'underline',
),
'wrapper' =>
array (
'backgroundColor' => '#ffffff',
),
'body' =>
array (
'backgroundColor' => '#6a7087',
),
),
'blockDefaults' =>
array (
'automatedLatestContent' =>
array (
'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' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContent.readMoreButton',
'styles' =>
array (
'block' =>
array (
'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' =>
array (
'context' => 'automatedLatestContent.divider',
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
'borderStyle' => 'solid',
'borderWidth' => '3px',
'borderColor' => '#aaaaaa',
),
),
),
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
'automatedLatestContentLayout' =>
array (
'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' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'automatedLatestContentLayout.readMoreButton',
'styles' =>
array (
'block' =>
array (
'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' =>
array (
'context' => 'automatedLatestContentLayout.divider',
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
'borderStyle' => 'solid',
'borderWidth' => '3px',
'borderColor' => '#aaaaaa',
),
),
),
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
'button' =>
array (
'text' => 'Button',
'url' => '',
'styles' =>
array (
'block' =>
array (
'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' =>
array (
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
'borderStyle' => 'solid',
'borderWidth' => '3px',
'borderColor' => '#aaaaaa',
),
),
),
'footer' =>
array (
'text' => '<p><a href="[link:subscription_unsubscribe_url]">Unsubscribe</a> | <a href="[link:subscription_manage_url]">Manage subscription</a><br />Add your postal address here!</p>',
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
),
'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'none',
),
),
),
'posts' =>
array (
'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' =>
array (
'text' => 'Read more',
'url' => '[postLink]',
'context' => 'posts.readMoreButton',
'styles' =>
array (
'block' =>
array (
'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' =>
array (
'context' => 'posts.divider',
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
'padding' => '13px',
'borderStyle' => 'solid',
'borderWidth' => '3px',
'borderColor' => '#aaaaaa',
),
),
),
'backgroundColor' => '#ffffff',
'backgroundColorAlternate' => '#eeeeee',
),
'social' =>
array (
'iconSet' => 'default',
'icons' =>
array (
0 =>
array (
'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 =>
array (
'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' =>
array (
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
'height' => '20px',
),
),
'type' => 'spacer',
),
'header' =>
array (
'text' => 'Display problems?&nbsp;<a href="[link:newsletter_view_in_browser_url]">Open this email in your web browser.</a>',
'styles' =>
array (
'block' =>
array (
'backgroundColor' => 'transparent',
),
'text' =>
array (
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
),
'link' =>
array (
'fontColor' => '#6cb7d4',
'textDecoration' => 'underline',
),
),
),
),
);
}
}