| 1 |
import sharedDynamicCss from "../shared/dynamicCss"; |
| 2 |
import { colorControls, objectToCssString, rangerCss, spacingGenerate, wrapInMediaQuery } from "../shared/helpFn"; |
| 3 |
|
| 4 |
const cacheCss = { desktop: "", mobile: "", tablet: "" }; |
| 5 |
const dynamicCss = (attributes, page = "frontend", currentDevice = "all") => { |
| 6 |
const { |
| 7 |
uniqueId, |
| 8 |
thumbnailSliderTwoHeight, |
| 9 |
thumbnailTwoItemsHeight, |
| 10 |
thumbnailThumbBGColor, |
| 11 |
largeItemTitleFontSize, |
| 12 |
largeItemTitleLatterSpacing, |
| 13 |
largeItemTitleLineHeight, |
| 14 |
largeItemTitleTypography, |
| 15 |
contentAreaInnerWidth, |
| 16 |
largeItemTitleColor, |
| 17 |
titleColor, |
| 18 |
postCardBorderRadius, |
| 19 |
thumbnailSliderTwoLayout, |
| 20 |
postCardPadding, |
| 21 |
thumbnailProgressPosition, |
| 22 |
thumbnailProgressThickness, |
| 23 |
thumbnailProgressBarWidth, |
| 24 |
thumbnailProgressColor, |
| 25 |
thumbnailItemsToShow, |
| 26 |
catTabCategoryBarColor, |
| 27 |
carouselAutoPlayDelay, |
| 28 |
contentAreaThumbsBorder, |
| 29 |
contentAreaThumbsBorderWidth, |
| 30 |
contentAreaThumbsBorderRadius, |
| 31 |
catTabCategoryBarHoverColor, |
| 32 |
carouselAutoPlay, |
| 33 |
largeItemTitleWordSpacing, |
| 34 |
imageBorder, |
| 35 |
imageBorderWidth, |
| 36 |
imageRadius, |
| 37 |
globalBreakPointData, |
| 38 |
} = attributes; |
| 39 |
|
| 40 |
const { sharedDesktopCss, sharedTabletCss, sharedMobileCss } = sharedDynamicCss(attributes, page); |
| 41 |
|
| 42 |
const thumbsBgColor = (layout, colorType = "color") => { |
| 43 |
const thumbConfig = { |
| 44 |
"thumbnail-slider-two-layout-one": "#F0F0F0", |
| 45 |
"thumbnail-slider-two-layout-two": "transparent", |
| 46 |
"thumbnail-slider-two-layout-three": "#0000001a", |
| 47 |
"thumbnail-slider-two-layout-four": "transparent", |
| 48 |
"thumbnail-slider-two-layout-five": "#00000066", |
| 49 |
}; |
| 50 |
const finalBgColorConfig = { |
| 51 |
"thumbnail-slider-two-layout-one": "var(--smart-post-secondary)", |
| 52 |
"thumbnail-slider-two-layout-two": "transparent", |
| 53 |
"thumbnail-slider-two-layout-three": "transparent", |
| 54 |
"thumbnail-slider-two-layout-four": "transparent", |
| 55 |
"thumbnail-slider-two-layout-five": "#00000066", |
| 56 |
}; |
| 57 |
|
| 58 |
return colorType === "color" ? thumbConfig[layout] : finalBgColorConfig[layout]; |
| 59 |
}; |
| 60 |
const thumbsNormalBgColor = thumbsBgColor(thumbnailSliderTwoLayout); |
| 61 |
const thumbsBgHoverColor = thumbsBgColor(thumbnailSliderTwoLayout, "hover"); |
| 62 |
|
| 63 |
const thumbsGap = (layout) => { |
| 64 |
const thumbsConfig = { |
| 65 |
"thumbnail-slider-two-layout-one": 0, |
| 66 |
"thumbnail-slider-two-layout-two": 48, |
| 67 |
"thumbnail-slider-two-layout-three": 20, |
| 68 |
"thumbnail-slider-two-layout-four": 12, |
| 69 |
"thumbnail-slider-two-layout-five": 24, |
| 70 |
}; |
| 71 |
return thumbsConfig[layout]; |
| 72 |
}; |
| 73 |
|
| 74 |
const responsiveCss = (deviceType) => { |
| 75 |
return [ |
| 76 |
{ |
| 77 |
class: `#${uniqueId} .sp-smart-thumbnail-slider-two .sp-smart-post-swiper .sp-smart-post-card`, |
| 78 |
styles: { |
| 79 |
height: rangerCss(thumbnailSliderTwoHeight, deviceType), |
| 80 |
}, |
| 81 |
}, |
| 82 |
|
| 83 |
{ |
| 84 |
class: `#${uniqueId} .thumbnail-slider-two-layout-one .sp-smart-post-thumbnail-two-thumb .sp-slide-item-thumb.swiper-slide-thumb-active .sp-smart-post-card`, |
| 85 |
styles: { |
| 86 |
height: |
| 87 |
thumbnailTwoItemsHeight.device?.[deviceType] + |
| 88 |
28 + |
| 89 |
thumbnailTwoItemsHeight.unit?.[deviceType] + |
| 90 |
" !important", |
| 91 |
}, |
| 92 |
}, |
| 93 |
{ |
| 94 |
class: `#${uniqueId} .thumbnail-slider-two-layout-one .sp-smart-post-card .sp-smart-post-template-one-content, #${uniqueId} .thumbnail-slider-two-layout-two .sp-smart-post-card .sp-smart-post-template-one-content`, |
| 95 |
styles: { |
| 96 |
"align-items": "center", |
| 97 |
}, |
| 98 |
}, |
| 99 |
{ |
| 100 |
class: `#${uniqueId} .thumbnail-slider-two-layout-one .sp-smart-post-thumbnail-two-thumb .sp-slide-item-thumb .sp-smart-post-card, #${uniqueId} .thumbnail-slider-two-layout-two .sp-smart-post-thumbnail-two-thumb .sp-slide-item-thumb .sp-smart-post-card, #${uniqueId} .thumbnail-slider-two-layout-three .sp-smart-post-thumbnail-two-thumb .sp-slide-item-thumb .sp-smart-post-card`, |
| 101 |
styles: { |
| 102 |
height: |
| 103 |
thumbnailTwoItemsHeight.device?.[deviceType] + |
| 104 |
thumbnailTwoItemsHeight.unit?.[deviceType] + |
| 105 |
" !important", |
| 106 |
}, |
| 107 |
}, |
| 108 |
{ |
| 109 |
class: `#${uniqueId} .sp-smart-post-thumbnail-two-thumb .sp-smart-post-card .thumbnail-slider-two-layout-two`, |
| 110 |
styles: { |
| 111 |
height: "fit-content !important", |
| 112 |
}, |
| 113 |
}, |
| 114 |
{ |
| 115 |
class: `#${uniqueId} .sp-smart-post-thumbnail-slide-two .sp-smart-post-card .sp-smart-post-title`, |
| 116 |
styles: { |
| 117 |
"font-size": |
| 118 |
largeItemTitleFontSize.device?.[deviceType] + |
| 119 |
largeItemTitleFontSize.unit?.[deviceType] + |
| 120 |
" !important", |
| 121 |
"letter-spacing": |
| 122 |
largeItemTitleLatterSpacing.device?.[deviceType] + |
| 123 |
largeItemTitleLatterSpacing.unit?.[deviceType] + |
| 124 |
" !important", |
| 125 |
"word-spacing": |
| 126 |
largeItemTitleWordSpacing.device?.[deviceType] + |
| 127 |
largeItemTitleWordSpacing.unit?.[deviceType] + |
| 128 |
" !important", |
| 129 |
"line-height": largeItemTitleLineHeight.device?.[deviceType] + " !important", |
| 130 |
}, |
| 131 |
}, |
| 132 |
{ |
| 133 |
class: `#${uniqueId} .sp-smart-post-thumbnail-slide-two .sp-smart-post-card .sp-smart-post-template-one-content`, |
| 134 |
styles: { |
| 135 |
width: contentAreaInnerWidth.device?.[deviceType] + contentAreaInnerWidth.unit?.[deviceType], |
| 136 |
}, |
| 137 |
}, |
| 138 |
{ |
| 139 |
class: `#${uniqueId} .sp-smart-thumbnail-slider-two`, |
| 140 |
styles: { |
| 141 |
"border-radius": spacingGenerate(postCardBorderRadius, deviceType), |
| 142 |
overflow: "hidden", |
| 143 |
}, |
| 144 |
}, |
| 145 |
{ |
| 146 |
class: `#${uniqueId} .sp-smart-thumbnail-slider-two .sp-smart-post-thumbnail-two-thumb .sp-smart-post-card`, |
| 147 |
styles: { |
| 148 |
"border-radius": "0", |
| 149 |
}, |
| 150 |
}, |
| 151 |
{ |
| 152 |
class: `#${uniqueId} .sp-smart-post-thumbnail-two-thumb .sp-smart-post-card.thumbnail-slider-two-layout-two .sp-smart-post-title`, |
| 153 |
styles: { |
| 154 |
[`padding-${thumbnailProgressPosition}`]: `${thumbnailProgressThickness.device?.[deviceType] + 8}px`, |
| 155 |
"margin-top": "0 !important", |
| 156 |
}, |
| 157 |
}, |
| 158 |
{ |
| 159 |
class: `#${uniqueId} .sp-smart-post-thumbnail-two-thumb .sp-smart-post-card.thumbnail-slider-two-layout-two .sp-thumbnail-progress-bar`, |
| 160 |
styles: { |
| 161 |
width: |
| 162 |
thumbnailProgressPosition === "left" |
| 163 |
? thumbnailProgressThickness.device?.[deviceType] + |
| 164 |
thumbnailProgressThickness.unit?.[deviceType] |
| 165 |
: thumbnailProgressBarWidth.device?.[deviceType] + |
| 166 |
thumbnailProgressBarWidth.unit?.[deviceType], |
| 167 |
height: |
| 168 |
thumbnailProgressPosition === "left" |
| 169 |
? thumbnailProgressBarWidth.device?.[deviceType] + |
| 170 |
thumbnailProgressBarWidth.unit?.[deviceType] |
| 171 |
: thumbnailProgressThickness.device?.[deviceType] + |
| 172 |
thumbnailProgressThickness.unit?.[deviceType], |
| 173 |
}, |
| 174 |
}, |
| 175 |
{ |
| 176 |
class: `#${uniqueId} .sp-smart-post-thumbnail-two-thumb .swiper-slide-thumb-active .sp-smart-post-card .sp-thumbnail-progress-bar::after`, |
| 177 |
styles: { |
| 178 |
animation: `${carouselAutoPlay ? "progress" : "progress-auto-off"} ${ |
| 179 |
carouselAutoPlayDelay.value + 200 + carouselAutoPlayDelay.unit |
| 180 |
} linear forwards`, |
| 181 |
}, |
| 182 |
}, |
| 183 |
{ |
| 184 |
class: `#${uniqueId} .sp-smart-post-thumbnail-two-thumb.progress-bar-left .swiper-slide-thumb-active .sp-smart-post-card .sp-thumbnail-progress-bar::after`, |
| 185 |
styles: { |
| 186 |
animation: `${carouselAutoPlay ? "progress-left" : "progress-left-auto-off"} ${ |
| 187 |
carouselAutoPlayDelay.value + carouselAutoPlayDelay.unit |
| 188 |
} linear forwards`, |
| 189 |
}, |
| 190 |
}, |
| 191 |
{ |
| 192 |
class: `#${uniqueId} .thumbnail-slider-two-layout-two .sp-smart-post-thumbnail-two-thumb.thumbnails-left, #${uniqueId} .thumbnail-slider-two-layout-two .sp-smart-post-thumbnail-two-thumb.thumbnails-right`, |
| 193 |
styles: { |
| 194 |
height: `${ |
| 195 |
"calc( " + |
| 196 |
thumbnailSliderTwoHeight.device?.[deviceType] + |
| 197 |
thumbnailSliderTwoHeight.unit?.[deviceType] + |
| 198 |
" - 15% )" |
| 199 |
} !important`, |
| 200 |
overflow: "overlay", |
| 201 |
}, |
| 202 |
}, |
| 203 |
{ |
| 204 |
class: `#${uniqueId} .thumbnail-slider-two-layout-two .sp-smart-post-thumbnail-two-thumb.thumbnails-left .sp-smart-post-swiper2 .sp-slide-item-thumb, #${uniqueId} .thumbnail-slider-two-layout-two .sp-smart-post-thumbnail-two-thumb.thumbnails-right .sp-smart-post-swiper2 .sp-slide-item-thumb`, |
| 205 |
styles: { |
| 206 |
height: `${ |
| 207 |
"calc( " + |
| 208 |
(thumbnailSliderTwoHeight.device?.[deviceType] - |
| 209 |
thumbnailSliderTwoHeight.device?.[deviceType] * 0.1) + |
| 210 |
thumbnailSliderTwoHeight.unit?.[deviceType] + |
| 211 |
" / " + |
| 212 |
thumbnailItemsToShow.device?.[deviceType] + |
| 213 |
" - " + |
| 214 |
thumbsGap(thumbnailSliderTwoLayout) + |
| 215 |
"px )" |
| 216 |
} !important`, |
| 217 |
"margin-top": thumbsGap(thumbnailSliderTwoLayout) / 2 + "px !important", |
| 218 |
"margin-bottom": thumbsGap(thumbnailSliderTwoLayout) / 2 + "px !important", |
| 219 |
}, |
| 220 |
}, |
| 221 |
// Layout One & Two Navigation Arrow. |
| 222 |
// { |
| 223 |
// class: `#${ uniqueId } .thumbnail-slider-two-layout-one .sp-smart-post-swiper-nav-arrow, #${ uniqueId } .thumbnail-slider-two-layout-two .sp-smart-post-swiper-nav-arrow`, |
| 224 |
// styles: { |
| 225 |
// top: |
| 226 |
// carouselArrowHorizontal.device[ deviceType ] === '' |
| 227 |
// ? '50%' |
| 228 |
// : carouselArrowHorizontal.device[ deviceType ] + |
| 229 |
// carouselArrowHorizontal.unit[ deviceType ], |
| 230 |
// }, |
| 231 |
// }, |
| 232 |
// Layout three Navigation Arrow. |
| 233 |
// { |
| 234 |
// class: `#${ uniqueId } .thumbnail-slider-two-layout-three .sp-smart-post-swiper-nav-arrow`, |
| 235 |
// styles: { |
| 236 |
// top: |
| 237 |
// carouselArrowHorizontal.device[ deviceType ] === '' |
| 238 |
// ? '88%' |
| 239 |
// : carouselArrowHorizontal.device[ deviceType ] + |
| 240 |
// carouselArrowHorizontal.unit[ deviceType ], |
| 241 |
// }, |
| 242 |
// }, |
| 243 |
{ |
| 244 |
class: `#${uniqueId} .thumbnail-slider-two-layout-four .sp-smart-post-thumbnail-two-thumb`, |
| 245 |
styles: { |
| 246 |
height: 90 * thumbnailItemsToShow.device?.[deviceType] + "px", |
| 247 |
}, |
| 248 |
}, |
| 249 |
// Layout Four Navigation Arrow. |
| 250 |
// { |
| 251 |
// class: `#${ uniqueId } .thumbnail-slider-two-layout-four .sp-smart-post-swiper-nav-arrow`, |
| 252 |
// styles: { |
| 253 |
// top: |
| 254 |
// carouselArrowHorizontal.device[ deviceType ] === '' |
| 255 |
// ? '90%' |
| 256 |
// : carouselArrowHorizontal.device[ deviceType ] + |
| 257 |
// carouselArrowHorizontal.unit[ deviceType ], |
| 258 |
// }, |
| 259 |
// }, |
| 260 |
// Layout Five Navigation Arrow |
| 261 |
// { |
| 262 |
// class: `#${ uniqueId } .thumbnail-slider-two-layout-five .sp-smart-post-swiper-nav-arrow`, |
| 263 |
// styles: { |
| 264 |
// top: |
| 265 |
// carouselArrowHorizontal.device[ deviceType ] === '' |
| 266 |
// ? '90%' |
| 267 |
// : carouselArrowHorizontal.device[ deviceType ] + |
| 268 |
// carouselArrowHorizontal.unit[ deviceType ], |
| 269 |
// }, |
| 270 |
// }, |
| 271 |
{ |
| 272 |
class: `#${uniqueId} .sp-smart-post-thumbnail-slide-two .thumbnail-slider-two-layout-one .sp-smart-post-card-content`, |
| 273 |
styles: { |
| 274 |
padding: spacingGenerate(postCardPadding, deviceType), |
| 275 |
}, |
| 276 |
}, |
| 277 |
{ |
| 278 |
class: `#${uniqueId} .sp-smart-post-thumbnail-slide-two .thumbnail-slider-two-layout-two .sp-smart-post-card-content`, |
| 279 |
styles: { |
| 280 |
padding: spacingGenerate(postCardPadding, deviceType), |
| 281 |
}, |
| 282 |
}, |
| 283 |
{ |
| 284 |
class: `#${uniqueId} .sp-smart-post-thumbnail-slide-two .thumbnail-slider-two-layout-three .sp-smart-post-card-content`, |
| 285 |
styles: { |
| 286 |
padding: spacingGenerate(postCardPadding, deviceType), |
| 287 |
}, |
| 288 |
}, |
| 289 |
{ |
| 290 |
class: `#${uniqueId} .sp-smart-post-thumbnail-slide-two .thumbnail-slider-two-layout-four .sp-smart-post-card-content`, |
| 291 |
styles: { |
| 292 |
padding: spacingGenerate(postCardPadding, deviceType), |
| 293 |
}, |
| 294 |
}, |
| 295 |
{ |
| 296 |
class: `#${uniqueId} .sp-smart-post-thumbnail-slide-two .thumbnail-slider-two-layout-five .sp-smart-post-card-content`, |
| 297 |
styles: { |
| 298 |
padding: spacingGenerate(postCardPadding, deviceType), |
| 299 |
}, |
| 300 |
}, |
| 301 |
{ |
| 302 |
class: `#${uniqueId} .thumbnail-slider-two-layout-three .sp-smart-post-thumbnail-two-thumb .sp-slide-item-thumb, #${uniqueId} .thumbnail-slider-two-layout-four .sp-smart-post-thumbnail-two-thumb .sp-slide-item-thumb, #${uniqueId} .thumbnail-slider-two-layout-five .sp-smart-post-thumbnail-two-thumb .sp-slide-item-thumb.swiper-slide-thumb-active .sp-smart-post-card-image img`, |
| 303 |
styles: { |
| 304 |
"border-width": spacingGenerate(contentAreaThumbsBorderWidth, deviceType) + " !important", |
| 305 |
"border-radius": spacingGenerate(contentAreaThumbsBorderRadius, deviceType), |
| 306 |
}, |
| 307 |
}, |
| 308 |
{ |
| 309 |
class: `#${uniqueId} .thumbnail-slider-two-layout-two .sp-smart-post-thumbnail-two-thumb .sp-thumbnail-progress-bar`, |
| 310 |
styles: { |
| 311 |
width: |
| 312 |
thumbnailProgressPosition !== "left" |
| 313 |
? thumbnailProgressBarWidth.device?.[deviceType] + |
| 314 |
thumbnailProgressBarWidth.unit?.[deviceType] |
| 315 |
: thumbnailProgressThickness.device?.[deviceType] + |
| 316 |
thumbnailProgressThickness.unit?.[deviceType], |
| 317 |
height: |
| 318 |
thumbnailProgressPosition !== "left" |
| 319 |
? thumbnailProgressThickness.device?.[deviceType] + |
| 320 |
thumbnailProgressThickness.unit?.[deviceType] |
| 321 |
: thumbnailProgressBarWidth.device?.[deviceType] + |
| 322 |
thumbnailProgressBarWidth.unit?.[deviceType], |
| 323 |
}, |
| 324 |
}, |
| 325 |
{ |
| 326 |
class: `#${uniqueId} .thumbnail-slider-two-layout-one .sp-smart-post-thumbnail-two-thumb.thumbs-align-right`, |
| 327 |
styles: { |
| 328 |
"border-bottom-style": imageBorder.style, |
| 329 |
"border-bottom-color": "transparent", |
| 330 |
"border-bottom-width": |
| 331 |
imageBorderWidth.device?.[deviceType].bottom + imageBorderWidth.unit?.[deviceType], |
| 332 |
"border-bottom-right-radius": |
| 333 |
imageRadius.device?.[deviceType].left * 0.8 + imageRadius.unit?.[deviceType], |
| 334 |
left: `calc( 40% - ${ |
| 335 |
imageBorderWidth.device?.[deviceType].right + imageBorderWidth.unit?.[deviceType] |
| 336 |
} )`, |
| 337 |
right: "unset", |
| 338 |
}, |
| 339 |
}, |
| 340 |
{ |
| 341 |
class: `#${uniqueId} .thumbnail-slider-two-layout-one .sp-smart-post-thumbnail-two-thumb.thumbs-align-left`, |
| 342 |
styles: { |
| 343 |
"border-bottom-style": imageBorder.style, |
| 344 |
"border-bottom-color": "transparent", |
| 345 |
"border-bottom-width": |
| 346 |
imageBorderWidth.device?.[deviceType].bottom + imageBorderWidth.unit?.[deviceType], |
| 347 |
"border-bottom-left-radius": |
| 348 |
imageRadius.device?.[deviceType].right * 0.8 + imageRadius.unit?.[deviceType], |
| 349 |
left: "unset", |
| 350 |
right: `calc( 40% - ${ |
| 351 |
imageBorderWidth.device?.[deviceType].left + imageBorderWidth.unit?.[deviceType] |
| 352 |
} )`, |
| 353 |
}, |
| 354 |
}, |
| 355 |
{ |
| 356 |
class: `#${uniqueId} .thumbnail-slider-two-layout-one .sp-smart-post-thumbnail-two-thumb.thumbs-align-center`, |
| 357 |
styles: { |
| 358 |
"border-bottom-style": imageBorder.style, |
| 359 |
"border-bottom-color": "transparent", |
| 360 |
"border-bottom-width": |
| 361 |
imageBorderWidth.device?.[deviceType].bottom + imageBorderWidth.unit?.[deviceType], |
| 362 |
right: "unset", |
| 363 |
}, |
| 364 |
}, |
| 365 |
{ |
| 366 |
class: `#${uniqueId} .thumbnail-slider-two-layout-four .sp-smart-post-thumbnail-two-thumb .sp-smart-post-card-image, #${uniqueId} .thumbnail-slider-two-layout-five .sp-smart-post-thumbnail-two-thumb .sp-smart-post-card-image`, |
| 367 |
styles: { |
| 368 |
"border-top-left-radius": imageRadius.device?.[deviceType].top / 2 + imageRadius.unit?.[deviceType], |
| 369 |
"border-top-right-radius": |
| 370 |
imageRadius.device?.[deviceType].right / 2 + imageRadius.unit?.[deviceType], |
| 371 |
"border-bottom-left-radius": |
| 372 |
imageRadius.device?.[deviceType].bottom / 2 + imageRadius.unit?.[deviceType], |
| 373 |
"border-bottom-right-radius": |
| 374 |
imageRadius.device?.[deviceType].left / 2 + imageRadius.unit?.[deviceType], |
| 375 |
}, |
| 376 |
}, |
| 377 |
]; |
| 378 |
}; |
| 379 |
|
| 380 |
const desktopCss = [ |
| 381 |
...sharedDesktopCss, |
| 382 |
...responsiveCss("Desktop"), |
| 383 |
{ |
| 384 |
class: `#${uniqueId} .sp-smart-post-thumbnail-two-thumb .sp-smart-post-swiper2 .swiper-wrapper .sp-slide-item-thumb .sp-smart-post-card::after`, |
| 385 |
styles: { |
| 386 |
opacity: 0, |
| 387 |
}, |
| 388 |
}, |
| 389 |
{ |
| 390 |
class: `#${uniqueId} .sp-smart-post-thumbnail-two-thumb .sp-smart-post-swiper2 .sp-smart-post-card:not(.thumbnail-slider-two-layout-five)`, |
| 391 |
styles: { |
| 392 |
background: colorControls( |
| 393 |
thumbnailThumbBGColor?.color?.style, |
| 394 |
thumbnailThumbBGColor?.color?.solidColor, |
| 395 |
thumbnailThumbBGColor?.color?.gradient |
| 396 |
) |
| 397 |
? colorControls( |
| 398 |
thumbnailThumbBGColor?.color?.style, |
| 399 |
thumbnailThumbBGColor?.color?.solidColor, |
| 400 |
thumbnailThumbBGColor?.color?.gradient |
| 401 |
) |
| 402 |
: thumbsNormalBgColor, |
| 403 |
transition: "all 0.3s ease-in-out", |
| 404 |
}, |
| 405 |
}, |
| 406 |
{ |
| 407 |
class: `#${uniqueId} .sp-smart-post-thumbnail-two-thumb .sp-smart-post-swiper2 .swiper-slide-thumb-active .sp-smart-post-card:not(.thumbnail-slider-two-layout-five), #${uniqueId} .sp-smart-post-thumbnail-two-thumb .sp-smart-post-swiper2 .sp-smart-post-card:not(.thumbnail-slider-two-layout-five):hover`, |
| 408 |
styles: { |
| 409 |
background: colorControls( |
| 410 |
thumbnailThumbBGColor?.hover?.style, |
| 411 |
thumbnailThumbBGColor?.hover?.solidColor, |
| 412 |
thumbnailThumbBGColor?.hover?.gradient |
| 413 |
) |
| 414 |
? colorControls( |
| 415 |
thumbnailThumbBGColor?.hover?.style, |
| 416 |
thumbnailThumbBGColor?.hover?.solidColor, |
| 417 |
thumbnailThumbBGColor?.hover?.gradient |
| 418 |
) |
| 419 |
: thumbsBgHoverColor, |
| 420 |
}, |
| 421 |
}, |
| 422 |
{ |
| 423 |
class: `#${uniqueId} .thumbnail-slider-two-layout-five .sp-smart-post-thumbnail-two-thumb .sp-smart-post-swiper2 .sp-smart-post-card`, |
| 424 |
styles: { |
| 425 |
background: "transparent", |
| 426 |
}, |
| 427 |
}, |
| 428 |
{ |
| 429 |
class: `#${uniqueId} .thumbnail-slider-two-layout-five .sp-smart-post-thumbnail-two-thumb`, |
| 430 |
styles: { |
| 431 |
background: colorControls( |
| 432 |
thumbnailThumbBGColor?.color?.style, |
| 433 |
thumbnailThumbBGColor?.color?.solidColor, |
| 434 |
thumbnailThumbBGColor?.color?.gradient |
| 435 |
) |
| 436 |
? colorControls( |
| 437 |
thumbnailThumbBGColor?.color?.style, |
| 438 |
thumbnailThumbBGColor?.color?.solidColor, |
| 439 |
thumbnailThumbBGColor?.color?.gradient |
| 440 |
) |
| 441 |
: thumbsNormalBgColor, |
| 442 |
transition: "background 0.3s ease-in-out", |
| 443 |
}, |
| 444 |
}, |
| 445 |
{ |
| 446 |
class: `#${uniqueId} .thumbnail-slider-two-layout-five .sp-smart-post-thumbnail-two-thumb:hover`, |
| 447 |
styles: { |
| 448 |
background: colorControls( |
| 449 |
thumbnailThumbBGColor?.hover?.style, |
| 450 |
thumbnailThumbBGColor?.hover?.solidColor, |
| 451 |
thumbnailThumbBGColor?.hover?.gradient |
| 452 |
) |
| 453 |
? colorControls( |
| 454 |
thumbnailThumbBGColor?.hover?.style, |
| 455 |
thumbnailThumbBGColor?.hover?.solidColor, |
| 456 |
thumbnailThumbBGColor?.hover?.gradient |
| 457 |
) |
| 458 |
: thumbsBgHoverColor, |
| 459 |
}, |
| 460 |
}, |
| 461 |
{ |
| 462 |
class: `#${uniqueId} .sp-smart-post-thumbnail-slide-two .sp-smart-post-card .sp-smart-post-title`, |
| 463 |
styles: { |
| 464 |
color: largeItemTitleColor.color + " !important", |
| 465 |
"font-family": largeItemTitleTypography.typography.family + " !important", |
| 466 |
"font-style": largeItemTitleTypography.typography.style || "normal", |
| 467 |
"font-weight": largeItemTitleTypography.typography.fontWeight, |
| 468 |
"text-decoration": largeItemTitleTypography.typography.decoration + " !important", |
| 469 |
"text-transform": largeItemTitleTypography.typography.transform + " !important", |
| 470 |
transition: "color 0.3s ease-in-out", |
| 471 |
}, |
| 472 |
}, |
| 473 |
{ |
| 474 |
class: `#${uniqueId} .sp-smart-post-thumbnail-slide-two .sp-smart-post-card .sp-smart-post-title:hover`, |
| 475 |
styles: { |
| 476 |
color: largeItemTitleColor.hoverColor + " !important", |
| 477 |
}, |
| 478 |
}, |
| 479 |
{ |
| 480 |
class: `#${uniqueId} .sp-smart-post-thumbnail-two-thumb .sp-smart-post-swiper2 .swiper-slide-thumb-active .sp-smart-post-card.thumbnail-slider-two-layout-one .sp-smart-post-title`, |
| 481 |
styles: { |
| 482 |
color: titleColor.hoverColor + " !important", |
| 483 |
}, |
| 484 |
}, |
| 485 |
{ |
| 486 |
class: `#${uniqueId} .thumbnail-slider-two-layout-two .sp-smart-post-thumbnail-two-thumb .sp-thumbnail-progress-bar`, |
| 487 |
styles: { |
| 488 |
background: colorControls( |
| 489 |
thumbnailProgressColor?.color?.style, |
| 490 |
thumbnailProgressColor?.color?.solidColor, |
| 491 |
thumbnailProgressColor?.color?.gradient |
| 492 |
), |
| 493 |
}, |
| 494 |
}, |
| 495 |
{ |
| 496 |
class: `#${uniqueId} .thumbnail-slider-two-layout-two .sp-smart-post-thumbnail-two-thumb .sp-thumbnail-progress-bar::after`, |
| 497 |
styles: { |
| 498 |
background: colorControls( |
| 499 |
thumbnailProgressColor?.hover?.style, |
| 500 |
thumbnailProgressColor?.hover?.solidColor, |
| 501 |
thumbnailProgressColor?.hover?.gradient |
| 502 |
), |
| 503 |
}, |
| 504 |
}, |
| 505 |
{ |
| 506 |
class: `#${uniqueId} .sp-smart-post-category .post-categories li a::before, #${uniqueId} .sp-smart-post-category a::before`, |
| 507 |
styles: { |
| 508 |
background: catTabCategoryBarColor, |
| 509 |
}, |
| 510 |
}, |
| 511 |
{ |
| 512 |
class: `#${uniqueId} .sp-smart-post-category .post-categories li a:hover::before, #${uniqueId} .sp-smart-post-category a:hover::before`, |
| 513 |
styles: { |
| 514 |
background: catTabCategoryBarHoverColor, |
| 515 |
}, |
| 516 |
}, |
| 517 |
{ |
| 518 |
class: `#${uniqueId} .thumbnail-slider-two-layout-three .sp-smart-post-thumbnail-two-thumb .sp-slide-item-thumb, #${uniqueId} .thumbnail-slider-two-layout-four .sp-smart-post-thumbnail-two-thumb .sp-slide-item-thumb, #${uniqueId} .thumbnail-slider-two-layout-five .sp-smart-post-thumbnail-two-thumb .sp-slide-item-thumb.swiper-slide-thumb-active .sp-smart-post-card-image img`, |
| 519 |
styles: { |
| 520 |
"border-style": contentAreaThumbsBorder.style + " !important", |
| 521 |
// 'border-color': contentAreaThumbsBorder.color || '#ffffffff', |
| 522 |
"border-color": contentAreaThumbsBorder.color, |
| 523 |
overflow: "hidden", |
| 524 |
"border-width": "3px", |
| 525 |
}, |
| 526 |
}, |
| 527 |
]; |
| 528 |
|
| 529 |
cacheCss.desktop = objectToCssString(desktopCss); |
| 530 |
|
| 531 |
if ("Tablet" === currentDevice || "all" === currentDevice) { |
| 532 |
// Tablet style CSS. |
| 533 |
const tabletCss = [ |
| 534 |
...sharedTabletCss, |
| 535 |
...responsiveCss("Tablet"), |
| 536 |
{ |
| 537 |
class: `#${uniqueId} .thumbnail-slider-two-layout-one .sp-smart-post-thumbnail-two-thumb.thumbs-align-left, #${uniqueId} .thumbnail-slider-two-layout-one .sp-smart-post-thumbnail-two-thumb.thumbs-align-right`, |
| 538 |
styles: { |
| 539 |
"border-bottom-style": imageBorder.style, |
| 540 |
"border-bottom-color": "transparent", |
| 541 |
"border-bottom-width": imageBorderWidth.device.Tablet.bottom + imageBorderWidth.unit.Tablet, |
| 542 |
"border-bottom-left-radius": imageRadius.device.Tablet.right * 0.8 + imageRadius.unit.Tablet, |
| 543 |
"border-bottom-right-radius": imageRadius.device.Tablet.left * 0.8 + imageRadius.unit.Tablet, |
| 544 |
left: "0", |
| 545 |
width: "100%", |
| 546 |
}, |
| 547 |
}, |
| 548 |
]; |
| 549 |
cacheCss.tablet = wrapInMediaQuery( |
| 550 |
objectToCssString(tabletCss), |
| 551 |
`only screen and (max-width: ${globalBreakPointData?.tablet}px)` |
| 552 |
); |
| 553 |
} |
| 554 |
if ("Mobile" === currentDevice || "all" === currentDevice) { |
| 555 |
// Mobile style CSS. |
| 556 |
const mobileCss = [ |
| 557 |
...sharedMobileCss, |
| 558 |
...responsiveCss("Mobile"), |
| 559 |
{ |
| 560 |
class: `#${uniqueId} .sp-smart-post-thumbnail-two-thumb`, |
| 561 |
styles: { |
| 562 |
display: "none", |
| 563 |
}, |
| 564 |
}, |
| 565 |
{ |
| 566 |
class: `#${uniqueId} .sp-smart-post-block-wrapper.thumbnail-slider-two-layout-five .sp-smart-post-thumbnail-slide-two .sp-smart-post-card-content, #${uniqueId} .sp-smart-post-block-wrapper.thumbnail-slider-two-layout-four .sp-smart-post-thumbnail-slide-two .sp-smart-post-card-content, #${uniqueId} .sp-smart-post-block-wrapper.thumbnail-slider-two-layout-three .sp-smart-post-card-content`, |
| 567 |
styles: { |
| 568 |
width: "100%", |
| 569 |
}, |
| 570 |
}, |
| 571 |
{ |
| 572 |
class: `#${uniqueId} .sp-smart-post-block-wrapper.thumbnail-slider-two-layout-five .sp-smart-post-template-one-content, #${uniqueId} .sp-smart-post-block-wrapper.thumbnail-slider-two-layout-four .sp-smart-post-template-one-content, #${uniqueId} .sp-smart-post-block-wrapper.thumbnail-slider-two-layout-three .sp-smart-post-template-one-content`, |
| 573 |
styles: { |
| 574 |
"align-items": "center !important", |
| 575 |
}, |
| 576 |
}, |
| 577 |
]; |
| 578 |
cacheCss.mobile = wrapInMediaQuery( |
| 579 |
objectToCssString(mobileCss), |
| 580 |
`only screen and (max-width: ${globalBreakPointData?.mobile}px)` |
| 581 |
); |
| 582 |
} |
| 583 |
|
| 584 |
return `${cacheCss.desktop} ${cacheCss.tablet} ${cacheCss.mobile}`; |
| 585 |
}; |
| 586 |
|
| 587 |
export default dynamicCss; |
| 588 |
|