Changeset 3190820
- Timestamp:
- 11/18/2024 12:32:49 AM (4 months ago)
- Location:
- simple-block-gallery/trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
simple-block-gallery/trunk/block/build/masonry-block/block.json
r3184685 r3190820 9 9 "icon": "tagcloud", 10 10 "description": "Generate the masonry gallery.", 11 "version": "1.0. 7",11 "version": "1.0.8", 12 12 "textdomain": "simple-block-gallery", 13 13 "attributes": { -
simple-block-gallery/trunk/block/build/masonry-block/index.asset.php
r3184685 r3190820 1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => ' 7d0367d1083a2de70b16');1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '25446cfaf2131f4fbf44'); -
simple-block-gallery/trunk/block/build/masonry-block/index.js
r3184685 r3190820 1 (()=>{"use strict";var e,l=[,()=>{const e=window.wp.blocks,l=window.wp.i18n,i=window.wp.components,a=window.wp.blockEditor,r=window.wp.element,n=window.ReactJSXRuntime,s=JSON.parse('{"UU":"simple-block-gallery/masonry-block"}');(0,e.registerBlockType)(s.UU,{edit:function({attributes:e,setAttributes:s}){const o=(0,a.useBlockProps)();function t(e){let l=[];for(let i in e)l.push(e[i].id);return l}function p(l){let i='\x3c!-- wp:paragraph --\x3e<div style="columns: auto '+e.width+'px; column-gap: 0; margin: 0 auto; padding: 0;">';for(let a in l)i+='\x3c!-- wp:image {"lightbox":{"enabled":'+e.link+'},"id":'+l[a].id+',"sizeSlug":"large","linkDestination":"none"} --\x3e<figure style="display: block; padding-right: '+e.padding+"px; padding-bottom: "+e.padding+'px; margin: 0; line-height: 0;">',i+='<span style="width: '+e.width+'px;"><img src="'+l[a].url+'" style="max-width: 100%; height: auto; display: block; border-radius: '+e.r_images+'px;"></span>',i+="</figure>\x3c!-- /wp:image --\x3e";return i+="</div>\x3c!-- /wp:paragraph --\x3e",i}e.list_images=p(e.image);const{preview:c}=e;return c?(0,n.jsx)("div",{className:"simple-block-gallery-block-preview",children:(0,n.jsx)("img",{src:simple_block_gallery_preview_masonry.url,alt:"Preview"})}):(0,n.jsxs)("div",{...o,children:[(0,n.jsx)(r.RawHTML,{children:e.list_images}),(0,n.jsx)(a.MediaUploadCheck,{children:(0,n.jsx)(a.MediaUpload,{title:(0,l.__)("Masonry Block","simple-block-gallery"),onSelect:e=>{s({image:e,images_ids:t(e),list_images:p(e)})},allowedTypes:"image",gallery:!0,multiple:!0,value:e.images_ids,render:({open:a})=>(0,n.jsx)(i.Button,{variant:"secondary",onClick:a,children:e.images_ids?(0,l.__)("Update gallery","simple-block-gallery"):(0,l.__)("Create Gallery","simple-block-gallery")})})}),(0,n.jsx)(a.InspectorControls,{children:(0,n.jsxs)(i.PanelBody,{title:(0,l.__)("Settings","simple-block-gallery"),initialOpen:!0,children:[(0,n.jsx)(i.RangeControl,{label:(0,l.__)("Width","simple-block-gallery"),max:1e3,min:10,value:e.width,onChange:e=>s({width:e})}),(0,n.jsx)(i.RangeControl,{label:(0,l.__)("Space","simple-block-gallery"),max:20,min:0,value:e.padding,onChange:e=>s({padding:e})}),(0,n.jsx)(i.RangeControl,{label:(0,l.__)("Rounded Images","simple-block-gallery"),max:20,min:0,value:e.r_images,onChange:e=>s({r_images:e})}),(0,n.jsx)(i.ToggleControl,{label:(0,l.__)("Expand on click","simple-block-gallery"),help:(0,l.__)("Scales the image with a lightbox effect","simple-block-gallery"),checked:e.link,onChange:e=>s({link:e})})]})})]})},save:function({attributes:e}){const l=a.useBlockProps.save();return(0,n.jsx)(r.Fragment,{...l,children:e.list_images&&(0,n.jsx)(r.RawHTML,{children:e.list_images})})}})}],i={};function a(e){var r=i[e];if(void 0!==r)return r.exports;var n=i[e]={exports:{}};return l[e](n,n.exports,a),n.exports}a.m=l,e=[],a.O=(l,i,r,n)=>{if(!i){var s=1/0;for(c=0;c<e.length;c++){i=e[c][0],r=e[c][1],n=e[c][2];for(var o=!0,t=0;t<i.length;t++)(!1&n||s>=n)&&Object.keys(a.O).every((e=>a.O[e](i[t])))?i.splice(t--,1):(o=!1,n<s&&(s=n));if(o){e.splice(c--,1);var p=r();void 0!==p&&(l=p)}}return l}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[i,r,n]},a.o=(e,l)=>Object.prototype.hasOwnProperty.call(e,l),(()=>{var e={169:0,181:0};a.O.j=l=>0===e[l];var l=(l,i)=>{var r,n,s=i[0],o=i[1],t=i[2],p=0;if(s.some((l=>0!==e[l]))){for(r in o)a.o(o,r)&&(a.m[r]=o[r]);if(t)var c=t(a)}for(l&&l(i);p<s.length;p++)n=s[p],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return a.O(c)},i=self.webpackChunksimple_block_gallery=self.webpackChunksimple_block_gallery||[];i.forEach(l.bind(null,0)),i.push=l.bind(null,i.push.bind(i))})();var r=a.O(void 0,[181],(()=>a(1)));r=a.O(r)})();1 (()=>{"use strict";var e,l=[,()=>{const e=window.wp.blocks,l=window.wp.i18n,i=window.wp.components,a=window.wp.blockEditor,r=window.wp.element,n=window.ReactJSXRuntime,s=JSON.parse('{"UU":"simple-block-gallery/masonry-block"}');(0,e.registerBlockType)(s.UU,{edit:function({attributes:e,setAttributes:s}){const o=(0,a.useBlockProps)();function t(e){let l=[];for(let i in e)l.push(e[i].id);return l}function c(l){let i="\x3c!-- wp:paragraph --\x3e";i+='<style type="text/css">',i+=".simple-block-gallery-masonry { columns: auto "+e.width+"px; column-gap: 0; margin: 0 auto; padding: 0; }",i+="</style>",i+='<div class="simple-block-gallery-masonry">';for(let a in l)i+='<style type="text/css">',i+="div#masonry"+l[0].id+" { display: block; padding-right: "+e.padding+"px; padding-bottom: "+e.padding+"px; margin: 0; line-height: 0; }",i+="div#masonry"+l[0].id+" img { max-width: 100%; height: auto; display: block; border-radius: "+e.r_images+"px; }",i+="</style>",i+='<div id="masonry'+l[0].id+'">',i+='\x3c!-- wp:image {"lightbox":{"enabled":'+e.link+'},"id":'+l[a].id+',"sizeSlug":"large","linkDestination":"none"} --\x3e<figure class="wp-block-image size-large">',i+='<img src="'+l[a].url+'">',i+="</figure>\x3c!-- /wp:image --\x3e</div>";return i+="</div>",i+="\x3c!-- /wp:paragraph --\x3e",i}e.list_images=c(e.image);const{preview:g}=e;if(g)return(0,n.jsx)("div",{className:"simple-block-gallery-block-preview",children:(0,n.jsx)("img",{src:simple_block_gallery_preview_masonry.url,alt:"Preview"})});const p=[];return p.push((0,n.jsx)(a.MediaUploadCheck,{children:(0,n.jsx)(a.MediaUpload,{title:(0,l.__)("Masonry Block","simple-block-gallery"),onSelect:e=>{s({image:e,images_ids:t(e),list_images:c(e)})},allowedTypes:"image",gallery:!0,multiple:!0,value:e.images_ids,render:({open:a})=>(0,n.jsx)(i.Button,{variant:"secondary",onClick:a,children:e.images_ids?(0,l.__)("Update gallery","simple-block-gallery"):(0,l.__)("Create Gallery","simple-block-gallery")})})})),(0,n.jsxs)("div",{...o,children:[(0,n.jsx)(r.RawHTML,{children:e.list_images}),p,(0,n.jsx)(a.InspectorControls,{children:(0,n.jsxs)(i.PanelBody,{title:(0,l.__)("Settings","simple-block-gallery"),initialOpen:!0,children:[p,(0,n.jsx)("hr",{}),(0,n.jsx)(i.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Width","simple-block-gallery"),max:1e3,min:10,value:e.width,onChange:e=>s({width:e})}),(0,n.jsx)(i.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Space","simple-block-gallery"),max:20,min:0,value:e.padding,onChange:e=>s({padding:e})}),(0,n.jsx)(i.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Rounded Images","simple-block-gallery"),max:20,min:0,value:e.r_images,onChange:e=>s({r_images:e})}),(0,n.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Expand on click","simple-block-gallery"),help:(0,l.__)("Scales the image with a lightbox effect","simple-block-gallery"),checked:e.link,onChange:e=>s({link:e})})]})})]})},save:function({attributes:e}){const l=a.useBlockProps.save();return(0,n.jsx)(r.Fragment,{...l,children:e.list_images&&(0,n.jsx)(r.RawHTML,{children:e.list_images})})}})}],i={};function a(e){var r=i[e];if(void 0!==r)return r.exports;var n=i[e]={exports:{}};return l[e](n,n.exports,a),n.exports}a.m=l,e=[],a.O=(l,i,r,n)=>{if(!i){var s=1/0;for(g=0;g<e.length;g++){i=e[g][0],r=e[g][1],n=e[g][2];for(var o=!0,t=0;t<i.length;t++)(!1&n||s>=n)&&Object.keys(a.O).every((e=>a.O[e](i[t])))?i.splice(t--,1):(o=!1,n<s&&(s=n));if(o){e.splice(g--,1);var c=r();void 0!==c&&(l=c)}}return l}n=n||0;for(var g=e.length;g>0&&e[g-1][2]>n;g--)e[g]=e[g-1];e[g]=[i,r,n]},a.o=(e,l)=>Object.prototype.hasOwnProperty.call(e,l),(()=>{var e={169:0,181:0};a.O.j=l=>0===e[l];var l=(l,i)=>{var r,n,s=i[0],o=i[1],t=i[2],c=0;if(s.some((l=>0!==e[l]))){for(r in o)a.o(o,r)&&(a.m[r]=o[r]);if(t)var g=t(a)}for(l&&l(i);c<s.length;c++)n=s[c],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return a.O(g)},i=self.webpackChunksimple_block_gallery=self.webpackChunksimple_block_gallery||[];i.forEach(l.bind(null,0)),i.push=l.bind(null,i.push.bind(i))})();var r=a.O(void 0,[181],(()=>a(1)));r=a.O(r)})(); -
simple-block-gallery/trunk/block/build/sbg-parent-block/block.json
r3184685 r3190820 12 12 "slider" 13 13 ], 14 "version": "1.0. 7",14 "version": "1.0.8", 15 15 "textdomain": "simple-block-gallery", 16 16 "attributes": { -
simple-block-gallery/trunk/block/build/slider-block/block.json
r3184685 r3190820 9 9 "icon": "video-alt3", 10 10 "description": "Generate the slider gallery.", 11 "version": "1.0. 7",11 "version": "1.0.8", 12 12 "textdomain": "simple-block-gallery", 13 13 "attributes": { -
simple-block-gallery/trunk/block/build/slider-block/index.asset.php
r3184685 r3190820 1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => ' a08539d004d6106dc577');1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '41952f66d5cc9b7daa3d'); -
simple-block-gallery/trunk/block/build/slider-block/index.js
r3184685 r3190820 1 (()=>{"use strict";var e,i={997:()=>{const e=window.wp.blocks,i=window.wp.i18n,l=window.wp.components,r=window.wp.blockEditor,t=window.wp.element,n=window.ReactJSXRuntime,s=JSON.parse('{"UU":"simple-block-gallery/slider-block"}');(0,e.registerBlockType)(s.UU,{edit:function({attributes:e,setAttributes:s}){const a=(0,r.useBlockProps)();function o(e){let i=[];for(let l in e)i.push(e[l].id);return i}function d(i){let l="\x3c!-- wp:paragraph --\x3e";if(i){let r="";for(let e=0;e<i.length;e++)r+=100/(i.length-1)*e+"%{ left: -"+100*e+"%; } ",r+=100/(i.length-1)*(e+1)*.8+"%{ left: -"+100*e+"%; } ";l+='<style type="text/css">',l+="@keyframes slidy"+i[0].id+" { "+r+"}",l+="div#slider"+i[0].id+" { overflow: hidden; margin: 0 auto; padding: 0; }",l+="div#slider"+i[0].id+" figure img { width: "+100/i.length+"%;hight:auto; float: left; }",l+="div#slider"+i[0].id+" figure { position: relative; width: "+100*i.length+"%; margin: 0; left: 0; text-align: left; font-size: 0; animation: "+e.animation*i.length+"s slidy"+i[0].id+" infinite; }",l+="</style>",l+='<div id="slider'+i[0].id+'">',l+="<figure>";for(let e in i)l+='<img src="'+i[e].url+'">';l+="</figure></div>"}return l+="\x3c!-- /wp:paragraph --\x3e",l}e.list_images=d(e.image);const{preview:c}=e;return c?(0,n.jsx)("div",{className:"simple-block-gallery-block-preview",children:(0,n.jsx)("img",{src:simple_block_gallery_preview_slider.url,alt:"Preview"})}):(0,n.jsxs)("div",{...a,children:[(0,n.jsx)(t.RawHTML,{children:e.list_images}),(0,n.jsx)(r.MediaUploadCheck,{children:(0,n.jsx)(r.MediaUpload,{title:(0,i.__)("Slider block","simple-block-gallery"),onSelect:e=>{s({image:e,images_ids:o(e),list_images:d(e)})},allowedTypes:"image",gallery:!0,multiple:!0,value:e.images_ids,render:({open:r})=>(0,n.jsx)(l.Button,{variant:"secondary",onClick:r,children:e.images_ids?(0,i.__)("Update gallery","simple-block-gallery"):(0,i.__)("Create Gallery","simple-block-gallery")})})}),(0,n.jsx)(r.InspectorControls,{children:(0,n.jsx)(l.PanelBody,{title:(0,i.__)("Settings","simple-block-gallery"),initialOpen:!0,children:(0,n.jsx)(l.RangeControl,{ label:(0,i.__)("Interval","simple-block-gallery"),max:30,min:1,value:e.animation,onChange:e=>s({animation:e})})})})]})},save:function({attributes:e}){const i=r.useBlockProps.save();return(0,n.jsx)(t.Fragment,{...i,children:e.list_images&&(0,n.jsx)(t.RawHTML,{children:e.list_images})})}})}},l={};function r(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}};return i[e](n,n.exports,r),n.exports}r.m=i,e=[],r.O=(i,l,t,n)=>{if(!l){var s=1/0;for(c=0;c<e.length;c++){l=e[c][0],t=e[c][1],n=e[c][2];for(var a=!0,o=0;o<l.length;o++)(!1&n||s>=n)&&Object.keys(r.O).every((e=>r.O[e](l[o])))?l.splice(o--,1):(a=!1,n<s&&(s=n));if(a){e.splice(c--,1);var d=t();void 0!==d&&(i=d)}}return i}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[l,t,n]},r.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i),(()=>{var e={933:0,489:0};r.O.j=i=>0===e[i];var i=(i,l)=>{var t,n,s=l[0],a=l[1],o=l[2],d=0;if(s.some((i=>0!==e[i]))){for(t in a)r.o(a,t)&&(r.m[t]=a[t]);if(o)var c=o(r)}for(i&&i(l);d<s.length;d++)n=s[d],r.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return r.O(c)},l=self.webpackChunksimple_block_gallery=self.webpackChunksimple_block_gallery||[];l.forEach(i.bind(null,0)),l.push=i.bind(null,l.push.bind(l))})();var t=r.O(void 0,[489],(()=>r(997)));t=r.O(t)})();1 (()=>{"use strict";var e,i={997:()=>{const e=window.wp.blocks,i=window.wp.i18n,l=window.wp.components,r=window.wp.blockEditor,t=window.wp.element,n=window.ReactJSXRuntime,s=JSON.parse('{"UU":"simple-block-gallery/slider-block"}');(0,e.registerBlockType)(s.UU,{edit:function({attributes:e,setAttributes:s}){const a=(0,r.useBlockProps)();function o(e){let i=[];for(let l in e)i.push(e[l].id);return i}function d(i){let l="\x3c!-- wp:paragraph --\x3e";if(i){let r="";for(let e=0;e<i.length;e++)r+=100/(i.length-1)*e+"%{ left: -"+100*e+"%; } ",r+=100/(i.length-1)*(e+1)*.8+"%{ left: -"+100*e+"%; } ";l+='<style type="text/css">',l+="@keyframes slidy"+i[0].id+" { "+r+"}",l+="div#slider"+i[0].id+" { overflow: hidden; margin: 0 auto; padding: 0; }",l+="div#slider"+i[0].id+" figure img { width: "+100/i.length+"%;hight:auto; float: left; }",l+="div#slider"+i[0].id+" figure { position: relative; width: "+100*i.length+"%; margin: 0; left: 0; text-align: left; font-size: 0; animation: "+e.animation*i.length+"s slidy"+i[0].id+" infinite; }",l+="</style>",l+='<div id="slider'+i[0].id+'">',l+="<figure>";for(let e in i)l+='<img src="'+i[e].url+'">';l+="</figure></div>"}return l+="\x3c!-- /wp:paragraph --\x3e",l}e.list_images=d(e.image);const{preview:c}=e;return c?(0,n.jsx)("div",{className:"simple-block-gallery-block-preview",children:(0,n.jsx)("img",{src:simple_block_gallery_preview_slider.url,alt:"Preview"})}):(0,n.jsxs)("div",{...a,children:[(0,n.jsx)(t.RawHTML,{children:e.list_images}),(0,n.jsx)(r.MediaUploadCheck,{children:(0,n.jsx)(r.MediaUpload,{title:(0,i.__)("Slider block","simple-block-gallery"),onSelect:e=>{s({image:e,images_ids:o(e),list_images:d(e)})},allowedTypes:"image",gallery:!0,multiple:!0,value:e.images_ids,render:({open:r})=>(0,n.jsx)(l.Button,{variant:"secondary",onClick:r,children:e.images_ids?(0,i.__)("Update gallery","simple-block-gallery"):(0,i.__)("Create Gallery","simple-block-gallery")})})}),(0,n.jsx)(r.InspectorControls,{children:(0,n.jsx)(l.PanelBody,{title:(0,i.__)("Settings","simple-block-gallery"),initialOpen:!0,children:(0,n.jsx)(l.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Interval","simple-block-gallery"),max:30,min:1,value:e.animation,onChange:e=>s({animation:e})})})})]})},save:function({attributes:e}){const i=r.useBlockProps.save();return(0,n.jsx)(t.Fragment,{...i,children:e.list_images&&(0,n.jsx)(t.RawHTML,{children:e.list_images})})}})}},l={};function r(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}};return i[e](n,n.exports,r),n.exports}r.m=i,e=[],r.O=(i,l,t,n)=>{if(!l){var s=1/0;for(c=0;c<e.length;c++){l=e[c][0],t=e[c][1],n=e[c][2];for(var a=!0,o=0;o<l.length;o++)(!1&n||s>=n)&&Object.keys(r.O).every((e=>r.O[e](l[o])))?l.splice(o--,1):(a=!1,n<s&&(s=n));if(a){e.splice(c--,1);var d=t();void 0!==d&&(i=d)}}return i}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[l,t,n]},r.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i),(()=>{var e={933:0,489:0};r.O.j=i=>0===e[i];var i=(i,l)=>{var t,n,s=l[0],a=l[1],o=l[2],d=0;if(s.some((i=>0!==e[i]))){for(t in a)r.o(a,t)&&(r.m[t]=a[t]);if(o)var c=o(r)}for(i&&i(l);d<s.length;d++)n=s[d],r.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return r.O(c)},l=self.webpackChunksimple_block_gallery=self.webpackChunksimple_block_gallery||[];l.forEach(i.bind(null,0)),l.push=i.bind(null,l.push.bind(l))})();var t=r.O(void 0,[489],(()=>r(997)));t=r.O(t)})(); -
simple-block-gallery/trunk/block/package.json
r3184685 r3190820 1 1 { 2 2 "name": "simple-block-gallery", 3 "version": "1.0. 7",3 "version": "1.0.8", 4 4 "description": "Generate a Masonry or Slider gallery.", 5 5 "main": "index.js", -
simple-block-gallery/trunk/block/src/masonry-block/block.json
r3184685 r3190820 7 7 "icon": "tagcloud", 8 8 "description": "Generate the masonry gallery.", 9 "version": "1.0. 7",9 "version": "1.0.8", 10 10 "textdomain": "simple-block-gallery", 11 11 "attributes": { -
simple-block-gallery/trunk/block/src/masonry-block/edit.js
r3111747 r3190820 24 24 25 25 function List_Images( image ) { 26 let j = '<!-- wp:paragraph --><div style="columns: auto ' + attributes.width + 'px; column-gap: 0; margin: 0 auto; padding: 0;">'; 26 let j = '<!-- wp:paragraph -->'; 27 j += '<style type="text/css">'; 28 j += '.simple-block-gallery-masonry { columns: auto ' + attributes.width + 'px; column-gap: 0; margin: 0 auto; padding: 0; }'; 29 j += '</style>'; 30 j += '<div class="simple-block-gallery-masonry">'; 27 31 for( let i in image ) { 28 j += '<!-- wp:image {"lightbox":{"enabled":' + attributes.link + '},"id":' + image[i].id + ',"sizeSlug":"large","linkDestination":"none"} --><figure style="display: block; padding-right: ' + attributes.padding + 'px; padding-bottom: ' + attributes.padding + 'px; margin: 0; line-height: 0;">'; 29 j += '<span style="width: ' + attributes.width + 'px;"><img src="' + image[i].url +'" style="max-width: 100%; height: auto; display: block; border-radius: ' + attributes.r_images + 'px;"></span>'; 30 j += '</figure><!-- /wp:image -->'; 32 j += '<style type="text/css">'; 33 j += 'div#masonry' + image[0].id + ' { display: block; padding-right: ' + attributes.padding + 'px; padding-bottom: ' + attributes.padding + 'px; margin: 0; line-height: 0; }'; 34 j += 'div#masonry' + image[0].id + ' img { max-width: 100%; height: auto; display: block; border-radius: ' + attributes.r_images + 'px; }'; 35 j += '</style>'; 36 j += '<div id="masonry' + image[0].id + '">'; 37 j += '<!-- wp:image {"lightbox":{"enabled":' + attributes.link + '},"id":' + image[i].id + ',"sizeSlug":"large","linkDestination":"none"} --><figure class="wp-block-image size-large">'; 38 j += '<img src="' + image[i].url +'">'; 39 j += '</figure><!-- /wp:image --></div>'; 31 40 } 32 j += '</div><!-- /wp:paragraph -->'; 41 j += '</div>'; 42 j += '<!-- /wp:paragraph -->'; 33 43 return j; 34 44 } … … 45 55 } 46 56 57 const media_upload = []; 58 media_upload.push( 59 <MediaUploadCheck> 60 <MediaUpload 61 title = { __( 'Masonry Block', 'simple-block-gallery' ) } 62 onSelect = { onUpdateImage } 63 allowedTypes = 'image' 64 gallery = { true } 65 multiple = { true } 66 value = { attributes.images_ids } 67 render = { ( { open } ) => ( 68 <Button 69 variant = "secondary" 70 onClick = { open }> 71 { ! attributes.images_ids ? __( 'Create Gallery', 'simple-block-gallery' ) : __( 'Update gallery', 'simple-block-gallery' ) } 72 </Button> 73 ) } 74 /> 75 </MediaUploadCheck> 76 ); 77 47 78 return ( 48 79 <div { ...blockProps }> 49 80 <RawHTML>{ attributes.list_images }</RawHTML> 50 <MediaUploadCheck> 51 <MediaUpload 52 title = { __( 'Masonry Block', 'simple-block-gallery' ) } 53 onSelect = { onUpdateImage } 54 allowedTypes = 'image' 55 gallery = { true } 56 multiple = { true } 57 value = { attributes.images_ids } 58 render = { ( { open } ) => ( 59 <Button 60 variant = "secondary" 61 onClick = { open }> 62 { ! attributes.images_ids ? __( 'Create Gallery', 'simple-block-gallery' ) : __( 'Update gallery', 'simple-block-gallery' ) } 63 </Button> 64 ) } 65 /> 66 </MediaUploadCheck> 67 81 { media_upload } 68 82 <InspectorControls> 69 83 <PanelBody title = { __( 'Settings', 'simple-block-gallery' ) } initialOpen = { true }> 84 { media_upload } 85 <hr /> 70 86 <RangeControl 87 __nextHasNoMarginBottom 71 88 label = { __( 'Width', 'simple-block-gallery' ) } 72 89 max = { 1000 } … … 76 93 /> 77 94 <RangeControl 95 __nextHasNoMarginBottom 78 96 label = { __( 'Space', 'simple-block-gallery' ) } 79 97 max = { 20 } … … 83 101 /> 84 102 <RangeControl 103 __nextHasNoMarginBottom 85 104 label = { __( 'Rounded Images', 'simple-block-gallery' ) } 86 105 max = { 20 } … … 90 109 /> 91 110 <ToggleControl 111 __nextHasNoMarginBottom 92 112 label = { __( 'Expand on click', 'simple-block-gallery' ) } 93 113 help = { __( 'Scales the image with a lightbox effect', 'simple-block-gallery' ) } -
simple-block-gallery/trunk/block/src/sbg-parent-block/block.json
r3184685 r3190820 12 12 "slider" 13 13 ], 14 "version": "1.0. 7",14 "version": "1.0.8", 15 15 "textdomain": "simple-block-gallery", 16 16 "attributes": { -
simple-block-gallery/trunk/block/src/slider-block/block.json
r3184685 r3190820 7 7 "icon": "video-alt3", 8 8 "description": "Generate the slider gallery.", 9 "version": "1.0. 7",9 "version": "1.0.8", 10 10 "textdomain": "simple-block-gallery", 11 11 "attributes": { -
simple-block-gallery/trunk/block/src/slider-block/edit.js
r3111747 r3190820 1 1 import { __ } from '@wordpress/i18n'; 2 import { RangeControl, Button, PanelBody , ToggleControl} from '@wordpress/components';2 import { RangeControl, Button, PanelBody } from '@wordpress/components'; 3 3 import { InspectorControls, InnerBlocks, MediaUpload, MediaUploadCheck, useBlockProps } from '@wordpress/block-editor'; 4 4 import { RawHTML } from '@wordpress/element'; … … 83 83 <PanelBody title = { __( 'Settings', 'simple-block-gallery' ) } initialOpen = { true }> 84 84 <RangeControl 85 __nextHasNoMarginBottom 85 86 label = { __( 'Interval', 'simple-block-gallery' ) } 86 87 max = { 30 } -
simple-block-gallery/trunk/class-simpleblockgallery.php
r3184685 r3190820 4 4 * Plugin URI: https://wordpress.org/plugins/simple-block-gallery/ 5 5 * Description: Add the effect of Masonry and Slider to images. 6 * Version: 1.1 16 * Version: 1.12 7 7 * Author: Katsushi Kawamori 8 8 * Author URI: https://riverforest-wp.info/ -
simple-block-gallery/trunk/readme.txt
r3186075 r3190820 6 6 Requires PHP: 8.0 7 7 Tested up to: 6.7 8 Stable tag: 1.1 18 Stable tag: 1.12 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 45 45 46 46 == Changelog == 47 48 = [1.12] 2024/11/18 = 49 Fix – Rebuilt blocks. 47 50 48 51 = [1.11] 2024/11/09 =
Note: See TracChangeset
for help on using the changeset viewer.