PluginProbe
BlockSpare – Gutenberg Blocks, AI Content Generator & Site Builder for News, Magazine & Blogs / 2.7.3
BlockSpare – Gutenberg Blocks, AI Content Generator & Site Builder for News, Magazine & Blogs v2.7.3
5.0.1 4.1.0 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.1.2 2.5.0 2.5.3 All 39 releases
← All changes | inc/latest-post-block/posts-list/index.php +232 -160 2.5.3 → 2.7.3 View file →
@@ -2,8 +2,11 @@
2 2 if(!function_exists('blockspare_render_block_core_latest_posts_list')){
3 3 function blockspare_render_block_core_latest_posts_list($attributes)
4 4 {
5 5
6 + if($attributes['enablePagination']){
7 + wp_enqueue_script('blockspare-pagination-js');
8 + }
6 9 ob_start();
7 10 $unq_class = mt_rand(100000,999999);
8 11 $blockuniqueclass = '';
9 12
@@ -23,15 +26,42 @@
23 26 if($attributes['enableFeatureImage'] == true){
24 27 $hasimgclass = $attributes['imageSize'].'-'.$attributes['ImageUnit'];
25 28
26 29 }
30 + $blockName= 'post-list';
31 + $layoutClass= false;
32 + if($attributes['design'] != 'blockspare-posts-block-list-layout-4' && $attributes['design'] != 'blockspare-posts-block-list-layout-5' && $attributes['design'] != 'blockspare-posts-block-list-layout-6') {
33 + $layoutClass= true;
34 + }
27 35
28 - $block_class = 'blockspare-posts-block-is-list '.$hasimgclass .' has-gutter-'.$attributes['gutterSpace'];;
29 - blockspare_query_loop_and_wrapper($attributes,$block_class,$design);
30 -
31 - $data_content = blockspare_post_style_css($blockuniqueclass ,$attributes);
32 - $data_content .= ob_get_clean();
33 - return $data_content;
36 + $block_class = 'blockspare-posts-block-is-list '.$hasimgclass .' has-gutter-'.$attributes['gutterSpace'];
37 + if($attributes['displayPostExcerpt'] == true) {
38 + $block_class .= ' blockspare-post-expert-enabled';
39 + }
40 + if($attributes['imageSize'] == 'thumbnail') {
41 + $block_class .= ' blockspare-has-thumbnail-image';
42 + }
43 +
44 + $alignclass = blockspare_checkalignment($attributes['align']);
45 + $class = "wp-block-blockspare-posts-block-blockspare-posts-block-latest-posts align".$alignclass." ".$attributes['blockHoverEffect'] ;
46 +
47 + if (isset($attributes['className'])) {
48 + $class .= ' ' . $attributes['className'];
49 + }
50 +
51 + if( $attributes['animation']){
52 + $class .=' blockspare-block-animation';
53 + }
54 + $class .= ' ' . $blockuniqueclass;?>
55 + <div class="<?php echo esc_attr($class);?>" blockspare-animation=<?php echo esc_attr( $attributes['animation'] )?>>
56 + <?php
57 + echo blockspare_post_style_css($blockuniqueclass ,$attributes);
58 + blockspare_query_loop_and_wrapper($attributes,$block_class,$design,$blockName,$layoutClass);
59 + ?>
60 + </div>
61 + <?php
62 +
63 + return ob_get_clean();
34 64
35 65 }
36 66 }
37 67
@@ -219,217 +249,259 @@
219 249
220 250 return $imageSizes;
221 251 }
222 252 }
223 - if(!function_exists('blockspare_post_style_css')){
253 +if(!function_exists('blockspare_post_style_css')){
224 254 function blockspare_post_style_css($blockuniqueclass ,$attributes){
225 255
226 -
227 256 $block_content ='';
228 257 $block_content .= '<style type="text/css">';
229 - $block_content .= ' .' . $blockuniqueclass . '.blockspare-posts-block-latest-post-wrap{
230 - margin-top:' . $attributes['marginTop'] . 'px;
231 - margin-bottom:' . $attributes['marginBottom'] . 'px;
232 - margin-left:' . $attributes['marginLeft'] . 'px;
233 - margin-right:' . $attributes['marginRight'] . 'px;
234 - }';
258 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-wrap{
259 + margin-top:' . $attributes['marginTop'] . 'px;
260 + margin-bottom:' . $attributes['marginBottom'] . 'px;
261 + margin-left:' . $attributes['marginLeft'] . 'px;
262 + margin-right:' . $attributes['marginRight'] . 'px;
263 + }';
235 264
236 265 $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-content{
237 - padding-top:' . $attributes['contentPaddingTop'] . 'px;
238 - padding-right:' . $attributes['contentPaddingRight'] . 'px;
239 - padding-bottom:' . $attributes['contentPaddingBottom'] . 'px;
240 - padding-left:' . $attributes['contentPaddingLeft'] . 'px;
241 - }';
266 + padding-top:' . $attributes['contentPaddingTop'] . 'px;
267 + padding-right:' . $attributes['contentPaddingRight'] . 'px;
268 + padding-bottom:' . $attributes['contentPaddingBottom'] . 'px;
269 + padding-left:' . $attributes['contentPaddingLeft'] . 'px;
270 + }';
242 271
243 -
244 272 if ($attributes['categoryLayoutOption'] == 'solid') {
245 -
246 - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-category a{
273 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-category a{
247 274 color:' . $attributes['categoryTextColor'] . "!important" . ';
248 275 background-color:' . $attributes['categoryBackgroundColor'] . "!important" . ';
249 276 border-radius:' . $attributes['categoryBorderRadius'] . "px" . ';
250 - }';
251 -
252 -
277 + }';
253 278 } else if ($attributes['categoryLayoutOption'] == 'border') {
254 -
255 -
256 - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-category a{
279 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-category a{
257 280 color:' . $attributes['categoryTextColor'] . "!important" . ';
258 281 background-color:' . "transparent" . ';
259 282 border:' . "1px solid" . $attributes['categoryBorderColor'] . ';
260 283 border-radius:' . $attributes['categoryBorderRadius'] . "px" . ';
261 284 border-width:' . $attributes['categoryBorderWidth'] . "px" . ';
262 - }';
263 -
264 -
265 -
285 + }';
266 286 } else {
267 287 $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-category a{
268 288 color:' . $attributes['categoryTextColor'] . "!important" . ';
269 - }';
289 + }';
270 290 }
271 291
272 -
273 292 $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-category{
274 - margin-top:' . $attributes['categoryMarginTop'] . 'px' . ';
275 - margin-bottom:' . $attributes['categoryMarginBottom'] . 'px' . ';
276 - margin-left:' . $attributes['categoryMarginLeft'] . 'px' . ';
277 - margin-right:' . $attributes['categoryMarginRight'] . 'px' . ';
278 - }';
293 + margin-top:' . $attributes['categoryMarginTop'] . 'px' . ';
294 + margin-bottom:' . $attributes['categoryMarginBottom'] . 'px' . ';
295 + margin-left:' . $attributes['categoryMarginLeft'] . 'px' . ';
296 + margin-right:' . $attributes['categoryMarginRight'] . 'px' . ';
297 + }';
279 298
280 -
281 299 $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-byline{
282 -
283 - margin-top:' . $attributes['metaMarginTop'] . 'px' . ';
284 - margin-bottom:' . $attributes['metaMarginBottom'] . 'px' . ';
285 - margin-left:' . $attributes['metaMarginLeft'] . 'px' . ';
286 - margin-right:' . $attributes['metaMarginRight'] . 'px' . ';
287 - }';
300 + margin-top:' . $attributes['metaMarginTop'] . 'px' . ';
301 + margin-bottom:' . $attributes['metaMarginBottom'] . 'px' . ';
302 + margin-left:' . $attributes['metaMarginLeft'] . 'px' . ';
303 + margin-right:' . $attributes['metaMarginRight'] . 'px' . ';
304 + }';
288 305
289 -
290 306 $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-more-link{
291 - margin-top:' . $attributes['moreLinkMarginTop'] . 'px' . ';
292 - margin-bottom:' . $attributes['moreLinkMarginBottom'] . 'px' . ';
293 - margin-left:' . $attributes['moreLinkMarginLeft'] . 'px' . ';
294 - margin-right:' . $attributes['moreLinkMarginRight'] . 'px' . ';
295 - }';
307 + margin-top:' . $attributes['moreLinkMarginTop'] . 'px' . ';
308 + margin-bottom:' . $attributes['moreLinkMarginBottom'] . 'px' . ';
309 + margin-left:' . $attributes['moreLinkMarginLeft'] . 'px' . ';
310 + margin-right:' . $attributes['moreLinkMarginRight'] . 'px' . ';
311 + }';
296 312
297 - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title a span{
298 - color: ' . $attributes['postTitleColor'] . ';
299 -
300 - }';
313 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title a span{
314 + color: ' . $attributes['postTitleColor'] . ';
315 + }';
301 316
302 - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-author a span{
303 - color:' . $attributes['linkColor'] . ';
304 - }';
317 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-author a span{
318 + color:' . $attributes['linkColor'] . ';
319 + }';
305 320
321 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-more-link span{
322 + color:' . $attributes['linkColor'] . ';
323 + }';
306 324
307 - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-more-link span{
308 - color:' . $attributes['linkColor'] . ';
309 - }';
325 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-date{
326 + color:' . $attributes['generalColor'] . ';
327 + }';
310 328
311 - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-date{
312 - color:' . $attributes['generalColor'] . ';
313 - }';
329 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-excerpt-content{
330 + color:' . $attributes['generalColor'] . ';
331 + }';
332 +
333 + $block_content .= ' .' . $blockuniqueclass . ' .comment_count{
334 + color:' . $attributes['generalColor'] . ';
335 + }';
314 336
315 - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-excerpt-content,'.' .' . $blockuniqueclass . ' .comment_count{
316 - color:' . $attributes['generalColor'] . ';
317 -
318 - }';
319 -
320 -
321 337 $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title{
322 - margin-top:' . $attributes['titleMarginTop'] . 'px' . ';
323 - margin-bottom:' . $attributes['titleMarginBottom'] . 'px' . ';
324 - margin-left:' . $attributes['titleMarginLeft'] . 'px' . ';
325 - margin-right:' . $attributes['titleMarginRight'] . 'px' . ';
326 - }';
338 + margin-top:' . $attributes['titleMarginTop'] . 'px' . ';
339 + margin-bottom:' . $attributes['titleMarginBottom'] . 'px' . ';
340 + margin-left:' . $attributes['titleMarginLeft'] . 'px' . ';
341 + margin-right:' . $attributes['titleMarginRight'] . 'px' . ';
342 + }';
327 343
328 -
329 344 $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-excerpt-content{
330 - margin-top:' . $attributes['exceprtMarginTop'] . 'px' . ';
331 - margin-bottom:' . $attributes['exceprtMarginBottom'] . 'px' . ';
332 - margin-left:' . $attributes['exceprtMarginLeft'] . 'px' . ';
333 - margin-right:' . $attributes['exceprtMarginRight'] . 'px' . ';
345 + margin-top:' . $attributes['exceprtMarginTop'] . 'px' . ';
346 + margin-bottom:' . $attributes['exceprtMarginBottom'] . 'px' . ';
347 + margin-left:' . $attributes['exceprtMarginLeft'] . 'px' . ';
348 + margin-right:' . $attributes['exceprtMarginRight'] . 'px' . ';
349 + }';
350 +
351 + $layoutstyle = explode('-',$attributes['design']);
352 +
353 + if($layoutstyle[5] >3){
354 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-single .blockspare-posts-block-post-img img{
355 + border-radius:' . $attributes['borderRadius'] . 'px'.';
356 + }';
357 + if($attributes['enableBoxShadow']){
358 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-single .blockspare-posts-block-post-img img{
359 + box-shadow: ' . $attributes['xOffset'] . 'px ' . $attributes['yOffset'] . 'px ' . $attributes['blur'] . 'px ' . $attributes['spread'] . 'px ' . $attributes['shadowColor'] . ';
334 360 }';
335 -
336 -
337 -
338 - $layoutstyle = explode('-',$attributes['design']);
339 - if($layoutstyle[5] >3){
340 - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-single .blockspare-posts-block-post-img img{
341 - border-radius:' . $attributes['borderRadius'] . 'px'.';
342 -
343 - }';
344 - if($attributes['enableBoxShadow']){
345 - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-single .blockspare-posts-block-post-img img{
346 - box-shadow: ' . $attributes['xOffset'] . 'px ' . $attributes['yOffset'] . 'px ' . $attributes['blur'] . 'px ' . $attributes['spread'] . 'px ' . $attributes['shadowColor'] . ';
347 - }';
348 - }
349 - }else{
350 - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-single{
351 - border-radius:' . $attributes['borderRadius'] . 'px'.';
352 - background-color:'.$attributes['backGroundColor'].'
353 - }';
361 + }
362 + }else{
363 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-single{
364 + border-radius:' . $attributes['borderRadius'] . 'px'.';
365 + background-color:'.$attributes['backGroundColor'].'
366 + }';
354 367
355 - if($attributes['enableBoxShadow']){
356 - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-single{
357 - box-shadow: ' . $attributes['xOffset'] . 'px ' . $attributes['yOffset'] . 'px ' . $attributes['blur'] . 'px ' . $attributes['spread'] . 'px ' . $attributes['shadowColor'] . ';
358 - }';
359 - }
360 - }
368 + if($attributes['enableBoxShadow']){
369 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-single{
370 + box-shadow: ' . $attributes['xOffset'] . 'px ' . $attributes['yOffset'] . 'px ' . $attributes['blur'] . 'px ' . $attributes['spread'] . 'px ' . $attributes['shadowColor'] . ';
371 + }';
372 + }
373 + }
361 374
362 -
363 - //Title Hover
375 + //Title Hover
364 376
365 - if($attributes['titleOnHover']=='lpc-title-hover') {
366 - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-content .blockspare-posts-block-title-link:hover span{
367 - color: ' . $attributes['titleOnHoverColor'] . ';
368 -
377 + if($attributes['titleOnHover']=='lpc-title-hover') {
378 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-content .blockspare-posts-block-title-link:hover span{
379 + color: ' . $attributes['titleOnHoverColor'] . ';
369 380 }';
370 381 }
371 382
372 - if($attributes['titleOnHover']=='lpc-title-border') {
373 - $block_content .= ' .' . $blockuniqueclass . ' .lpc-title-border .blockspare-posts-block-post-grid-title .blockspare-posts-block-title-link span:hover{
374 - box-shadow: inset 0 -2px 0 0 ' . $attributes['titleOnHoverColor'] . ';
375 -
376 - }';
377 - }
383 + if($attributes['titleOnHover']=='lpc-title-border') {
384 + $block_content .= ' .' . $blockuniqueclass . ' .lpc-title-border .blockspare-posts-block-post-grid-title .blockspare-posts-block-title-link span:hover{
385 + box-shadow: inset 0 -2px 0 0 ' . $attributes['titleOnHoverColor'] . ';
386 + }';
387 + }
378 388
379 -
380 -
381 389 //Font Settings
382 390
383 -
391 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title a span{
392 + font-size: ' . $attributes['postTitleFontSize'] . $attributes['titleFontSizeType'] . ';
393 + '.bscheckFontfamily($attributes['titleFontFamily']).';
394 + '.bscheckFontfamilyWeight($attributes['titleFontWeight']).';
395 + line-height: ' . $attributes['postTitleLineHeight'] . ';
396 + }';
384 397
385 - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title a span{
386 -
387 - font-size: ' . $attributes['postTitleFontSize'] . $attributes['titleFontSizeType'] . ';
388 -
389 - '.bscheckFontfamily($attributes['titleFontFamily']).';
390 - font-weight: ' . $attributes['titleFontWeight'] . ';
391 - }';
398 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-content .blockspare-posts-block-post-grid-excerpt .blockspare-posts-block-post-grid-excerpt-content {
399 + font-size:' . $attributes['descriptionFontSize'] . $attributes['descriptionFontSizeType'] . ';
400 + '.bscheckFontfamily($attributes['descriptionFontFamily']).';
401 + '.bscheckFontfamilyWeight($attributes['descriptionFontWeight']).';
402 + }';
403 +
404 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-category a {
405 + font-size:' . $attributes['postCategoryFontSize'] . $attributes['postCategoryFontSizeType'] . ';
406 + '.bscheckFontfamily($attributes['postCategoryFontFamily']).';
407 + '.bscheckFontfamilyWeight($attributes['postCategoryFontWeight']).';
408 + }';
409 +
410 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-author a span {
411 + font-size:' . $attributes['postMetaFontSize'] . $attributes['postMetaFontSizeType'] . ';
412 + '.bscheckFontfamily($attributes['postMetaFontFamily']).';
413 + '.bscheckFontfamilyWeight($attributes['postMetaFontWeight']).';
414 + }';
415 +
416 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-date {
417 + font-size:' . $attributes['postMetaFontSize'] . $attributes['postMetaFontSizeType'] . ';
418 + '.bscheckFontfamily($attributes['postMetaFontFamily']).';
419 + '.bscheckFontfamilyWeight($attributes['postMetaFontWeight']).';
420 + }';
421 +
422 + $block_content .= ' .' . $blockuniqueclass . ' .comment_count {
423 + font-size:' . $attributes['postMetaFontSize'] . $attributes['postMetaFontSizeType'] . ';
424 + '.bscheckFontfamily($attributes['postMetaFontFamily']).';
425 + '.bscheckFontfamilyWeight($attributes['postMetaFontWeight']).';
426 + }';
392 427
393 - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-content .blockspare-posts-block-post-grid-excerpt .blockspare-posts-block-post-grid-excerpt-content {
394 - font-size:' . $attributes['descriptionFontSize'] . $attributes['descriptionFontSizeType'] . ';
395 -
396 - '.bscheckFontfamily($attributes['descriptionFontFamily']).';
397 - font-weight: ' . $attributes['descriptionFontWeight'] . ';
398 - }';
428 + $block_content .= '@media (max-width: 1025px) { ';
429 +
430 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title a span{
431 + font-size: ' . $attributes['titleFontSizeTablet'] . $attributes['titleFontSizeType'] . ';
432 + }';
433 + $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-content .blockspare-posts-block-post-grid-excerpt .blockspare-posts-block-post-grid-excerpt-content {
434 + font-size:' . $attributes['descriptionFontSizeTablet'].$attributes['descriptionFontSizeType'].'
435 + }';
436 + $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-category a {
437 + font-size:' . $attributes['postCategoryFontSizeTablet'].$attributes['postCategoryFontSizeType'].'
438 + }';
439 + $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-grid-author a span {
440 + font-size:' . $attributes['postMetaFontSizeTablet'].$attributes['postMetaFontSizeType'].'
441 + }';
442 + $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-grid-date {
443 + font-size:' . $attributes['postMetaFontSizeTablet'].$attributes['postMetaFontSizeType'].'
444 + }';
445 + $block_content .= ' .' . $blockuniqueclass .' .comment_count {
446 + font-size:' . $attributes['postMetaFontSizeTablet'].$attributes['postMetaFontSizeType'].'
447 + }';
448 +
449 + $block_content .= '}';
399 450
400 - $block_content .= '@media (max-width: 1025px) { ';
401 - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title a span{
402 - font-size: ' . $attributes['titleFontSizeTablet'] . $attributes['titleFontSizeType'] . ';
451 +
452 + $block_content .= '@media (max-width: 767px) { ';
453 +
454 + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title a span{
455 + font-size: ' . $attributes['titleFontSizeMobile'] . $attributes['titleFontSizeType'] . ';
456 + }';
457 + $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-content .blockspare-posts-block-post-grid-excerpt .blockspare-posts-block-post-grid-excerpt-content {
458 + font-size:' . $attributes['descriptionFontSizeMobile'].$attributes['descriptionFontSizeType'].'
459 + }';
460 + $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-category a {
461 + font-size:' . $attributes['postCategoryFontSizeMobile'].$attributes['postCategoryFontSizeType'].'
462 + }';
463 + $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-grid-author a span {
464 + font-size:' . $attributes['postMetaFontSizeMobile'].$attributes['postMetaFontSizeType'].'
465 + }';
466 + $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-grid-date {
467 + font-size:' . $attributes['postMetaFontSizeMobile'].$attributes['postMetaFontSizeType'].'
468 + }';
469 + $block_content .= ' .' . $blockuniqueclass .' .comment_count {
470 + font-size:' . $attributes['postMetaFontSizeMobile'].$attributes['postMetaFontSizeType'].'
471 + }';
472 +
473 + $block_content .= '}';
474 +
475 + //Pagination
476 +
477 + if($attributes['enablePagination']){
478 + if($attributes['loadMoreStyle'] == 'bs-loadmore-solid') {
479 + $block_content .=' .' . $blockuniqueclass . ' .bs_blockspare_loadmore a.blockspare-readmore .load-btn{
480 + color:'.$attributes['loadMoreSolidTextColor'].';
481 + background-color:'.$attributes['loadMoreTextBgColor'].';
403 482 }';
404 - $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-content .blockspare-posts-block-post-grid-excerpt .blockspare-posts-block-post-grid-excerpt-content {
405 - font-size:' . $attributes['descriptionFontSizeTablet'].$attributes['descriptionFontSizeType'].'
483 + $block_content .=' .' . $blockuniqueclass . ' .bs_blockspare_loadmore a.blockspare-readmore .load-btn:hover{
484 + color:'.$attributes['loadMoreSolidTextHoverColor'].';
485 + background-color:'.$attributes['loadMoreTextBgHoverColor'].';
406 486 }';
407 - $block_content .= '}';
408 -
409 -
410 - $block_content .= '@media (max-width: 768px) { ';
411 - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title a span{
412 - font-size: ' . $attributes['titleFontSizeMobile'] . $attributes['titleFontSizeType'] . ';
413 - }';
414 - $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-content .blockspare-posts-block-post-grid-excerpt .blockspare-posts-block-post-grid-excerpt-content {
415 - font-size:' . $attributes['descriptionFontSizeMobile'].$attributes['descriptionFontSizeType'].'
416 - }';
417 - $block_content .= '}';
418 -
419 - //Pagination
420 - if($attributes['enablePagination']){
421 - $block_content .=' .' . $blockuniqueclass . ' + .bs_blockspare_loadmore a.blockspare-readmore .load-btn{
487 + } else {
488 + $block_content .=' .' . $blockuniqueclass . ' .bs_blockspare_loadmore a.blockspare-readmore .load-btn{
422 489 color:'.$attributes['loadMoreTextColor'].';
423 - background-color:'.$attributes['loadMoreTextBgColor'].';
424 - '.bscheckFontfamily($attributes['titleFontFamily']).';
425 490 }';
426 - $block_content .=' .' . $blockuniqueclass . ' + .bs_blockspare_loadmore a.blockspare-readmore .ajax-loader-enabled{
427 - border-top-color:'.$attributes['loadMoreColor'].';
491 + $block_content .=' .' . $blockuniqueclass . ' .bs_blockspare_loadmore a.blockspare-readmore .load-btn:hover{
492 + color:'.$attributes['loadMoreTextHoverColor'].';
428 493 }';
429 - $block_content .= '}';
494 + }
430 495
431 - }
496 + $block_content .=' .' . $blockuniqueclass . ' .bs_blockspare_loadmore{
497 + text-align:'.$attributes['loadMoreAlignment'].';
498 + }';
499 + $block_content .=' .' . $blockuniqueclass . ' .bs_blockspare_loadmore a.blockspare-readmore .ajax-loader-enabled{
500 + border-top-color:'.$attributes['loadMoreColor'].';
501 + }';
502 + $block_content .= '}';
503 + }
432 504
433 505
434 506 $block_content .= '</style>';
435 507 return $block_content;