diff --git a/lib/Config/Populator.php b/lib/Config/Populator.php index 3b7cc016b4..a6cf17955d 100644 --- a/lib/Config/Populator.php +++ b/lib/Config/Populator.php @@ -41,7 +41,8 @@ class Populator { "Discount", "KickOff", "TakeAHike", - "FestivalEvent" + "FestivalEvent", + "PieceOfCake", ); } diff --git a/lib/Config/PopulatorData/Templates/PieceOfCake.php b/lib/Config/PopulatorData/Templates/PieceOfCake.php new file mode 100644 index 0000000000..f3ddbbb903 --- /dev/null +++ b/lib/Config/PopulatorData/Templates/PieceOfCake.php @@ -0,0 +1,443 @@ +template_image_url = '//ps.w.org/mailpoet/assets/newsletter-templates/piece_of_cake'; + $this->social_icon_url = $assets_url . '/img/newsletter_editor/social-icons'; + } + + function get() { + return array( + 'name' => __("Piece of cake", 'mailpoet'), + 'description' => __("Baked with plenty of images.", 'mailpoet'), + 'readonly' => 1, + 'thumbnail' => $this->getThumbnail(), + 'body' => json_encode($this->getBody()), + ); + } + + private function getBody() { + return array( + 'content' => array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'container', + 'orientation' => 'horizontal', + 'styles' => array( + 'block' => array( + 'backgroundColor' => '#ffffff', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'header', + 'text' => '
Open daily from 9am to 9pm | View Online
', + 'styles' => array( + 'block' => array( + 'backgroundColor' => '#ececeb', + ), + 'text' => array( + 'fontColor' => '#606060', + 'fontFamily' => 'Arial', + 'fontSize' => '13px', + 'textAlign' => 'right', + ), + 'link' => array( + 'fontColor' => '#d42b2b', + 'textDecoration' => 'none', + ), + ), + ), + 1 => array( + 'type' => 'spacer', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'height' => '30px', + ), + ), + ), + 2 => array( + 'type' => 'image', + 'link' => '', + 'src' => $this->template_image_url . '/Restaurant-Bakery-Logo-1.png', + 'alt' => 'Restaurant-Bakery-Logo-1', + 'fullWidth' => true, + 'width' => '1280px', + 'height' => '180px', + 'styles' => array( + 'block' => array( + 'textAlign' => 'center', + ), + ), + ), + 3 => array( + 'type' => 'spacer', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'height' => '30px', + ), + ), + ), + 4 => array( + 'type' => 'image', + 'link' => '', + 'src' => $this->template_image_url . '/Restaurant-Bakery-Header.jpg', + 'alt' => 'Restaurant-Bakery-Header', + 'fullWidth' => true, + 'width' => '1280px', + 'height' => '1600px', + 'styles' => array( + 'block' => array( + 'textAlign' => 'center', + ), + ), + ), + 5 => array( + 'type' => 'spacer', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'height' => '40px', + ), + ), + ), + 6 => array( + 'type' => 'text', + 'text' => 'HAPPYBDAY
', + ), + ), + ), + 2 => array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'spacer', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'height' => '20px', + ), + ), + ), + ), + ), + ), + ), + 2 => array( + 'type' => 'container', + 'orientation' => 'horizontal', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'spacer', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'height' => '50px', + ), + ), + ), + ), + ), + ), + ), + 3 => array( + 'type' => 'container', + 'orientation' => 'horizontal', + 'styles' => array( + 'block' => array( + 'backgroundColor' => '#ececeb', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'spacer', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'height' => '20px', + ), + ), + ), + ), + ), + ), + ), + 4 => array( + 'type' => 'container', + 'orientation' => 'horizontal', + 'styles' => array( + 'block' => array( + 'backgroundColor' => '#ececeb', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'text', + 'text' => 'Add your postal address here.
', + ), + ), + ), + 1 => array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'social', + 'iconSet' => 'full-symbol-color', + 'icons' => array( + 0 => array( + 'type' => 'socialIcon', + 'iconType' => 'facebook', + 'link' => 'http://www.facebook.com', + 'image' => $this->social_icon_url . '/06-full-symbol-color/Facebook.png', + 'height' => '32px', + 'width' => '32px', + 'text' => 'Facebook', + ), + 1 => array( + 'type' => 'socialIcon', + 'iconType' => 'twitter', + 'link' => 'http://www.twitter.com', + 'image' => $this->social_icon_url . '/06-full-symbol-color/Twitter.png', + 'height' => '32px', + 'width' => '32px', + 'text' => 'Twitter', + ), + 2 => array( + 'type' => 'socialIcon', + 'iconType' => 'youtube', + 'link' => 'http://www.youtube.com', + 'image' => $this->social_icon_url . '/06-full-symbol-color/Youtube.png', + 'height' => '32px', + 'width' => '32px', + 'text' => 'Youtube', + ), + 3 => array( + 'type' => 'socialIcon', + 'iconType' => 'instagram', + 'link' => 'http://instagram.com', + 'image' => $this->social_icon_url . '/06-full-symbol-color/Instagram.png', + 'height' => '32px', + 'width' => '32px', + 'text' => 'Instagram', + ), + ), + ), + ), + ), + 2 => array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'text', + 'text' => ' + ', + ), + ), + ), + ), + ), + 5 => array( + 'type' => 'container', + 'orientation' => 'horizontal', + 'styles' => array( + 'block' => array( + 'backgroundColor' => '#ececeb', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + 0 => array( + 'type' => 'spacer', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'height' => '40px', + ), + ), + ), + ), + ), + ), + ), + ), + ), + 'globalStyles' => array( + 'text' => array( + 'fontColor' => '#606060', + 'fontFamily' => 'Arial', + 'fontSize' => '16px', + ), + 'h1' => array( + 'fontColor' => '#606060', + 'fontFamily' => 'Arial', + 'fontSize' => '30px', + ), + 'h2' => array( + 'fontColor' => '#d42b2b', + 'fontFamily' => 'Arial', + 'fontSize' => '24px', + ), + 'h3' => array( + 'fontColor' => '#606060', + 'fontFamily' => 'Arial', + 'fontSize' => '20px', + ), + 'link' => array( + 'fontColor' => '#d42b2b', + 'textDecoration' => 'underline', + ), + 'wrapper' => array( + 'backgroundColor' => '#ffffff', + ), + 'body' => array( + 'backgroundColor' => '#ececeb', + ), + ), + ); + } + + private function getThumbnail() { + } + +} \ No newline at end of file