From 539e6d3ee124bcb4b99df43eb0b58e5427d2ce02 Mon Sep 17 00:00:00 2001 From: Pavel Dohnal Date: Tue, 27 Jun 2017 09:10:48 +0100 Subject: [PATCH] Add Burger Joint template [MAILPOET-922] --- lib/Config/Populator.php | 1 + .../PopulatorData/Templates/BurgerJoint.php | 496 ++++++++++++++++++ 2 files changed, 497 insertions(+) create mode 100644 lib/Config/PopulatorData/Templates/BurgerJoint.php diff --git a/lib/Config/Populator.php b/lib/Config/Populator.php index 2e3373aa47..bb047bceec 100644 --- a/lib/Config/Populator.php +++ b/lib/Config/Populator.php @@ -34,6 +34,7 @@ class Populator { "WelcomeBlank1Column", "WelcomeBlank12Column", "SimpleText", + "BurgerJoint", ); } diff --git a/lib/Config/PopulatorData/Templates/BurgerJoint.php b/lib/Config/PopulatorData/Templates/BurgerJoint.php new file mode 100644 index 0000000000..3c95e0f45d --- /dev/null +++ b/lib/Config/PopulatorData/Templates/BurgerJoint.php @@ -0,0 +1,496 @@ +template_image_url = 'http://ps.w.org/mailpoet/assets/newsletter-templates/burger_joint'; + $this->social_icon_url = $assets_url . '/img/newsletter_editor/social-icons'; + } + + function get() { + return array( + 'name' => __("Burger Joint", 'mailpoet'), + 'description' => __("Add more or less ketchup or mayo to this restaurant template.", '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( + array( + 'type' => 'container', + 'orientation' => 'horizontal', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + array( + 'type' => 'image', + 'link' => 'http://example.org', + 'src' => $this->template_image_url . '/header.jpg', + 'alt' => 'Joe\'s Burger Joint', + 'fullWidth' => true, + 'width' => '660px', + 'height' => '100px', + 'styles' => array( + 'block' => array( + 'textAlign' => 'center', + ), + ), + ), + ), + ), + ), + ), + array( + 'type' => 'container', + 'orientation' => 'horizontal', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + array( + 'type' => 'image', + 'link' => 'http://example.org', + 'src' => $this->template_image_url . '/burger-03.jpg', + 'alt' => 'burger-03', + 'fullWidth' => true, + 'width' => '1200px', + 'height' => '613px', + 'styles' => array( + 'block' => array( + 'textAlign' => 'center', + ), + ), + ), + array( + 'type' => 'spacer', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'height' => '30px', + ), + ), + ), + array( + 'type' => 'button', + 'text' => 'Make a reservation', + 'url' => 'http://example.org', + 'styles' => array( + 'block' => array( + 'backgroundColor' => '#d83b3b', + 'borderColor' => '#ffffff', + 'borderWidth' => '0px', + 'borderRadius' => '0px', + 'borderStyle' => 'solid', + 'width' => '225px', + 'lineHeight' => '50px', + 'fontColor' => '#ffffff', + 'fontFamily' => 'Verdana', + 'fontSize' => '18px', + 'fontWeight' => 'normal', + 'textAlign' => 'center', + ), + ), + ), + array( + 'type' => 'text', + 'text' => '

Upgrade! Add these sides

', + ), + array( + 'type' => 'spacer', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'height' => '20px', + ), + ), + ), + ), + ), + ), + ), + array( + 'type' => 'container', + 'orientation' => 'horizontal', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + array( + 'type' => 'image', + 'link' => 'http://example.org', + 'src' => $this->template_image_url . '/fries-01.jpg', + 'alt' => 'fries-01', + 'fullWidth' => false, + 'width' => '1000px', + 'height' => '1500px', + 'styles' => array( + 'block' => array( + 'textAlign' => 'center', + ), + ), + ), + array( + 'type' => 'text', + 'text' => '

Cras cursus viverra nulla non tempus. Curabitur sed neque vel sapien! - Morbi ullamcorper, Tellus Diam

', + ), + ), + ), + array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + array( + 'type' => 'image', + 'link' => 'http://example.org', + 'src' => $this->template_image_url . '/rolls-01.jpg', + 'alt' => 'rolls-01', + 'fullWidth' => false, + 'width' => '1000px', + 'height' => '1500px', + 'styles' => array( + 'block' => array( + 'textAlign' => 'center', + ), + ), + ), + array( + 'type' => 'text', + 'text' => '

Morbi ex diam, venenatis a efficitur et, iaculis at nibh. - Quis Ullamcorper, Tortor Ligula

', + ), + ), + ), + ), + ), + array( + 'type' => 'container', + 'orientation' => 'horizontal', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + array( + 'type' => 'divider', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'padding' => '34px', + 'borderStyle' => 'dashed', + 'borderWidth' => '3px', + 'borderColor' => '#aaaaaa', + ), + ), + ), + ), + ), + ), + ), + array( + 'type' => 'container', + 'orientation' => 'horizontal', + 'styles' => array( + 'block' => array( + 'backgroundColor' => '#e0e0e0', + ), + ), + 'blocks' => array( + array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + array( + 'type' => 'spacer', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'height' => '30px', + ), + ), + ), + array( + 'type' => 'text', + 'text' => '

Find us at these locations

', + ), + array( + 'type' => 'spacer', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'height' => '20px', + ), + ), + ), + ), + ), + ), + ), + array( + 'type' => 'container', + 'orientation' => 'horizontal', + 'styles' => array( + 'block' => array( + 'backgroundColor' => '#e0e0e0', + ), + ), + 'blocks' => array( + array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + array( + 'type' => 'text', + 'text' => '

Denver

1263 Schoville Street

53355 DENVER

CO

', + ), + ), + ), + array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + array( + 'type' => 'text', + 'text' => '

Fort Collins

157 Maine Street

86432 FORT COLLINS
CO

', + ), + ), + ), + array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + array( + 'type' => 'text', + 'text' => '

Pueblo

5390 York Avenue

64297 Pueblo

CO

', + ), + ), + ), + ), + ), + array( + 'type' => 'container', + 'orientation' => 'horizontal', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + array( + 'type' => 'container', + 'orientation' => 'vertical', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + ), + 'blocks' => array( + array( + 'type' => 'spacer', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + 'height' => '30px', + ), + ), + ), + array( + 'type' => 'social', + 'iconSet' => 'full-symbol-black', + 'icons' => array( + array( + 'type' => 'socialIcon', + 'iconType' => 'facebook', + 'link' => 'http://example.com', + 'image' => $this->social_icon_url . '/07-full-symbol-black/Facebook.png', + 'height' => '32px', + 'width' => '32px', + 'text' => 'Facebook', + ), + array( + 'type' => 'socialIcon', + 'iconType' => 'twitter', + 'link' => 'http://example.com', + 'image' => $this->social_icon_url . '/07-full-symbol-black/Twitter.png', + 'height' => '32px', + 'width' => '32px', + 'text' => 'Twitter', + ), + array( + 'type' => 'socialIcon', + 'iconType' => 'instagram', + 'link' => 'http://instagram.com', + 'image' => $this->social_icon_url . '/07-full-symbol-black/Instagram.png', + 'height' => '32px', + 'width' => '32px', + 'text' => 'Instagram', + ), + ), + ), + array( + 'type' => 'header', + 'text' => '

View this email in your web browser

', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + 'text' => array( + 'fontColor' => '#222222', + 'fontFamily' => 'Verdana', + 'fontSize' => '12px', + 'textAlign' => 'center', + ), + 'link' => array( + 'fontColor' => '#d83b3b', + 'textDecoration' => 'underline', + ), + ), + ), + array( + 'type' => 'footer', + 'text' => '

Unsubscribe | Manage subscription
Address: Colorado

', + 'styles' => array( + 'block' => array( + 'backgroundColor' => 'transparent', + ), + 'text' => array( + 'fontColor' => '#222222', + 'fontFamily' => 'Verdana', + 'fontSize' => '12px', + 'textAlign' => 'center', + ), + 'link' => array( + 'fontColor' => '#d83b3b', + 'textDecoration' => 'none', + ), + ), + ), + ), + ), + ), + ), + ), + ), + 'globalStyles' => array( + 'text' => array( + 'fontColor' => '#434343', + 'fontFamily' => 'Tahoma', + 'fontSize' => '16px', + ), + 'h1' => array( + 'fontColor' => '#222222', + 'fontFamily' => 'Verdana', + 'fontSize' => '24px', + ), + 'h2' => array( + 'fontColor' => '#222222', + 'fontFamily' => 'Verdana', + 'fontSize' => '22px', + ), + 'h3' => array( + 'fontColor' => '#222222', + 'fontFamily' => 'Verdana', + 'fontSize' => '20px', + ), + 'link' => array( + 'fontColor' => '#21759B', + 'textDecoration' => 'underline', + ), + 'wrapper' => array( + 'backgroundColor' => '#f0f0f0', + ), + 'body' => array( + 'backgroundColor' => '#ffffff', + ), + ), + ); + } + + private function getThumbnail() { + } + +}