| 1 |
<?php |
| 2 |
namespace YayMail\TemplatePatterns\Patterns; |
| 3 |
|
| 4 |
use YayMail\Abstracts\BasePattern; |
| 5 |
use YayMail\Elements\Column; |
| 6 |
use YayMail\Elements\ColumnLayout; |
| 7 |
use YayMail\Elements\Button; |
| 8 |
use YayMail\Elements\Image; |
| 9 |
use YayMail\Elements\Text; |
| 10 |
use YayMail\TemplatePatterns\SectionTemplates\Intro; |
| 11 |
use YayMail\Utils\SingletonTrait; |
| 12 |
|
| 13 |
/** |
| 14 |
* Intro 2 Pattern |
| 15 |
*/ |
| 16 |
class Intro2 extends BasePattern { |
| 17 |
use SingletonTrait; |
| 18 |
|
| 19 |
public const TYPE = 'intro_2'; |
| 20 |
|
| 21 |
public function __construct() { |
| 22 |
$this->id = uniqid(); |
| 23 |
$this->section = Intro::TYPE; |
| 24 |
$this->position = 10; |
| 25 |
$this->name = __( 'Intro 2', 'yaymail' ); |
| 26 |
$this->elements = [ |
| 27 |
ColumnLayout::get_object_data( |
| 28 |
2, |
| 29 |
[ |
| 30 |
'inner_background_color' => '#ffffff', |
| 31 |
'column_spacing' => 10, |
| 32 |
'padding' => [ |
| 33 |
'top' => 25, |
| 34 |
'bottom' => 25, |
| 35 |
'left' => 40, |
| 36 |
'right' => 40, |
| 37 |
], |
| 38 |
'children' => [ |
| 39 |
Column::get_object_data( |
| 40 |
65, |
| 41 |
[ |
| 42 |
'children' => [ |
| 43 |
Text::get_object_data( |
| 44 |
[ |
| 45 |
'rich_text' => '<p style="font-size: 18px; text-align: left; margin: 0px;"><span style="font-size: 18px;font-weight: 400;text-transform: uppercase;">New arrivals!</span></p>', |
| 46 |
'background_color' => '#ffffff', |
| 47 |
'padding' => [ |
| 48 |
'top' => 0, |
| 49 |
'bottom' => 5, |
| 50 |
'right' => 0, |
| 51 |
'left' => 0, |
| 52 |
], |
| 53 |
'text_color' => '#333439', |
| 54 |
] |
| 55 |
), |
| 56 |
Text::get_object_data( |
| 57 |
[ |
| 58 |
'rich_text' => '<p style="font-size: 24px; text-align: left; margin: 0px;"><span style="font-size: 24px;"><strong>Let\'s explore your Shopping List for the Upcoming Season</strong></span></p>', |
| 59 |
'background_color' => '#ffffff', |
| 60 |
'padding' => [ |
| 61 |
'top' => 0, |
| 62 |
'bottom' => 5, |
| 63 |
'right' => 0, |
| 64 |
'left' => 0, |
| 65 |
], |
| 66 |
'text_color' => '#333439', |
| 67 |
] |
| 68 |
), |
| 69 |
Button::get_object_data( |
| 70 |
[ |
| 71 |
'text' => 'Explore Now', |
| 72 |
'font_size' => 14, |
| 73 |
'border_radius' => [ |
| 74 |
'top_left' => 12, |
| 75 |
'top_right' => 12, |
| 76 |
'bottom_left' => 12, |
| 77 |
'bottom_right' => 12, |
| 78 |
], |
| 79 |
'border' => [ |
| 80 |
'side' => 'all', |
| 81 |
'width' => 1, |
| 82 |
'style' => 'solid', |
| 83 |
'color' => '#FFC900', |
| 84 |
'custom' => [ |
| 85 |
'top' => 1, |
| 86 |
'right' => 1, |
| 87 |
'bottom' => 1, |
| 88 |
'left' => 1, |
| 89 |
], |
| 90 |
], |
| 91 |
'padding' => [ |
| 92 |
'top' => 10, |
| 93 |
'bottom' => 0, |
| 94 |
'left' => 0, |
| 95 |
'right' => 0, |
| 96 |
], |
| 97 |
'background_color' => '#FFFFFF', |
| 98 |
'button_background_color' => '#ffffff', |
| 99 |
'text_color' => '#FFC900', |
| 100 |
'width' => 40, |
| 101 |
'align' => 'left', |
| 102 |
'url' => '[yaymail_site_url]', |
| 103 |
] |
| 104 |
), |
| 105 |
], |
| 106 |
] |
| 107 |
), |
| 108 |
Column::get_object_data( |
| 109 |
35, |
| 110 |
[ |
| 111 |
'children' => [ |
| 112 |
Image::get_object_data( |
| 113 |
[ |
| 114 |
'src' => 'https://images.wpbrandy.com/uploads/yaymail-intro-2-img.png', |
| 115 |
'padding' => [ |
| 116 |
'top' => 0, |
| 117 |
'bottom' => 0, |
| 118 |
'right' => 0, |
| 119 |
'left' => 0, |
| 120 |
], |
| 121 |
'align' => 'right', |
| 122 |
'background_color' => '#ffffff', |
| 123 |
'width' => 242, |
| 124 |
] |
| 125 |
), |
| 126 |
], |
| 127 |
] |
| 128 |
), |
| 129 |
], |
| 130 |
] |
| 131 |
), |
| 132 |
]; |
| 133 |
} |
| 134 |
} |
| 135 |
|