| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; |
| 4 |
} |
| 5 |
|
| 6 |
if ( ! class_exists( 'Blockspare_Header_Template_Block' ) ) { |
| 7 |
|
| 8 |
class Blockspare_Header_Template_Block extends Blockspare_Import_Block_Base{ |
| 9 |
public static function get_instance() { |
| 10 |
|
| 11 |
static $instance = null; |
| 12 |
if ( null === $instance ) { |
| 13 |
$instance = new self(); |
| 14 |
} |
| 15 |
return $instance; |
| 16 |
|
| 17 |
} |
| 18 |
public function add_block_template_library( $blocks_lists ){ |
| 19 |
|
| 20 |
$block_library_list = array( |
| 21 |
array( |
| 22 |
'type' => 'header', |
| 23 |
'item' => ['Header'], |
| 24 |
'key' => 'bs_header_1', |
| 25 |
'name' => esc_html__( 'Agency Header', 'blockspare' ), |
| 26 |
'blockLink'=>"https://blockspare.com/demo/default/agency/", |
| 27 |
'content' => '<!-- wp:group {"align":"wide","style":{"border":{"bottom":{"color":"#cccccc","width":"1px"}},"spacing":{"padding":{"top":"30px","bottom":"30px"}}},"backgroundColor":"base","layout":{"type":"constrained"}} --> |
| 28 |
<div class="wp-block-group alignwide has-base-background-color has-background" style="border-bottom-color:#cccccc;border-bottom-width:1px;padding-top:30px;padding-bottom:30px"><!-- wp:columns {"verticalAlignment":"center","align":"wide"} --> |
| 29 |
<div class="wp-block-columns alignwide are-vertically-aligned-center"><!-- wp:column {"verticalAlignment":"center","width":"70%"} --> |
| 30 |
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:70%"><!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap"}} --> |
| 31 |
<div class="wp-block-group"><!-- wp:site-logo {"shouldSyncIcon":true} /--> |
| 32 |
|
| 33 |
<!-- wp:navigation {"ref":662,"style":{"typography":{"fontStyle":"normal","fontWeight":"500","textTransform":"capitalize"}}} /--></div> |
| 34 |
<!-- /wp:group --></div> |
| 35 |
<!-- /wp:column --> |
| 36 |
|
| 37 |
<!-- wp:column {"verticalAlignment":"center","width":"30%"} --> |
| 38 |
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:30%"><!-- wp:group {"layout":{"type":"constrained","justifyContent":"right"}} --> |
| 39 |
<div class="wp-block-group"><!-- wp:blockspare/blockspare-buttons {"sectionAlignment":"right","uniqueClass":"blockspare-758c16ad-5210-4","buttonBackgroundColor":"#2e947d","buttonShape":"blockspare-button-shape-square","marginTop":0,"marginBottom":0} --> |
| 40 |
<div class="wp-block-blockspare-blockspare-buttons blockspare-758c16ad-5210-4 blockspare-block-button-wrap" blockspare-animation=""><style>.blockspare-758c16ad-5210-4 .blockspare-block-button{text-align:right;margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px}.blockspare-758c16ad-5210-4 .blockspare-block-button span{color:#fff;border-width:2px}.blockspare-758c16ad-5210-4 .blockspare-block-button .blockspare-button{background-color:#2e947d}.blockspare-758c16ad-5210-4 .blockspare-block-button .blockspare-button:visited{background-color:#2e947d}.blockspare-758c16ad-5210-4 .blockspare-block-button .blockspare-button:focus{background-color:#2e947d}.blockspare-758c16ad-5210-4 .blockspare-block-button span,.blockspare-758c16ad-5210-4 .blockspare-block-button i{font-size:16px}.blockspare-758c16ad-5210-4 .blockspare-block-button a{padding-top:12px;padding-bottom:12px;padding-right:22px;padding-left:22px}@media screen and (max-width:1025px){.blockspare-758c16ad-5210-4 .blockspare-block-button span,.blockspare-758c16ad-5210-4 .blockspare-block-button i{font-size:14px}}@media screen and (max-width:768px){.blockspare-758c16ad-5210-4 .blockspare-block-button span,.blockspare-758c16ad-5210-4 .blockspare-block-button i{font-size:14px}}</style><div class="blockspare-block-button"><a class="blockspare-button blockspare-button-shape-square blockspare-button-size-small"><span>Get Started</span></a></div></div> |
| 41 |
<!-- /wp:blockspare/blockspare-buttons --></div> |
| 42 |
<!-- /wp:group --></div> |
| 43 |
<!-- /wp:column --></div> |
| 44 |
<!-- /wp:columns --></div> |
| 45 |
<!-- /wp:group -->', |
| 46 |
'imagePath' => 'header', |
| 47 |
), |
| 48 |
array( |
| 49 |
'type' => 'header', |
| 50 |
'item' => ['Header'], |
| 51 |
'key' => 'bs_header_2', |
| 52 |
'name' => esc_html__( 'Lawyer Header', 'blockspare' ), |
| 53 |
'blockLink'=>"https://blockspare.com/demo/default/lawyer/", |
| 54 |
'content' => '<!-- wp:blockspare/blockspare-container {"paddingTop":0,"paddingRight":0,"paddingBottom":0,"paddingLeft":0,"marginTop":0,"marginBottom":0,"uniqueClass":"blockspare-8e37aa95-6584-4","backGroundColor":"#f6f6f6"} --> |
| 55 |
<div class="wp-block-blockspare-blockspare-container alignfull blockspare-8e37aa95-6584-4" blockspare-animation=""><style>.blockspare-8e37aa95-6584-4 > .blockspare-block-container-wrapper{background-color:#f6f6f6;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-radius:0}.blockspare-8e37aa95-6584-4 .blockspare-image-wrap{background-image:none}</style><div class="blockspare-block-container-wrapper blockspare-hover-item"><div class="blockspare-container-background blockspare-image-wrap has-background-opacity-100 has-background-opacity"></div><div class="blockspare-container"><div class="blockspare-inner-blocks blockspare-inner-wrapper-blocks"><!-- wp:group {"style":{"border":{"bottom":{"color":"#cccccc","width":"1px"}},"color":{"background":"#f5f5ef"}},"layout":{"type":"constrained"}} --> |
| 56 |
<div class="wp-block-group has-background" style="border-bottom-color:#cccccc;border-bottom-width:1px;background-color:#f5f5ef"><!-- wp:columns {"verticalAlignment":"center","align":"wide"} --> |
| 57 |
<div class="wp-block-columns alignwide are-vertically-aligned-center"><!-- wp:column {"verticalAlignment":"center","width":"70%"} --> |
| 58 |
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:70%"><!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap"}} --> |
| 59 |
<div class="wp-block-group"><!-- wp:site-logo {"shouldSyncIcon":true} /--> |
| 60 |
|
| 61 |
<!-- wp:navigation {"ref":1895,"style":{"typography":{"fontStyle":"normal","fontWeight":"500","textTransform":"capitalize"}}} /--></div> |
| 62 |
<!-- /wp:group --></div> |
| 63 |
<!-- /wp:column --> |
| 64 |
|
| 65 |
<!-- wp:column {"verticalAlignment":"center","width":"30%"} --> |
| 66 |
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:30%"><!-- wp:group {"layout":{"type":"constrained","justifyContent":"right"}} --> |
| 67 |
<div class="wp-block-group"><!-- wp:blockspare/blockspare-buttons {"sectionAlignment":"right","uniqueClass":"blockspare-c87b3294-bd44-4","buttonText":"Take Appointment","buttonBackgroundColor":"#b69d74","buttonStyle":"solid","borderColor":"#b69d74"} --> |
| 68 |
<div class="wp-block-blockspare-blockspare-buttons blockspare-c87b3294-bd44-4 blockspare-block-button-wrap" blockspare-animation=""><style>.blockspare-c87b3294-bd44-4 .blockspare-block-button{text-align:right;margin-top:30px;margin-bottom:30px;margin-left:0px;margin-right:0px}.blockspare-c87b3294-bd44-4 .blockspare-block-button span{color:#404040}.blockspare-c87b3294-bd44-4 .blockspare-button{border-color:#b69d74;border-style:solid;border-width:2px}.blockspare-c87b3294-bd44-4 .blockspare-block-button .blockspare-button{background-color:transparent}.blockspare-c87b3294-bd44-4 .blockspare-block-button span,.blockspare-c87b3294-bd44-4 .blockspare-block-button i{font-size:16px}.blockspare-c87b3294-bd44-4 .blockspare-block-button a{padding-top:12px;padding-bottom:12px;padding-right:22px;padding-left:22px}@media screen and (max-width:1025px){.blockspare-c87b3294-bd44-4 .blockspare-block-button span,.blockspare-c87b3294-bd44-4 .blockspare-block-button i{font-size:14px}}@media screen and (max-width:768px){.blockspare-c87b3294-bd44-4 .blockspare-block-button span,.blockspare-c87b3294-bd44-4 .blockspare-block-button i{font-size:14px}}</style><div class="blockspare-block-button"><a class="blockspare-button blockspare-button-shape-rounded blockspare-button-size-small"><span>Take Appointment</span></a></div></div> |
| 69 |
<!-- /wp:blockspare/blockspare-buttons --></div> |
| 70 |
<!-- /wp:group --></div> |
| 71 |
<!-- /wp:column --></div> |
| 72 |
<!-- /wp:columns --></div> |
| 73 |
<!-- /wp:group --></div></div></div></div> |
| 74 |
<!-- /wp:blockspare/blockspare-container -->', |
| 75 |
'imagePath' => 'header', |
| 76 |
), |
| 77 |
array( |
| 78 |
'type' => 'header', |
| 79 |
'item' => ['Header'], |
| 80 |
'key' => 'bs_header_3', |
| 81 |
'name' => esc_html__( 'Restaurant Header', 'blockspare' ), |
| 82 |
'blockLink'=>"https://blockspare.com/demo/default/restaurant/", |
| 83 |
'content' => BLOCKSPARE_PRO_PATH, |
| 84 |
'imagePath' => 'header', |
| 85 |
), |
| 86 |
array( |
| 87 |
'type' => 'header', |
| 88 |
'item' => ['Header'], |
| 89 |
'key' => 'bs_header_4', |
| 90 |
'name' => esc_html__( 'Apps Header', 'blockspare' ), |
| 91 |
'blockLink'=>"https://blockspare.com/demo/default/apps/", |
| 92 |
'content' => BLOCKSPARE_PRO_PATH, |
| 93 |
'imagePath' => 'header', |
| 94 |
), |
| 95 |
array( |
| 96 |
'type' => 'header', |
| 97 |
'item' => ['Header'], |
| 98 |
'key' => 'bs_header_5', |
| 99 |
'name' => esc_html__( 'Education Header', 'blockspare' ), |
| 100 |
'blockLink'=>"https://blockspare.com/demo/default/education/", |
| 101 |
'content' => BLOCKSPARE_PRO_PATH, |
| 102 |
'imagePath' => 'header', |
| 103 |
), |
| 104 |
array( |
| 105 |
'type' => 'header', |
| 106 |
'item' => ['Header'], |
| 107 |
'key' => 'bs_header_6', |
| 108 |
'name' => esc_html__( 'Fitness Header', 'blockspare' ), |
| 109 |
'blockLink'=>"https://blockspare.com/demo/default/fitness/", |
| 110 |
'content' => BLOCKSPARE_PRO_PATH, |
| 111 |
'imagePath' => 'header', |
| 112 |
), |
| 113 |
array( |
| 114 |
'type' => 'header', |
| 115 |
'item' => ['Header'], |
| 116 |
'key' => 'bs_header_7', |
| 117 |
'name' => esc_html__( 'Real Estate Header', 'blockspare' ), |
| 118 |
'blockLink'=>"https://blockspare.com/demo/default/real-eastate/", |
| 119 |
'content' => BLOCKSPARE_PRO_PATH, |
| 120 |
'imagePath' => 'header', |
| 121 |
), |
| 122 |
array( |
| 123 |
'type' => 'header', |
| 124 |
'item' => ['Header'], |
| 125 |
'key' => 'bs_header_8', |
| 126 |
'name' => esc_html__( 'Medical Header', 'blockspare' ), |
| 127 |
'blockLink'=>"https://blockspare.com/demo/default/medical/", |
| 128 |
'content' => BLOCKSPARE_PRO_PATH, |
| 129 |
'imagePath' => 'header', |
| 130 |
), |
| 131 |
array( |
| 132 |
'type' => 'header', |
| 133 |
'item' => ['Header'], |
| 134 |
'key' => 'bs_header_9', |
| 135 |
'name' => esc_html__( 'Charity Header', 'blockspare' ), |
| 136 |
'blockLink'=>"https://blockspare.com/demo/default/charity/", |
| 137 |
'content' => BLOCKSPARE_PRO_PATH, |
| 138 |
'imagePath' => 'header', |
| 139 |
), |
| 140 |
array( |
| 141 |
'type' => 'header', |
| 142 |
'item' => ['Header'], |
| 143 |
'key' => 'bs_header_10', |
| 144 |
'name' => esc_html__( 'Sport Header', 'blockspare' ), |
| 145 |
'blockLink'=>"https://blockspare.com/demo/default/sport-news/", |
| 146 |
'content' => BLOCKSPARE_PRO_PATH, |
| 147 |
'imagePath' => 'header', |
| 148 |
), |
| 149 |
array( |
| 150 |
'type' => 'header', |
| 151 |
'item' => ['Header'], |
| 152 |
'key' => 'bs_header_11', |
| 153 |
'name' => esc_html__( 'Pet Care Header', 'blockspare' ), |
| 154 |
'blockLink'=>"https://blockspare.com/demo/default/puppycare/", |
| 155 |
'content' => BLOCKSPARE_PRO_PATH, |
| 156 |
'imagePath' => 'header', |
| 157 |
), |
| 158 |
array( |
| 159 |
'type' => 'header', |
| 160 |
'item' => ['Header'], |
| 161 |
'key' => 'bs_header_12', |
| 162 |
'name' => esc_html__( 'Gadgets Header', 'blockspare' ), |
| 163 |
'blockLink'=>"https://blockspare.com/demo/default/tech-gadgets/", |
| 164 |
'content' => BLOCKSPARE_PRO_PATH, |
| 165 |
'imagePath' => 'header', |
| 166 |
), |
| 167 |
array( |
| 168 |
'type' => 'header', |
| 169 |
'item' => ['Header'], |
| 170 |
'key' => 'bs_header_13', |
| 171 |
'name' => esc_html__( 'Construction Header', 'blockspare' ), |
| 172 |
'blockLink'=>"https://blockspare.com/demo/default/constructions/", |
| 173 |
'content' => BLOCKSPARE_PRO_PATH, |
| 174 |
'imagePath' => 'header', |
| 175 |
) |
| 176 |
); |
| 177 |
|
| 178 |
return array_merge_recursive( $blocks_lists, $block_library_list ); |
| 179 |
} |
| 180 |
} |
| 181 |
} |
| 182 |
Blockspare_Header_Template_Block::get_instance()->run(); |