| @@ -16,9 +16,9 @@ | ||
| 16 | 16 | }else{ |
| 17 | 17 | $blockuniqueclass = 'blockspare-posts-block-list-'.$unq_class; |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | - $block_class = 'blockspare-posts-block-is-grid'.' has-gutter-'.$attributes['gutterSpace'];;; | |
| 20 | + $block_class = 'blockspare-posts-block-is-grid'.' has-gutter-'.$attributes['gutterSpace'].' column-'.$attributes['columns']; | |
| 21 | 21 | $design = $attributes['grid']; |
| 22 | 22 | $blockName= 'post-grid'; |
| 23 | 23 | $layoutClass= false; |
| 24 | 24 | if($attributes['grid'] != 'blockspare-posts-block-grid-layout-4' && $attributes['grid'] != 'blockspare-posts-block-grid-layout-5' && $attributes['grid'] != 'blockspare-posts-block-grid-layout-6') { |
| @@ -23,13 +23,30 @@ | ||
| 23 | 23 | $layoutClass= false; |
| 24 | 24 | if($attributes['grid'] != 'blockspare-posts-block-grid-layout-4' && $attributes['grid'] != 'blockspare-posts-block-grid-layout-5' && $attributes['grid'] != 'blockspare-posts-block-grid-layout-6') { |
| 25 | 25 | $layoutClass= true; |
| 26 | 26 | } |
| 27 | + $alignclass = blockspare_checkalignment($attributes['align']); | |
| 28 | + $class = "wp-block-blockspare-posts-block-blockspare-posts-block-latest-posts align".$alignclass." ".$attributes['blockHoverEffect'] ; | |
| 27 | 29 | |
| 30 | + if (isset($attributes['className'])) { | |
| 31 | + $class .= ' ' . $attributes['className']; | |
| 32 | + } | |
| 33 | + | |
| 34 | + if( $attributes['animation']){ | |
| 35 | + $class .=' blockspare-block-animation'; | |
| 36 | + } | |
| 37 | + $class .= ' ' . $blockuniqueclass; | |
| 38 | + | |
| 39 | + ?> | |
| 40 | + <div class="<?php echo esc_attr($class);?>" blockspare-animation=<?php echo esc_attr( $attributes['animation'] )?>> | |
| 41 | + <?php | |
| 42 | + echo latest_posts_style_control_grid($blockuniqueclass ,$attributes); | |
| 28 | 43 | blockspare_query_loop_and_wrapper($attributes,$block_class,$design,$blockName,$layoutClass); |
| 29 | - $data_content = latest_posts_style_control_grid($blockuniqueclass ,$attributes); | |
| 30 | - $data_content .= ob_get_clean(); | |
| 31 | - return $data_content; | |
| 44 | + ?> | |
| 45 | + </div> | |
| 46 | + <?php | |
| 47 | + return ob_get_clean(); | |
| 48 | + | |
| 32 | 49 | |
| 33 | 50 | } |
| 34 | 51 | } |
| 35 | 52 | |
| @@ -61,44 +78,37 @@ | ||
| 61 | 78 | |
| 62 | 79 | add_action('init', 'blockspare_register_block_core_latest_posts_grid'); |
| 63 | 80 | } |
| 64 | 81 | |
| 65 | - if(!function_exists('latest_posts_style_control_grid')){ | |
| 82 | +if(!function_exists('latest_posts_style_control_grid')){ | |
| 66 | 83 | function latest_posts_style_control_grid($blockuniqueclass ,$attributes){ |
| 67 | 84 | |
| 68 | 85 | |
| 69 | 86 | $block_content =''; |
| 70 | 87 | $block_content .= '<style type="text/css">'; |
| 71 | - $block_content .= ' .' . $blockuniqueclass . '.blockspare-posts-block-latest-post-wrap{ | |
| 72 | - margin-top:' . $attributes['marginTop'] . 'px; | |
| 73 | - margin-bottom:' . $attributes['marginBottom'] . 'px; | |
| 74 | - margin-left:' . $attributes['marginLeft'] . 'px; | |
| 75 | - margin-right:' . $attributes['marginRight'] . 'px; | |
| 76 | - }'; | |
| 88 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-wrap{ | |
| 89 | + margin-top:' . $attributes['marginTop'] . 'px; | |
| 90 | + margin-bottom:' . $attributes['marginBottom'] . 'px; | |
| 91 | + margin-left:' . $attributes['marginLeft'] . 'px; | |
| 92 | + margin-right:' . $attributes['marginRight'] . 'px; | |
| 93 | + }'; | |
| 77 | 94 | |
| 78 | 95 | $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-content{ |
| 79 | - padding-top:' . $attributes['contentPaddingTop'] . 'px; | |
| 80 | - padding-right:' . $attributes['contentPaddingRight'] . 'px; | |
| 81 | - padding-bottom:' . $attributes['contentPaddingBottom'] . 'px; | |
| 82 | - padding-left:' . $attributes['contentPaddingLeft'] . 'px; | |
| 83 | - }'; | |
| 96 | + padding-top:' . $attributes['contentPaddingTop'] . 'px; | |
| 97 | + padding-right:' . $attributes['contentPaddingRight'] . 'px; | |
| 98 | + padding-bottom:' . $attributes['contentPaddingBottom'] . 'px; | |
| 99 | + padding-left:' . $attributes['contentPaddingLeft'] . 'px; | |
| 100 | + }'; | |
| 84 | 101 | |
| 85 | - | |
| 86 | - | |
| 87 | - | |
| 88 | 102 | if ($attributes['categoryLayoutOption'] == 'solid') { |
| 89 | - | |
| 90 | - | |
| 91 | - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-category a{ | |
| 103 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-category a{ | |
| 92 | 104 | color:' . $attributes['categoryTextColor'] . "!important" . '; |
| 93 | 105 | background-color:' . $attributes['categoryBackgroundColor'] . "!important" . '; |
| 94 | 106 | border-radius:' . $attributes['categoryBorderRadius'] . "px" . '; |
| 95 | - }'; | |
| 107 | + }'; | |
| 96 | 108 | |
| 97 | 109 | } else if ($attributes['categoryLayoutOption'] == 'border') { |
| 98 | - | |
| 99 | - | |
| 100 | - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-category a{ | |
| 110 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-category a{ | |
| 101 | 111 | color:' . $attributes['categoryTextColor'] . "!important" . '; |
| 102 | 112 | background-color:' . "transparent" . '; |
| 103 | 113 | border:' . "1px solid" . $attributes['categoryBorderColor'] . '; |
| 104 | 114 | border-radius:' . $attributes['categoryBorderRadius'] . "px" . '; |
| @@ -103,178 +113,221 @@ | ||
| 103 | 113 | border:' . "1px solid" . $attributes['categoryBorderColor'] . '; |
| 104 | 114 | border-radius:' . $attributes['categoryBorderRadius'] . "px" . '; |
| 105 | 115 | border-width:' . $attributes['categoryBorderWidth'] . "px" . '; |
| 106 | 116 | }'; |
| 107 | - | |
| 108 | - | |
| 109 | - | |
| 117 | + | |
| 110 | 118 | } else { |
| 111 | 119 | $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-category a{ |
| 112 | 120 | color:' . $attributes['categoryTextColor'] . "!important" . '; |
| 113 | - }'; | |
| 121 | + }'; | |
| 114 | 122 | } |
| 115 | 123 | |
| 116 | - | |
| 117 | 124 | $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-category{ |
| 118 | - margin-top:' . $attributes['categoryMarginTop'] . 'px' . '; | |
| 119 | - margin-bottom:' . $attributes['categoryMarginBottom'] . 'px' . '; | |
| 120 | - margin-left:' . $attributes['categoryMarginLeft'] . 'px' . '; | |
| 121 | - margin-right:' . $attributes['categoryMarginRight'] . 'px' . '; | |
| 122 | - }'; | |
| 125 | + margin-top:' . $attributes['categoryMarginTop'] . 'px' . '; | |
| 126 | + margin-bottom:' . $attributes['categoryMarginBottom'] . 'px' . '; | |
| 127 | + margin-left:' . $attributes['categoryMarginLeft'] . 'px' . '; | |
| 128 | + margin-right:' . $attributes['categoryMarginRight'] . 'px' . '; | |
| 129 | + }'; | |
| 123 | 130 | |
| 124 | - | |
| 125 | 131 | $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-byline{ |
| 126 | - | |
| 127 | - margin-top:' . $attributes['metaMarginTop'] . 'px' . '; | |
| 128 | - margin-bottom:' . $attributes['metaMarginBottom'] . 'px' . '; | |
| 129 | - margin-left:' . $attributes['metaMarginLeft'] . 'px' . '; | |
| 130 | - margin-right:' . $attributes['metaMarginRight'] . 'px' . '; | |
| 131 | - }'; | |
| 132 | + margin-top:' . $attributes['metaMarginTop'] . 'px' . '; | |
| 133 | + margin-bottom:' . $attributes['metaMarginBottom'] . 'px' . '; | |
| 134 | + margin-left:' . $attributes['metaMarginLeft'] . 'px' . '; | |
| 135 | + margin-right:' . $attributes['metaMarginRight'] . 'px' . '; | |
| 136 | + }'; | |
| 132 | 137 | |
| 133 | - | |
| 134 | 138 | $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-more-link{ |
| 135 | - margin-top:' . $attributes['moreLinkMarginTop'] . 'px' . '; | |
| 136 | - margin-bottom:' . $attributes['moreLinkMarginBottom'] . 'px' . '; | |
| 137 | - margin-left:' . $attributes['moreLinkMarginLeft'] . 'px' . '; | |
| 138 | - margin-right:' . $attributes['moreLinkMarginRight'] . 'px' . '; | |
| 139 | - }'; | |
| 139 | + margin-top:' . $attributes['moreLinkMarginTop'] . 'px' . '; | |
| 140 | + margin-bottom:' . $attributes['moreLinkMarginBottom'] . 'px' . '; | |
| 141 | + margin-left:' . $attributes['moreLinkMarginLeft'] . 'px' . '; | |
| 142 | + margin-right:' . $attributes['moreLinkMarginRight'] . 'px' . '; | |
| 143 | + }'; | |
| 140 | 144 | |
| 141 | - | |
| 145 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title a span{ | |
| 146 | + color: ' . $attributes['postTitleColor'] . '; | |
| 147 | + }'; | |
| 142 | 148 | |
| 143 | - | |
| 149 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-author a span{ | |
| 150 | + color:' . $attributes['linkColor'] . '; | |
| 151 | + }'; | |
| 144 | 152 | |
| 145 | - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title a span{ | |
| 146 | - color: ' . $attributes['postTitleColor'] . '; | |
| 147 | - | |
| 148 | - }'; | |
| 149 | 153 | |
| 150 | - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-author a span{ | |
| 151 | - color:' . $attributes['linkColor'] . '; | |
| 152 | - }'; | |
| 154 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-more-link span{ | |
| 155 | + color:' . $attributes['linkColor'] . '; | |
| 156 | + }'; | |
| 153 | 157 | |
| 158 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-date{ | |
| 159 | + color:' . $attributes['generalColor'] . '; | |
| 160 | + }'; | |
| 154 | 161 | |
| 155 | - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-more-link span{ | |
| 156 | - color:' . $attributes['linkColor'] . '; | |
| 157 | - }'; | |
| 158 | - | |
| 159 | - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-date{ | |
| 160 | - color:' . $attributes['generalColor'] . '; | |
| 161 | - }'; | |
| 162 | - | |
| 163 | - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-excerpt-content,'.' .' . $blockuniqueclass . ' .comment_count{ | |
| 164 | - color:' . $attributes['generalColor'] . '; | |
| 165 | - | |
| 166 | - }'; | |
| 167 | - | |
| 162 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-excerpt-content{ | |
| 163 | + color:' . $attributes['generalColor'] . '; | |
| 164 | + }'; | |
| 165 | + $block_content .= ' .' . $blockuniqueclass . ' .comment_count{ | |
| 166 | + color:' . $attributes['generalColor'] . '; | |
| 167 | + }'; | |
| 168 | 168 | |
| 169 | 169 | $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title{ |
| 170 | - margin-top:' . $attributes['titleMarginTop'] . 'px' . '; | |
| 171 | - margin-bottom:' . $attributes['titleMarginBottom'] . 'px' . '; | |
| 172 | - margin-left:' . $attributes['titleMarginLeft'] . 'px' . '; | |
| 173 | - margin-right:' . $attributes['titleMarginRight'] . 'px' . '; | |
| 174 | - }'; | |
| 170 | + margin-top:' . $attributes['titleMarginTop'] . 'px' . '; | |
| 171 | + margin-bottom:' . $attributes['titleMarginBottom'] . 'px' . '; | |
| 172 | + margin-left:' . $attributes['titleMarginLeft'] . 'px' . '; | |
| 173 | + margin-right:' . $attributes['titleMarginRight'] . 'px' . '; | |
| 174 | + }'; | |
| 175 | 175 | |
| 176 | - | |
| 177 | 176 | $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-excerpt-content{ |
| 178 | - margin-top:' . $attributes['exceprtMarginTop'] . 'px' . '; | |
| 177 | + margin-top:' . $attributes['exceprtMarginTop'] . 'px' . '; | |
| 179 | 178 | margin-bottom:' . $attributes['exceprtMarginBottom'] . 'px' . '; |
| 180 | 179 | margin-left:' . $attributes['exceprtMarginLeft'] . 'px' . '; |
| 181 | 180 | margin-right:' . $attributes['exceprtMarginRight'] . 'px' . '; |
| 181 | + }'; | |
| 182 | + | |
| 183 | + $layoutstyle = explode('-',$attributes['grid']); | |
| 184 | + if($layoutstyle[5] >3){ | |
| 185 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-single .blockspare-posts-block-post-img img{ | |
| 186 | + border-radius:' . $attributes['borderRadius'] . 'px'.'; | |
| 187 | + }'; | |
| 188 | + if($attributes['enableBoxShadow']){ | |
| 189 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-single .blockspare-posts-block-post-img img{ | |
| 190 | + box-shadow: ' . $attributes['xOffset'] . 'px ' . $attributes['yOffset'] . 'px ' . $attributes['blur'] . 'px ' . $attributes['spread'] . 'px ' . $attributes['shadowColor'] . '; | |
| 182 | 191 | }'; |
| 192 | + } | |
| 193 | + }else{ | |
| 194 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-single{ | |
| 195 | + border-radius:' . $attributes['borderRadius'] . 'px'.'; | |
| 196 | + background-color:'.$attributes['backGroundColor'].' | |
| 197 | + }'; | |
| 183 | 198 | |
| 184 | - $layoutstyle = explode('-',$attributes['grid']); | |
| 185 | - if($layoutstyle[5] >3){ | |
| 186 | - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-single .blockspare-posts-block-post-img img{ | |
| 187 | - border-radius:' . $attributes['borderRadius'] . 'px'.'; | |
| 188 | - | |
| 189 | - }'; | |
| 190 | - if($attributes['enableBoxShadow']){ | |
| 191 | - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-single .blockspare-posts-block-post-img img{ | |
| 192 | - box-shadow: ' . $attributes['xOffset'] . 'px ' . $attributes['yOffset'] . 'px ' . $attributes['blur'] . 'px ' . $attributes['spread'] . 'px ' . $attributes['shadowColor'] . '; | |
| 193 | - }'; | |
| 194 | - } | |
| 195 | - }else{ | |
| 199 | + if($attributes['enableBoxShadow']){ | |
| 196 | 200 | $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-single{ |
| 197 | - border-radius:' . $attributes['borderRadius'] . 'px'.'; | |
| 198 | - background-color:'.$attributes['backGroundColor'].' | |
| 199 | - }'; | |
| 200 | - | |
| 201 | - if($attributes['enableBoxShadow']){ | |
| 202 | - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-single{ | |
| 203 | - box-shadow: ' . $attributes['xOffset'] . 'px ' . $attributes['yOffset'] . 'px ' . $attributes['blur'] . 'px ' . $attributes['spread'] . 'px ' . $attributes['shadowColor'] . '; | |
| 204 | - }'; | |
| 205 | - } | |
| 201 | + box-shadow: ' . $attributes['xOffset'] . 'px ' . $attributes['yOffset'] . 'px ' . $attributes['blur'] . 'px ' . $attributes['spread'] . 'px ' . $attributes['shadowColor'] . '; | |
| 202 | + }'; | |
| 206 | 203 | } |
| 204 | + } | |
| 207 | 205 | |
| 208 | - | |
| 209 | - | |
| 210 | - | |
| 211 | - | |
| 212 | - //Title Hover | |
| 206 | + //Title Hover | |
| 213 | 207 | |
| 214 | - if($attributes['titleOnHover']=='lpc-title-hover') { | |
| 215 | - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-content .blockspare-posts-block-title-link:hover span{ | |
| 216 | - color: ' . $attributes['titleOnHoverColor'] . '; | |
| 217 | - | |
| 218 | - }'; | |
| 208 | + if($attributes['titleOnHover']=='lpc-title-hover') { | |
| 209 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-content .blockspare-posts-block-title-link:hover span{ | |
| 210 | + color: ' . $attributes['titleOnHoverColor'] . '; | |
| 211 | + }'; | |
| 219 | 212 | } |
| 220 | 213 | |
| 221 | - if($attributes['titleOnHover']=='lpc-title-border') { | |
| 222 | - $block_content .= ' .' . $blockuniqueclass . ' .lpc-title-border .blockspare-posts-block-post-grid-title .blockspare-posts-block-title-link span:hover{ | |
| 223 | - box-shadow: inset 0 -2px 0 0 ' . $attributes['titleOnHoverColor'] . '; | |
| 224 | - | |
| 225 | - }'; | |
| 226 | - } | |
| 214 | + if($attributes['titleOnHover']=='lpc-title-border') { | |
| 215 | + $block_content .= ' .' . $blockuniqueclass . ' .lpc-title-border .blockspare-posts-block-post-grid-title .blockspare-posts-block-title-link span:hover{ | |
| 216 | + box-shadow: inset 0 -2px 0 0 ' . $attributes['titleOnHoverColor'] . '; | |
| 217 | + }'; | |
| 218 | + } | |
| 227 | 219 | |
| 228 | 220 | //Font Settings |
| 229 | 221 | |
| 230 | - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title a span{ | |
| 231 | - | |
| 232 | - font-size: ' . $attributes['postTitleFontSize'] . $attributes['titleFontSizeType'] . '; | |
| 233 | - | |
| 234 | - '.bscheckFontfamily($attributes['titleFontFamily']).'; | |
| 235 | - font-weight: ' . $attributes['titleFontWeight'] . '; | |
| 236 | - }'; | |
| 222 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title a span{ | |
| 223 | + font-size: ' . $attributes['postTitleFontSize'] . $attributes['titleFontSizeType'] . '; | |
| 224 | + '.bscheckFontfamily($attributes['titleFontFamily']).'; | |
| 225 | + '.bscheckFontfamilyWeight($attributes['titleFontWeight']).'; | |
| 226 | + line-height: ' . $attributes['postTitleLineHeight'] . '; | |
| 227 | + }'; | |
| 237 | 228 | |
| 238 | - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-content .blockspare-posts-block-post-grid-excerpt .blockspare-posts-block-post-grid-excerpt-content { | |
| 239 | - font-size:' . $attributes['descriptionFontSize'] . $attributes['descriptionFontSizeType'] . '; | |
| 240 | - | |
| 241 | - '.bscheckFontfamily($attributes['descriptionFontFamily']).'; | |
| 242 | - font-weight: ' . $attributes['descriptionFontWeight'] . '; | |
| 243 | - }'; | |
| 229 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-content .blockspare-posts-block-post-grid-excerpt .blockspare-posts-block-post-grid-excerpt-content { | |
| 230 | + font-size:' . $attributes['descriptionFontSize'] . $attributes['descriptionFontSizeType'] . '; | |
| 231 | + '.bscheckFontfamily($attributes['descriptionFontFamily']).'; | |
| 232 | + '.bscheckFontfamilyWeight($attributes['descriptionFontWeight']).'; | |
| 233 | + }'; | |
| 234 | + | |
| 235 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-category a { | |
| 236 | + font-size:' . $attributes['postCategoryFontSize'] . $attributes['postCategoryFontSizeType'] . '; | |
| 237 | + '.bscheckFontfamily($attributes['postCategoryFontFamily']).'; | |
| 238 | + '.bscheckFontfamilyWeight($attributes['postCategoryFontWeight']).'; | |
| 239 | + }'; | |
| 240 | + | |
| 241 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-author a span { | |
| 242 | + font-size:' . $attributes['postMetaFontSize'] . $attributes['postMetaFontSizeType'] . '; | |
| 243 | + '.bscheckFontfamily($attributes['postMetaFontFamily']).'; | |
| 244 | + '.bscheckFontfamilyWeight($attributes['postMetaFontWeight']).'; | |
| 245 | + }'; | |
| 246 | + | |
| 247 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-date { | |
| 248 | + font-size:' . $attributes['postMetaFontSize'] . $attributes['postMetaFontSizeType'] . '; | |
| 249 | + '.bscheckFontfamily($attributes['postMetaFontFamily']).'; | |
| 250 | + '.bscheckFontfamilyWeight($attributes['postMetaFontWeight']).'; | |
| 251 | + }'; | |
| 252 | + | |
| 253 | + $block_content .= ' .' . $blockuniqueclass . ' .comment_count { | |
| 254 | + font-size:' . $attributes['postMetaFontSize'] . $attributes['postMetaFontSizeType'] . '; | |
| 255 | + '.bscheckFontfamily($attributes['postMetaFontFamily']).'; | |
| 256 | + '.bscheckFontfamilyWeight($attributes['postMetaFontWeight']).'; | |
| 257 | + }'; | |
| 244 | 258 | |
| 245 | - $block_content .= '@media (max-width: 1025px) { '; | |
| 246 | - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title a span{ | |
| 247 | - font-size: ' . $attributes['titleFontSizeTablet'] . $attributes['titleFontSizeType'] . '; | |
| 248 | - }'; | |
| 249 | - $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-content .blockspare-posts-block-post-grid-excerpt .blockspare-posts-block-post-grid-excerpt-content { | |
| 250 | - font-size:' . $attributes['descriptionFontSizeTablet'].$attributes['descriptionFontSizeType'].' | |
| 251 | - }'; | |
| 252 | - $block_content .= '}'; | |
| 259 | + $block_content .= '@media (max-width: 1025px) { '; | |
| 260 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title a span{ | |
| 261 | + font-size: ' . $attributes['titleFontSizeTablet'] . $attributes['titleFontSizeType'] . '; | |
| 262 | + }'; | |
| 263 | + $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-content .blockspare-posts-block-post-grid-excerpt .blockspare-posts-block-post-grid-excerpt-content { | |
| 264 | + font-size:' . $attributes['descriptionFontSizeTablet'].$attributes['descriptionFontSizeType'].' | |
| 265 | + }'; | |
| 266 | + $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-category a { | |
| 267 | + font-size:' . $attributes['postCategoryFontSizeTablet'].$attributes['postCategoryFontSizeType'].' | |
| 268 | + }'; | |
| 269 | + $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-grid-author a span { | |
| 270 | + font-size:' . $attributes['postMetaFontSizeTablet'].$attributes['postMetaFontSizeType'].' | |
| 271 | + }'; | |
| 272 | + $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-grid-date { | |
| 273 | + font-size:' . $attributes['postMetaFontSizeTablet'].$attributes['postMetaFontSizeType'].' | |
| 274 | + }'; | |
| 275 | + $block_content .= ' .' . $blockuniqueclass .' .comment_count { | |
| 276 | + font-size:' . $attributes['postMetaFontSizeTablet'].$attributes['postMetaFontSizeType'].' | |
| 277 | + }'; | |
| 278 | + $block_content .= '}'; | |
| 253 | 279 | |
| 254 | 280 | |
| 255 | - $block_content .= '@media (max-width: 767px) { '; | |
| 256 | - $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title a span{ | |
| 257 | - font-size: ' . $attributes['titleFontSizeMobile'] . $attributes['titleFontSizeType'] . '; | |
| 281 | + $block_content .= '@media (max-width: 767px) { '; | |
| 282 | + $block_content .= ' .' . $blockuniqueclass . ' .blockspare-posts-block-post-grid-title a span{ | |
| 283 | + font-size: ' . $attributes['titleFontSizeMobile'] . $attributes['titleFontSizeType'] . '; | |
| 284 | + }'; | |
| 285 | + $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-content .blockspare-posts-block-post-grid-excerpt .blockspare-posts-block-post-grid-excerpt-content { | |
| 286 | + font-size:' . $attributes['descriptionFontSizeMobile'].$attributes['descriptionFontSizeType'].' | |
| 287 | + }'; | |
| 288 | + $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-category a { | |
| 289 | + font-size:' . $attributes['postCategoryFontSizeMobile'].$attributes['postCategoryFontSizeType'].' | |
| 290 | + }'; | |
| 291 | + $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-grid-author a span { | |
| 292 | + font-size:' . $attributes['postMetaFontSizeMobile'].$attributes['postMetaFontSizeType'].' | |
| 293 | + }'; | |
| 294 | + $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-grid-date { | |
| 295 | + font-size:' . $attributes['postMetaFontSizeMobile'].$attributes['postMetaFontSizeType'].' | |
| 296 | + }'; | |
| 297 | + $block_content .= ' .' . $blockuniqueclass .' .comment_count { | |
| 298 | + font-size:' . $attributes['postMetaFontSizeMobile'].$attributes['postMetaFontSizeType'].' | |
| 299 | + }'; | |
| 300 | + $block_content .= '}'; | |
| 301 | + | |
| 302 | + //Pagination | |
| 303 | + if($attributes['enablePagination']){ | |
| 304 | + if($attributes['loadMoreStyle'] == 'bs-loadmore-solid') { | |
| 305 | + $block_content .=' .' . $blockuniqueclass . ' .bs_blockspare_loadmore a.blockspare-readmore .load-btn{ | |
| 306 | + color:'.$attributes['loadMoreSolidTextColor'].'; | |
| 307 | + background-color:'.$attributes['loadMoreTextBgColor'].'; | |
| 258 | 308 | }'; |
| 259 | - $block_content .= ' .' . $blockuniqueclass .' .blockspare-posts-block-post-content .blockspare-posts-block-post-grid-excerpt .blockspare-posts-block-post-grid-excerpt-content { | |
| 260 | - font-size:' . $attributes['descriptionFontSizeMobile'].$attributes['descriptionFontSizeType'].' | |
| 261 | - }'; | |
| 262 | - $block_content .= '}'; | |
| 263 | - | |
| 264 | - //Pagination | |
| 265 | - if($attributes['enablePagination']){ | |
| 266 | - $block_content .=' .' . $blockuniqueclass . ' + .bs_blockspare_loadmore a.blockspare-readmore .load-btn{ | |
| 309 | + $block_content .=' .' . $blockuniqueclass . ' .bs_blockspare_loadmore a.blockspare-readmore .load-btn:hover{ | |
| 310 | + color:'.$attributes['loadMoreSolidTextHoverColor'].'; | |
| 311 | + background-color:'.$attributes['loadMoreTextBgHoverColor'].'; | |
| 312 | + }'; | |
| 313 | + } else { | |
| 314 | + $block_content .=' .' . $blockuniqueclass . ' .bs_blockspare_loadmore a.blockspare-readmore .load-btn{ | |
| 267 | 315 | color:'.$attributes['loadMoreTextColor'].'; |
| 268 | - background-color:'.$attributes['loadMoreTextBgColor'].'; | |
| 269 | - '.bscheckFontfamily($attributes['titleFontFamily']).'; | |
| 270 | 316 | }'; |
| 271 | - $block_content .=' .' . $blockuniqueclass . ' + .bs_blockspare_loadmore a.blockspare-readmore .ajax-loader-enabled{ | |
| 272 | - border-top-color:'.$attributes['loadMoreColor'].'; | |
| 317 | + $block_content .=' .' . $blockuniqueclass . ' .bs_blockspare_loadmore a.blockspare-readmore .load-btn:hover{ | |
| 318 | + color:'.$attributes['loadMoreTextHoverColor'].'; | |
| 273 | 319 | }'; |
| 274 | - $block_content .= '}'; | |
| 320 | + } | |
| 275 | 321 | |
| 276 | - } | |
| 322 | + $block_content .=' .' . $blockuniqueclass . ' .bs_blockspare_loadmore{ | |
| 323 | + text-align:'.$attributes['loadMoreAlignment'].'; | |
| 324 | + }'; | |
| 325 | + $block_content .=' .' . $blockuniqueclass . ' .bs_blockspare_loadmore a.blockspare-readmore .ajax-loader-enabled{ | |
| 326 | + border-top-color:'.$attributes['loadMoreColor'].'; | |
| 327 | + }'; | |
| 328 | + $block_content .= '}'; | |
| 329 | + } | |
| 277 | 330 | |
| 278 | 331 | |
| 279 | 332 | $block_content .= '</style>'; |
| 280 | 333 | return $block_content; |