Changeset 3411083
- Timestamp:
- 12/04/2025 02:44:43 PM (4 months ago)
- Location:
- photoblocks-gallery/trunk/src/photo-gallery
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
photoblocks-gallery/trunk/src/photo-gallery/edit.js
r3391515 r3411083 1 import { useBlockProps, BlockControls, MediaUpload, MediaUploadCheck, InspectorControls} from '@wordpress/block-editor';2 3 import { ToolbarGroup, ToolbarButton, Button, PanelBody, RangeControl, ToggleControl, SelectControl, TabPanel} from '@wordpress/components';1 import {useBlockProps, BlockControls, MediaUpload, MediaUploadCheck,InspectorControls} from '@wordpress/block-editor'; 2 3 import { ToolbarGroup, ToolbarButton, Button, PanelBody, RangeControl, ToggleControl, SelectControl,} from '@wordpress/components'; 4 4 5 5 import { Fragment } from '@wordpress/element'; … … 8 8 export default function Edit({ attributes, setAttributes }) { 9 9 10 const { 11 images = [], 12 columns = 3, 13 gap = 16, 14 showCaptions = true, 15 imageSize = 'full', 16 customWidth = 0, 10 const { 11 images = [], 12 columns = 3, 13 gap = 16, 14 showCaptions = true, 15 imageSize = 'full', 16 customWidth = 0, 17 17 customHeight = 0, 18 layoutType = 'grid', 19 showPagination = false, 20 itemsPerPage = 12, 18 layoutType = 'grid', 19 showPagination = false, 20 itemsPerPage = 12, 21 21 currentPage = 1, 22 // Slideshow specific attributes 23 autoPlay = true, 24 autoPlaySpeed = 3000, 25 showThumbnails = true, 26 showNavigation = true, 27 transitionEffect = 'slide', 28 currentSlide = 0, 22 29 // Image Browser specific attributes 23 30 browserCurrentImage = 0, … … 27 34 browserAutoFullscreen = false, 28 35 browserZoomEnabled = true, 29 ImgbackgroundColor = '#000000',30 ImgCaptionColor = '#ffffff',31 32 36 // Masonry specific attributes 33 37 masonryBorderRadius = 8, 34 38 masonryImageBorder = 0, 35 39 masonryImageBorderColor = '#e0e0e0', 36 masonryImageBorderStyle = 'solid', 37 38 // NEW STYLE ATTRIBUTES 39 // Grid Style attributes 40 gridBackgroundColor = '#000000', 41 grindCaptionColor = '#ffffff', 42 GtBgap = 0, 43 44 // Lightbox Style attributes 45 lightboxOverlayColor = 'rgba(0, 0, 0, 0.8)', 46 lightboxIconColor = '#ffffff', 47 lightboxHoverScale = 1.05, 48 49 LightBackgroundColor = '#000000', 50 LightCaptionColor = '#ffffff', 51 LighttBgap = 0, 52 53 54 // Masonry Style attributes (additional to existing) 55 masonryHoverEffect = 'lift', 56 masonryImageOpacity = 1, 57 40 masonryImageBorderStyle = 'solid' 58 41 } = attributes; 59 42 … … 67 50 sizes: img.sizes || {}, 68 51 })), 69 currentPage: 1, 70 currentSlide: 0, 71 browserCurrentImage: 0 52 currentPage: 1, // Reset to first page when images change 53 currentSlide: 0, // Reset to first slide when images change 54 browserCurrentImage: 0 // Reset to first image for browser 72 55 }); 73 56 }; … … 76 59 const startIndex = (currentPage - 1) * itemsPerPage; 77 60 const endIndex = startIndex + itemsPerPage; 78 const imagesToDisplay = showPagination ? images.slice(startIndex, endIndex) : images;61 const imagesToDisplay = showPagination ? images.slice(startIndex, endIndex): images; 79 62 80 63 // Calculate total pages for pagination 81 64 const totalPages = Math.ceil(images.length / itemsPerPage); 65 66 // Handle slideshow navigation 67 const handleSlideChange = (slideIndex) => { 68 setAttributes({ currentSlide: slideIndex }); 69 }; 70 71 const nextSlide = () => { 72 const nextIndex = (currentSlide + 1) % images.length; 73 setAttributes({ currentSlide: nextIndex }); 74 }; 75 76 const prevSlide = () => { 77 const prevIndex = currentSlide === 0 ? images.length - 1 : currentSlide - 1; 78 setAttributes({ currentSlide: prevIndex }); 79 }; 82 80 83 81 // Handle image browser navigation … … 98 96 return ( 99 97 <Fragment> 98 100 99 <BlockControls> 101 <ToolbarGroup>102 <ToolbarButton103 icon="grid-view"104 isPressed={layoutType === 'grid'}105 onClick={() => setAttributes({ layoutType: 'grid' })}100 <ToolbarGroup> 101 <ToolbarButton 102 icon="grid-view" 103 isPressed={ layoutType === 'grid' } 104 onClick={ () => setAttributes({ layoutType: 'grid' }) } 106 105 > 107 {__('Grid', 'photoblocks-gallery')}106 { __( 'Grid', 'photoblocks-gallery' ) } 108 107 </ToolbarButton> 109 108 110 <ToolbarButton109 <ToolbarButton 111 110 icon="format-gallery" 112 isPressed={ layoutType === 'lightbox'}113 onClick={ () => setAttributes({ layoutType: 'lightbox' })}111 isPressed={ layoutType === 'lightbox' } 112 onClick={ () => setAttributes({ layoutType: 'lightbox' }) } 114 113 > 115 {__('Lightbox', 'photoblocks-gallery')} 116 </ToolbarButton> 117 118 <ToolbarButton 114 { __( 'Lightbox', 'photoblocks-gallery' ) } 115 </ToolbarButton> 116 117 <ToolbarButton 118 icon="slides" 119 isPressed={ layoutType === 'slideshow' } 120 onClick={ () => setAttributes({ layoutType: 'slideshow' }) } 121 > 122 { __( 'Slide Show', 'photoblocks-gallery' ) } 123 </ToolbarButton> 124 125 <ToolbarButton 119 126 icon="schedule" 120 isPressed={ layoutType === 'masonry'}121 onClick={ () => setAttributes({ layoutType: 'masonry' })}127 isPressed={ layoutType === 'masonry' } 128 onClick={ () => setAttributes({ layoutType: 'masonry' }) } 122 129 > 123 { __('Masonry', 'photoblocks-gallery')}124 </ToolbarButton>125 126 <ToolbarButton130 { __( 'Masonry', 'photoblocks-gallery' ) } 131 </ToolbarButton> 132 133 <ToolbarButton 127 134 icon="cover-image" 128 isPressed={ layoutType === 'imagebrowser'}129 onClick={ () => setAttributes({ layoutType: 'imagebrowser' })}135 isPressed={ layoutType === 'imagebrowser' } 136 onClick={ () => setAttributes({ layoutType: 'imagebrowser' }) } 130 137 > 131 {__('Image Browser', 'photoblocks-gallery')} 132 </ToolbarButton> 133 134 <ToolbarButton 135 icon="cover-image" 136 disabled={true} 137 > 138 {__('Infinite Carousel', 'photoblocks-gallery')} 139 <span className="pro-badge">PRO</span> 140 </ToolbarButton> 141 142 <ToolbarButton 143 icon="cover-image" 144 disabled={true} 145 > 146 {__('Wave Gallery', 'photoblocks-gallery')} 147 <span className="pro-badge">PRO</span> 148 </ToolbarButton> 149 150 <ToolbarButton 151 icon="cover-image" 152 disabled={true} 153 > 154 {__('Image Center', 'photoblocks-gallery')} 155 <span className="pro-badge">PRO</span> 156 </ToolbarButton> 157 158 </ToolbarGroup> 159 </BlockControls> 160 161 138 { __( 'Image Browser', 'photoblocks-gallery' ) } 139 </ToolbarButton> 140 141 142 </ToolbarGroup> 143 </BlockControls> 144 162 145 <InspectorControls> 163 164 <div className="tab-content-settings"> 165 <PanelBody title={__('Layout & Display')} initialOpen={true}> 166 <SelectControl 167 label={__('Gallery Layout')} 168 value={layoutType} 169 options={[ 170 { label: 'Grid Layout', value: 'grid' }, 171 { label: 'Lightbox Layout', value: 'lightbox' }, 172 { label: 'Image browser Layout', value: 'imagebrowser' }, 173 { label: 'Masonry Layout', value: 'masonry' }, 174 { label: 'Infinite Carousel (PRO 🔒)', value: 'infinite', disabled: true }, 175 { label: 'Wave Gallery (PRO 🔒)', value: 'wave', disabled: true }, 176 { label: 'Image Center (PRO 🔒)', value: 'center', disabled: true }, 177 ]} 178 onChange={(value) => setAttributes({ layoutType: value })} 179 /> 180 181 {layoutType !== 'slideshow' && layoutType !== 'imagebrowser' && ( 146 <PanelBody title={__('Gallery Settings')} initialOpen={true}> 147 <SelectControl 148 label={__('Gallery Layout')} 149 value={layoutType} 150 options={[ 151 { label: 'Grid Layout', value: 'grid' }, 152 { label: 'Slide Show Layout', value: 'slideshow' }, 153 { label: 'Lightbox Layout', value: 'lightbox' }, 154 { label: 'Image browser Layout', value: 'imagebrowser' }, 155 { label: 'Masonry Layout', value: 'masonry' }, 156 157 ]} 158 onChange={(value) => setAttributes({ layoutType: value })} 159 /> 160 161 {layoutType !== 'slideshow' && layoutType !== 'imagebrowser' && ( 162 <RangeControl 163 label={__('Images Per Row')} 164 value={columns} 165 onChange={(value) => setAttributes({ columns: value })} 166 min={1} 167 max={6} 168 /> 169 )} 170 171 {layoutType !== 'imagebrowser' && ( 172 <RangeControl 173 label={__('Space Between Images')} 174 value={gap} 175 onChange={(value) => setAttributes({ gap: value })} 176 min={8} 177 max={100} 178 /> 179 )} 180 181 <ToggleControl 182 label={__('Show Captions')} 183 checked={showCaptions} 184 onChange={(value) => setAttributes({ showCaptions: value })} 185 /> 186 187 <SelectControl 188 label={__('Image Size')} 189 value={imageSize} 190 options={[ 191 { label: 'Full Size', value: 'full' }, 192 { label: 'Large', value: 'large' }, 193 { label: 'Medium', value: 'medium' }, 194 { label: 'Thumbnail', value: 'thumbnail' }, 195 { label: 'Custom', value: 'custom' }, 196 ]} 197 onChange={(value) => setAttributes({ imageSize: value })} 198 /> 199 200 {imageSize === 'custom' && ( 201 <> 182 202 <RangeControl 183 label={__(' Images Per Row')}184 value={c olumns}185 onChange={(value) => setAttributes({ c olumns: value })}186 min={ 1}187 max={ 6}203 label={__('Custom Width (px)')} 204 value={customWidth} 205 onChange={(value) => setAttributes({ customWidth: value })} 206 min={50} 207 max={1200} 188 208 /> 189 )}190 191 {layoutType !== 'imagebrowser' && (192 209 <RangeControl 193 label={__(' Space Between Images')}194 value={ gap}195 onChange={(value) => setAttributes({ gap: value })}196 min={ 8}197 max={1 00}210 label={__('Custom Height (px)')} 211 value={customHeight} 212 onChange={(value) => setAttributes({ customHeight: value })} 213 min={50} 214 max={1200} 198 215 /> 199 )} 200 201 <ToggleControl 202 label={__('Show Captions')} 203 checked={showCaptions} 204 onChange={(value) => setAttributes({ showCaptions: value })} 205 /> 206 207 <SelectControl 208 label={__('Image Size')} 209 value={imageSize} 210 options={[ 211 { label: 'Full Size', value: 'full' }, 212 { label: 'Large', value: 'large' }, 213 { label: 'Medium', value: 'medium' }, 214 { label: 'Thumbnail', value: 'thumbnail' }, 215 { label: 'Custom', value: 'custom' }, 216 ]} 217 onChange={(value) => setAttributes({ imageSize: value })} 218 /> 219 220 {imageSize === 'custom' && ( 221 <> 222 <RangeControl 223 label={__('Custom Width (px)')} 224 value={customWidth} 225 onChange={(value) => setAttributes({ customWidth: value })} 226 min={50} 227 max={1200} 228 /> 229 <RangeControl 230 label={__('Custom Height (px)')} 231 value={customHeight} 232 onChange={(value) => setAttributes({ customHeight: value })} 233 min={50} 234 max={1200} 235 /> 236 </> 237 )} 238 239 {(layoutType === 'grid' || layoutType === 'lightbox' || layoutType === 'masonry') && ( 240 <> 241 <ToggleControl 242 label={__('Pagination Show')} 243 checked={showPagination} 244 onChange={(value) => setAttributes({ showPagination: value, currentPage: 1 })} 245 /> 246 247 {showPagination && ( 248 <SelectControl 249 label={__('Items Per Page')} 250 value={itemsPerPage} 251 options={[ 252 { label: '4', value: 4 }, 253 { label: '8', value: 8 }, 254 { label: '12', value: 12 }, 255 { label: '16', value: 16 }, 256 { label: '20', value: 20 }, 257 ]} 258 onChange={(value) => 259 setAttributes({ itemsPerPage: parseInt(value, 10), currentPage: 1 }) 260 } 261 /> 262 )} 263 </> 264 )} 265 </PanelBody> 266 267 {layoutType === 'slideshow' && ( 268 <PanelBody title={__('Slideshow Settings')} initialOpen={true}> 216 </> 217 )} 218 219 {(layoutType === 'grid' || layoutType === 'lightbox' || layoutType === 'masonry') && ( 220 <> 269 221 <ToggleControl 270 label={__(' Auto Play')}271 checked={ autoPlay}272 onChange={(value) => setAttributes({ autoPlay: value})}222 label={__('Pagination Show')} 223 checked={showPagination} 224 onChange={(value) => setAttributes({ showPagination: value, currentPage: 1 })} 273 225 /> 274 226 275 {autoPlay && ( 276 <RangeControl 277 label={__('Auto Play Speed (ms)')} 278 value={autoPlaySpeed} 279 onChange={(value) => setAttributes({ autoPlaySpeed: value })} 280 min={1000} 281 max={10000} 282 step={500} 227 {showPagination && ( 228 <SelectControl 229 label={__('Items Per Page')} 230 value={itemsPerPage} 231 options={[ 232 { label: '4', value: 4 }, 233 { label: '8', value: 8 }, 234 { label: '12', value: 12 }, 235 { label: '16', value: 16 }, 236 { label: '20', value: 20 }, 237 ]} 238 onChange={(value) => 239 setAttributes({ itemsPerPage: parseInt(value, 10), currentPage: 1 }) 240 } 283 241 /> 284 242 )} 285 286 <ToggleControl 287 label={__('Show Thumbnails')} 288 checked={showThumbnails} 289 onChange={(value) => setAttributes({ showThumbnails: value })} 243 </> 244 )} 245 </PanelBody> 246 247 {layoutType === 'slideshow' && ( 248 <PanelBody title={__('Slideshow Settings')} initialOpen={true}> 249 <ToggleControl 250 label={__('Auto Play')} 251 checked={autoPlay} 252 onChange={(value) => setAttributes({ autoPlay: value })} 253 /> 254 255 {autoPlay && ( 256 <RangeControl 257 label={__('Auto Play Speed (ms)')} 258 value={autoPlaySpeed} 259 onChange={(value) => setAttributes({ autoPlaySpeed: value })} 260 min={1000} 261 max={10000} 262 step={500} 290 263 /> 291 292 <ToggleControl 293 label={__('Show Navigation')} 294 checked={showNavigation} 295 onChange={(value) => setAttributes({ showNavigation: value })} 296 /> 297 298 <SelectControl 299 label={__('Transition Effect')} 300 value={transitionEffect} 301 options={[ 302 { label: 'Slide', value: 'slide' }, 303 { label: 'Fade', value: 'fade' }, 304 { label: 'Zoom', value: 'zoom' }, 305 ]} 306 onChange={(value) => setAttributes({ transitionEffect: value })} 307 /> 308 </PanelBody> 309 )} 310 311 {layoutType === 'imagebrowser' && ( 312 <PanelBody title={__('Image Browser Settings')} initialOpen={true}> 313 <ToggleControl 314 label={__('Show Thumbnails')} 315 checked={browserShowThumbnails} 316 onChange={(value) => setAttributes({ browserShowThumbnails: value })} 317 /> 318 319 <ToggleControl 320 label={__('Show Navigation Arrows')} 321 checked={browserShowNavigation} 322 onChange={(value) => setAttributes({ browserShowNavigation: value })} 323 /> 324 325 <ToggleControl 326 label={__('Show Image Counter')} 327 checked={browserShowCounter} 328 onChange={(value) => setAttributes({ browserShowCounter: value })} 329 /> 330 331 <ToggleControl 332 label={__('Enable Zoom & Pan')} 333 checked={browserZoomEnabled} 334 onChange={(value) => setAttributes({ browserZoomEnabled: value })} 335 /> 336 337 <ToggleControl 338 label={__('Auto Fullscreen Mode')} 339 checked={browserAutoFullscreen} 340 onChange={(value) => setAttributes({ browserAutoFullscreen: value })} 341 /> 342 </PanelBody> 343 )} 344 </div> 345 346 </InspectorControls> 347 348 349 350 <InspectorControls group='styles'> 351 352 <div className="tab-content-styles"> 353 <PanelBody title={__('Appearance')} initialOpen={true}> 354 {/* Grid Layout Styles */} 355 {layoutType === 'grid' && ( 264 )} 265 266 <ToggleControl 267 label={__('Show Thumbnails')} 268 checked={showThumbnails} 269 onChange={(value) => setAttributes({ showThumbnails: value })} 270 /> 271 272 <ToggleControl 273 label={__('Show Navigation')} 274 checked={showNavigation} 275 onChange={(value) => setAttributes({ showNavigation: value })} 276 /> 277 278 <SelectControl 279 label={__('Transition Effect')} 280 value={transitionEffect} 281 options={[ 282 { label: 'Slide', value: 'slide' }, 283 { label: 'Fade', value: 'fade' }, 284 { label: 'Zoom', value: 'zoom' }, 285 ]} 286 onChange={(value) => setAttributes({ transitionEffect: value })} 287 /> 288 </PanelBody> 289 )} 290 291 {layoutType === 'imagebrowser' && ( 292 <PanelBody title={__('Image Browser Settings')} initialOpen={true}> 293 <ToggleControl 294 label={__('Show Thumbnails')} 295 checked={browserShowThumbnails} 296 onChange={(value) => setAttributes({ browserShowThumbnails: value })} 297 /> 298 299 <ToggleControl 300 label={__('Show Navigation Arrows')} 301 checked={browserShowNavigation} 302 onChange={(value) => setAttributes({ browserShowNavigation: value })} 303 /> 304 305 <ToggleControl 306 label={__('Show Image Counter')} 307 checked={browserShowCounter} 308 onChange={(value) => setAttributes({ browserShowCounter: value })} 309 /> 310 311 <ToggleControl 312 label={__('Enable Zoom & Pan')} 313 checked={browserZoomEnabled} 314 onChange={(value) => setAttributes({ browserZoomEnabled: value })} 315 /> 316 317 <ToggleControl 318 label={__('Auto Fullscreen Mode')} 319 checked={browserAutoFullscreen} 320 onChange={(value) => setAttributes({ browserAutoFullscreen: value })} 321 /> 322 </PanelBody> 323 )} 324 325 {layoutType === 'masonry' && ( 326 <PanelBody title={__('Masonry Settings')} initialOpen={true}> 327 <RangeControl 328 label={__('Border Radius (px)')} 329 value={masonryBorderRadius} 330 onChange={(value) => setAttributes({ masonryBorderRadius: value })} 331 min={0} 332 max={50} 333 /> 334 335 <RangeControl 336 label={__('Image Border Width (px)')} 337 value={masonryImageBorder} 338 onChange={(value) => setAttributes({ masonryImageBorder: value })} 339 min={0} 340 max={20} 341 /> 342 343 {masonryImageBorder > 0 && ( 356 344 <> 345 <SelectControl 346 label={__('Border Style')} 347 value={masonryImageBorderStyle} 348 options={[ 349 { label: 'Solid', value: 'solid' }, 350 { label: 'Dashed', value: 'dashed' }, 351 { label: 'Dotted', value: 'dotted' }, 352 { label: 'Double', value: 'double' }, 353 ]} 354 onChange={(value) => setAttributes({ masonryImageBorderStyle: value })} 355 /> 357 356 <div style={{ marginBottom: '16px' }}> 358 357 <label style={{ display: 'block', marginBottom: '4px', fontSize: '11px', fontWeight: '500', textTransform: 'uppercase' }}> 359 {__('B ackgroundColor')}358 {__('Border Color')} 360 359 </label> 361 360 <input 362 361 type="color" 363 value={gridBackgroundColor} 364 onChange={(e) => setAttributes({ gridBackgroundColor: e.target.value })} 365 style={{ width: '100%', height: '32px', border: 'none', borderRadius: '4px', cursor: 'pointer' }} 366 /> 367 </div> 368 369 <div style={{ marginBottom: '16px' }}> 370 <label style={{ display: 'block', marginBottom: '4px', fontSize: '11px', fontWeight: '500', textTransform: 'uppercase' }}> 371 {__('Text Color')} 372 </label> 373 <input 374 type="color" 375 value={grindCaptionColor} 376 onChange={(e) => setAttributes({ grindCaptionColor: e.target.value })} 377 style={{ width: '100%', height: '32px', border: 'none', borderRadius: '4px', cursor: 'pointer' }} 378 /> 379 </div> 380 381 <div style={{ marginBottom: '16px' }}> 382 <label style={{ display: 'block', marginBottom: '4px', fontSize: '11px', fontWeight: '500', textTransform: 'uppercase' }}> 383 {__('padding')} 384 </label> 385 <RangeControl 386 label={__('Top Bottom Padding (px)')} 387 value={GtBgap} 388 onChange={(value) => setAttributes({ GtBgap: value })} 389 min={0} 390 max={100} 391 /> 392 </div> 393 </> 394 )} 395 396 {/* Lightbox Layout Styles */} 397 {layoutType === 'lightbox' && ( 398 <> 399 <div style={{ marginBottom: '16px' }}> 400 <label style={{ display: 'block', marginBottom: '4px', fontSize: '11px', fontWeight: '500', textTransform: 'uppercase' }}> 401 {__('Background Color')} 402 </label> 403 <input 404 type="color" 405 value={LightBackgroundColor} 406 onChange={(e) => setAttributes({ LightBackgroundColor: e.target.value })} 407 style={{ width: '100%', height: '32px', border: 'none', borderRadius: '4px', cursor: 'pointer' }} 408 /> 409 </div> 410 411 <div style={{ marginBottom: '16px' }}> 412 <label style={{ display: 'block', marginBottom: '4px', fontSize: '11px', fontWeight: '500', textTransform: 'uppercase' }}> 413 {__('Text Color')} 414 </label> 415 <input 416 type="color" 417 value={LightCaptionColor} 418 onChange={(e) => setAttributes({ LightCaptionColor: e.target.value })} 419 style={{ width: '100%', height: '32px', border: 'none', borderRadius: '4px', cursor: 'pointer' }} 420 /> 421 </div> 422 423 <div style={{ marginBottom: '16px' }}> 424 <label style={{ display: 'block', marginBottom: '4px', fontSize: '11px', fontWeight: '500', textTransform: 'uppercase' }}> 425 {__('padding')} 426 </label> 427 <RangeControl 428 label={__('Top Bottom Padding (px)')} 429 value={LighttBgap} 430 onChange={(value) => setAttributes({ LighttBgap: value })} 431 min={0} 432 max={100} 433 /> 434 </div> 435 </> 436 )} 437 438 {/* Masonry Layout Styles */} 439 {layoutType === 'masonry' && ( 440 <> 441 442 <RangeControl 443 label={__('Border Radius (px)')} 444 value={masonryBorderRadius} 445 onChange={(value) => setAttributes({ masonryBorderRadius: value })} 446 min={0} 447 max={50} 448 /> 449 450 <RangeControl 451 label={__('Image Border Width (px)')} 452 value={masonryImageBorder} 453 onChange={(value) => setAttributes({ masonryImageBorder: value })} 454 min={0} 455 max={20} 456 /> 457 458 {masonryImageBorder > 0 && ( 459 <> 460 <SelectControl 461 label={__('Border Style')} 462 value={masonryImageBorderStyle} 463 options={[ 464 { label: 'Solid', value: 'solid' }, 465 { label: 'Dashed', value: 'dashed' }, 466 { label: 'Dotted', value: 'dotted' }, 467 { label: 'Double', value: 'double' }, 468 ]} 469 onChange={(value) => setAttributes({ masonryImageBorderStyle: value })} 470 /> 471 <div style={{ marginBottom: '16px' }}> 472 <label style={{ display: 'block', marginBottom: '4px', fontSize: '11px', fontWeight: '500', textTransform: 'uppercase' }}> 473 {__('Border Color')} 474 </label> 475 <input 476 type="color" 477 value={masonryImageBorderColor} 478 onChange={(e) => setAttributes({ masonryImageBorderColor: e.target.value })} 479 style={{ width: '100%', height: '32px', border: 'none', borderRadius: '4px', cursor: 'pointer' }} 480 /> 481 </div> 482 </> 483 )} 484 485 486 </> 487 )} 488 489 {/* Image Browser Layout Styles */} 490 {layoutType === 'imagebrowser' && ( 491 <> 492 <div style={{ marginBottom: '16px' }}> 493 <label style={{ display: 'block', marginBottom: '4px', fontSize: '11px', fontWeight: '500', textTransform: 'uppercase' }}> 494 {__('Background Color')} 495 </label> 496 <input 497 type="color" 498 value={ImgbackgroundColor} 499 onChange={(e) => setAttributes({ ImgbackgroundColor: e.target.value })} 500 style={{ width: '100%', height: '32px', border: 'none', borderRadius: '4px', cursor: 'pointer' }} 501 /> 502 </div> 503 504 <div style={{ marginBottom: '16px' }}> 505 <label style={{ display: 'block', marginBottom: '4px', fontSize: '11px', fontWeight: '500', textTransform: 'uppercase' }}> 506 {__('Caption Color')} 507 </label> 508 <input 509 type="color" 510 value={ImgCaptionColor} 511 onChange={(e) => setAttributes({ ImgCaptionColor: e.target.value })} 362 value={masonryImageBorderColor} 363 onChange={(e) => setAttributes({ masonryImageBorderColor: e.target.value })} 512 364 style={{ width: '100%', height: '32px', border: 'none', borderRadius: '4px', cursor: 'pointer' }} 513 365 /> … … 516 368 )} 517 369 </PanelBody> 518 </div>370 )} 519 371 </InspectorControls> 520 372 521 373 522 374 {/* 523 375 =========== Gallery Preview ========== … … 540 392 /> 541 393 </MediaUploadCheck> 542 ) : ( 394 ) : ( 543 395 <Fragment> 544 396 {layoutType === 'grid' && ( … … 550 402 <div key={img.id} className="wpct_gallery__item"> 551 403 <img 552 src={imageSize === 'custom' ? img.url : img.sizes?.[imageSize]?.url || img.url} alt={img.alt} 553 style={imageSize === 'custom' ? { 554 width: customWidth ? `${customWidth}px` : 'auto', 555 height: customHeight ? `${customHeight}px` : 'auto', 556 } : undefined 557 } 404 src={ imageSize === 'custom' ? img.url : img.sizes?.[imageSize]?.url || img.url} alt={img.alt} 405 style={ imageSize === 'custom' ? { width: customWidth ? `${customWidth}px` : 'auto', 406 height: customHeight ? `${customHeight}px` : 'auto',} : undefined 407 } 558 408 /> 559 409 {showCaptions && img.caption && ( 560 <figcaption style={{ 561 backgroundColor: gridBackgroundColor, 562 color: grindCaptionColor, 563 paddingTop: GtBgap, 564 paddingBottom: GtBgap 565 }}> {img.caption}</figcaption> 410 <figcaption>{img.caption}</figcaption> 566 411 )} 567 412 </div> … … 573 418 <div 574 419 className="wpct_gallery__lightbox-grid" 575 style={{ 576 '--columns': columns, 577 '--gap': `${gap}px`, 578 '--lightbox-overlay': lightboxOverlayColor, 579 '--lightbox-icon-color': lightboxIconColor, 580 '--lightbox-hover-scale': lightboxHoverScale 581 }} 420 style={{ '--columns': columns, '--gap': `${gap}px` }} 582 421 > 583 422 {imagesToDisplay.map((img) => ( … … 585 424 <div className="wpct_gallery__lightbox-thumb"> 586 425 <img 587 src={imageSize === 'custom' ? img.url : img.sizes?.[imageSize]?.url || img.url} alt={img.alt} 588 style={imageSize === 'custom' ? { 589 width: customWidth ? `${customWidth}px` : 'auto', 590 height: customHeight ? `${customHeight}px` : 'auto', 591 } : undefined 592 } 426 src={ imageSize === 'custom' ? img.url : img.sizes?.[imageSize]?.url || img.url} alt={img.alt} 427 style={ imageSize === 'custom' ? { width: customWidth ? `${customWidth}px` : 'auto', 428 height: customHeight ? `${customHeight}px` : 'auto',} : undefined 429 } 593 430 /> 594 431 <div className="wpct_gallery__lightbox-overlay"> … … 597 434 </div> 598 435 {showCaptions && img.caption && ( 599 <figcaption style={{ 600 backgroundColor: LightBackgroundColor, 601 color: LightCaptionColor, 602 paddingTop: LighttBgap, 603 paddingBottom: LighttBgap 604 }}>{img.caption}</figcaption> 436 <figcaption>{img.caption}</figcaption> 605 437 )} 606 438 </div> … … 612 444 <div 613 445 className="wpct_gallery__masonry" 614 style={{ 615 '--columns': columns, 446 style={{ 447 '--columns': columns, 616 448 '--gap': `${gap}px`, 617 449 '--border-radius': `${masonryBorderRadius}px`, 618 450 '--border-width': `${masonryImageBorder}px`, 619 451 '--border-color': masonryImageBorderColor, 620 '--border-style': masonryImageBorderStyle, 621 '--masonry-hover-effect': masonryHoverEffect, 622 '--masonry-opacity': masonryImageOpacity 452 '--border-style': masonryImageBorderStyle 623 453 }} 624 454 > … … 626 456 <div key={img.id} className="wpct_gallery__masonry-item"> 627 457 <img 628 src={imageSize === 'custom' ? img.url : img.sizes?.[imageSize]?.url || img.url}629 alt={img.alt}630 style={imageSize === 'custom' ? {631 width: customWidth ? `${customWidth}px` : 'auto',632 height: customHeight ? `${customHeight}px` : 'auto',633 } : undefined}458 src={ imageSize === 'custom' ? img.url : img.sizes?.[imageSize]?.url || img.url} 459 alt={img.alt} 460 style={ imageSize === 'custom' ? { 461 width: customWidth ? `${customWidth}px` : 'auto', 462 height: customHeight ? `${customHeight}px` : 'auto', 463 } : undefined} 634 464 /> 635 465 {showCaptions && img.caption && ( … … 640 470 </div> 641 471 )} 642 {layoutType === 'imagebrowser' && ( 643 <div className="wpct_gallery__imagebrowser"> 644 {/* Image Browser Main Container */} 645 <div className="wpct_gallery__imagebrowser-main"> 646 <div className="wpct_gallery__imagebrowser-viewer"> 472 473 {layoutType === 'slideshow' && ( 474 <div className="wpct_gallery__slideshow"> 475 {/* Main Slideshow Container */} 476 <div className="wpct_gallery__slideshow-main"> 477 <div className="wpct_gallery__slideshow-container"> 647 478 {images.map((img, index) => ( 648 <div 649 key={img.id} 650 className={`wpct_gallery__ browser-image ${index === browserCurrentImage ? 'active' : ''}`}651 style={{ display: index === browserCurrentImage ? 'block' : 'none' }}479 <div 480 key={img.id} 481 className={`wpct_gallery__slide ${index === currentSlide ? 'active' : ''}`} 482 style={{ display: index === currentSlide ? 'block' : 'none' }} 652 483 > 653 484 <img … … 660 491 /> 661 492 {showCaptions && img.caption && ( 662 <div className="wpct_gallery__imagebrowser-caption" 663 style={{ 664 backgroundColor: ImgbackgroundColor, 665 color: ImgCaptionColor 666 }}> 493 <div className="wpct_gallery__slideshow-caption"> 667 494 {img.caption} 668 495 </div> … … 671 498 ))} 672 499 </div> 673 500 674 501 {/* Navigation Controls */} 675 { browserShowNavigation && images.length > 1 && (502 {showNavigation && images.length > 1 && ( 676 503 <> 677 <Button 678 className="wpct_gallery__ imagebrowser-prev"679 onClick={prev BrowserImage}504 <Button 505 className="wpct_gallery__slideshow-prev" 506 onClick={prevSlide} 680 507 variant="secondary" 681 508 > 682 509 ❮ 683 510 </Button> 684 <Button 685 className="wpct_gallery__ imagebrowser-next"686 onClick={next BrowserImage}511 <Button 512 className="wpct_gallery__slideshow-next" 513 onClick={nextSlide} 687 514 variant="secondary" 688 515 > … … 691 518 </> 692 519 )} 693 520 521 {/* Slide Counter */} 522 <div className="wpct_gallery__slideshow-counter"> 523 {currentSlide + 1} / {images.length} 524 </div> 525 </div> 526 527 {/* Thumbnails */} 528 {showThumbnails && images.length > 1 && ( 529 <div className="wpct_gallery__slideshow-thumbnails" style={{ '--gap': `${gap}px` }}> 530 {images.map((img, index) => ( 531 <div 532 key={img.id} 533 className={`wpct_gallery__slideshow-thumb ${index === currentSlide ? 'active' : ''}`} 534 onClick={() => handleSlideChange(index)} 535 > 536 <img 537 src={img.sizes?.thumbnail?.url || img.url} 538 alt={img.alt} 539 /> 540 </div> 541 ))} 542 </div> 543 )} 544 545 {/* Play/Pause Controls */} 546 <div className="wpct_gallery__slideshow-controls"> 547 <Button variant="secondary"> 548 {autoPlay ? '⏸️ Pause' : '▶️ Play'} 549 </Button> 550 </div> 551 </div> 552 )} 553 554 {layoutType === 'imagebrowser' && ( 555 <div className="wpct_gallery__imagebrowser"> 556 {/* Image Browser Main Container */} 557 <div className="wpct_gallery__imagebrowser-main"> 558 <div className="wpct_gallery__imagebrowser-viewer"> 559 {images.map((img, index) => ( 560 <div 561 key={img.id} 562 className={`wpct_gallery__browser-image ${index === browserCurrentImage ? 'active' : ''}`} 563 style={{ display: index === browserCurrentImage ? 'block' : 'none' }} 564 > 565 <img 566 src={imageSize === 'custom' ? img.url : img.sizes?.[imageSize]?.url || img.url} 567 alt={img.alt} 568 style={imageSize === 'custom' ? { 569 width: customWidth ? `${customWidth}px` : 'auto', 570 height: customHeight ? `${customHeight}px` : 'auto', 571 } : undefined} 572 /> 573 {showCaptions && img.caption && ( 574 <div className="wpct_gallery__imagebrowser-caption"> 575 {img.caption} 576 </div> 577 )} 578 </div> 579 ))} 580 </div> 581 582 {/* Navigation Controls */} 583 {browserShowNavigation && images.length > 1 && ( 584 <> 585 <Button 586 className="wpct_gallery__imagebrowser-prev" 587 onClick={prevBrowserImage} 588 variant="secondary" 589 > 590 ❮ 591 </Button> 592 <Button 593 className="wpct_gallery__imagebrowser-next" 594 onClick={nextBrowserImage} 595 variant="secondary" 596 > 597 ❯ 598 </Button> 599 </> 600 )} 601 694 602 {/* Image Counter */} 695 603 {browserShowCounter && ( … … 721 629 </div> 722 630 </div> 723 631 724 632 {/* Thumbnails */} 725 633 {browserShowThumbnails && images.length > 1 && ( 726 634 <div className="wpct_gallery__imagebrowser-thumbnails"> 727 635 {images.map((img, index) => ( 728 <div 636 <div 729 637 key={img.id} 730 638 className={`wpct_gallery__imagebrowser-thumb ${index === browserCurrentImage ? 'active' : ''}`} -
photoblocks-gallery/trunk/src/photo-gallery/editor.css
r3390095 r3411083 195 195 margin-top: 0.5em; 196 196 } 197 198 /* Slideshow Layout - Editor Styles */ 199 .wpct_gallery__slideshow { 200 position: relative; 201 width: 100%; 202 max-width: 100%; 203 margin: 0 auto; 204 background: #f9f9f9; 205 border-radius: 12px; 206 overflow: hidden; 207 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); 208 } 209 210 .wpct_gallery__slideshow-main { 211 position: relative; 212 width: 100%; 213 background: #fff; 214 } 215 216 .wpct_gallery__slideshow-container { 217 position: relative; 218 width: 100%; 219 height: 400px; /* Slightly smaller for editor */ 220 overflow: hidden; 221 background: #000; 222 } 223 197 224 .wpct_gallery__slide { 198 225 position: absolute; … … 449 476 left: 20px; 450 477 right: 20px; 478 background: rgba(0, 0, 0, 0.8); 451 479 color: white; 452 480 padding: 12px 20px; … … 671 699 } 672 700 701 /* Editor-specific slideshow adjustments */ 702 .block-editor-block-list__layout .wpct_gallery__slideshow { 703 margin-bottom: 1em; 704 } 705 706 .block-editor-block-list__layout .wpct_gallery__slideshow-container { 707 min-height: 300px; /* Ensure minimum height in editor */ 708 } 709 673 710 /* Editor-specific image browser adjustments */ 674 711 .block-editor-block-list__layout .wpct_gallery__imagebrowser { … … 687 724 /* Responsive adjustments for editor */ 688 725 @media (max-width: 768px) { 726 .wpct_gallery__slideshow-container { 727 height: 300px; 728 } 729 730 .wpct_gallery__slideshow-prev, 731 .wpct_gallery__slideshow-next { 732 width: 35px; 733 height: 35px; 734 font-size: 14px; 735 } 736 737 .wpct_gallery__slideshow-controls .components-button { 738 width: 35px !important; 739 height: 35px !important; 740 min-width: 35px !important; 741 font-size: 12px !important; 742 } 743 744 .wpct_gallery__slideshow-counter { 745 padding: 4px 8px; 746 font-size: 0.75em; 747 } 748 749 .wpct_gallery__slideshow-thumb { 750 width: 50px; 751 height: 38px; 752 } 753 754 .wpct_gallery__slideshow-caption { 755 padding: 1em 0.8em 0.8em; 756 font-size: 0.9em; 757 } 758 689 759 /* Image Browser Mobile - Editor */ 690 760 .wpct_gallery__imagebrowser-viewer { … … 752 822 } 753 823 } 754 755 .pro-badge {756 background: #ff4757;757 color: #fff;758 font-size: 10px;759 font-weight: bold;760 padding: 2px 4px;761 border-radius: 3px;762 margin-left: 6px;763 vertical-align: middle;764 } -
photoblocks-gallery/trunk/src/photo-gallery/save.js
r3390095 r3411083 13 13 showPagination = false, 14 14 itemsPerPage = 12, 15 16 //Grid layout 17 gridBackgroundColor = '#000000', 18 grindCaptionColor = '#ffffff', 19 GtBgap = 0, 20 21 // Lightbox specific attributes 22 LightBackgroundColor = '#000000', 23 LightCaptionColor = '#ffffff', 24 LighttBgap = 0, 25 15 // Slideshow attributes 16 autoPlay = true, 17 autoPlaySpeed = 3000, 18 showThumbnails = true, 19 showNavigation = true, 20 transitionEffect = 'slide', 26 21 // Image Browser attributes 27 22 browserShowThumbnails = true, … … 30 25 browserAutoFullscreen = false, 31 26 browserZoomEnabled = true, 32 ImgbackgroundColor = '#000000',33 ImgCaptionColor = '#ffffff',34 35 27 // Masonry specific attributes 36 28 masonryBorderRadius = 8, … … 67 59 gap: `${gap}px` 68 60 }} 69 data-bg-color={gridBackgroundColor}70 data-caption-color={grindCaptionColor}71 61 data-columns={columns} 72 62 data-gap={gap} … … 89 79 <figure 90 80 key={img.id || index} 91 className=" wpc-gallery__item"81 className="my-gallery__item" 92 82 data-image-id={img.id || index} 93 83 > … … 97 87 style={Object.keys(imageStyles).length > 0 ? imageStyles : undefined} 98 88 /> 99 {showCaptions && img.caption && ( 100 <figcaption style={{ 101 backgroundColor: gridBackgroundColor, 102 color: grindCaptionColor, 103 paddingTop:GtBgap, 104 paddingBottom:GtBgap }}> {img.caption} </figcaption> 89 {showCaptions && img.caption && ( 90 <figcaption dangerouslySetInnerHTML={{ __html: img.caption }} /> 105 91 )} 106 92 </figure> … … 120 106 </div> 121 107 ); 122 123 108 } else if (layoutType === 'lightbox') { 124 109 return ( … … 131 116 display: 'grid', 132 117 gridTemplateColumns: `repeat(${columns}, 1fr)`, 133 gap: `${gap}px`, 134 118 gap: `${gap}px` 135 119 }} 136 120 data-layout="lightbox" … … 176 160 </div> 177 161 {showCaptions && img.caption && ( 178 179 <figcaption style={{ 180 backgroundColor: LightBackgroundColor, 181 color: LightCaptionColor, 182 paddingTop:LighttBgap, 183 paddingBottom:LighttBgap }}> {img.caption} </figcaption> 162 <figcaption dangerouslySetInnerHTML={{ __html: img.caption }} /> 184 163 )} 185 164 </figure> … … 209 188 </div> 210 189 ); 190 } else if (layoutType === 'slideshow') { 191 return ( 192 <div {...blockProps}> 193 <div 194 className="my-gallery__slideshow" 195 data-layout="slideshow" 196 data-auto-play={autoPlay ? 'true' : 'false'} 197 data-auto-play-speed={autoPlaySpeed} 198 data-show-thumbnails={showThumbnails ? 'true' : 'false'} 199 data-show-navigation={showNavigation ? 'true' : 'false'} 200 data-transition-effect={transitionEffect} 201 data-show-captions={showCaptions ? 'true' : 'false'} 202 data-total-slides={images.length} 203 > 204 {/* Main Slideshow Container */} 205 <div className="my-gallery__slideshow-main"> 206 <div className="my-gallery__slideshow-container"> 207 {images.map((img, index) => { 208 const imageUrl = imageSize === 'custom' 209 ? img.url 210 : (img.sizes && img.sizes[imageSize] && img.sizes[imageSize].url) || img.url; 211 212 const imageStyles = imageSize === 'custom' && (customWidth || customHeight) 213 ? { 214 width: customWidth ? `${customWidth}px` : 'auto', 215 height: customHeight ? `${customHeight}px` : 'auto', 216 } 217 : {}; 218 219 return ( 220 <div 221 key={img.id || index} 222 className={`my-gallery__slide ${index === 0 ? 'active' : ''}`} 223 data-slide-index={index} 224 data-image-id={img.id || index} 225 > 226 <img 227 src={imageUrl} 228 alt={img.alt || ''} 229 style={Object.keys(imageStyles).length > 0 ? imageStyles : undefined} 230 /> 231 {showCaptions && img.caption && ( 232 <div className="my-gallery__slideshow-caption" dangerouslySetInnerHTML={{ __html: img.caption }} /> 233 )} 234 </div> 235 ); 236 })} 237 </div> 238 239 {/* Navigation Controls */} 240 {showNavigation && images.length > 1 && ( 241 <> 242 <button 243 className="my-gallery__slideshow-prev" 244 aria-label="Previous slide" 245 type="button" 246 > 247 <span>‹</span> 248 </button> 249 <button 250 className="my-gallery__slideshow-next" 251 aria-label="Next slide" 252 type="button" 253 > 254 <span>›</span> 255 </button> 256 </> 257 )} 258 259 {/* Slide Counter */} 260 <div className="my-gallery__slideshow-counter"> 261 <span className="current">1</span> / <span className="total">{images.length}</span> 262 </div> 263 264 {/* Play/Pause Control */} 265 {autoPlay && ( 266 <div className="my-gallery__slideshow-controls"> 267 <button 268 className="my-gallery__slideshow-play-pause" 269 aria-label={autoPlay ? 'Pause slideshow' : 'Play slideshow'} 270 type="button" 271 data-playing={autoPlay ? 'true' : 'false'} 272 > 273 <span className="play-icon">▶</span> 274 <span className="pause-icon">⏸</span> 275 </button> 276 </div> 277 )} 278 </div> 279 280 {/* Thumbnails */} 281 {showThumbnails && images.length > 1 && ( 282 <div className="my-gallery__slideshow-thumbnails" style={{ '--gap': `${gap}px` }}> 283 {images.map((img, index) => ( 284 <div 285 key={img.id || index} 286 className={`my-gallery__slideshow-thumb ${index === 0 ? 'active' : ''}`} 287 data-slide-index={index} 288 data-image-id={img.id || index} 289 > 290 <img 291 src={img.sizes?.thumbnail?.url || img.url} 292 alt={img.alt || ''} 293 /> 294 </div> 295 ))} 296 </div> 297 )} 298 </div> 299 </div> 300 ); 211 301 } else if (layoutType === 'imagebrowser') { 212 302 return ( … … 215 305 className="my-gallery__imagebrowser" 216 306 data-layout="imagebrowser" 217 data-bg-color={ImgbackgroundColor}218 data-caption-color={ImgCaptionColor}219 307 data-show-thumbnails={browserShowThumbnails ? 'true' : 'false'} 220 308 data-show-navigation={browserShowNavigation ? 'true' : 'false'} … … 264 352 /> 265 353 {showCaptions && img.caption && ( 266 <div className="my-gallery__imagebrowser-caption" 267 style={{ color: ImgCaptionColor, 268 backgroundColor: ImgbackgroundColor }} 269 270 dangerouslySetInnerHTML={{ __html: img.caption }} /> 354 <div className="my-gallery__imagebrowser-caption" dangerouslySetInnerHTML={{ __html: img.caption }} /> 271 355 )} 272 356 </div> … … 340 424 title="Fullscreen" 341 425 > 342 <span className="fullscreen-enter"><i className="fas fa-expand"></i></span>343 <span className="fullscreen-exit"><i className="fas fa-times"></i></span>426 <span className="fullscreen-enter"><i className="fas fa-expand"></i></span> 427 <span className="fullscreen-exit"><i className="fas fa-times"></i></span> 344 428 </button> 345 429 </div> … … 367 451 </div> 368 452 ); 369 370 453 } else if (layoutType === 'masonry') { 371 454 return ( -
photoblocks-gallery/trunk/src/photo-gallery/style.css
r3390095 r3411083 5 5 6 6 /* Grid Layout Styles */ 7 . wpc-gallery__grid {7 .my-gallery__grid { 8 8 display: grid !important; 9 9 grid-template-columns: repeat(3, 1fr) !important; … … 14 14 15 15 /* Force grid layout with data attributes */ 16 . wpc-gallery__grid[data-columns="1"] {16 .my-gallery__grid[data-columns="1"] { 17 17 grid-template-columns: 1fr !important; 18 18 } 19 19 20 . wpc-gallery__grid[data-columns="2"] {20 .my-gallery__grid[data-columns="2"] { 21 21 grid-template-columns: repeat(2, 1fr) !important; 22 22 } 23 23 24 . wpc-gallery__grid[data-columns="3"] {24 .my-gallery__grid[data-columns="3"] { 25 25 grid-template-columns: repeat(3, 1fr) !important; 26 26 } 27 27 28 . wpc-gallery__grid[data-columns="4"] {28 .my-gallery__grid[data-columns="4"] { 29 29 grid-template-columns: repeat(4, 1fr) !important; 30 30 } 31 31 32 . wpc-gallery__grid[data-columns="5"] {32 .my-gallery__grid[data-columns="5"] { 33 33 grid-template-columns: repeat(5, 1fr) !important; 34 34 } 35 35 36 . wpc-gallery__grid[data-columns="6"] {36 .my-gallery__grid[data-columns="6"] { 37 37 grid-template-columns: repeat(6, 1fr) !important; 38 38 } 39 39 40 . wpc-gallery__grid * {40 .my-gallery__grid * { 41 41 box-sizing: border-box; 42 42 } 43 43 44 . wpc-gallery__item {44 .my-gallery__item { 45 45 overflow: hidden; 46 46 position: relative; 47 47 } 48 48 49 . wpc-gallery__item img {49 .my-gallery__item img { 50 50 width: 100%; 51 51 height: auto; … … 56 56 } 57 57 58 . wpc-gallery__item:hover img {58 .my-gallery__item:hover img { 59 59 transform: scale(1.02); 60 60 } 61 61 62 . wpc-gallery__item figcaption {62 .my-gallery__item figcaption { 63 63 text-align: center; 64 64 font-size: 0.85em; … … 68 68 69 69 /* =========================================== 70 MASONRY LAYOUT STYLES - FRONTEND70 MASONRY LAYOUT STYLES - FRONTEND 71 71 =========================================== */ 72 72 .my-gallery__masonry *, 73 73 .my-gallery__masonry { 74 display: grid !important; 75 grid-template-columns: repeat(3, 1fr) !important; 76 gap: 16px !important; 77 width: 100%; 78 box-sizing: border-box; 74 border-style: none !important; 75 } 76 77 .my-gallery__masonry { 78 display: grid; 79 grid-template-columns: repeat(var(--columns, 3), 1fr); 80 gap: var(--gap, 16px); 79 81 align-items: start; 80 border: 0px !important;81 }82 83 /* Force masonry layout with data attributes */84 .my-gallery__masonry[data-columns="1"] {85 grid-template-columns: 1fr !important;86 }87 88 .my-gallery__masonry[data-columns="2"] {89 grid-template-columns: repeat(2, 1fr) !important;90 }91 92 .my-gallery__masonry[data-columns="3"] {93 grid-template-columns: repeat(3, 1fr) !important;94 }95 96 .my-gallery__masonry[data-columns="4"] {97 grid-template-columns: repeat(4, 1fr) !important;98 }99 100 .my-gallery__masonry[data-columns="5"] {101 grid-template-columns: repeat(5, 1fr) !important;102 }103 104 .my-gallery__masonry[data-columns="6"] {105 grid-template-columns: repeat(6, 1fr) !important;106 }107 108 .my-gallery__masonry * {109 box-sizing: border-box;110 82 } 111 83 … … 114 86 position: relative; 115 87 break-inside: avoid; 116 background: #ffffff; 117 border-radius: 8px; 118 box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); 88 background: #fff; 89 border-radius: var(--masonry-border-radius, 8px); 90 /* border: var(--masonry-border-width, 0px) var(--masonry-border-style, solid) var(--masonry-border-color, #e0e0e0); */ 91 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); 119 92 transition: all 0.3s ease; 120 margin-bottom: 0;121 page-break-inside: avoid;122 -webkit-transform: translateZ(0);123 transform: translateZ(0);124 }125 126 .my-gallery__masonry-item:hover {127 transform: translateY(-4px) translateZ(0);128 box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);129 93 } 130 94 … … 133 97 height: auto; 134 98 display: block; 135 border-radius: 8px; 136 border: 0px solid transparent; 99 border-radius: inherit; 137 100 object-fit: cover; 138 101 transition: all 0.3s ease; 139 vertical-align: top; 102 } 103 104 .my-gallery__masonry-item:hover { 105 transform: translateY(-2px); 106 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); 140 107 } 141 108 … … 145 112 146 113 .my-gallery__masonry-caption { 147 padding: 1 6px 20px 20px;114 padding: 12px 16px; 148 115 text-align: center; 149 font-size: 0.9em; 150 color: #555; 151 line-height: 1.5; 152 background: #ffffff; 153 border-radius: 0 0 8px 8px; 154 font-weight: 400; 155 } 156 157 .my-gallery__masonry-caption:empty { 158 display: none; 159 } 160 161 /* Dynamic styling for masonry items using JavaScript classes */ 162 .my-gallery__masonry-item.masonry-style-applied { 163 border-radius: var(--masonry-border-radius, 8px); 164 } 165 166 .my-gallery__masonry-item.masonry-style-applied img { 167 border-radius: var(--masonry-border-radius, 8px); 168 border: var(--masonry-border-width, 0px) var(--masonry-border-style, solid) var(--masonry-border-color, transparent); 169 } 170 171 .my-gallery__masonry-item.masonry-style-applied .my-gallery__masonry-caption { 116 font-size: 0.85em; 117 color: #666; 118 line-height: 1.4; 119 background: #fff; 172 120 border-radius: 0 0 var(--masonry-border-radius, 8px) var(--masonry-border-radius, 8px); 173 121 } 174 122 175 /* Masonry responsive breakpoints */ 176 @media (max-width: 1400px) { 177 .my-gallery__masonry[data-columns="6"] { 178 grid-template-columns: repeat(5, 1fr) !important; 179 } 180 } 181 123 /* Forced heights to simulate masonry (same as editor previews) */ 124 .my-gallery__masonry-item:nth-child(6n+1) img { height: 200px; } 125 .my-gallery__masonry-item:nth-child(6n+2) img { height: 280px; } 126 .my-gallery__masonry-item:nth-child(6n+3) img { height: 220px; } 127 .my-gallery__masonry-item:nth-child(6n+4) img { height: 260px; } 128 .my-gallery__masonry-item:nth-child(6n+5) img { height: 180px; } 129 .my-gallery__masonry-item:nth-child(6n+6) img { height: 240px; } 130 131 /* Responsive Masonry */ 182 132 @media (max-width: 1200px) { 183 .my-gallery__masonry[data-columns="6"], 184 .my-gallery__masonry[data-columns="5"] { 133 .my-gallery__masonry[style*="--columns: 6"] { 185 134 grid-template-columns: repeat(4, 1fr) !important; 186 135 } 187 136 } 188 189 137 @media (max-width: 900px) { 190 .my-gallery__masonry[data-columns="6"], 191 .my-gallery__masonry[data-columns="5"], 192 .my-gallery__masonry[data-columns="4"] { 138 .my-gallery__masonry[style*="--columns: 5"], 139 .my-gallery__masonry[style*="--columns: 4"] { 193 140 grid-template-columns: repeat(3, 1fr) !important; 194 141 } 195 142 } 196 197 143 @media (max-width: 768px) { 198 144 .my-gallery__masonry { 199 145 grid-template-columns: repeat(2, 1fr) !important; 200 146 } 201 202 .my-gallery__masonry-item { 203 margin-bottom: 0; 204 } 205 206 .my-gallery__masonry-caption { 207 padding: 12px 16px 16px; 208 font-size: 0.85em; 209 } 210 } 211 147 } 212 148 @media (max-width: 480px) { 213 149 .my-gallery__masonry { 214 150 grid-template-columns: 1fr !important; 215 151 } 216 217 .my-gallery__masonry-caption { 218 padding: 10px 14px 14px; 219 font-size: 0.8em; 220 } 221 } 222 223 /* Loading animation for masonry images */ 224 .my-gallery__masonry-item img { 225 opacity: 0; 226 transition: opacity 0.4s ease-in-out, transform 0.3s ease; 227 } 228 229 .my-gallery__masonry-item img.loaded { 230 opacity: 1; 231 } 232 233 /* Hidden items for pagination */ 234 .my-gallery__masonry-item.hidden { 235 display: none; 236 } 237 238 /* Enhanced focus states for accessibility */ 239 .my-gallery__masonry-item:focus-within { 240 outline: 2px solid #0073aa; 241 outline-offset: 2px; 242 } 243 244 /* Print styles for masonry */ 245 @media print { 246 .my-gallery__masonry { 247 display: block !important; 248 column-count: 2; 249 column-gap: 20px; 250 column-fill: balance; 251 } 252 253 .my-gallery__masonry-item { 254 break-inside: avoid; 255 page-break-inside: avoid; 256 margin-bottom: 20px; 257 box-shadow: none; 258 border: 1px solid #ddd; 259 } 260 } 261 262 /* Masonry enhanced hover effects */ 263 .my-gallery__masonry-item::after { 264 content: ''; 265 position: absolute; 266 top: 0; 267 left: 0; 268 right: 0; 269 bottom: 0; 270 background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%); 271 opacity: 0; 272 transition: opacity 0.3s ease; 273 pointer-events: none; 274 border-radius: 8px; 275 } 276 277 .my-gallery__masonry-item:hover::after { 278 opacity: 1; 279 } 152 } 153 154 155 /* =========================================== 156 LIGHTBOX LAYOUT STYLES 157 =========================================== */ 280 158 281 159 /* Lightbox Layout Styles */ … … 526 404 527 405 /* =========================================== 528 SLIDESHOW LAYOUT STYLES406 SLIDESHOW LAYOUT STYLES 529 407 =========================================== */ 408 409 .my-gallery__slideshow { 410 position: relative; 411 width: 100%; 412 max-width: 100%; 413 margin: 0 auto; 414 background: #ffffff; 415 border-radius: 16px; 416 overflow: hidden; 417 box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08); 418 border: 1px solid #e5e7eb; 419 } 420 421 .my-gallery__slideshow:focus { 422 outline: 2px solid #0073aa; 423 outline-offset: 2px; 424 } 425 426 /* Main Slideshow Container */ 427 .my-gallery__slideshow-main { 428 position: relative; 429 width: 100%; 430 background: #ffffff; 431 } 432 433 .my-gallery__slideshow-container { 434 position: relative; 435 width: 100%; 436 height: 500px; 437 overflow: hidden; 438 background: #f8fafc; 439 border-radius: 16px 16px 0 0; 440 } 530 441 531 442 /* Individual Slides */ … … 560 471 border-radius: 12px; 561 472 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); 473 } 474 475 /* Slide Transitions */ 476 .my-gallery__slideshow[data-transition-effect="fade"] .my-gallery__slide { 477 transition: opacity 0.8s ease-in-out; 478 } 479 480 .my-gallery__slideshow[data-transition-effect="slide"] .my-gallery__slide { 481 transform: translateX(100%); 482 transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out; 483 } 484 485 .my-gallery__slideshow[data-transition-effect="slide"] .my-gallery__slide.active { 486 transform: translateX(0); 487 } 488 489 .my-gallery__slideshow[data-transition-effect="slide"] .my-gallery__slide.prev { 490 transform: translateX(-100%); 491 } 492 493 .my-gallery__slideshow[data-transition-effect="zoom"] .my-gallery__slide { 494 transform: scale(0.8); 495 transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out; 496 } 497 498 .my-gallery__slideshow[data-transition-effect="zoom"] .my-gallery__slide.active { 499 transform: scale(1); 500 } 501 502 /* Slide Captions */ 503 .my-gallery__slideshow-caption { 504 position: absolute; 505 bottom: 20px; 506 left: 20px; 507 right: 20px; 508 background: rgba(0, 0, 0, 0.7); 509 color: white; 510 padding: 16px 20px; 511 border-radius: 10px; 512 text-align: center; 513 font-size: 14px; 514 font-weight: 400; 515 line-height: 1.5; 516 backdrop-filter: blur(8px); 517 } 518 519 /* Navigation Controls */ 520 .my-gallery__slideshow-prev, 521 .my-gallery__slideshow-next { 522 position: absolute; 523 top: 50%; 524 transform: translateY(-50%); 525 width: 48px; 526 height: 48px; 527 background: rgba(255, 255, 255, 0.95); 528 color: #374151; 529 border: 1px solid rgba(0, 0, 0, 0.1); 530 border-radius: 50%; 531 font-size: 20px; 532 font-weight: 600; 533 cursor: pointer; 534 display: flex; 535 align-items: center; 536 justify-content: center; 537 transition: all 0.3s ease; 538 z-index: 10; 539 backdrop-filter: blur(8px); 540 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); 541 font-size: 42px !important; 542 } 543 544 .my-gallery__slideshow-prev { 545 left: 20px; 546 } 547 548 .my-gallery__slideshow-next { 549 right: 20px; 550 } 551 552 .my-gallery__slideshow-prev:hover, 553 .my-gallery__slideshow-next:hover { 554 background: rgba(255, 255, 255, 1); 555 transform: translateY(-50%) scale(1.05); 556 box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15); 562 557 } 563 558 … … 839 834 840 835 /* Hidden items for pagination */ 841 . wpc-gallery__item.hidden,836 .my-gallery__item.hidden, 842 837 .my-gallery__lightbox-item.hidden, 843 838 .my-gallery__masonry-item.hidden { … … 870 865 } 871 866 867 /* Slideshow mobile adjustments */ 868 .my-gallery__slideshow-container { 869 height: 350px; 870 } 871 872 .my-gallery__slideshow-prev, 873 .my-gallery__slideshow-next { 874 width: 40px; 875 height: 40px; 876 font-size: 16px; 877 left: 15px; 878 } 879 880 .my-gallery__slideshow-next { 881 right: 15px; 882 } 883 884 .my-gallery__slideshow-play-pause { 885 width: 38px; 886 height: 38px; 887 font-size: 12px; 888 } 889 890 .my-gallery__slideshow-counter { 891 padding: 6px 12px; 892 font-size: 12px; 893 } 894 895 .my-gallery__slideshow-thumb { 896 width: 70px; 897 height: 50px; 898 } 899 900 .my-gallery__slideshow-caption { 901 padding: 12px 16px; 902 font-size: 13px; 903 bottom: 15px; 904 left: 15px; 905 right: 15px; 906 } 907 908 .my-gallery__slideshow-thumbnails { 909 padding: 15px; 910 gap: 10px; 911 } 912 872 913 /* Image Browser Mobile */ 873 914 .my-gallery__imagebrowser-viewer { … … 926 967 927 968 @media (max-width: 480px) { 928 . wpc-gallery__grid,969 .my-gallery__grid, 929 970 .my-gallery__lightbox-grid { 930 971 grid-template-columns: 1fr !important; … … 952 993 padding: 0.7em; 953 994 font-size: 0.8em; 995 } 996 997 /* Slideshow small mobile adjustments */ 998 .my-gallery__slideshow-container { 999 height: 280px; 1000 } 1001 1002 .my-gallery__slideshow-prev, 1003 .my-gallery__slideshow-next { 1004 width: 36px; 1005 height: 36px; 1006 font-size: 14px; 1007 left: 10px; 1008 } 1009 1010 .my-gallery__slideshow-next { 1011 right: 10px; 1012 } 1013 1014 .my-gallery__slideshow-play-pause { 1015 width: 34px; 1016 height: 34px; 1017 font-size: 11px; 1018 } 1019 1020 .my-gallery__slideshow-counter { 1021 padding: 4px 8px; 1022 font-size: 11px; 1023 top: 15px; 1024 right: 15px; 1025 } 1026 1027 .my-gallery__slideshow-controls { 1028 top: 15px; 1029 left: 15px; 1030 } 1031 1032 .my-gallery__slideshow-thumb { 1033 width: 60px; 1034 height: 40px; 1035 } 1036 1037 .my-gallery__slideshow-thumbnails { 1038 padding: 12px; 1039 gap: 8px; 1040 } 1041 1042 .my-gallery__slideshow-caption { 1043 padding: 10px 12px; 1044 font-size: 12px; 1045 bottom: 12px; 1046 left: 12px; 1047 right: 12px; 1048 } 1049 1050 .my-gallery__slideshow { 1051 border-radius: 12px; 1052 } 1053 1054 .my-gallery__slideshow-container { 1055 border-radius: 12px 12px 0 0; 954 1056 } 955 1057 … … 1026 1128 /* High resolution display optimization */ 1027 1129 @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { 1130 .my-gallery__slideshow-prev, 1131 .my-gallery__slideshow-next, 1132 .my-gallery__slideshow-play-pause, 1028 1133 .my-gallery__imagebrowser-prev, 1029 1134 .my-gallery__imagebrowser-next, … … 1035 1140 } 1036 1141 1037 /* .my-gallery__slideshow-counter, */1142 .my-gallery__slideshow-counter, 1038 1143 .my-gallery__imagebrowser-counter { 1039 1144 backdrop-filter: blur(12px); … … 1059 1164 1060 1165 /* Focus styles for accessibility */ 1061 /* .my-gallery__slideshow-thumb:focus, */ 1166 .my-gallery__slideshow-thumb:focus, 1062 1167 .my-gallery__imagebrowser-thumb:focus, 1063 1168 .my-gallery__masonry-item:focus { … … 1068 1173 1069 1174 /* Animation for thumbnail scrolling */ 1070 /* .my-gallery__slideshow-thumbnails, */ 1175 .my-gallery__slideshow-thumbnails, 1071 1176 .my-gallery__imagebrowser-thumbnails { 1072 1177 scroll-behavior: smooth; … … 1074 1179 1075 1180 /* Enhanced hover effects */ 1076 /* .my-gallery__slideshow-thumb, */ 1181 .my-gallery__slideshow-thumb, 1077 1182 .my-gallery__imagebrowser-thumb { 1078 1183 position: relative; … … 1080 1185 } 1081 1186 1082 /* .my-gallery__slideshow-thumb::after, */ 1187 .my-gallery__slideshow-thumb::after, 1083 1188 .my-gallery__imagebrowser-thumb::after { 1084 1189 content: ''; … … 1094 1199 } 1095 1200 1096 /* .my-gallery__slideshow-thumb:hover::after, */ 1201 .my-gallery__slideshow-thumb:hover::after, 1097 1202 .my-gallery__imagebrowser-thumb:hover::after { 1098 1203 opacity: 1; … … 1138 1243 1139 1244 1245 .my-gallery__slideshow-prev:focus, 1246 .my-gallery__slideshow-next:focus { 1247 outline: 2px solid #0073aa; 1248 outline-offset: 2px; 1249 } 1250 1251 /* Slide Counter */ 1252 .my-gallery__slideshow-counter { 1253 position: absolute; 1254 top: 20px; 1255 right: 20px; 1256 background: rgba(255, 255, 255, 0.95); 1257 color: #374151; 1258 padding: 8px 16px; 1259 border-radius: 20px; 1260 font-size: 14px; 1261 font-weight: 500; 1262 backdrop-filter: blur(8px); 1263 z-index: 10; 1264 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); 1265 border: 1px solid rgba(0, 0, 0, 0.1); 1266 } 1267 1268 /* Play/Pause Controls */ 1269 .my-gallery__slideshow-controls { 1270 position: absolute; 1271 top: 20px; 1272 left: 20px; 1273 z-index: 10; 1274 } 1275 1276 .my-gallery__slideshow-play-pause { 1277 width: 44px; 1278 height: 44px; 1279 background: rgba(255, 255, 255, 0.95); 1280 color: #374151; 1281 border: 1px solid rgba(0, 0, 0, 0.1); 1282 border-radius: 50%; 1283 font-size: 14px; 1284 cursor: pointer; 1285 display: flex; 1286 align-items: center; 1287 justify-content: center; 1288 transition: all 0.3s ease; 1289 backdrop-filter: blur(8px); 1290 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); 1291 } 1292 1293 .my-gallery__slideshow-play-pause:hover { 1294 background: rgba(255, 255, 255, 1); 1295 transform: scale(1.05); 1296 box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15); 1297 } 1298 1299 .my-gallery__slideshow-play-pause:focus { 1300 outline: 2px solid #0073aa; 1301 outline-offset: 2px; 1302 } 1303 1304 /* Show/hide play/pause icons based on state */ 1305 .my-gallery__slideshow-play-pause[data-playing="true"] .play-icon { 1306 display: none; 1307 } 1308 1309 .my-gallery__slideshow-play-pause[data-playing="false"] .pause-icon { 1310 display: none; 1311 } 1312 1313 /* Thumbnails - Matching the reference design */ 1314 .my-gallery__slideshow-thumbnails { 1315 display: flex; 1316 gap: 12px; 1317 padding: 20px; 1318 background: #ffffff; 1319 overflow-x: auto; 1320 scrollbar-width: thin; 1321 scrollbar-color: #d1d5db #f9fafb; 1322 border-top: 1px solid #e5e7eb; 1323 } 1324 1325 .my-gallery__slideshow-thumbnails::-webkit-scrollbar { 1326 height: 6px; 1327 } 1328 1329 .my-gallery__slideshow-thumbnails::-webkit-scrollbar-track { 1330 background: #f9fafb; 1331 border-radius: 3px; 1332 } 1333 1334 .my-gallery__slideshow-thumbnails::-webkit-scrollbar-thumb { 1335 background: #d1d5db; 1336 border-radius: 3px; 1337 } 1338 1339 .my-gallery__slideshow-thumbnails::-webkit-scrollbar-thumb:hover { 1340 background: #9ca3af; 1341 } 1342 1343 .my-gallery__slideshow-thumb { 1344 flex-shrink: 0; 1345 width: 90px; 1346 height: 60px; 1347 border-radius: 10px; 1348 overflow: hidden; 1349 cursor: pointer; 1350 border: 2px solid transparent; 1351 transition: all 0.3s ease; 1352 background: #f3f4f6; 1353 position: relative; 1354 } 1355 1356 .my-gallery__slideshow-thumb:hover { 1357 transform: translateY(-2px); 1358 border-color: #9ca3af; 1359 box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 1360 } 1361 1362 .my-gallery__slideshow-thumb.active { 1363 border-color: #0073aa; 1364 box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2); 1365 transform: translateY(-2px); 1366 } 1367 1368 .my-gallery__slideshow-thumb.active::before { 1369 content: ''; 1370 position: absolute; 1371 top: 0; 1372 left: 0; 1373 right: 0; 1374 bottom: 0; 1375 background: rgba(0, 115, 170, 0.1); 1376 pointer-events: none; 1377 } 1378 1379 .my-gallery__slideshow-thumb img { 1380 width: 100%; 1381 height: 100%; 1382 object-fit: cover; 1383 display: block; 1384 transition: opacity 0.3s ease; 1385 } 1386 1387 .my-gallery__slideshow-thumb:hover img { 1388 opacity: 0.9; 1389 } 1390 1140 1391 /* =========================================== 1141 IMAGE BROWSER LAYOUT STYLES - FRONTEND1392 IMAGE BROWSER LAYOUT STYLES - FRONTEND 1142 1393 =========================================== */ 1143 1394 … … 1232 1483 .my-gallery__imagebrowser-caption { 1233 1484 position: absolute; 1234 bottom: -1px; 1235 /* background: rgba(0, 0, 0, 0.8); */ 1485 bottom: 20px; 1486 left: 20px; 1487 right: 20px; 1488 background: rgba(0, 0, 0, 0.8); 1236 1489 color: white; 1237 padding: 1 8px 20px;1490 padding: 12px 20px; 1238 1491 border-radius: 10px; 1239 1492 text-align: center; … … 1243 1496 max-width: calc(100% - 40px); 1244 1497 word-wrap: break-word; 1245 width: 100%;1246 1498 } 1247 1499 … … 1268 1520 backdrop-filter: blur(8px); 1269 1521 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); 1270 font-size: 30px !important;1271 1522 } 1272 1523 … … 1563 1814 1564 1815 /* Hidden items for pagination */ 1565 . wpc-gallery__item.hidden,1816 .my-gallery__item.hidden, 1566 1817 .my-gallery__lightbox-item.hidden, 1567 1818 .my-gallery__masonry-item.hidden { … … 1571 1822 /* Responsive Design */ 1572 1823 @media (max-width: 768px) { 1573 . wpc-gallery__grid,1824 .my-gallery__grid, 1574 1825 .my-gallery__lightbox-grid { 1575 1826 grid-template-columns: repeat(2, 1fr) !important; … … 1592 1843 max-width: 95%; 1593 1844 max-height: 95%; 1845 } 1846 1847 /* Slideshow mobile adjustments */ 1848 .my-gallery__slideshow-container { 1849 height: 350px; 1850 } 1851 1852 .my-gallery__slideshow-prev, 1853 .my-gallery__slideshow-next { 1854 width: 40px; 1855 height: 40px; 1856 font-size: 16px; 1857 left: 15px; 1858 } 1859 1860 .my-gallery__slideshow-next { 1861 right: 15px; 1862 } 1863 1864 .my-gallery__slideshow-play-pause { 1865 width: 38px; 1866 height: 38px; 1867 font-size: 12px; 1868 } 1869 1870 .my-gallery__slideshow-counter { 1871 padding: 6px 12px; 1872 font-size: 12px; 1873 } 1874 1875 .my-gallery__slideshow-thumb { 1876 width: 70px; 1877 height: 50px; 1878 } 1879 1880 .my-gallery__slideshow-caption { 1881 padding: 12px 16px; 1882 font-size: 13px; 1883 bottom: 15px; 1884 left: 15px; 1885 right: 15px; 1886 } 1887 1888 .my-gallery__slideshow-thumbnails { 1889 padding: 15px; 1890 gap: 10px; 1594 1891 } 1595 1892 … … 1650 1947 1651 1948 @media (max-width: 480px) { 1652 . wpc-gallery__grid,1949 .my-gallery__grid, 1653 1950 .my-gallery__lightbox-grid { 1654 1951 grid-template-columns: 1fr !important; … … 1676 1973 padding: 0.7em; 1677 1974 font-size: 0.8em; 1975 } 1976 1977 /* Slideshow small mobile adjustments */ 1978 .my-gallery__slideshow-container { 1979 height: 280px; 1980 } 1981 1982 .my-gallery__slideshow-prev, 1983 .my-gallery__slideshow-next { 1984 width: 36px; 1985 height: 36px; 1986 font-size: 14px; 1987 left: 10px; 1988 } 1989 1990 .my-gallery__slideshow-next { 1991 right: 10px; 1992 } 1993 1994 .my-gallery__slideshow-play-pause { 1995 width: 34px; 1996 height: 34px; 1997 font-size: 11px; 1998 } 1999 2000 .my-gallery__slideshow-counter { 2001 padding: 4px 8px; 2002 font-size: 11px; 2003 top: 15px; 2004 right: 15px; 2005 } 2006 2007 .my-gallery__slideshow-controls { 2008 top: 15px; 2009 left: 15px; 2010 } 2011 2012 .my-gallery__slideshow-thumb { 2013 width: 60px; 2014 height: 40px; 2015 } 2016 2017 .my-gallery__slideshow-thumbnails { 2018 padding: 12px; 2019 gap: 8px; 2020 } 2021 2022 .my-gallery__slideshow-caption { 2023 padding: 10px 12px; 2024 font-size: 12px; 2025 bottom: 12px; 2026 left: 12px; 2027 right: 12px; 2028 } 2029 2030 .my-gallery__slideshow { 2031 border-radius: 12px; 2032 } 2033 2034 .my-gallery__slideshow-container { 2035 border-radius: 12px 12px 0 0; 1678 2036 } 1679 2037 … … 1750 2108 /* High resolution display optimization */ 1751 2109 @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { 1752 /*.my-gallery__slideshow-prev,2110 .my-gallery__slideshow-prev, 1753 2111 .my-gallery__slideshow-next, 1754 .my-gallery__slideshow-play-pause, */2112 .my-gallery__slideshow-play-pause, 1755 2113 .my-gallery__imagebrowser-prev, 1756 2114 .my-gallery__imagebrowser-next, … … 1762 2120 } 1763 2121 1764 /* .my-gallery__slideshow-counter, */2122 .my-gallery__slideshow-counter, 1765 2123 .my-gallery__imagebrowser-counter { 1766 2124 backdrop-filter: blur(12px); … … 1786 2144 1787 2145 /* Focus styles for accessibility */ 2146 .my-gallery__slideshow-thumb:focus, 1788 2147 .my-gallery__imagebrowser-thumb:focus, 1789 2148 .my-gallery__masonry-item:focus { … … 1794 2153 1795 2154 /* Animation for thumbnail scrolling */ 2155 .my-gallery__slideshow-thumbnails, 1796 2156 .my-gallery__imagebrowser-thumbnails { 1797 2157 scroll-behavior: smooth; … … 1799 2159 1800 2160 /* Enhanced hover effects */ 2161 .my-gallery__slideshow-thumb, 1801 2162 .my-gallery__imagebrowser-thumb { 1802 2163 position: relative; … … 1804 2165 } 1805 2166 1806 /* .my-gallery__slideshow-thumb::after, */ 2167 .my-gallery__slideshow-thumb::after, 1807 2168 .my-gallery__imagebrowser-thumb::after { 1808 2169 content: ''; … … 1818 2179 } 1819 2180 1820 /* .my-gallery__slideshow-thumb:hover::after, */ 2181 .my-gallery__slideshow-thumb:hover::after, 1821 2182 .my-gallery__imagebrowser-thumb:hover::after { 1822 2183 opacity: 1; … … 1949 2310 } 1950 2311 1951 .my-gallery__masonry-item.masonry-style-applied img {2312 /* .my-gallery__masonry-item.masonry-style-applied img { 1952 2313 border-radius: var(--masonry-border-radius, 8px); 1953 2314 border: var(--masonry-border-width, 0px) var(--masonry-border-style, solid) var(--masonry-border-color, transparent); 1954 2315 transition: all 0.3s ease; 1955 2316 width: 100%; 1956 height: auto;1957 2317 display: block; 1958 2318 object-fit: cover; 1959 } 2319 } */ 1960 2320 1961 2321 .my-gallery__masonry-item.masonry-style-applied:hover img { … … 1983 2343 text-align: center; 1984 2344 padding: 1rem 0; 1985 /* display: block !important; */2345 display: block !important; 1986 2346 } 1987 2347
Note: See TracChangeset
for help on using the changeset viewer.