diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/components/plugin/sections/screenshots/image-gallery-lightbox/index.jsx b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/components/plugin/sections/screenshots/image-gallery-lightbox/index.jsx
index e69de29bb..4cf92fd0b 100644
a
|
b
|
|
| 1 | import React from 'react'; |
| 2 | import ImageGallery from 'react-image-gallery'; |
| 3 | |
| 4 | export default class ImageGalleryLightbox extends React.Component { |
| 5 | |
| 6 | constructor( props ) { |
| 7 | super( props ); |
| 8 | } |
| 9 | |
| 10 | _renderThumbInner = ( item ) => { |
| 11 | const onThumbnailError = this.props.onThumbnailError || this._handleImageError; |
| 12 | |
| 13 | return ( |
| 14 | <button className = "image-gallery-thumbnail-inner"> |
| 15 | <img |
| 16 | src={ item.thumbnail } |
| 17 | alt={ item.thumbnailAlt } |
| 18 | title={ item.thumbnailTitle } |
| 19 | onError={ onThumbnailError } |
| 20 | /> |
| 21 | {item.thumbnailLabel && |
| 22 | <div className="image-gallery-thumbnail-label"> |
| 23 | {item.thumbnailLabel} |
| 24 | </div> |
| 25 | } |
| 26 | </button> |
| 27 | ); |
| 28 | }; |
| 29 | |
| 30 | render() { |
| 31 | return ( |
| 32 | <ImageGallery |
| 33 | items={ this.props.items } |
| 34 | useBrowserFullscreen={ false } |
| 35 | showPlayButton={ false } |
| 36 | renderThumbInner={ this._renderThumbInner } |
| 37 | showFullscreenButton={ true } |
| 38 | /> |
| 39 | ); |
| 40 | } |
| 41 | } |
| 42 | No newline at end of file |
diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/components/plugin/sections/screenshots/image-gallery-lightbox/style.scss b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/components/plugin/sections/screenshots/image-gallery-lightbox/style.scss
index e69de29bb..8c9cca204 100644
a
|
b
|
|
| 1 | @import "node_modules/react-image-gallery/styles/scss/image-gallery.scss"; |
| 2 | |
| 3 | #screenshots .image-gallery{ |
| 4 | |
| 5 | width: 100%; |
| 6 | height: auto; |
| 7 | |
| 8 | .image-gallery-fullscreen-button{ |
| 9 | height: 100%; |
| 10 | width: 100%; |
| 11 | &:before{ |
| 12 | content: none; |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | .image-gallery-swipe{ |
| 17 | display: flex; |
| 18 | align-items: center; |
| 19 | flex-direction: column; |
| 20 | } |
| 21 | |
| 22 | .image-gallery-slides{ |
| 23 | width: calc(100% - 50px); |
| 24 | } |
| 25 | |
| 26 | .image-gallery-left-nav{ |
| 27 | padding: 50px 10px 50px 5px; |
| 28 | } |
| 29 | |
| 30 | .image-gallery-right-nav{ |
| 31 | padding: 50px 5px 50px 10px; |
| 32 | } |
| 33 | |
| 34 | .image-gallery-left-nav, .image-gallery-right-nav{ |
| 35 | font-size: 2em; |
| 36 | &:before{ |
| 37 | color: #aaa; |
| 38 | text-shadow: none; |
| 39 | font-weight: bold; |
| 40 | } |
| 41 | &:hover, &:focus{ |
| 42 | &:before{ |
| 43 | color: #0073aa; |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | .image-gallery-image{ |
| 49 | display: flex; |
| 50 | flex-direction: column; |
| 51 | } |
| 52 | |
| 53 | .image-gallery-slide img { |
| 54 | width: auto; |
| 55 | height: 480px; |
| 56 | max-height: 80vh; |
| 57 | object-fit: scale-down; |
| 58 | overflow: hidden; |
| 59 | object-position: center center; |
| 60 | } |
| 61 | |
| 62 | .image-gallery-slide .image-gallery-description{ |
| 63 | background: #f5f5f5; |
| 64 | color: #32373c; |
| 65 | line-height: 1.5; |
| 66 | padding: 10px 20px; |
| 67 | white-space: normal; |
| 68 | font-size: 12.8px; |
| 69 | font-size: .8rem; |
| 70 | position: relative; |
| 71 | bottom: 0; |
| 72 | margin-bottom: 12px; |
| 73 | } |
| 74 | |
| 75 | .fullscreen{ |
| 76 | |
| 77 | .image-gallery-slides{ |
| 78 | width: 100%; |
| 79 | } |
| 80 | |
| 81 | .image-gallery-slide { |
| 82 | .image-gallery-description{ |
| 83 | display: none; |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | .image-gallery-thumbnails-wrapper{ |
| 88 | display: none; |
| 89 | } |
| 90 | } |
| 91 | } |
diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/components/plugin/sections/screenshots/image-gallery/style.scss b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/components/plugin/sections/screenshots/image-gallery/style.scss
index cd98aa9b5..47e93ec64 100644
a
|
b
|
|
| 1 | /* |
1 | 2 | $ig-screen-sm-min: 768px !default; |
2 | 3 | $ig-black: #222 !default; |
3 | 4 | $ig-blue: #337ab7 !default; |
… |
… |
$ig-background-black: rgba(0, 0, 0, .4) !default; |
176 | 177 | right: 0; |
177 | 178 | z-index: 4; |
178 | 179 | } |
| 180 | */ |
| 181 | No newline at end of file |
diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/components/plugin/sections/screenshots/index.jsx b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/components/plugin/sections/screenshots/index.jsx
index 3d1cda1cc..9aeaf0da3 100644
a
|
b
|
import { identity, map } from 'lodash'; |
8 | 8 | /** |
9 | 9 | * Internal dependencies. |
10 | 10 | */ |
11 | | import ImageGallery from './image-gallery'; |
| 11 | // import ImageGallery from './image-gallery'; |
| 12 | import ImageGalleryLightbox from './image-gallery-lightbox'; |
12 | 13 | |
13 | 14 | export const Screenshots = ( { screenshots } ) => { |
14 | 15 | const items = map( screenshots, ( { caption, src } ) => ( { |
… |
… |
export const Screenshots = ( { screenshots } ) => { |
23 | 24 | return ( |
24 | 25 | <div id="screenshots" className="plugin-screenshots"> |
25 | 26 | <h2>{ localeData.screenshots }</h2> |
26 | | <ImageGallery items={ items } /> |
| 27 | {/* <ImageGallery items={ items } /> */} |
| 28 | <ImageGalleryLightbox items={ items } /> |
27 | 29 | </div> |
28 | 30 | ); |
29 | 31 | } |
diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/package.json b/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/package.json
index 6447955ae..24f0496b6 100644
a
|
b
|
|
58 | 58 | "dependencies": { |
59 | 59 | "i18n-calypso": "^1.7.0", |
60 | 60 | "json-loader": "^0.5.4", |
61 | | "wpapi": "^1.2.1" |
| 61 | "wpapi": "^1.2.1", |
| 62 | "react-image-gallery": "^1.0.7" |
62 | 63 | } |
63 | 64 | } |