Plugin Directory

Changeset 2180409


Ignore:
Timestamp:
10/25/2019 10:43:02 PM (6 years ago)
Author:
iseulde
Message:

v0.0.21

Location:
slide/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • slide/trunk/common.css

    r2178439 r2180409  
    160160    font-size: 2em !important;
    161161}
     162
     163.alignfull img,
     164.alignfull video,
     165.alignwide img,
     166.alignwide video {
     167    width: 100%;
     168    display: block;
     169}
     170
     171.wp-block-slide-slide *:last-child {
     172    margin-bottom: 0 !important;
     173}
  • slide/trunk/index.css

    r2177066 r2180409  
    4646.wp-block[data-align=wide] {
    4747    max-width: none;
     48}
     49
     50.wp-block[data-align="wide"] video,
     51.wp-block[data-align="full"] video {
     52    width: 100%;
     53    display: block;
    4854}
    4955
     
    105111    left: 0;
    106112    right: 0;
     113    background-repeat: no-repeat;
    107114}
    108115
  • slide/trunk/index.js

    r2180213 r2180409  
    1919  const { PluginDocumentSettingPanel } = editPost;
    2020  const { useSelect, useDispatch, subscribe, select, dispatch } = data;
    21   const { TextareaControl, ColorPicker, PanelBody, RangeControl, SelectControl, ToggleControl, Button, FocalPointPicker, ExternalLink, Notice, TextControl, RadioControl } = components;
     21  const { TextareaControl, PanelBody, RangeControl, SelectControl, ToggleControl, Button, FocalPointPicker, ExternalLink, Notice, TextControl, RadioControl } = components;
    2222  const { MediaUpload, __experimentalGradientPickerControl, InnerBlocks, InspectorControls, RichTextToolbarButton, ColorPalette } = blockEditor;
    2323  const { addQueryArgs } = url;
     
    554554      },
    555555      backgroundOpacity: {
     556        type: 'string'
     557      },
     558      backgroundSize: {
    556559        type: 'string'
    557560      },
     
    664667                    backgroundUrl: undefined,
    665668                    backgroundId: undefined,
     669                    backgroundSize: undefined,
    666670                    focalPoint: undefined
    667671                  });
     
    688692                  backgroundUrl: undefined,
    689693                  backgroundId: undefined,
     694                  backgroundSize: undefined,
    690695                  focalPoint: undefined
    691696                });
     
    707712              onChange: (value) => setAttributes({
    708713                backgroundOpacity: value + ''
     714              })
     715            }),
     716            !!attributes.backgroundUrl && e(RadioControl, {
     717              label: __('Size', 'slide'),
     718              selected: attributes.backgroundSize,
     719              options: [
     720                { label: __('Cover'), value: 'cover' },
     721                { label: __('Contain'), value: 'contain' }
     722              ],
     723              onChange: (backgroundSize) => setAttributes({
     724                backgroundSize
    709725              })
    710726            })
     
    771787                backgroundImage: attributes.backgroundUrl ? `url("${attributes.backgroundUrl}")` : undefined,
    772788                backgroundPosition: attributes.focalPoint ? `${attributes.focalPoint.x * 100}% ${attributes.focalPoint.y * 100}%` : undefined,
     789                backgroundSize: attributes.backgroundSize ? attributes.backgroundSize : undefined,
    773790                opacity: attributes.backgroundOpacity ? attributes.backgroundOpacity / 100 : undefined
    774791              }
     
    797814        'data-background-position': attributes.focalPoint ? `${attributes.focalPoint.x * 100}% ${attributes.focalPoint.y * 100}%` : undefined,
    798815        'data-background-opacity': attributes.backgroundOpacity ? attributes.backgroundOpacity / 100 : undefined,
    799         'data-background-iframe': attributes.backgroundIframeUrl ? attributes.backgroundIframeUrl : undefined
     816        'data-background-iframe': attributes.backgroundIframeUrl ? attributes.backgroundIframeUrl : undefined,
     817        'data-background-size': attributes.backgroundSize ? attributes.backgroundSize : undefined
    800818      },
    801819      e(InnerBlocks.Content)
  • slide/trunk/index.php

    r2180234 r2180409  
    55 * Plugin URI:  https://wordpress.org/plugins/slide/
    66 * Description: Allows you to create presentations with the block editor.
    7  * Version:     0.0.20
     7 * Version:     0.0.21
    88 * Author:      Ella van Durpe
    99 * Author URI:  https://ellavandurpe.com
  • slide/trunk/readme.md

    r2180234 r2180409  
    66    Requires PHP:      5.6
    77    Tested up to:      5.3
    8     Stable tag:        0.0.20
     8    Stable tag:        0.0.21
    99    License:           GPL-2.0-or-later
    1010    License URI:       http://www.gnu.org/licenses/gpl-2.0.html
  • slide/trunk/template.php

    r2179945 r2180409  
    184184            document.querySelectorAll( '.alignfull' ).forEach( ( element ) => {
    185185                element.style.width = 100 / event.scale + 'vw';
    186                 element.style.maxHeight = 84 / event.scale + 'vh';
     186                element.style.maxHeight = 100 / event.scale + 'vh';
    187187            } );
    188188        } );
Note: See TracChangeset for help on using the changeset viewer.