| 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\Image; |
| 8 |
use YayMail\Elements\Text; |
| 9 |
use YayMail\TemplatePatterns\SectionTemplates\Intro; |
| 10 |
use YayMail\Utils\SingletonTrait; |
| 11 |
|
| 12 |
/** |
| 13 |
* Intro 4 Pattern |
| 14 |
*/ |
| 15 |
class Intro4 extends BasePattern { |
| 16 |
use SingletonTrait; |
| 17 |
|
| 18 |
public const TYPE = 'intro_4'; |
| 19 |
|
| 20 |
public function __construct() { |
| 21 |
$this->id = uniqid(); |
| 22 |
$this->section = Intro::TYPE; |
| 23 |
$this->position = 10; |
| 24 |
$this->name = __( 'Intro 4', 'yaymail' ); |
| 25 |
$this->elements = [ |
| 26 |
ColumnLayout::get_object_data( |
| 27 |
2, |
| 28 |
[ |
| 29 |
'inner_background_color' => '#ffffff00', |
| 30 |
'column_spacing' => 20, |
| 31 |
'border_radius' => [ |
| 32 |
'top_left' => 15, |
| 33 |
'top_right' => 15, |
| 34 |
'bottom_right' => 15, |
| 35 |
'bottom_left' => 15, |
| 36 |
], |
| 37 |
'padding' => [ |
| 38 |
'top' => 13, |
| 39 |
'bottom' => 0, |
| 40 |
'left' => 40, |
| 41 |
'right' => 42, |
| 42 |
], |
| 43 |
'background_image' => [ |
| 44 |
'url' => 'https://images.wpbrandy.com/uploads/yaymail-intro-3-bg.png', |
| 45 |
'position' => 'center_center', |
| 46 |
'x_position' => 52, |
| 47 |
'y_position' => 50, |
| 48 |
'repeat' => 'no-repeat', |
| 49 |
'size' => 'cover', |
| 50 |
], |
| 51 |
'children' => [ |
| 52 |
Column::get_object_data( |
| 53 |
65, |
| 54 |
[ |
| 55 |
'children' => [ |
| 56 |
Text::get_object_data( |
| 57 |
[ |
| 58 |
'rich_text' => '<p style="font-size: 24px; text-align: left; margin: 0px;"><span style="font-size: 24px;font-weight: 700;">Welcome [yaymail_customer_username] 👋</span></p>', |
| 59 |
'background_color' => '#ffffff00', |
| 60 |
'padding' => [ |
| 61 |
'top' => 20, |
| 62 |
'bottom' => 0, |
| 63 |
'right' => 0, |
| 64 |
'left' => 0, |
| 65 |
], |
| 66 |
'text_color' => '#333439', |
| 67 |
] |
| 68 |
), |
| 69 |
Text::get_object_data( |
| 70 |
[ |
| 71 |
'rich_text' => '<p style="font-size: 18px; text-align: left; margin: 0px;"><span style="font-size: 18px;font-weight: 400;">We\'re excited to unveil our latest product, meticulously crafted with you in mind!</span></p>', |
| 72 |
'background_color' => '#ffffff00', |
| 73 |
'padding' => [ |
| 74 |
'top' => 10, |
| 75 |
'bottom' => 25, |
| 76 |
'right' => 0, |
| 77 |
'left' => 0, |
| 78 |
], |
| 79 |
'text_color' => '#333439', |
| 80 |
] |
| 81 |
), |
| 82 |
], |
| 83 |
] |
| 84 |
), |
| 85 |
Column::get_object_data( |
| 86 |
35, |
| 87 |
[ |
| 88 |
'children' => [ |
| 89 |
Image::get_object_data( |
| 90 |
[ |
| 91 |
'src' => 'https://images.wpbrandy.com/uploads/yaymail-intro-4-img.png', |
| 92 |
'padding' => [ |
| 93 |
'top' => 0, |
| 94 |
'bottom' => 0, |
| 95 |
'right' => 0, |
| 96 |
'left' => 0, |
| 97 |
], |
| 98 |
'align' => 'right', |
| 99 |
'background_color' => '#ffffff00', |
| 100 |
'width' => 242, |
| 101 |
] |
| 102 |
), |
| 103 |
], |
| 104 |
] |
| 105 |
), |
| 106 |
], |
| 107 |
] |
| 108 |
), |
| 109 |
]; |
| 110 |
} |
| 111 |
} |
| 112 |
|