Changeset 2180409
- Timestamp:
- 10/25/2019 10:43:02 PM (6 years ago)
- Location:
- slide/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
slide/trunk/common.css
r2178439 r2180409 160 160 font-size: 2em !important; 161 161 } 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 46 46 .wp-block[data-align=wide] { 47 47 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; 48 54 } 49 55 … … 105 111 left: 0; 106 112 right: 0; 113 background-repeat: no-repeat; 107 114 } 108 115 -
slide/trunk/index.js
r2180213 r2180409 19 19 const { PluginDocumentSettingPanel } = editPost; 20 20 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; 22 22 const { MediaUpload, __experimentalGradientPickerControl, InnerBlocks, InspectorControls, RichTextToolbarButton, ColorPalette } = blockEditor; 23 23 const { addQueryArgs } = url; … … 554 554 }, 555 555 backgroundOpacity: { 556 type: 'string' 557 }, 558 backgroundSize: { 556 559 type: 'string' 557 560 }, … … 664 667 backgroundUrl: undefined, 665 668 backgroundId: undefined, 669 backgroundSize: undefined, 666 670 focalPoint: undefined 667 671 }); … … 688 692 backgroundUrl: undefined, 689 693 backgroundId: undefined, 694 backgroundSize: undefined, 690 695 focalPoint: undefined 691 696 }); … … 707 712 onChange: (value) => setAttributes({ 708 713 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 709 725 }) 710 726 }) … … 771 787 backgroundImage: attributes.backgroundUrl ? `url("${attributes.backgroundUrl}")` : undefined, 772 788 backgroundPosition: attributes.focalPoint ? `${attributes.focalPoint.x * 100}% ${attributes.focalPoint.y * 100}%` : undefined, 789 backgroundSize: attributes.backgroundSize ? attributes.backgroundSize : undefined, 773 790 opacity: attributes.backgroundOpacity ? attributes.backgroundOpacity / 100 : undefined 774 791 } … … 797 814 'data-background-position': attributes.focalPoint ? `${attributes.focalPoint.x * 100}% ${attributes.focalPoint.y * 100}%` : undefined, 798 815 '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 800 818 }, 801 819 e(InnerBlocks.Content) -
slide/trunk/index.php
r2180234 r2180409 5 5 * Plugin URI: https://wordpress.org/plugins/slide/ 6 6 * Description: Allows you to create presentations with the block editor. 7 * Version: 0.0.2 07 * Version: 0.0.21 8 8 * Author: Ella van Durpe 9 9 * Author URI: https://ellavandurpe.com -
slide/trunk/readme.md
r2180234 r2180409 6 6 Requires PHP: 5.6 7 7 Tested up to: 5.3 8 Stable tag: 0.0.2 08 Stable tag: 0.0.21 9 9 License: GPL-2.0-or-later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
slide/trunk/template.php
r2179945 r2180409 184 184 document.querySelectorAll( '.alignfull' ).forEach( ( element ) => { 185 185 element.style.width = 100 / event.scale + 'vw'; 186 element.style.maxHeight = 84/ event.scale + 'vh';186 element.style.maxHeight = 100 / event.scale + 'vh'; 187 187 } ); 188 188 } );
Note: See TracChangeset
for help on using the changeset viewer.