| 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\Header; |
| 10 |
use YayMail\Utils\SingletonTrait; |
| 11 |
|
| 12 |
/** |
| 13 |
* Header2 Elements |
| 14 |
*/ |
| 15 |
class Header2 extends BasePattern { |
| 16 |
|
| 17 |
use SingletonTrait; |
| 18 |
|
| 19 |
public const TYPE = 'header_2'; |
| 20 |
|
| 21 |
private function __construct() { |
| 22 |
$this->id = uniqid(); |
| 23 |
$this->section = Header::TYPE; |
| 24 |
$this->position = 20; |
| 25 |
$this->name = __( 'Header 2', 'yaymail' ); |
| 26 |
$this->elements = [ |
| 27 |
ColumnLayout::get_object_data( |
| 28 |
3, |
| 29 |
[ |
| 30 |
'background_color' => '#ffffff', |
| 31 |
'children' => [ |
| 32 |
Column::get_object_data( |
| 33 |
32, |
| 34 |
[ |
| 35 |
'children' => [ |
| 36 |
Image::get_object_data( |
| 37 |
[ |
| 38 |
'src' => 'https://images.wpbrandy.com/uploads/yaymail-footer-img-1.png', |
| 39 |
'width' => 195, |
| 40 |
'padding' => [ |
| 41 |
'top' => 0, |
| 42 |
'right' => 0, |
| 43 |
'bottom' => 0, |
| 44 |
'left' => 0, |
| 45 |
], |
| 46 |
] |
| 47 |
), |
| 48 |
], |
| 49 |
] |
| 50 |
), |
| 51 |
Column::get_object_data( |
| 52 |
5, |
| 53 |
[ |
| 54 |
'children' => [ |
| 55 |
Text::get_object_data( |
| 56 |
[ |
| 57 |
'rich_text' => '<p style="text-align: center; margin: 0;"><span style="font-size: 18px; font-weight: 100;">|</span></p>', |
| 58 |
'padding' => [ |
| 59 |
'top' => 0, |
| 60 |
'right' => 0, |
| 61 |
'bottom' => 0, |
| 62 |
'left' => 0, |
| 63 |
], |
| 64 |
'text_color' => '#C4C6CC', |
| 65 |
] |
| 66 |
), |
| 67 |
], |
| 68 |
] |
| 69 |
), |
| 70 |
Column::get_object_data( |
| 71 |
68, |
| 72 |
[ |
| 73 |
'children' => [ |
| 74 |
Text::get_object_data( |
| 75 |
[ |
| 76 |
'rich_text' => '<p style="text-align: left; margin: 0;"><span style="font-size: 18px; margin: 0px;">A store where you can shop everything</span></p>', |
| 77 |
'padding' => [ |
| 78 |
'top' => 0, |
| 79 |
'right' => 0, |
| 80 |
'bottom' => 0, |
| 81 |
'left' => 0, |
| 82 |
], |
| 83 |
'text_color' => '#333439', |
| 84 |
] |
| 85 |
), |
| 86 |
], |
| 87 |
] |
| 88 |
), |
| 89 |
], |
| 90 |
'padding' => [ |
| 91 |
'top' => 20, |
| 92 |
'left' => 30, |
| 93 |
'bottom' => 10, |
| 94 |
'right' => 30, |
| 95 |
], |
| 96 |
] |
| 97 |
), |
| 98 |
Text::get_object_data( |
| 99 |
[ |
| 100 |
'rich_text' => '<p style="text-align: left; margin: 0;"><span style="font-size: 16px;"><span style="margin-right: 25px;">Support</span> <span style="margin-right: 25px;">Blog</span> <span style="margin-right: 25px;">FAQs</span></span></p>', |
| 101 |
'padding' => [ |
| 102 |
'top' => 0, |
| 103 |
'right' => 30, |
| 104 |
'bottom' => 20, |
| 105 |
'left' => 30, |
| 106 |
], |
| 107 |
'text_color' => '#333439', |
| 108 |
] |
| 109 |
), |
| 110 |
]; |
| 111 |
} |
| 112 |
} |
| 113 |
|