Making WordPress.org


Ignore:
Timestamp:
08/31/2016 03:49:39 AM (10 years ago)
Author:
obenland
Message:

Plugin Directory: First pass at a screenshot slider.

Testable at: https://wordpress.org/plugins-wp/shortcode-ui/?react

See #1828.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/client/components/plugin/sections/screenshots/index.jsx

    r3862 r3889  
    11import React from 'react';
     2import values from 'lodash/values';
     3
     4import ImageGallery from './image-gallery';
    25
    36export default React.createClass( {
     
    58
    69    render() {
     10        let items = values( this.props.screenshots ).map( screenshot => {
     11            return {
     12                original: screenshot.src,
     13                thumbnail: screenshot.src + '&width=100',
     14                description: screenshot.caption || false
     15            }
     16        } );
     17
     18        if ( ! items ) {
     19            return <div />;
     20        }
     21
    722        return (
    8             <div id="screenshots" className="read-more" aria-expanded="false">
     23            <div id="screenshots" className="plugin-screenshots">
    924                <h2>Screenshots</h2>
    10                 <ul className="plugin-screenshots">
    11                     <li>
    12                         <figure>
    13                             <a href="https://i0.wp.com/plugins.svn.wordpress.org/!svn/bc/1477794/google-analyticator/trunk/screenshot-5.png?strip=all" rel="nofollow">
    14                                 <img className="screenshot" src="https://i0.wp.com/plugins.svn.wordpress.org/!svn/bc/1477794/google-analyticator/trunk/screenshot-5.png?strip=all" />
    15                             </a>
    16                             <figcaption>An example of a front-end widget configuration.</figcaption>
    17                         </figure>
    18                     </li>
    19                     <li>
    20                         <figure>
    21                             <a href="https://i0.wp.com/plugins.svn.wordpress.org/!svn/bc/1477794/google-analyticator/trunk/screenshot-6.png?strip=all" rel="nofollow"><img className="screenshot" src="https://i0.wp.com/plugins.svn.wordpress.org/!svn/bc/1477794/google-analyticator/trunk/screenshot-6.png?strip=all" /></a>
    22                             <figcaption>An example of a front-end widget configuration.</figcaption>
    23                         </figure>
    24                     </li>
    25                     <li>
    26                         <figure>
    27                             <a href="https://i0.wp.com/plugins.svn.wordpress.org/!svn/bc/1477794/google-analyticator/trunk/screenshot-4.png?strip=all" rel="nofollow"><img className="screenshot" src="https://i0.wp.com/plugins.svn.wordpress.org/!svn/bc/1477794/google-analyticator/trunk/screenshot-4.png?strip=all" /></a>
    28                             <figcaption>An example of a front-end widget configuration.</figcaption>
    29                         </figure>
    30                     </li>
    31                     <li>
    32                         <figure>
    33                             <a href="https://i0.wp.com/plugins.svn.wordpress.org/!svn/bc/1477794/google-analyticator/trunk/screenshot-2.png?strip=all" rel="nofollow"><img className="screenshot" src="https://i0.wp.com/plugins.svn.wordpress.org/!svn/bc/1477794/google-analyticator/trunk/screenshot-2.png?strip=all" /></a>
    34                             <figcaption>The top half of the settings page.</figcaption>
    35                         </figure>
    36                     </li>
    37                     <li>
    38                         <figure>
    39                             <a href="https://i0.wp.com/plugins.svn.wordpress.org/!svn/bc/1477794/google-analyticator/trunk/screenshot-3.png?strip=all" rel="nofollow"><img className="screenshot" src="https://i0.wp.com/plugins.svn.wordpress.org/!svn/bc/1477794/google-analyticator/trunk/screenshot-3.png?strip=all" /></a>
    40                             <figcaption>The configuration options for the front-end widget.</figcaption>
    41                         </figure>
    42                     </li>
    43                     <li>
    44                         <figure>
    45                             <a href="https://i0.wp.com/plugins.svn.wordpress.org/!svn/bc/1477794/google-analyticator/trunk/screenshot-1.png?strip=all" rel="nofollow"><img className="screenshot" src="https://i0.wp.com/plugins.svn.wordpress.org/!svn/bc/1477794/google-analyticator/trunk/screenshot-1.png?strip=all" /></a>
    46                             <figcaption>An example of the admin dashboard widget displaying stats pulled from Google
    47                                 Analytics.
    48                             </figcaption>
    49                         </figure>
    50                     </li>
    51                 </ul>
     25                <ImageGallery items={ items } />
    5226            </div>
    5327        )
Note: See TracChangeset for help on using the changeset viewer.