frontblocks-advanced-option.js
1 month ago
frontblocks-advanced-option.jsx
1 month ago
frontblocks-carousel-editor.css
4 months ago
frontblocks-carousel.css
1 month ago
frontblocks-carousel.js
1 month ago
glide.min.js
8 months ago
frontblocks-carousel.css
299 lines
| 1 | /** |
| 2 | * Frontblocks Carousel – scoped under .frontblocks so other Glide instances are not affected. |
| 3 | */ |
| 4 | |
| 5 | .frontblocks.glide { |
| 6 | position: relative; |
| 7 | width: 100%; |
| 8 | max-width: 100%; |
| 9 | box-sizing: border-box; |
| 10 | overflow: visible; |
| 11 | margin: 0; |
| 12 | padding: 0; |
| 13 | } |
| 14 | |
| 15 | .frontblocks.glide * { |
| 16 | box-sizing: inherit; |
| 17 | } |
| 18 | |
| 19 | .frontblocks .glide__track { |
| 20 | overflow: hidden; |
| 21 | width: 100%; |
| 22 | position: relative; |
| 23 | left: 0; |
| 24 | margin: 0; |
| 25 | padding: 0; |
| 26 | } |
| 27 | |
| 28 | .frontblocks .glide__slides { |
| 29 | position: relative; |
| 30 | width: 100%; |
| 31 | list-style: none; |
| 32 | backface-visibility: hidden; |
| 33 | transform-style: preserve-3d; |
| 34 | touch-action: pan-Y; |
| 35 | overflow: hidden; |
| 36 | margin: 0; |
| 37 | padding: 0; |
| 38 | white-space: nowrap; |
| 39 | display: flex; |
| 40 | flex-wrap: nowrap; |
| 41 | will-change: transform; |
| 42 | } |
| 43 | |
| 44 | .frontblocks .glide__slides--dragging { |
| 45 | user-select: none; |
| 46 | } |
| 47 | |
| 48 | .frontblocks .glide__slide { |
| 49 | width: 100%; |
| 50 | height: 100%; |
| 51 | flex-shrink: 0; |
| 52 | white-space: normal; |
| 53 | user-select: none; |
| 54 | -webkit-touch-callout: none; |
| 55 | -webkit-tap-highlight-color: transparent; |
| 56 | min-width: 0; |
| 57 | overflow: hidden; |
| 58 | } |
| 59 | |
| 60 | /* Prevent inner content (cards, AWB, etc.) from overflowing the slide and being cut off. */ |
| 61 | .frontblocks .glide__slide > * { |
| 62 | max-width: 100%; |
| 63 | box-sizing: border-box; |
| 64 | } |
| 65 | |
| 66 | .frontblocks .glide__slide a { |
| 67 | user-select: none; |
| 68 | -webkit-user-drag: none; |
| 69 | -moz-user-select: none; |
| 70 | -ms-user-select: none; |
| 71 | } |
| 72 | |
| 73 | .frontblocks .glide__arrows { |
| 74 | -webkit-touch-callout: none; |
| 75 | user-select: none; |
| 76 | } |
| 77 | |
| 78 | .frontblocks .glide__bullets { |
| 79 | -webkit-touch-callout: none; |
| 80 | user-select: none; |
| 81 | } |
| 82 | |
| 83 | .frontblocks.glide--rtl { |
| 84 | direction: rtl; |
| 85 | } |
| 86 | |
| 87 | .frontblocks .glide__arrow { |
| 88 | position: absolute; |
| 89 | display: block; |
| 90 | top: 50%; |
| 91 | z-index: 2; |
| 92 | color: white; |
| 93 | text-transform: uppercase; |
| 94 | padding: 9px 12px; |
| 95 | background-color: transparent; |
| 96 | border: 2px solid rgba(255, 255, 255, 0.5); |
| 97 | border-radius: 4px; |
| 98 | opacity: 1; |
| 99 | cursor: pointer; |
| 100 | transition: opacity 150ms ease, border 300ms ease-in-out; |
| 101 | transform: translateY(-50%); |
| 102 | line-height: 1; |
| 103 | } |
| 104 | |
| 105 | .frontblocks .glide__arrow:focus { |
| 106 | outline: none; |
| 107 | } |
| 108 | |
| 109 | .frontblocks .glide__arrow:hover { |
| 110 | border-color: white; |
| 111 | } |
| 112 | |
| 113 | .frontblocks .glide__arrow--left { |
| 114 | left: 1em; |
| 115 | } |
| 116 | |
| 117 | .frontblocks .glide__arrow--right { |
| 118 | right: 1em; |
| 119 | } |
| 120 | |
| 121 | .frontblocks .glide__arrow--disabled { |
| 122 | opacity: 0.33; |
| 123 | } |
| 124 | |
| 125 | .frontblocks .glide__bullets { |
| 126 | display: flex; |
| 127 | justify-content: center; |
| 128 | list-style: none; |
| 129 | gap: 2px; |
| 130 | margin: 0.75em 0 0; |
| 131 | padding: 0; |
| 132 | } |
| 133 | |
| 134 | .frontblocks .glide__bullet { |
| 135 | box-sizing: content-box; |
| 136 | width: 10px; |
| 137 | height: 10px; |
| 138 | padding: 0; |
| 139 | border-radius: 50%; |
| 140 | border: none; |
| 141 | background-color: var(--frbl-bullet-bg, rgba(0, 0, 0, 0.25)); |
| 142 | cursor: pointer; |
| 143 | transition: background-color 300ms ease-in-out, transform 300ms ease-in-out; |
| 144 | margin: 0 2px; |
| 145 | flex-shrink: 0; |
| 146 | } |
| 147 | |
| 148 | .frontblocks .glide__bullet:focus { |
| 149 | outline: 2px solid var(--frbl-bullet-color, rgba(0, 0, 0, 0.8)); |
| 150 | outline-offset: 2px; |
| 151 | } |
| 152 | |
| 153 | .frontblocks .glide__bullet:hover { |
| 154 | background-color: var(--frbl-bullet-color, rgba(0, 0, 0, 0.8)); |
| 155 | transform: scale(1.2); |
| 156 | } |
| 157 | |
| 158 | .frontblocks .glide__bullet--active { |
| 159 | background-color: var(--frbl-bullet-color, rgba(0, 0, 0, 0.8)); |
| 160 | transform: scale(1.2); |
| 161 | } |
| 162 | |
| 163 | .frontblocks.glide--swipeable { |
| 164 | cursor: grab; |
| 165 | cursor: -moz-grab; |
| 166 | cursor: -webkit-grab; |
| 167 | } |
| 168 | |
| 169 | .frontblocks.glide--dragging { |
| 170 | cursor: grabbing; |
| 171 | cursor: -moz-grabbing; |
| 172 | cursor: -webkit-grabbing; |
| 173 | } |
| 174 | |
| 175 | .frontblocks .glide__arrows--bottom .glide__arrow { |
| 176 | top: calc(100% + 25px); |
| 177 | left: 0; |
| 178 | } |
| 179 | |
| 180 | .frontblocks .glide__arrows--bottom .glide__arrow--right { |
| 181 | left: 50px; |
| 182 | right: unset; |
| 183 | } |
| 184 | |
| 185 | .frontblocks .glide__arrows--top { |
| 186 | position: absolute; |
| 187 | top: 50%; |
| 188 | left: 0; |
| 189 | right: 0; |
| 190 | width: 100%; |
| 191 | z-index: 10; |
| 192 | pointer-events: none; |
| 193 | transform: translateY(-50%); |
| 194 | } |
| 195 | |
| 196 | .frontblocks .glide__arrows--top .glide__arrow { |
| 197 | pointer-events: all; |
| 198 | } |
| 199 | |
| 200 | .frontblocks .glide__arrows--top .glide__arrow--left { |
| 201 | left: 2em; |
| 202 | } |
| 203 | |
| 204 | .frontblocks .glide__arrows--top .glide__arrow--right { |
| 205 | right: 2em; |
| 206 | } |
| 207 | |
| 208 | @media only screen and (max-width: 768px) { |
| 209 | .frontblocks .glide__arrow--left { |
| 210 | left: 0.5em; |
| 211 | } |
| 212 | .frontblocks .glide__arrow--right { |
| 213 | right: 0.5em; |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | /** |
| 218 | * Override native Gutenberg Grid styles when carousel is active (scoped to frontblocks carousel). |
| 219 | */ |
| 220 | .wp-block-group.frontblocks-carousel, |
| 221 | .wp-block-group.frontblocks-carousel.is-layout-grid { |
| 222 | display: block; |
| 223 | grid-template-columns: none; |
| 224 | gap: 0; |
| 225 | } |
| 226 | |
| 227 | .wp-block-group.frontblocks-carousel .frontblocks.glide, |
| 228 | .wp-block-group.frontblocks-carousel .frontblocks .glide__track { |
| 229 | width: 100%; |
| 230 | max-width: 100%; |
| 231 | margin-left: 0; |
| 232 | margin-right: 0; |
| 233 | padding-left: 0; |
| 234 | padding-right: 0; |
| 235 | } |
| 236 | |
| 237 | .wp-block-group.frontblocks-carousel > * { |
| 238 | width: 100%; |
| 239 | } |
| 240 | |
| 241 | .wp-block-group.frontblocks-carousel > .wp-block-group__inner-container { |
| 242 | display: block; |
| 243 | grid-template-columns: none; |
| 244 | gap: 0; |
| 245 | width: 100%; |
| 246 | } |
| 247 | |
| 248 | .frontblocks .glide__slides.wp-block-group, |
| 249 | .frontblocks .glide__slides.wp-block-group.is-layout-grid { |
| 250 | display: flex; |
| 251 | grid-template-columns: none; |
| 252 | gap: 0; |
| 253 | column-gap: 0; |
| 254 | row-gap: 0; |
| 255 | } |
| 256 | |
| 257 | .frontblocks .glide__slides > .glide__slide { |
| 258 | min-width: 0; |
| 259 | flex-shrink: 0; |
| 260 | } |
| 261 | |
| 262 | /** |
| 263 | * GenerateBlocks (and any other plugin) may inject column-gap via generated |
| 264 | * utility classes on the carousel slides container. Glide manages its own |
| 265 | * spacing through margin-right on each slide, so any external column-gap |
| 266 | * breaks the width calculation and must be zeroed out. |
| 267 | */ |
| 268 | .frontblocks-carousel, |
| 269 | .frontblocks .glide__slides { |
| 270 | column-gap: 0 !important; |
| 271 | gap: 0 !important; |
| 272 | } |
| 273 | |
| 274 | /* core/query (wp-block-post-template) as carousel — override WP grid layout */ |
| 275 | .frontblocks ul.glide__slides.wp-block-post-template, |
| 276 | .frontblocks ul.glide__slides.wp-block-post-template.is-layout-grid, |
| 277 | .frontblocks ul.glide__slides.wp-block-post-template.is-layout-flex, |
| 278 | .frontblocks ul.glide__slides.wp-block-post-template.is-layout-flow { |
| 279 | display: flex; |
| 280 | flex-wrap: nowrap; |
| 281 | grid-template-columns: unset; |
| 282 | grid-auto-rows: unset; |
| 283 | max-width: none; |
| 284 | list-style: none; |
| 285 | padding-left: 0; |
| 286 | margin-left: 0; |
| 287 | margin-right: 0; |
| 288 | } |
| 289 | |
| 290 | .frontblocks ul.glide__slides.wp-block-post-template > li.glide__slide, |
| 291 | .frontblocks ul.glide__slides.wp-block-post-template > li.glide__slide.wp-block-post { |
| 292 | display: block; |
| 293 | height: auto; |
| 294 | grid-column: unset; |
| 295 | grid-row: unset; |
| 296 | float: none; |
| 297 | clear: none; |
| 298 | } |
| 299 |