template_image_url = 'https://ps.w.org/mailpoet/assets/newsletter-templates/engineering';
$this->social_icon_url = $assets_url . '/img/newsletter_editor/social-icons';
}
public function get() {
return [
'name' => __("Engineering", 'mailpoet'),
'categories' => json_encode(['standard', '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',
'columnLayout' => false,
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => '#1d1d1d',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '40px',
],
],
],
],
],
],
],
1 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'image',
'link' => '',
'src' => $this->template_image_url . '/Engineering-Logo.png',
'alt' => 'Engineering-Logo',
'fullWidth' => true,
'width' => '150px',
'height' => '506px',
'styles' =>
[
'block' =>
[
'textAlign' => 'center',
],
],
],
1 =>
[
'type' => 'header',
'text' => '
' . __("View this in your browser.", 'mailpoet') . '
',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
'text' =>
[
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
],
'link' =>
[
'fontColor' => '#6cb7d4',
'textDecoration' => 'underline',
],
],
],
2 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '20px',
],
],
],
],
],
],
],
2 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
'image' =>
[
'src' => $this->template_image_url . '/Engineering-Header-1.jpg',
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '295px',
],
],
],
1 =>
[
'type' => 'text',
'text' => 'Let your dreams take flight...
',
],
2 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '40px',
],
],
],
],
],
],
],
3 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'image',
'link' => '',
'src' => $this->template_image_url . '/Engineering-Bearing.png',
'alt' => 'Engineering-Bearing',
'fullWidth' => false,
'width' => '400px',
'height' => '800px',
'styles' =>
[
'block' =>
[
'textAlign' => 'center',
],
],
],
],
],
1 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'text',
'text' => 'The all-new RoundBros 6206 ball bearing.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ac orci neque. Sed hendrerit condimentum augue, sed porta nulla vulputate rutrum. Donec vel purus urna. Sed dui sapien, congue non accumsan euismod, ultrices ut dui.
',
],
1 =>
[
'type' => 'button',
'text' => 'Find out more',
'url' => '',
'styles' =>
[
'block' =>
[
'backgroundColor' => '#1d1d1d',
'borderColor' => '#ffffff',
'borderWidth' => '3px',
'borderRadius' => '3px',
'borderStyle' => 'solid',
'width' => '134px',
'lineHeight' => '33px',
'fontColor' => '#ffffff',
'fontFamily' => 'Roboto',
'fontSize' => '16px',
'fontWeight' => 'bold',
'textAlign' => 'left',
],
],
],
],
],
],
],
4 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '40px',
],
],
],
1 =>
[
'type' => 'text',
'text' => '...and stay grounded in safety
',
],
2 =>
[
'type' => 'image',
'link' => '',
'src' => $this->template_image_url . '/Engineering-Footer-c.jpg',
'alt' => 'Engineering-Footer-c',
'fullWidth' => true,
'width' => '928px',
'height' => '661px',
'styles' =>
[
'block' =>
[
'textAlign' => 'center',
],
],
],
],
],
],
],
5 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'text',
'text' => 'Bearing sets are back in stock for a limited time!
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ac orci neque. Sed hendrerit condimentum augue, sed porta nulla vulputate rutrum.
',
],
1 =>
[
'type' => 'button',
'text' => 'Find out more',
'url' => '',
'styles' =>
[
'block' =>
[
'backgroundColor' => '#1d1d1d',
'borderColor' => '#ffffff',
'borderWidth' => '3px',
'borderRadius' => '3px',
'borderStyle' => 'solid',
'width' => '134px',
'lineHeight' => '33px',
'fontColor' => '#ffffff',
'fontFamily' => 'Roboto',
'fontSize' => '16px',
'fontWeight' => 'bold',
'textAlign' => 'left',
],
],
],
],
],
1 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '20px',
],
],
],
1 =>
[
'type' => 'image',
'link' => '',
'src' => $this->template_image_url . '/Engineering-Bearing-2.png',
'alt' => 'Engineering-Bearing-2',
'fullWidth' => false,
'width' => '800px',
'height' => '574px',
'styles' =>
[
'block' =>
[
'textAlign' => 'center',
],
],
],
],
],
],
],
6 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '20px',
],
],
],
1 =>
[
'type' => 'divider',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'padding' => '13px',
'borderStyle' => 'dotted',
'borderWidth' => '2px',
'borderColor' => '#424242',
],
],
],
],
],
],
],
7 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '50px',
],
],
],
1 =>
[
'type' => 'social',
'iconSet' => 'circles',
'icons' =>
[
0 =>
[
'type' => 'socialIcon',
'iconType' => 'facebook',
'link' => 'http://www.facebook.com',
'image' => $this->social_icon_url . '/03-circles/Facebook.png',
'height' => '32px',
'width' => '32px',
'text' => 'Facebook',
],
1 =>
[
'type' => 'socialIcon',
'iconType' => 'twitter',
'link' => 'http://www.twitter.com',
'image' => $this->social_icon_url . '/03-circles/Twitter.png',
'height' => '32px',
'width' => '32px',
'text' => 'Twitter',
],
2 =>
[
'type' => 'socialIcon',
'iconType' => 'instagram',
'link' => 'http://instagram.com',
'image' => $this->social_icon_url . '/03-circles/Instagram.png',
'height' => '32px',
'width' => '32px',
'text' => 'Instagram',
],
],
],
],
],
1 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '20px',
],
],
],
1 =>
[
'type' => 'image',
'link' => '',
'src' => $this->template_image_url . '/Engineering-Logo.png',
'alt' => 'Engineering-Logo',
'fullWidth' => true,
'width' => '100px',
'height' => '506px',
'styles' =>
[
'block' =>
[
'textAlign' => 'center',
],
],
],
],
],
2 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '30px',
],
],
],
1 =>
[
'type' => 'footer',
'text' => '' . __("Unsubscribe", 'mailpoet') . '
' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '
',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
'text' =>
[
'fontColor' => '#222222',
'fontFamily' => 'Roboto',
'fontSize' => '12px',
'textAlign' => 'center',
],
'link' =>
[
'fontColor' => '#5aa9cc',
'textDecoration' => 'underline',
],
],
],
],
],
],
],
8 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'horizontal',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'container',
'columnLayout' => false,
'orientation' => 'vertical',
'image' =>
[
'src' => null,
'display' => 'scale',
],
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
],
'blocks' =>
[
0 =>
[
'type' => 'spacer',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '50px',
],
],
],
],
],
],
],
],
],
'globalStyles' =>
[
'text' =>
[
'fontColor' => '#000000',
'fontFamily' => 'Roboto',
'fontSize' => '14px',
],
'h1' =>
[
'fontColor' => '#111111',
'fontFamily' => 'Roboto',
'fontSize' => '40px',
],
'h2' =>
[
'fontColor' => '#222222',
'fontFamily' => 'Roboto',
'fontSize' => '24px',
],
'h3' =>
[
'fontColor' => '#333333',
'fontFamily' => 'Roboto',
'fontSize' => '22px',
],
'link' =>
[
'fontColor' => '#21759B',
'textDecoration' => 'underline',
],
'wrapper' =>
[
'backgroundColor' => '#1d1d1d',
],
'body' =>
[
'backgroundColor' => '#1d1d1d',
],
],
'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' => 'Find out more',
'url' => '',
'styles' =>
[
'block' =>
[
'backgroundColor' => '#1d1d1d',
'borderColor' => '#ffffff',
'borderWidth' => '3px',
'borderRadius' => '3px',
'borderStyle' => 'solid',
'width' => '134px',
'lineHeight' => '33px',
'fontColor' => '#ffffff',
'fontFamily' => 'Roboto',
'fontSize' => '16px',
'fontWeight' => 'bold',
'textAlign' => 'left',
],
],
'type' => 'button',
],
'divider' =>
[
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'padding' => '13px',
'borderStyle' => 'dotted',
'borderWidth' => '2px',
'borderColor' => '#424242',
],
],
'type' => 'divider',
],
'footer' =>
[
'text' => '' . __("Unsubscribe", 'mailpoet') . ' | ' . __("Manage your subscription", 'mailpoet') . '
' . __("Add your postal address here!", 'mailpoet') . '
',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
'text' =>
[
'fontColor' => '#222222',
'fontFamily' => 'Roboto',
'fontSize' => '12px',
'textAlign' => 'center',
],
'link' =>
[
'fontColor' => '#5aa9cc',
'textDecoration' => 'underline',
],
],
'type' => 'footer',
],
'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' => 'circles',
'icons' =>
[
0 =>
[
'type' => 'socialIcon',
'iconType' => 'facebook',
'link' => 'http://www.facebook.com',
'image' => $this->social_icon_url . '/03-circles/Facebook.png',
'height' => '32px',
'width' => '32px',
'text' => 'Facebook',
],
1 =>
[
'type' => 'socialIcon',
'iconType' => 'twitter',
'link' => 'http://www.twitter.com',
'image' => $this->social_icon_url . '/03-circles/Twitter.png',
'height' => '32px',
'width' => '32px',
'text' => 'Twitter',
],
2 =>
[
'type' => 'socialIcon',
'iconType' => 'instagram',
'link' => 'http://instagram.com',
'image' => $this->social_icon_url . '/03-circles/Instagram.png',
'height' => '32px',
'width' => '32px',
'text' => 'Instagram',
],
],
'type' => 'social',
],
'spacer' =>
[
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
'height' => '50px',
],
],
'type' => 'spacer',
],
'header' =>
[
'text' => '' . __("View this in your browser.", 'mailpoet') . '',
'styles' =>
[
'block' =>
[
'backgroundColor' => 'transparent',
],
'text' =>
[
'fontColor' => '#222222',
'fontFamily' => 'Arial',
'fontSize' => '12px',
'textAlign' => 'center',
],
'link' =>
[
'fontColor' => '#6cb7d4',
'textDecoration' => 'underline',
],
],
'type' => 'header',
],
],
];
}
}