Version Description
- New: Image box block
- New: Count up block
- New: Video Popup block
- Fixed: Compatibility with Gutenberg 2.4.0
- Fixed: Removed "0" displayed in Number box when editing
Download this release
Release Info
Developer | bfintal |
Plugin | Stackable – Page Builder Gutenberg Blocks |
Version | 0.3 |
Comparing to | |
See all releases |
Code changes from version 0.2 to 0.3
- dist/blocks.build.js +1 -1
- dist/blocks.editor.build.css +3 -0
- dist/blocks.frontend.build.js +1347 -2
- dist/blocks.frontend.build.min.js +1 -1
- dist/blocks.style.build.css +3 -0
- plugin.php +1 -1
- readme.txt +41 -29
- src/block/blockquote/index.js +1 -1
- src/block/button/index.js +1 -1
- src/block/call-to-action/index.js +1 -1
- src/block/count-up/editor.scss +6 -0
- src/block/count-up/frontend.js +133 -0
- src/block/count-up/index.js +188 -0
- src/block/count-up/style.scss +22 -0
- src/block/divider/index.js +4 -4
- src/block/expand/index.js +2 -2
- src/block/image-box/editor.scss +6 -0
- src/block/image-box/index.js +356 -0
- src/block/image-box/style.scss +64 -0
- src/block/notification/index.js +1 -1
- src/block/number-box/index.js +4 -2
- src/block/pullquote/index.js +1 -1
- src/block/spacer/index.js +1 -1
- src/block/team-member/index.js +4 -4
- src/block/testimonial/index.js +4 -2
- src/block/video-popup/editor.scss +6 -0
- src/block/video-popup/frontend.js +34 -0
- src/block/video-popup/index.js +235 -0
- src/block/video-popup/style.scss +84 -0
- src/blocks.js +17 -12
- src/icons.js +30 -2
dist/blocks.build.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){function t(l){if(n[l])return n[l].exports;var o=n[l]={i:l,l:!1,exports:{}};return e[l].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,l){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:l})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t,n){"use strict";n.d(t,"f",function(){return r}),n.d(t,"a",function(){return a}),n.d(t,"e",function(){return c}),n.d(t,"c",function(){return i}),n.d(t,"h",function(){return u}),n.d(t,"i",function(){return m}),n.d(t,"k",function(){return s}),n.d(t,"b",function(){return p}),n.d(t,"j",function(){return d}),n.d(t,"d",function(){return b}),n.d(t,"g",function(){return g});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},o=function(e){return wp.element.createElement("defs",null,wp.element.createElement("linearGradient",l({},e,{gradientTransform:"rotate(90)"}),wp.element.createElement("stop",{offset:"0%",stopColor:"#2FDDD1",stopOpacity:"1"}),wp.element.createElement("stop",{offset:"20%",stopColor:"#30A2E3",stopOpacity:"1"}),wp.element.createElement("stop",{offset:"50%",stopColor:"#F56FAE",stopOpacity:"1"}),wp.element.createElement("stop",{offset:"100%",stopColor:"#FFC58E",stopOpacity:"1"})))},r=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",width:"20",height:"20"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M512 96c-111.118 0-215.584 43.272-294.156 121.844S96 400.882 96 512s43.272 215.584 121.844 294.156S400.882 928 512 928s215.584-43.272 294.156-121.844S928 623.118 928 512s-43.272-215.584-121.843-294.156S623.118 96 512 96zm0-96c282.77 0 512 229.23 512 512s-229.23 512-512 512S0 794.77 0 512 229.23 0 512 0zm-64 704h128v128H448zm0-512h128v384H448z"}))},a=function(){return wp.element.createElement("svg",{role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M17 5H3c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm1 7c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V7c0-.6.4-1 1-1h14c.6 0 1 .4 1 1v5z"}))},c=function(){return wp.element.createElement(a,null)},i=function(){return wp.element.createElement("svg",{role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M4 9h12v2H4V9z"}))},u=function(){return wp.element.createElement("svg",{role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M8.54 12.74c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45L6.65 1.94C3.45 3.46.31 6.96.85 11.37 1.19 14.16 2.8 16 5.08 16c1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38zm9.43 0c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45l-1.63-2.28c-3.2 1.52-6.34 5.02-5.8 9.43.34 2.79 1.95 4.63 4.23 4.63 1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38z"}))},m=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 14 32"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M0 29h5.833L0 23h5V9H0l5.833-6H0V0h14v3H8.167L14 9H9v14h5l-5.833 6H14v3H0v-3z"}))},s=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 13 12.916010856628418"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M5.68 12.916a.5.5 0 0 1-.397-.196L3.208 10H1.463C.656 10 0 9.428 0 8.621V1.463C0 .656.656 0 1.463 0h10.074C12.344 0 13 .656 13 1.463v7.158C13 9.428 12.344 10 11.537 10H8.151l-2.073 2.72a.504.504 0 0 1-.398.196zM1.463 1A.464.464 0 0 0 1 1.463v7.158c0 .255.208.463.463.463h1.993a.5.5 0 0 1 .397.196l1.827 2.312L7.507 9.28a.502.502 0 0 1 .397-.196h3.633A.464.464 0 0 0 12 8.621V1.463A.464.464 0 0 0 11.537 1H1.463zm1.193 2h7.828c.284.024.514.207.514.49a.498.498 0 0 1-.514.496H2.656a.499.499 0 0 1-.514-.496c.001-.283.231-.466.514-.49zm0 3h7.828c.284.024.514.207.514.49a.498.498 0 0 1-.514.496H2.656a.499.499 0 0 1-.514-.496c.001-.283.231-.466.514-.49z"}))},p=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 75.22699737548828 73.15494537353516"},wp.element.createElement(o,{id:"Grad"}),wp.element.createElement("path",{fill:"url(#Grad)",d:"M14.941 14.912C6.689 14.912 0 21.601 0 29.853s6.689 14.941 14.941 14.941a2.712 2.712 0 0 0 2.676-2.296h.043V17.632a2.72 2.72 0 0 0-2.719-2.72zM75.227 2.719A2.72 2.72 0 0 0 72.508 0c-.623 0-1.19.218-1.648.57L46.934 14.384H25.366a2.719 2.719 0 0 0-2.719 2.719v25.809h.034a2.71 2.71 0 0 0 2.685 2.383h19.138l26.16 15.103c.485.45 1.13.731 1.844.731a2.72 2.72 0 0 0 2.719-2.719c0-.103-.019-.201-.03-.301h.03V2.877h-.016c.003-.053.016-.103.016-.158zM43.825 65.977l-.038-.066c-.013-.024-.019-.049-.033-.073s-.032-.042-.046-.064l-8.305-14.383-.031.018a2.7 2.7 0 0 0-1.857-1.096v-.03h-7.222v.018a2.693 2.693 0 0 0-1.135.347 2.718 2.718 0 0 0-.995 3.714c.064.11.142.206.219.303l-.032.019 9.678 16.764.002.005a.014.014 0 0 0 .003.004l.097.168.017-.01a2.71 2.71 0 0 0 3.596.832c.145-.084.276-.183.399-.287l.025.043 4.983-2.876-.023-.04a2.708 2.708 0 0 0 .691-3.306l.007-.004z"}))},d=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 896 1023"},wp.element.createElement(o,{id:"Grad"}),wp.element.createElement("path",{fill:"url(#Grad)",d:"M821 491q-41-41-95-60 62-26 100-82t38-125q0-93-65.5-158.5T640 0q-71 0-128.5 41T430 147q-32-39-77-61t-97-22q-93 0-158.5 65.5T32 288q0 69 38 125t100 82q-54 19-95 60Q0 630 0 736v191q0 40 28 68t68 28h320q31 0 55.5-18t34.5-46h294q40 0 68-28t28-68V672q0-106-75-181zM527 111q47-47 113-47t113 47 47 113-47 113-113 47-113-47-47-113 47-113zM143 401q-47-47-47-113t47-113 113-47 113 47 47 113-47 113-113 47-113-47zm305 526q0 13-9.5 22.5T416 959H96q-13 0-22.5-9.5T64 927V736q0-79 56.5-135.5T256 544t136 56q1 2 2 3 54 55 54 133v191zm-27-387q-36-30-79-45 43-18 75.5-52t48.5-78q36 44 88 66-54 19-95 60-22 23-38 49zm411 323q0 13-9.5 22.5T800 895H512V736q0-80-46-146 15-30 38-53 57-57 136-57t135.5 56.5T832 672v191z"}))},b=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 32 8"},wp.element.createElement(o,{id:"Grad"}),wp.element.createElement("path",{fill:"url(#Grad)",d:"M4 0C1.79 0 0 1.79 0 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm24 0c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zM16 0c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"}))},g=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 21.027502059936523 10.284000396728516"},wp.element.createElement(o,{id:"Grad"}),wp.element.createElement("path",{fill:"url(#Grad)",d:"M3.028 10.284a1 1 0 0 1-1-1V2.902l-.553.276A1 1 0 1 1 .58 1.389l2-1a.998.998 0 0 1 1.447.895v8a1 1 0 0 1-1 1zm9 0h-5a1.002 1.002 0 0 1-.707-1.707l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001a1.33 1.33 0 0 0-.393.948 1 1 0 0 1-2 0c0-.894.348-1.733.98-2.364C8.273 0 10.472 0 11.735 1.264c.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.98 2.364L9.443 8.284h2.586a1 1 0 0 1 0 2zm7.955-5.623a2.725 2.725 0 0 0 .545-1.627 2.753 2.753 0 0 0-2.75-2.75 2.739 2.739 0 0 0-2.44 1.484 1 1 0 1 0 1.776.92.75.75 0 1 1 .664 1.096 1 1 0 0 0 0 2c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25a1 1 0 0 0-2 0c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25a3.23 3.23 0 0 0-1.045-2.373z"}))}},function(e,t){var n={utf8:{stringToBytes:function(e){return n.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(n.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(3),n(6),n(9),n(12),n(15),n(21),n(24),n(27),n(30),n(33),n(36),n(39)},function(e,t,n){"use strict";var l=n(4),o=(n.n(l),n(5)),r=(n.n(o),n(0)),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("ugb/spacer",{title:a("Spacer","UGB"),icon:r.i,category:"layout",keywords:[a("Spacer"),a("Stackable")],attributes:{height:{default:50,type:"number"}},edit:function(e){var t=e.isSelected,n=wp.blocks.InspectorControls,l=wp.components,o=l.RangeControl,r=(l.TextControl,e.attributes.height);return[!!t&&wp.element.createElement(n,{key:"inspector"},wp.element.createElement(o,{label:a("Height"),value:r,min:"30",max:"200",onChange:function(t){e.setAttributes({height:t})}})),wp.element.createElement("div",{className:e.className,style:{height:r+"px"}})]},save:function(e){var t=e.attributes.height;return wp.element.createElement("div",{className:e.className,style:{height:t+"px"}})}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(7),o=(n.n(l),n(8)),r=(n.n(o),n(0)),a=wp.i18n.__,c=wp.blocks.registerBlockType,i=wp.components.PanelColor;c("ugb/divider",{title:a("Divider","UGB"),icon:r.c,category:"layout",keywords:[a("Divider"),a("Stackable")],attributes:{height:{default:1,type:"number"},width:{default:50,type:"number"},color:{type:"string",default:"#dddddd"},alignment:{type:"string",default:"center"}},edit:function(e){var t=e.focus,n=wp.blocks,l=n.InspectorControls,o=n.ColorPalette,r=n.BlockControls,c=n.AlignmentToolbar,u=wp.components.RangeControl,m=e.attributes,s=m.height,p=m.width,d=m.color,b=m.alignment;return[!!t&&wp.element.createElement(r,{key:"controls"},wp.element.createElement(c,{value:b,onChange:function(t){e.setAttributes({alignment:t})}})),!!t&&wp.element.createElement(l,{key:"inspector"},wp.element.createElement(u,{label:a("Height"),value:s,min:"1",max:"10",onChange:function(t){e.setAttributes({height:t})}}),wp.element.createElement(u,{label:a("Width"),value:p,min:"10",max:"100",step:"0.1",onChange:function(t){e.setAttributes({width:t})}}),wp.element.createElement(i,{title:a("Divider Color"),colorValue:d,initialOpen:!1},wp.element.createElement(o,{value:d,onChange:function(t){return e.setAttributes({color:t})}}))),wp.element.createElement("div",{className:"ugb-divider",style:{paddingTop:8,paddingBottom:8}},wp.element.createElement("hr",{align:b,style:{marginTop:0,marginBottom:0,backgroundColor:d,width:p+"%",height:s}}))]},save:function(e){var t=e.attributes,n=t.height,l=t.width,o=t.color,r=t.alignment;return wp.element.createElement("div",{className:"ugb-divider"},wp.element.createElement("hr",{align:r,style:{backgroundColor:o,width:l+"%",height:n}}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function r(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(10),c=(n.n(a),n(11)),i=(n.n(c),n(0)),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}return function(t,n,l){return n&&e(t.prototype,n),l&&e(t,l),t}}(),m=wp.i18n.__,s=wp.element.Component,p=wp.blocks.registerBlockType,d=wp.components,b=d.PanelColor,g=d.Dashicon,h=d.IconButton,w=d.SelectControl,f=d.RangeControl,y=wp.blocks,v=y.InspectorControls,C=y.BlockControls,E=y.AlignmentToolbar,T=y.RichText,x=y.ColorPalette,k=y.UrlInput,N=function(e){function t(){return l(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.isSelected,n=(e.className,e.setAttributes),l=this.props.attributes,o=l.url,r=l.title,a=l.text,c=l.color,i=l.textColor,u=l.size,s=l.textAlignment,p=l.cornerButtonRadius,d=[{value:"small",label:m("Small")},{value:"normal",label:m("Normal")},{value:"medium",label:m("Medium")},{value:"large",label:m("Large")}];return[t&&wp.element.createElement(C,{key:"controls"},wp.element.createElement(E,{value:s,onChange:function(e){n({textAlignment:e})}})),wp.element.createElement("span",{key:"button",title:r,className:"wp-block-button ugb-button-"+s},wp.element.createElement(T,{tagName:"span",placeholder:m("Enter Text"),value:a,onChange:function(e){return n({text:e})},formattingControls:["bold","italic","strikethrough"],className:"wp-ugb-button ugb-button-"+u,style:{backgroundColor:c,color:i,borderRadius:p+"px"},isSelected:t,keepPlaceholderOnFocus:!0}),t&&wp.element.createElement(v,{key:"inspector"},wp.element.createElement(w,{label:m("Size"),value:u,options:d.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){n({size:e})}}),wp.element.createElement(f,{label:m("Corner Radius"),value:p,min:"1",max:"50",onChange:function(e){return n({cornerButtonRadius:e})}}),wp.element.createElement(b,{title:m("Background Color"),colorValue:c,initialOpen:!1},wp.element.createElement(x,{value:c,onChange:function(e){return n({color:e})}})),wp.element.createElement(b,{title:m("Text Color"),colorValue:i,initialOpen:!1},wp.element.createElement(x,{value:i,onChange:function(e){return n({textColor:e})}})))),t&&wp.element.createElement("form",{key:"form-link",onSubmit:function(e){return e.preventDefault()},className:"blocks-button__inline-link ugb-button-"+s},wp.element.createElement(g,{icon:"admin-links"}),wp.element.createElement(k,{value:o,onChange:function(e){return n({url:e})}}),wp.element.createElement(h,{icon:"editor-break",label:m("Apply"),type:"submit"}))]}}]),t}(s);p("ugb/button",{title:m("Button","UGB"),icon:i.a,category:"layout",keywords:[m("Button"),m("Stackable")],attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"array",source:"children",selector:"a"},textAlignment:{type:"string",default:"center"},color:{type:"string",default:"#2091e1"},textColor:{type:"string",default:"#ffffff"},size:{type:"string",default:"normal"},cornerButtonRadius:{type:"number",default:4}},edit:N,save:function(e){var t=e.attributes,n=t.url,l=(t.title,t.text),o=t.textAlignment,r=t.color,a=t.textColor,c=t.size,i=t.cornerButtonRadius,u={backgroundColor:r,color:a,borderRadius:i+"px"};return wp.element.createElement("div",{className:"ugb-button-"+o},wp.element.createElement("a",{href:n,className:"wp-ugb-button ugb-button-"+c,style:u},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function r(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(13),c=(n.n(a),n(14)),i=(n.n(c),n(0)),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}return function(t,n,l){return n&&e(t.prototype,n),l&&e(t,l),t}}(),m=wp.i18n.__,s=wp.element.Component,p=wp.blocks,d=p.registerBlockType,b=p.InspectorControls,g=p.BlockControls,h=p.RichText,w=p.AlignmentToolbar,f=p.ColorPalette,y=p.UrlInput,v=wp.components,C=v.PanelColor,E=v.IconButton,T=v.Dashicon,x=v.SelectControl,k=v.RangeControl,N=function(e){function t(){return l(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.isSelected,n=e.setAttributes,l=this.props.attributes,o=l.url,r=l.title,a=l.text,c=l.color,i=l.size,u=l.textAlignment,s=l.cornerButtonRadius,p=l.borderThickness,d=[{value:"small",label:m("Small")},{value:"normal",label:m("Normal ")},{value:"medium",label:m("Medium")},{value:"large",label:m("Large")}];return[t&&wp.element.createElement(g,{key:"controls"},wp.element.createElement(w,{value:u,onChange:function(e){n({textAlignment:e})}})),wp.element.createElement("span",{key:"button",title:r,className:"wp-block-button ugb-button-"+u},wp.element.createElement(h,{tagName:"span",placeholder:m("Enter Text"),value:a,onChange:function(e){return n({text:e})},formattingControls:["bold","italic","strikethrough"],className:"wp-ugb-button ugb-button-"+i+" ugb-ghost-button",style:{borderColor:c,color:c,borderRadius:s+"px",borderWidth:p+"px"},isSelected:t,keepPlaceholderOnFocus:!0}),t&&wp.element.createElement(b,{key:"inspector"},wp.element.createElement(x,{label:m("Size"),value:i,options:d.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){n({size:e})}}),wp.element.createElement(k,{label:m("Corner Radius"),value:s,min:"1",max:"50",onChange:function(e){return n({cornerButtonRadius:e})}}),wp.element.createElement(k,{label:m("Border Thickness"),value:p,min:"1",max:"10",onChange:function(e){return n({borderThickness:e})}}),wp.element.createElement(C,{title:m("Button Color"),colorValue:c,initialOpen:!1},wp.element.createElement(f,{value:c,onChange:function(e){return n({color:e})}})))),t&&wp.element.createElement("form",{key:"form-link",onSubmit:function(e){return e.preventDefault()},className:"blocks-button__inline-link ugb-button-"+u},wp.element.createElement(T,{icon:"admin-links"}),wp.element.createElement(y,{value:o,onChange:function(e){return n({url:e})}}),wp.element.createElement(E,{icon:"editor-break",label:m("Apply"),type:"submit"}))]}}]),t}(s);d("ugb/ghost-button",{title:m("Ghost Button"),icon:i.e,category:"layout",keywords:[m("Ghost Button"),m("Stackable")],attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"array",source:"children",selector:"a"},textAlignment:{type:"string",default:"center"},color:{type:"string"},textColor:{type:"string"},size:{type:"string",default:"normal"},cornerButtonRadius:{type:"number",default:"4"},borderThickness:{type:"number",default:"1"}},edit:N,save:function(e){var t=e.attributes,n=t.url,l=(t.title,t.text),o=t.textAlignment,r=t.color,a=t.size,c=t.cornerButtonRadius,i=t.borderThickness,u={borderColor:r,color:r,borderRadius:c+"px",borderWidth:i+"px"};return wp.element.createElement("div",{className:"ugb-button-"+o},wp.element.createElement("a",{href:n,className:"wp-ugb-button ugb-button-"+a+" ugb-ghost-button",style:u},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(16),o=(n.n(l),n(17)),r=(n.n(o),n(18)),a=n.n(r),c=n(0),i=wp.i18n.__,u=(wp.element.Component,wp.components.PanelColor),m=wp.components.withState,s=wp.blocks,p=s.registerBlockType,d=s.InspectorControls,b=s.RichText,g=s.ColorPalette,h=s.BlockControls,w=wp.blocks.InspectorControls,f=w.SelectControl,y=w.ToggleControl;p("ugb/notification",{title:i("Notification","UGB"),icon:c.f,category:"layout",keywords:[i("Notification"),i("Stackable")],attributes:{text:{type:"array",source:"children",selector:"p",default:i("This is an informational alert, usually used for successful subscriptions, promo announcements, and the like.")},color:{type:"string"},textColor:{type:"string"},notifType:{type:"string",default:"success"},dismissible:{type:"boolean",default:!1}},edit:m({editable:"content"})(function(e){var t=[{value:"success",label:i("Success")},{value:"error",label:i("Error")},{value:"warning",label:i("Warning")},{value:"info",label:i("Information")}],n=e.isSelected,l=e.editable,o=e.setState,r=e.setAttributes,a=(e.className,e.attributes),c=a.text,m=a.color,s=a.textColor,p=a.notifType,w=a.dismissible;return[n&&wp.element.createElement(h,{key:"controls"}),wp.element.createElement("div",{key:"editable",className:"ugb-notification type-"+p+" dismissible-"+w},w&&wp.element.createElement("span",{key:"button",className:"close-button"},wp.element.createElement("svg",{viewBox:"0 0 28.3 28.3",style:{fill:s}},wp.element.createElement("path",{d:"M52.4-166.2c3.2,0,3.2-5,0-5C49.2-171.2,49.2-166.2,52.4-166.2L52.4-166.2z"}),wp.element.createElement("path",{d:"M16.8,13.9L26.9,3.8c0.6-0.6,0.6-1.5,0-2.1s-1.5-0.6-2.1,0L14.7,11.8L4.6,1.7C4,1.1,3.1,1.1,2.5,1.7s-0.6,1.5,0,2.1l10.1,10.1L2.5,24c-0.6,0.6-0.6,1.5,0,2.1c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4L14.7,16l10.1,10.1c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4c0.6-0.6,0.6-1.5,0-2.1L16.8,13.9z"}))),wp.element.createElement(b,{tagName:"p",placeholder:e.attributes.text.default,value:c,isSelected:n&&"content"===l,onFocus:function(e){return function(){o({editable:e})}}("content"),onChange:function(e){return r({text:e})},className:"wp-ugb-notif notif-"+p,style:{backgroundColor:m,color:s}}),n&&wp.element.createElement(d,{key:"inspector"},wp.element.createElement(y,{label:i("Dismissible"),checked:w,onChange:function(){return r({dismissible:!w})}}),wp.element.createElement(f,{label:i("Notification Type"),value:p,options:t.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){r({notifType:e})}}),wp.element.createElement(u,{title:i("Background Color"),colorValue:m,initialOpen:!1},wp.element.createElement(g,{value:m,onChange:function(e){return r({color:e})}})),wp.element.createElement(u,{title:i("Text Color"),colorValue:s,initialOpen:!1},wp.element.createElement(g,{value:s,onChange:function(e){return r({textColor:e})}}))))]}),save:function(e){var t=e.attributes,n=t.text,l=t.color,o=t.textColor,r=t.notifType,c=t.dismissible,i={backgroundColor:l,color:o},u=a()(n+r).substr(0,6);return wp.element.createElement("div",{className:"ugb-notification type-"+r+" dismissible-"+c,"data-uid":u},c&&wp.element.createElement("span",{key:"button",className:"close-button"},wp.element.createElement("svg",{viewBox:"0 0 28.3 28.3",style:{fill:o}},wp.element.createElement("path",{d:"M52.4-166.2c3.2,0,3.2-5,0-5C49.2-171.2,49.2-166.2,52.4-166.2L52.4-166.2z"}),wp.element.createElement("path",{d:"M16.8,13.9L26.9,3.8c0.6-0.6,0.6-1.5,0-2.1s-1.5-0.6-2.1,0L14.7,11.8L4.6,1.7C4,1.1,3.1,1.1,2.5,1.7s-0.6,1.5,0,2.1l10.1,10.1L2.5,24c-0.6,0.6-0.6,1.5,0,2.1c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4L14.7,16l10.1,10.1c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4c0.6-0.6,0.6-1.5,0-2.1L16.8,13.9z"}))),wp.element.createElement("p",{className:"wp-ugb-notif notif-"+r,style:i},n))}})},function(e,t){},function(e,t){},function(e,t,n){!function(){var t=n(19),l=n(1).utf8,o=n(20),r=n(1).bin,a=function(e,n){e.constructor==String?e=n&&"binary"===n.encoding?r.stringToBytes(e):l.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var c=t.bytesToWords(e),i=8*e.length,u=1732584193,m=-271733879,s=-1732584194,p=271733878,d=0;d<c.length;d++)c[d]=16711935&(c[d]<<8|c[d]>>>24)|4278255360&(c[d]<<24|c[d]>>>8);c[i>>>5]|=128<<i%32,c[14+(i+64>>>9<<4)]=i;for(var b=a._ff,g=a._gg,h=a._hh,w=a._ii,d=0;d<c.length;d+=16){var f=u,y=m,v=s,C=p;u=b(u,m,s,p,c[d+0],7,-680876936),p=b(p,u,m,s,c[d+1],12,-389564586),s=b(s,p,u,m,c[d+2],17,606105819),m=b(m,s,p,u,c[d+3],22,-1044525330),u=b(u,m,s,p,c[d+4],7,-176418897),p=b(p,u,m,s,c[d+5],12,1200080426),s=b(s,p,u,m,c[d+6],17,-1473231341),m=b(m,s,p,u,c[d+7],22,-45705983),u=b(u,m,s,p,c[d+8],7,1770035416),p=b(p,u,m,s,c[d+9],12,-1958414417),s=b(s,p,u,m,c[d+10],17,-42063),m=b(m,s,p,u,c[d+11],22,-1990404162),u=b(u,m,s,p,c[d+12],7,1804603682),p=b(p,u,m,s,c[d+13],12,-40341101),s=b(s,p,u,m,c[d+14],17,-1502002290),m=b(m,s,p,u,c[d+15],22,1236535329),u=g(u,m,s,p,c[d+1],5,-165796510),p=g(p,u,m,s,c[d+6],9,-1069501632),s=g(s,p,u,m,c[d+11],14,643717713),m=g(m,s,p,u,c[d+0],20,-373897302),u=g(u,m,s,p,c[d+5],5,-701558691),p=g(p,u,m,s,c[d+10],9,38016083),s=g(s,p,u,m,c[d+15],14,-660478335),m=g(m,s,p,u,c[d+4],20,-405537848),u=g(u,m,s,p,c[d+9],5,568446438),p=g(p,u,m,s,c[d+14],9,-1019803690),s=g(s,p,u,m,c[d+3],14,-187363961),m=g(m,s,p,u,c[d+8],20,1163531501),u=g(u,m,s,p,c[d+13],5,-1444681467),p=g(p,u,m,s,c[d+2],9,-51403784),s=g(s,p,u,m,c[d+7],14,1735328473),m=g(m,s,p,u,c[d+12],20,-1926607734),u=h(u,m,s,p,c[d+5],4,-378558),p=h(p,u,m,s,c[d+8],11,-2022574463),s=h(s,p,u,m,c[d+11],16,1839030562),m=h(m,s,p,u,c[d+14],23,-35309556),u=h(u,m,s,p,c[d+1],4,-1530992060),p=h(p,u,m,s,c[d+4],11,1272893353),s=h(s,p,u,m,c[d+7],16,-155497632),m=h(m,s,p,u,c[d+10],23,-1094730640),u=h(u,m,s,p,c[d+13],4,681279174),p=h(p,u,m,s,c[d+0],11,-358537222),s=h(s,p,u,m,c[d+3],16,-722521979),m=h(m,s,p,u,c[d+6],23,76029189),u=h(u,m,s,p,c[d+9],4,-640364487),p=h(p,u,m,s,c[d+12],11,-421815835),s=h(s,p,u,m,c[d+15],16,530742520),m=h(m,s,p,u,c[d+2],23,-995338651),u=w(u,m,s,p,c[d+0],6,-198630844),p=w(p,u,m,s,c[d+7],10,1126891415),s=w(s,p,u,m,c[d+14],15,-1416354905),m=w(m,s,p,u,c[d+5],21,-57434055),u=w(u,m,s,p,c[d+12],6,1700485571),p=w(p,u,m,s,c[d+3],10,-1894986606),s=w(s,p,u,m,c[d+10],15,-1051523),m=w(m,s,p,u,c[d+1],21,-2054922799),u=w(u,m,s,p,c[d+8],6,1873313359),p=w(p,u,m,s,c[d+15],10,-30611744),s=w(s,p,u,m,c[d+6],15,-1560198380),m=w(m,s,p,u,c[d+13],21,1309151649),u=w(u,m,s,p,c[d+4],6,-145523070),p=w(p,u,m,s,c[d+11],10,-1120210379),s=w(s,p,u,m,c[d+2],15,718787259),m=w(m,s,p,u,c[d+9],21,-343485551),u=u+f>>>0,m=m+y>>>0,s=s+v>>>0,p=p+C>>>0}return t.endian([u,m,s,p])};a._ff=function(e,t,n,l,o,r,a){var c=e+(t&n|~t&l)+(o>>>0)+a;return(c<<r|c>>>32-r)+t},a._gg=function(e,t,n,l,o,r,a){var c=e+(t&l|n&~l)+(o>>>0)+a;return(c<<r|c>>>32-r)+t},a._hh=function(e,t,n,l,o,r,a){var c=e+(t^n^l)+(o>>>0)+a;return(c<<r|c>>>32-r)+t},a._ii=function(e,t,n,l,o,r,a){var c=e+(n^(t|~l))+(o>>>0)+a;return(c<<r|c>>>32-r)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,n){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var l=t.wordsToBytes(a(e,n));return n&&n.asBytes?l:n&&n.asString?r.bytesToString(l):t.bytesToHex(l)}}()},function(e,t){!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,l=0;n<e.length;n++,l+=8)t[l>>>5]|=e[n]<<24-l%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],l=0;l<e.length;l+=3)for(var o=e[l]<<16|e[l+1]<<8|e[l+2],r=0;r<4;r++)8*l+6*r<=8*e.length?n.push(t.charAt(o>>>6*(3-r)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],l=0,o=0;l<e.length;o=++l%4)0!=o&&n.push((t.indexOf(e.charAt(l-1))&Math.pow(2,-2*o+8)-1)<<2*o|t.indexOf(e.charAt(l))>>>6-2*o);return n}};e.exports=n}()},function(e,t){function n(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function l(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&n(e.slice(0,0))}e.exports=function(e){return null!=e&&(n(e)||l(e)||!!e._isBuffer)}},function(e,t,n){"use strict";var l=n(22),o=(n.n(l),n(23)),r=(n.n(o),n(0)),a=wp.i18n.__,c=(wp.element.Component,wp.components),i=c.PanelColor,u=c.withState,m=wp.blocks,s=m.registerBlockType,p=m.InspectorControls,d=m.RichText,b=m.ColorPalette;s("ugb/blockquote",{title:a("Blockquote","UGB"),icon:r.h,category:"common",keywords:[a("Blockquote"),a("Stackable")],attributes:{text:{type:"array",source:"children",selector:"p",default:a("It's okay to acknowledge that life can get complicated, but we musn't forget the beauty in its simplicity, too. From the multitude of stars above, to freshly mowed grass in the morning, life is simply wonderful.")},color:{type:"string",default:"#424242"},borderColor:{type:"string",default:"#2091e1"}},edit:u({editable:"content"})(function(e){var t=e.isSelected,n=e.setAttributes,l=(e.className,e.attributes),o=l.color,r=l.text,c=l.borderColor;return[wp.element.createElement("blockquote",{key:"quote",className:"ugb-blockquote",style:{borderLeftColor:c}},wp.element.createElement(d,{tagName:"p",className:"ugb-blockquote-text",value:r,onChange:function(e){return n({text:e})},isSelected:t,style:{color:o}})),t&&wp.element.createElement(p,{key:"inspector"},wp.element.createElement(i,{title:a("Text Color"),colorValue:o,initialOpen:!1},wp.element.createElement(b,{value:o,onChange:function(e){return n({color:e})}})),wp.element.createElement(i,{title:a("Border Color"),colorValue:c,initialOpen:!1},wp.element.createElement(b,{value:c,onChange:function(e){return n({borderColor:e})}})))]}),save:function(e){var t=e.attributes,n=t.color,l=t.text,o=t.borderColor;return wp.element.createElement("blockquote",{className:"ugb-blockquote",style:{borderLeftColor:o}},wp.element.createElement("p",{style:{color:n}},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(25),o=(n.n(l),n(26)),r=(n.n(o),n(0)),a=wp.i18n.__,c=(wp.element.Component,wp.components),i=c.PanelColor,u=c.withState,m=wp.blocks,s=m.registerBlockType,p=m.InspectorControls,d=m.RichText,b=m.ColorPalette;s("ugb/pullquote",{title:a("Pullquote","UGB"),icon:r.h,category:"formatting",keywords:[a("Pullquote"),a("Stackable")],attributes:{text:{type:"array",source:"children",selector:"p",default:a("It's okay to acknowledge that life can get complicated, but we musn't forget the beauty in its simplicity, too. From the multitude of stars above, to freshly mowed grass in the morning, life is simply wonderful.")},color:{type:"string",default:"#2091e1"},borderColor:{type:"string",default:"#2091e1"}},edit:u({editable:"content"})(function(e){var t=e.isSelected,n=e.setAttributes,l=(e.className,e.attributes),o=l.color,r=l.text,c=l.borderColor;return[wp.element.createElement("blockquote",{key:"quote",className:"ugb-pullquote",style:{borderTopColor:c,borderBottomColor:c}},wp.element.createElement(d,{tagName:"p",className:"ugb-pullquote-text",value:r,onChange:function(e){return n({text:e})},placeholder:a("Write quote\u2026"),formattingControls:["bold","italic","strikethrough","link"],isSelected:t,keepPlaceholderOnFocus:!0,style:{color:o}})),t&&wp.element.createElement(p,{key:"inspector"},wp.element.createElement(i,{title:a("Text Color"),colorValue:o,initialOpen:!1},wp.element.createElement(b,{value:o,onChange:function(e){return n({color:e})}})),wp.element.createElement(i,{title:a("Border Color"),colorValue:c,initialOpen:!1},wp.element.createElement(b,{value:c,onChange:function(e){return n({borderColor:e})}})))]}),save:function(e){var t=e.attributes,n=t.color,l=t.text,o=t.borderColor;return wp.element.createElement("blockquote",{className:"ugb-pullquote",style:{borderTopColor:o,borderBottomColor:o}},wp.element.createElement("p",{style:{color:n}},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(28),o=(n.n(l),n(29)),r=(n.n(o),n(0)),a=wp.i18n.__,c=(wp.element.Component,wp.components),i=c.PanelColor,u=c.Dashicon,m=c.IconButton,s=c.withState,p=c.SelectControl,d=c.RangeControl,b=wp.blocks,g=b.registerBlockType,h=b.InspectorControls,w=(b.BlockControls,b.AlignmentToolbar,b.RichText),f=b.ColorPalette,y=b.UrlInput;g("ugb/cta",{title:a("Call to Action","UGB"),icon:r.b,category:"layout",keywords:[a("Call to Action"),a("Stackable"),a("CTA")],attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},ctaTitle:{type:"array",source:"children",selector:"h3",default:a("Get Started Today")},bodyText:{type:"array",source:"children",selector:"p",default:a("Get Stackable: Ultimate Gutenberg Blocks today.\xa0 Apart from adding new blocks, it gives Gutenberg users more options and settings to tinker with, expanding Gutenberg\u2019s functionality.")},buttonText:{type:"array",source:"children",selector:"a"},color:{type:"string",default:"#2091e1"},textColor:{type:"string",default:"#ffffff"},titleColor:{type:"string"},bodyTextColor:{type:"string"},bgColor:{type:"string"},size:{type:"string",default:"normal"},borderButtonRadius:{type:"number",default:4}},edit:s({editable:"content"})(function(e){var t=e.isSelected,n=e.editable,l=e.setState,o=(e.className,e.setAttributes),r=e.attributes,c=r.url,s=r.buttonText,b=(r.title,r.ctaTitle),g=r.bodyText,v=r.color,C=r.textColor,E=r.size,T=r.borderButtonRadius,x=r.bodyTextColor,k=r.titleColor,N=r.bgColor,S=[{value:"small",label:a("Small")},{value:"normal",label:a("Normal")},{value:"medium",label:a("Medium")},{value:"large",label:a("Large")}],B=function(e){return function(){l({editable:e})}};return[wp.element.createElement("div",{key:"editable",className:"ugb-cta",style:{backgroundColor:N}},wp.element.createElement(w,{className:"ugb-cta-title",tagName:"h3",placeholder:a("Add Title"),value:b,onChange:function(e){return o({ctaTitle:e})},isSelected:t&&"ctaTitle"===n,onFocus:B("ctaTitle"),keepPlaceholderOnFocus:!0,style:{color:k}}),wp.element.createElement(w,{tagName:"p",value:g,className:"ugb-cta-bodyText",onChange:function(e){return o({bodyText:e})},isSelected:t&&"bodyText"===n,onFocus:B("bodyText"),placeholder:a("Write body text\u2026"),style:{color:x}}),wp.element.createElement("span",{key:"button",className:"wp-block-button ugb-cta-button"},wp.element.createElement(w,{tagName:"span",placeholder:a("Add Text"),value:s,onChange:function(e){return o({buttonText:e})},isSelected:t&&"buttonText"===n,onFocus:B("buttonText"),className:"wp-ugb-button ugb-button-"+E,style:{backgroundColor:v,color:C,borderRadius:T+"px"},keepPlaceholderOnFocus:!0}),t&&wp.element.createElement(h,{key:"inspector"},wp.element.createElement(p,{label:a("Button Size"),value:E,options:S.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){o({size:e})}}),wp.element.createElement(d,{label:a("Button Border Radius"),value:T,min:"1",max:"50",onChange:function(e){return o({borderButtonRadius:e})}}),wp.element.createElement(i,{title:a("Title Color"),colorValue:k,initialOpen:!1},wp.element.createElement(f,{value:v,onChange:function(e){return o({titleColor:e})}})),wp.element.createElement(i,{title:a("Body Text Color"),colorValue:x,initialOpen:!1},wp.element.createElement(f,{value:v,onChange:function(e){return o({bodyTextColor:e})}})),wp.element.createElement(i,{title:a("Button Background Color"),colorValue:v,initialOpen:!1},wp.element.createElement(f,{value:v,onChange:function(e){return o({color:e})}})),wp.element.createElement(i,{title:a("Button Text Color"),colorValue:C,initialOpen:!1},wp.element.createElement(f,{value:C,onChange:function(e){return o({textColor:e})}})),wp.element.createElement(i,{title:a("Background Color"),colorValue:N,initialOpen:!1},wp.element.createElement(f,{value:N,onChange:function(e){return o({bgColor:e})}})))),t&&wp.element.createElement("form",{key:"form-link",onSubmit:function(e){return e.preventDefault()},className:"blocks-button__inline-link"},wp.element.createElement(u,{icon:"admin-links"}),wp.element.createElement(y,{value:c,onChange:function(e){return o({url:e})}}),wp.element.createElement(m,{icon:"editor-break",label:a("Apply"),type:"submit"})))]}),save:function(e){var t=e.attributes,n=t.url,l=(t.title,t.buttonText),o=t.ctaTitle,r=t.bodyText,a=t.color,c=t.textColor,i=t.size,u=t.borderButtonRadius,m=t.bodyTextColor,s=t.titleColor,p=t.bgColor,d={backgroundColor:a,color:c,borderRadius:u+"px"};return wp.element.createElement("div",{className:"ugb-cta",style:{backgroundColor:p}},o&&!!o.length&&wp.element.createElement("h3",{className:"ugb-cta-title",style:{color:s}},o),r&&!!r.length&&wp.element.createElement("p",{className:"ugb-cta-bodyText",style:{color:m}},r),l&&!!l.length&&wp.element.createElement("a",{href:n,className:"wp-ugb-button ugb-cta-button ugb-button-"+i,style:d},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(31),o=(n.n(l),n(32)),r=(n.n(o),n(0)),a=wp.i18n.__,c=(wp.element.Component,wp.blocks.registerBlockType),i=wp.components,u=i.PanelColor,m=i.Button,s=i.withState,p=wp.blocks,d=p.InspectorControls,b=p.RichText,g=p.ColorPalette,h=p.MediaUpload,w=p.BlockControls,f=(p.AlignmentToolbar,wp.blocks.InspectorControls.SelectControl);c("ugb/testimonial",{title:a("Testimonial","Stackable"),icon:r.k,category:"common",keywords:[a("Testimonial"),a("Stackable")],attributes:{title:{type:"string",source:"attribute",selector:"a",attribute:"title"},url:{type:"string",source:"attribute",selector:"a",attribute:"href"},href:{type:"url"},hrefTwo:{type:"url"},hrefThree:{type:"url"},mediaID:{type:"number"},mediaIDTwo:{type:"number"},mediaIDThree:{type:"number"},mediaURL:{type:"string",source:"attribute",selector:".ugb-testimonial-column-one .testimonial-image",attribute:"data-src"},mediaURLTwo:{type:"string",source:"attribute",selector:".ugb-testimonial-column-two .testimonial-image",attribute:"data-src"},mediaURLThree:{type:"string",source:"attribute",selector:".ugb-testimonial-column-three .testimonial-image",attribute:"data-src"},testimonialTitle:{type:"array",source:"children",selector:".ugb-testimonial-column-one h4",default:a("Ben Adams")},testimonialTitleTwo:{type:"array",source:"children",selector:".ugb-testimonial-column-two h4",default:a("Alex Johnson")},testimonialTitleThree:{type:"array",source:"children",selector:".ugb-testimonial-column-three h4",default:a("Sammy Simpson")},position:{type:"array",source:"children",selector:".ugb-testimonial-position",default:a("Founder")},positionTwo:{type:"array",source:"children",selector:".ugb-testimonial-position-two",default:a("Editor")},positionThree:{type:"array",source:"children",selector:".ugb-testimonial-position-three",default:a("Programmer")},body:{type:"array",source:"children",selector:".ugb-testimonial-body",default:a("Stackable: Ultimate Blocks from Gutenberg has all the blocks I need to make a great webpage.")},bodyTwo:{type:"array",source:"children",selector:".ugb-testimonial-body-two",default:a("Stackable: Ultimate Blocks from Gutenberg has all the blocks I need to make a great webpage.")},bodyThree:{type:"array",source:"children",selector:".ugb-testimonial-body-three",default:a("Stackable: Ultimate Blocks from Gutenberg has all the blocks I need to make a great webpage.")},titleColor:{type:"string"},posColor:{type:"string"},bodyTextColor:{type:"string"},iconColor:{type:"string"},columns:{type:"select",default:"1"}},edit:s({editable:"content"})(function(e){var t=e.isSelected,n=e.editable,l=e.setState,o=(e.className,e.setAttributes),r=e.attributes,c=(r.url,r.title,r.testimonialTitle),i=r.testimonialTitleTwo,s=r.testimonialTitleThree,p=r.body,y=r.bodyTwo,v=r.bodyThree,C=r.position,E=r.positionTwo,T=r.positionThree,x=(r.href,r.hrefTwo,r.hrefThree,r.mediaID),k=r.mediaIDTwo,N=r.mediaIDThree,S=r.mediaURL,B=r.mediaURLTwo,O=r.mediaURLThree,A=r.columns,I=r.titleColor,F=r.posColor,P=r.bodyTextColor,L=r.iconColor,R=[{value:"1",label:a("One Column")},{value:"2",label:a("Two Column")},{value:"3",label:a("Three Column")}],_=function(e){return function(){l({editable:e})}};return[wp.element.createElement(w,null),t&&wp.element.createElement(d,{key:"inspector"},wp.element.createElement(f,{label:a("Column Number"),value:A,options:R.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){o({columns:e})}}),wp.element.createElement(u,{title:a("Title Color"),colorValue:I,initialOpen:!1},wp.element.createElement(g,{value:I,onChange:function(e){return o({titleColor:e})}})),wp.element.createElement(u,{title:a("Position Color"),colorValue:F,initialOpen:!1},wp.element.createElement(g,{value:F,onChange:function(e){return o({posColor:e})}})),wp.element.createElement(u,{title:a("Body Text Color"),colorValue:P,initialOpen:!1},wp.element.createElement(g,{value:P,onChange:function(e){return o({bodyTextColor:e})}})),wp.element.createElement(u,{title:a("Icon Color"),colorValue:L,initialOpen:!1},wp.element.createElement(g,{value:L,onChange:function(e){return o({iconColor:e})}}))),wp.element.createElement("div",{key:"editable",className:"ugb-testimonial column-"+A},wp.element.createElement("div",{className:"ugb-testimonial-column-one"},wp.element.createElement("div",null,wp.element.createElement(h,{onSelect:function(e){return o({mediaURL:e.url,mediaID:e.id})},type:"image",value:x,render:function(e){return wp.element.createElement(m,{className:x?"":"button button-large",onClick:e.open},x?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+S+")"}}):a("Upload Image"))}})),wp.element.createElement(b,{tagName:"h4",placeholder:a("Add title\u2026"),value:c,onChange:function(e){return o({testimonialTitle:e})},isSelected:t&&"testimonialTitle"===n,onFocus:_("testimonialTitle"),style:{color:I},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:C,className:"ugb-testimonial-position",onChange:function(e){return o({position:e})},isSelected:t&&"position"===n,onFocus:_("position"),placeholder:a("Add position\u2026"),style:{color:F},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:p,className:"ugb-testimonial-body",onChange:function(e){return o({body:e})},isSelected:t&&"body"===n,onFocus:_("body"),placeholder:a("Add body\u2026"),style:{color:P},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-testimonial-column-two"},wp.element.createElement("div",null,wp.element.createElement(h,{onSelect:function(e){return o({mediaURLTwo:e.url,mediaIDTwo:e.id})},type:"image",value:k,render:function(e){return wp.element.createElement(m,{className:k?"":"button button-large",onClick:e.open},k?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+B+")"}}):a("Upload Image"))}})),wp.element.createElement(b,{tagName:"h4",placeholder:a("Add title\u2026"),value:i,onChange:function(e){return o({testimonialTitleTwo:e})},isSelected:t&&"testimonialTitleTwo"===n,onFocus:_("testimonialTitleTwo"),style:{color:I},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:E,className:"ugb-testimonial-position-two",onChange:function(e){return o({positionTwo:e})},isSelected:t&&"positionTwo"===n,onFocus:_("positionTwo"),placeholder:a("Add position\u2026"),style:{color:F},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:y,className:"ugb-testimonial-body-two",onChange:function(e){return o({bodyTwo:e})},isSelected:t&&"bodyTwo"===n,onFocus:_("bodyTwo"),placeholder:a("Add body\u2026"),style:{color:P},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-testimonial-column-three"},wp.element.createElement("div",null,wp.element.createElement(h,{onSelect:function(e){return o({mediaURLThree:e.url,mediaIDThree:e.id})},type:"image",value:N,render:function(e){return wp.element.createElement(m,{className:N?"":"button button-large",onClick:e.open},N?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+O+")"}}):a("Upload Image"))}})),wp.element.createElement(b,{tagName:"h4",placeholder:a("Add title\u2026"),value:s,onChange:function(e){return o({testimonialTitleThree:e})},isSelected:t&&"testimonialTitleThree"===n,onFocus:_("testimonialTitleThree"),style:{color:I},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:T,className:"ugb-testimonial-position-three",onChange:function(e){return o({positionThree:e})},isSelected:t&&"positionThree"===n,onFocus:_("positionThree"),placeholder:a("Add position\u2026"),style:{color:F},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:v,className:"ugb-testimonial-body-three",onChange:function(e){return o({bodyThree:e})},isSelected:t&&"bodyThree"===n,onFocus:_("bodyThree"),placeholder:a("Add body\u2026"),style:{color:P},keepPlaceholderOnFocus:!0})))]}),save:function(e){var t=e.attributes,n=(t.url,t.title,t.testimonialTitle),l=t.testimonialTitleTwo,o=t.testimonialTitleThree,r=t.body,a=t.bodyTwo,c=t.bodyThree,i=t.position,u=t.positionTwo,m=t.positionThree,s=t.mediaURL,p=t.mediaURLTwo,d=t.mediaURLThree,b=(t.mediaID,t.mediaIDTwo,t.mediaIDThree,t.titleColor),g=t.posColor,h=t.bodyTextColor,w=t.iconColor,f=t.columns,y=wp.element.createElement("div",{key:"button",className:"quote-icon"},wp.element.createElement("svg",{viewBox:"0 0 246 187.5",style:{fill:w}},wp.element.createElement("path",{d:"M98.5,0h-93C2.5,0,0,2.5,0,5.5v93c0,3,2.5,5.5,5.5,5.5h39c-1.7,15.5-8.8,50-39,50c-3,0-5.5,2.5-5.5,5.5V182c0,3,2.5,5.5,5.5,5.5c5.2,0,98.5-4.5,98.5-89v-93C104,2.5,101.5,0,98.5,0z"}),wp.element.createElement("path",{d:"M240.5,0h-93c-3,0-5.5,2.5-5.5,5.5v93c0,3,2.5,5.5,5.5,5.5h39c-1.7,15.5-8.8,50-39,50c-3,0-5.5,2.5-5.5,5.5V182c0,3,2.5,5.5,5.5,5.5c5.2,0,98.5-4.5,98.5-89v-93C246,2.5,243.5,0,240.5,0z"}),wp.element.createElement("path",{d:"M161.3-86.3c3.2,0,3.2-5,0-5C158.1-91.3,158.1-86.3,161.3-86.3L161.3-86.3z"})));return wp.element.createElement("div",{className:"ugb-testimonial column-"+f},wp.element.createElement("div",{className:"ugb-testimonial-column-one"},s?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+s+")"},"data-src":s}):y,n&&!!n.length&&wp.element.createElement("h4",{style:{color:b}},n),i&&!!i.length&&wp.element.createElement("p",{className:"ugb-testimonial-position",style:{color:g}},i),r&&!!r.length&&wp.element.createElement("p",{className:"ugb-testimonial-body",style:{color:h}},r)),f>1&&wp.element.createElement("div",{className:"ugb-testimonial-column-two"},p?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+p+")"},"data-src":p}):y,l&&!!l.length&&wp.element.createElement("h4",{style:{color:b}},l),u&&!!u.length&&wp.element.createElement("p",{className:"ugb-testimonial-position-two",style:{color:g}},u),a&&!!a.length&&wp.element.createElement("p",{className:"ugb-testimonial-body-two",style:{color:h}},a)),f>2&&wp.element.createElement("div",{className:"ugb-testimonial-column-three"},d?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+d+")"},"data-src":d}):y,o&&!!o.length&&wp.element.createElement("h4",{style:{color:b}},o),m&&!!m.length&&wp.element.createElement("p",{className:"ugb-testimonial-position-three",style:{color:g}},m),c&&!!c.length&&wp.element.createElement("p",{className:"ugb-testimonial-body-three",style:{color:h}},c)))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(34),o=(n.n(l),n(35)),r=(n.n(o),n(0)),a=wp.i18n.__,c=(wp.element.Component,wp.components),i=c.PanelColor,u=c.Button,m=c.SelectControl,s=(c.TextControl,c.withState),p=wp.blocks,d=p.registerBlockType,b=p.InspectorControls,g=p.RichText,h=p.ColorPalette,w=p.MediaUpload,f=p.BlockControls;p.AlignmentToolbar;d("ugb/team-member",{title:a("Team Member","Stackable"),icon:r.j,category:"common",keywords:[a("Team Member"),a("Stackable")],attributes:{title:{type:"string",source:"attribute",selector:"a",attribute:"title"},url:{type:"string",source:"attribute",selector:"a",attribute:"href"},href:{type:"url"},hrefTwo:{type:"url"},hrefThree:{type:"url"},mediaID:{type:"number"},mediaIDTwo:{type:"number"},mediaIDThree:{type:"number"},mediaURL:{type:"string",source:"attribute",selector:".ugb-team-member-column-one .team-member-image",attribute:"data-src"},mediaURLTwo:{type:"string",source:"attribute",selector:".ugb-team-member-column-two .team-member-image",attribute:"data-src"},mediaURLThree:{type:"string",source:"attribute",selector:".ugb-team-member-column-three .team-member-image",attribute:"data-src"},name:{type:"array",source:"children",selector:".ugb-team-member-column-one h4",default:a("Ben Adams")},nameTwo:{type:"array",source:"children",selector:".ugb-team-member-column-two h4",default:a("Alex Johnson")},nameThree:{type:"array",source:"children",selector:".ugb-team-member-column-three h4",default:a("Sammy Simpson")},position:{type:"array",source:"children",selector:".ugb-team-member-column-one .ugb-team-member-position",default:a("Founder")},positionTwo:{type:"array",source:"children",selector:".ugb-team-member-column-two .ugb-team-member-position",default:a("Editor")},positionThree:{type:"array",source:"children",selector:".ugb-team-member-column-three .ugb-team-member-position",default:a("Programmer")},des:{type:"array",source:"children",selector:".ugb-team-member-des",default:a("Ben is the head of our small team. He loves walking his dog, Walter, when he has some free time.")},desTwo:{type:"array",source:"children",selector:".ugb-team-member-des-two",default:a("Alex handles all written content. She enjoys painting and playing softball on the weekends.")},desThree:{type:"array",source:"children",selector:".ugb-team-member-des-three",default:a("Sammy is our programmer. You'll usually find her nose in a book. She has a cat named Skitty.")},nameColor:{type:"string"},posColor:{type:"string"},desColor:{type:"string"},iconColor:{type:"string"},columns:{type:"select",default:"1"},shapes:{type:"select",default:"square"}},edit:s({editable:"content"})(function(e){var t=e.isSelected,n=e.editable,l=e.setState,o=(e.className,e.setAttributes),r=(focus&&focus.editable,e.attributes),c=(r.url,r.title,r.name),s=r.nameTwo,p=r.nameThree,d=r.des,y=r.desTwo,v=r.desThree,C=r.position,E=r.positionTwo,T=r.positionThree,x=(r.href,r.hrefTwo,r.hrefThree,r.mediaID),k=r.mediaIDTwo,N=r.mediaIDThree,S=r.mediaURL,B=r.mediaURLTwo,O=r.mediaURLThree,A=r.columns,I=r.nameColor,F=r.posColor,P=r.desColor,L=r.iconColor,R=r.shapes,_=[{value:"1",label:a("One Column")},{value:"2",label:a("Two Column")},{value:"3",label:a("Three Column")}],z=[{value:"square",label:a("Square")},{value:"circle",label:a("Circle")}],U=function(e){return function(){l({editable:e})}};return[wp.element.createElement(f,{key:"controls"}),t&&wp.element.createElement(b,{key:"inspector"},wp.element.createElement(m,{label:a("Image Shape"),value:R,options:z.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){o({shapes:e})}}),wp.element.createElement(m,{label:a("Column Number"),value:A,options:_.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){o({columns:e})}}),wp.element.createElement(i,{title:a("Name Color"),colorValue:I,initialOpen:!1},wp.element.createElement(h,{value:I,onChange:function(e){return o({nameColor:e})}})),wp.element.createElement(i,{title:a("Position Color"),colorValue:F,initialOpen:!1},wp.element.createElement(h,{value:F,onChange:function(e){return o({posColor:e})}})),wp.element.createElement(i,{title:a("Description Color"),colorValue:P,initialOpen:!1},wp.element.createElement(h,{value:P,onChange:function(e){return o({desColor:e})}})),wp.element.createElement(i,{title:a("Icon Color"),colorValue:L,initialOpen:!1},wp.element.createElement(h,{value:L,onChange:function(e){return o({iconColor:e})}}))),wp.element.createElement("div",{key:"editable",className:"ugb-team-member column-"+A+" image-"+R},wp.element.createElement("div",{className:"ugb-team-member-column-one"},wp.element.createElement("div",null,wp.element.createElement(w,{onSelect:function(e){return o({mediaURL:e.url,mediaID:e.id})},type:"image",value:x,render:function(e){return wp.element.createElement(u,{className:x?"":"button button-large",onClick:e.open},x?wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+S+")"}}):a("Upload Image"))}})),wp.element.createElement(g,{tagName:"h4",value:c,onChange:function(e){return o({name:e})},isSelected:t&&"name"===n,onFocus:U("name"),placeholder:c.default,style:{color:I},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:C,className:"ugb-team-member-position",onChange:function(e){return o({position:e})},isSelected:t&&"position"===n,onFocus:U("position"),placeholder:C.default,style:{color:F},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:d,className:"ugb-team-member-des",onChange:function(e){return o({des:e})},isSelected:t&&"des"===n,onFocus:U("des"),placeholder:d.default,style:{color:P},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-team-member-column-two"},wp.element.createElement("div",null,wp.element.createElement(w,{onSelect:function(e){return o({mediaURLTwo:e.url,mediaIDTwo:e.id})},type:"image",value:k,render:function(e){return wp.element.createElement(u,{className:k?"":"button button-large",onClick:e.open},k?wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+B+")"}}):a("Upload Image"))}})),wp.element.createElement(g,{tagName:"h4",value:s,onChange:function(e){return o({nameTwo:e})},isSelected:t&&"nameTwo"===n,onFocus:U("nameTwo"),placeholder:s.default,style:{color:I},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:E,className:"ugb-team-member-position",onChange:function(e){return o({positionTwo:e})},isSelected:t&&"positionTwo"===n,onFocus:U("positionTwo"),placeholder:E.default,style:{color:F},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:y,className:"ugb-team-member-des-two",onChange:function(e){return o({desTwo:e})},isSelected:t&&"desTwo"===n,onFocus:U("desTwo"),placeholder:y.default,style:{color:P},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-team-member-column-three"},wp.element.createElement("div",null,wp.element.createElement(w,{onSelect:function(e){return o({mediaURLThree:e.url,mediaIDThree:e.id})},type:"image",value:N,render:function(e){return wp.element.createElement(u,{className:N?"":"button button-large",onClick:e.open},N?wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+O+")"}}):a("Upload Image"))}})),wp.element.createElement(g,{tagName:"h4",value:p,onChange:function(e){return o({nameThree:e})},isSelected:t&&"nameThree"===n,onFocus:U("nameThree"),placeholder:p.default,style:{color:I},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:T,className:"ugb-team-member-position",onChange:function(e){return o({positionThree:e})},isSelected:t&&"positionThree"===n,onFocus:U("positionThree"),placeholder:T.default,style:{color:F},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:v,className:"ugb-team-member-des-three",onChange:function(e){return o({desThree:e})},isSelected:t&&"desThree"===n,onFocus:U("desThree"),placeholder:v.default,style:{color:P},keepPlaceholderOnFocus:!0})))]}),save:function(e){var t=e.attributes,n=(t.url,t.title,t.name),l=t.nameTwo,o=t.nameThree,r=t.shapes,a=t.des,c=t.desTwo,i=t.desThree,u=t.position,m=t.positionTwo,s=t.positionThree,p=t.mediaURL,d=t.mediaURLTwo,b=t.mediaURLThree,g=(t.mediaID,t.mediaIDTwo,t.mediaIDThree,t.nameColor),h=t.posColor,w=t.desColor,f=(t.iconColor,t.columns);return wp.element.createElement("div",{className:"ugb-team-member column-"+f+" image-"+r},wp.element.createElement("div",{className:"ugb-team-member-column-one"},p&&wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+p+")"},"data-src":p}),n&&!!n.length&&wp.element.createElement("h4",{style:{color:g}},n),u&&!!u.length&&wp.element.createElement("p",{className:"ugb-team-member-position",style:{color:h}},u),a&&!!a.length&&wp.element.createElement("p",{className:"ugb-team-member-des",style:{color:w}},a)),f>1&&wp.element.createElement("div",{className:"ugb-team-member-column-two"},d&&wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+d+")"},"data-src":d}),l&&!!l.length&&wp.element.createElement("h4",{style:{color:g}},l),m&&!!m.length&&wp.element.createElement("p",{className:"ugb-team-member-position",style:{color:h}},m),c&&!!c.length&&wp.element.createElement("p",{className:"ugb-team-member-des-two",style:{color:w}},c)),f>2&&wp.element.createElement("div",{className:"ugb-team-member-column-three"},b&&wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+b+")"},"data-src":b}),o&&!!o.length&&wp.element.createElement("h4",{style:{color:g}},o),s&&!!s.length&&wp.element.createElement("p",{className:"ugb-team-member-position",style:{color:h}},s),i&&!!i.length&&wp.element.createElement("p",{className:"ugb-team-member-des-three",style:{color:w}},i)))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(37),r=(n.n(o),n(38)),a=(n.n(r),n(0)),c=wp.i18n.__,i=(wp.element.Component,wp.components.withState),u=wp.blocks,m=u.registerBlockType,s=u.RichText,p=u.BlockControls,d=function(e){return e.map(function(e){return e.children})},b=function(e){return e.map(function(e){return{children:e}})};m("ugb/expand",{title:c("Expand / Show More","UGB"),icon:a.d,category:"formatting",keywords:[c("Expand"),c("Show more"),c("Stackable")],attributes:{text:{type:"array",source:"query",selector:".ugb-expand-less-text > p",query:{children:{source:"node"}},default:[]},moreText:{type:"array",source:"query",selector:".ugb-expand-more-text > p",query:{children:{source:"node"}},default:[]},moreLabel:{type:"array",source:"children",selector:".ugb-expand-more",default:c("Show more")},lessLabel:{type:"array",source:"children",selector:".ugb-expand-less",default:c("Show less")}},edit:i({editable:"text"})(function(e){var t=(e.focus,e.setFocus,e.editable),n=e.setAttributes,o=e.setState,r=e.className,a=e.isSelected,i=function(e){return function(){o({editable:e})}},u=e.attributes,m=u.text,g=u.moreLabel,h=u.moreText,w=u.lessLabel;return[a&&wp.element.createElement(p,{key:"controls"}),wp.element.createElement("div",{key:"expand",className:r},a&&wp.element.createElement("label",{className:"ugb-editor-label"},"Less text"),wp.element.createElement(s,l({multiline:"p",placeholder:e.attributes.text.default,value:d(m),onChange:function(e){return n({text:b(e)})},isSelected:a&&"text"===t,onFocus:i("text"),className:"ugb-expand-less-text"},"placeholder",c("Some short text that can be expanded to show more details."))),wp.element.createElement(s,l({tagName:"a",placeholder:e.attributes.moreLabel.default,value:g,isSelected:a&&"moreLabel"===t,onFocus:i("moreLabel"),onChange:function(e){return n({moreLabel:e})},formattingControls:["bold","italic","strikethrough"],className:"ugb-expand-more"},"placeholder",c("Show more"))),a&&wp.element.createElement("label",{className:"ugb-editor-label"},"More text"),a&&wp.element.createElement(s,l({multiline:"p",placeholder:e.attributes.moreText.default,value:d(h),isSelected:a&&"moreText"===t,onFocus:i("moreText"),onChange:function(e){return n({moreText:b(e)})},className:"ugb-expand-more-text"},"placeholder",c("Some short text that can be expanded to show more details. Some additional text that can only be seen when expanded."))),a&&wp.element.createElement(s,l({tagName:"a",placeholder:e.attributes.lessLabel.default,value:w,isSelected:a&&"lessLabel"===t,onFocus:i("lessLabel"),onChange:function(e){return n({lessLabel:e})},formattingControls:["bold","italic","strikethrough"],className:"ugb-expand-less"},"placeholder",c("Show less"))))]}),save:function(e){var t=e.attributes,n=t.text,l=t.moreLabel,o=t.moreText,r=t.lessLabel;return wp.element.createElement("div",null,wp.element.createElement("div",{className:"ugb-expand-less-text"},n.map(function(e,t){return wp.element.createElement("p",{key:t},e.children&&e.children.props.children)})),wp.element.createElement("div",{className:"ugb-expand-more-text",style:{display:"none"}},o.map(function(e,t){return wp.element.createElement("p",{key:t},e.children&&e.children.props.children)})),wp.element.createElement("a",{className:"ugb-expand-button",href:"#"},wp.element.createElement("span",{className:"ugb-expand-more"},l),wp.element.createElement("span",{className:"ugb-expand-less",style:{display:"none"}},r)))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(40),o=(n.n(l),n(41)),r=(n.n(o),n(0)),a=wp.i18n.__,c=(wp.element.Component,wp.components),i=c.PanelColor,u=c.withState,m=c.SelectControl,s=wp.blocks,p=s.registerBlockType,d=s.InspectorControls,b=s.RichText,g=s.ColorPalette,h=(s.MediaUpload,s.BlockControls);s.AlignmentToolbar,s.BlockAlignmentToolbar;p("ugb/number-box",{title:a("Number Box","Stackable"),icon:r.g,category:"common",keywords:[a("Number Box"),a("Stackable")],attributes:{title:{type:"string",source:"attribute",selector:"a",attribute:"title"},numberBox:{type:"array",source:"children",selector:".ugb-number-box-column-one span",default:a("01")},numberBoxTwo:{type:"array",source:"children",selector:".ugb-number-box-column-two span",default:a("02")},numberBoxThree:{type:"array",source:"children",selector:".ugb-number-box-column-three span",default:a("03")},name:{type:"array",source:"children",selector:".ugb-number-box-name",default:a("Registration")},nameTwo:{type:"array",source:"children",selector:".ugb-number-box-name-two",default:a("Waiting Period")},nameThree:{type:"array",source:"children",selector:".ugb-number-box-name-three",default:a("Delivery")},body:{type:"array",source:"children",selector:".ugb-number-box-body",default:a("This is just a sample write-up, but you can check out more info on Gutenberg on the WP repository.")},bodyTwo:{type:"array",source:"children",selector:".ugb-number-box-body-two",default:a("This is just a sample write-up, but you can check out more info on Gutenberg on the WP repository.")},bodyThree:{type:"array",source:"children",selector:".ugb-number-box-body-three",default:a("This is just a sample write-up, but you can check out more info on Gutenberg on the WP repository.")},numberBoxColor:{type:"string"},nameColor:{type:"string"},bodyTextColor:{type:"string"},numberBGColor:{type:"string"},columns:{type:"select",default:"1"}},edit:u({editable:"content"})(function(e){var t=(e.className,e.setAttributes),n=e.isSelected,l=e.editable,o=e.setState,r=e.attributes,c=(r.title,r.numberBox),u=r.numberBoxTwo,s=r.numberBoxThree,p=r.body,w=r.bodyTwo,f=r.bodyThree,y=r.name,v=r.nameTwo,C=r.nameThree,E=r.columns,T=r.numberBoxColor,x=r.nameColor,k=r.bodyTextColor,N=r.numberBGColor,S=[{value:"1",label:a("One Column")},{value:"2",label:a("Two Column")},{value:"3",label:a("Three Column")}],B=function(e){return function(){o({editable:e})}};return[wp.element.createElement(h,{key:"controls"}),n&&wp.element.createElement(d,{key:"inspector"},wp.element.createElement(m,{label:a("Column Number"),value:E,options:S.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){t({columns:e})}}),wp.element.createElement(i,{title:a("Number Color"),colorValue:T,initialOpen:!1},wp.element.createElement(g,{value:T,onChange:function(e){return t({numberBoxColor:e})}})),wp.element.createElement(i,{title:a("Number Background Color"),colorValue:N,initialOpen:!1},wp.element.createElement(g,{value:N,onChange:function(e){return t({numberBGColor:e})}})),wp.element.createElement(i,{title:a("Name Color"),colorValue:x,initialOpen:!1},wp.element.createElement(g,{value:x,onChange:function(e){return t({nameColor:e})}})),wp.element.createElement(i,{title:a("Body Text Color"),colorValue:k,initialOpen:!1},wp.element.createElement(g,{value:k,onChange:function(e){return t({bodyTextColor:e})}}))),wp.element.createElement("div",{key:"editable",className:"ugb-number-box column-"+E},wp.element.createElement("div",{className:"ugb-number-box-column-one"},wp.element.createElement(b,{tagName:"span",placeholder:c.default,value:c,onChange:function(e){return t({numberBox:e})},isSelected:n&&"numberBox"===l,onFocus:B("numberBox"),style:{color:T,backgroundColor:N},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"h4",value:y,className:"ugb-number-box-name",onChange:function(e){return t({name:e})},isSelected:n&&"name"===l,onFocus:B("name"),placeholder:a("Add name\u2026"),style:{color:x},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:p,className:"ugb-number-box-body",onChange:function(e){return t({body:e})},isSelected:n&&"body"===l,onFocus:B("body"),placeholder:a("Add body\u2026"),style:{color:k},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-number-box-column-two"},wp.element.createElement(b,{tagName:"span",placeholder:u.default,value:u,onChange:function(e){return t({numberBoxTwo:e})},isSelected:n&&"numberBoxTwo"===l,onFocus:B("numberBoxTwo"),style:{color:T,backgroundColor:N},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"h4",value:v,className:"ugb-number-box-name-two",onChange:function(e){return t({nameTwo:e})},isSelected:n&&"nameTwo"===l,onFocus:B("nameTwo"),placeholder:a("Add name\u2026"),style:{color:x},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:w,className:"ugb-number-box-body-two",onChange:function(e){return t({bodyTwo:e})},isSelected:n&&"bodyTwo"===l,onFocus:B("bodyTwo"),placeholder:a("Add body\u2026"),style:{color:k},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-number-box-column-three"},wp.element.createElement(b,{tagName:"span",placeholder:s.default,value:s,onChange:function(e){return t({numberBoxThree:e})},isSelected:n&&"numberBoxThree"===l,onFocus:B("numberBoxThree"),style:{color:T,backgroundColor:N},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"h4",value:C,className:"ugb-number-box-name-three",onChange:function(e){return t({nameThree:e})},isSelected:n&&"nameThree"===l,onFocus:B("nameThree"),placeholder:a("Add name\u2026"),style:{color:x},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:f,className:"ugb-number-box-body-three",onChange:function(e){return t({bodyThree:e})},isSelected:n&&"bodyThree"===l,onFocus:B("bodyThree"),placeholder:a("Add body\u2026"),style:{color:k},keepPlaceholderOnFocus:!0})))]}),save:function(e){var t=e.attributes,n=(t.title,t.numberBox),l=t.numberBoxTwo,o=t.numberBoxThree,r=t.body,a=t.bodyTwo,c=t.bodyThree,i=t.name,u=t.nameTwo,m=t.nameThree,s=t.numberBoxColor,p=t.nameColor,d=t.bodyTextColor,b=t.numberBGColor,g=t.columns;return wp.element.createElement("div",{className:"ugb-number-box column-"+g},wp.element.createElement("div",{className:"ugb-number-box-column-one"},n&&!!n.length&&wp.element.createElement("span",{style:{color:s,backgroundColor:b}},n),i&&!!i.length&&wp.element.createElement("h4",{className:"ugb-number-box-name",style:{color:p}},i),r&&!!r.length&&wp.element.createElement("p",{className:"ugb-number-box-body",style:{color:d}},r)),g>1&&wp.element.createElement("div",{className:"ugb-number-box-column-two"},l&&!!l.length&&wp.element.createElement("span",{style:{color:s,backgroundColor:b}},l),u&&!!u.length&&wp.element.createElement("h4",{className:"ugb-number-box-name-two",style:{color:p}},u),a&&!!a.length&&wp.element.createElement("p",{className:"ugb-number-box-body-two",style:{color:d}},a)),g>2&&wp.element.createElement("div",{className:"ugb-number-box-column-three"},o&&!!o.length&&wp.element.createElement("span",{style:{color:s,backgroundColor:b}},o),m&&!!m.length&&wp.element.createElement("h4",{className:"ugb-number-box-name-three",style:{color:p}},m),c&&!!c.length&&wp.element.createElement("p",{className:"ugb-number-box-body-three",style:{color:d}},c)))}})},function(e,t){},function(e,t){}]);
|
1 |
+
!function(e){function t(l){if(n[l])return n[l].exports;var o=n[l]={i:l,l:!1,exports:{}};return e[l].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,l){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:l})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t,n){"use strict";n.d(t,"f",function(){return r}),n.d(t,"a",function(){return a}),n.d(t,"e",function(){return i}),n.d(t,"c",function(){return c}),n.d(t,"i",function(){return u}),n.d(t,"j",function(){return m}),n.d(t,"l",function(){return s}),n.d(t,"b",function(){return p}),n.d(t,"k",function(){return d}),n.d(t,"d",function(){return b}),n.d(t,"g",function(){return g}),n.d(t,"h",function(){return h}),n.d(t,"m",function(){return w});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},o=function(e){return wp.element.createElement("defs",null,wp.element.createElement("linearGradient",l({},e,{gradientTransform:"rotate(90)"}),wp.element.createElement("stop",{offset:"0%",stopColor:"#2FDDD1",stopOpacity:"1"}),wp.element.createElement("stop",{offset:"20%",stopColor:"#30A2E3",stopOpacity:"1"}),wp.element.createElement("stop",{offset:"50%",stopColor:"#F56FAE",stopOpacity:"1"}),wp.element.createElement("stop",{offset:"100%",stopColor:"#FFC58E",stopOpacity:"1"})))},r=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",width:"20",height:"20"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M512 96c-111.118 0-215.584 43.272-294.156 121.844S96 400.882 96 512s43.272 215.584 121.844 294.156S400.882 928 512 928s215.584-43.272 294.156-121.844S928 623.118 928 512s-43.272-215.584-121.843-294.156S623.118 96 512 96zm0-96c282.77 0 512 229.23 512 512s-229.23 512-512 512S0 794.77 0 512 229.23 0 512 0zm-64 704h128v128H448zm0-512h128v384H448z"}))},a=function(){return wp.element.createElement("svg",{role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M17 5H3c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm1 7c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V7c0-.6.4-1 1-1h14c.6 0 1 .4 1 1v5z"}))},i=function(){return wp.element.createElement(a,null)},c=function(){return wp.element.createElement("svg",{role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M4 9h12v2H4V9z"}))},u=function(){return wp.element.createElement("svg",{role:"img",focusable:"false",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M8.54 12.74c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45L6.65 1.94C3.45 3.46.31 6.96.85 11.37 1.19 14.16 2.8 16 5.08 16c1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38zm9.43 0c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45l-1.63-2.28c-3.2 1.52-6.34 5.02-5.8 9.43.34 2.79 1.95 4.63 4.23 4.63 1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38z"}))},m=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 14 32"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M0 29h5.833L0 23h5V9H0l5.833-6H0V0h14v3H8.167L14 9H9v14h5l-5.833 6H14v3H0v-3z"}))},s=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 13 12.916010856628418"},wp.element.createElement(o,{id:"AlertIconGradient"}),wp.element.createElement("path",{fill:"url(#AlertIconGradient)",d:"M5.68 12.916a.5.5 0 0 1-.397-.196L3.208 10H1.463C.656 10 0 9.428 0 8.621V1.463C0 .656.656 0 1.463 0h10.074C12.344 0 13 .656 13 1.463v7.158C13 9.428 12.344 10 11.537 10H8.151l-2.073 2.72a.504.504 0 0 1-.398.196zM1.463 1A.464.464 0 0 0 1 1.463v7.158c0 .255.208.463.463.463h1.993a.5.5 0 0 1 .397.196l1.827 2.312L7.507 9.28a.502.502 0 0 1 .397-.196h3.633A.464.464 0 0 0 12 8.621V1.463A.464.464 0 0 0 11.537 1H1.463zm1.193 2h7.828c.284.024.514.207.514.49a.498.498 0 0 1-.514.496H2.656a.499.499 0 0 1-.514-.496c.001-.283.231-.466.514-.49zm0 3h7.828c.284.024.514.207.514.49a.498.498 0 0 1-.514.496H2.656a.499.499 0 0 1-.514-.496c.001-.283.231-.466.514-.49z"}))},p=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 16 14"},wp.element.createElement(o,{id:"Grad"}),wp.element.createElement("path",{fill:"url(#Grad)",d:"M10 0c-.17 0-.36.05-.52.14C8.04 1.02 4.5 3.58 3 4c-1.38 0-3 .67-3 2.5S1.63 9 3 9c.3.08.64.23 1 .41V14h2v-3.45c1.34.86 2.69 1.83 3.48 2.31.16.09.34.14.52.14.52 0 1-.42 1-1V1c0-.58-.48-1-1-1zm0 12c-.38-.23-.89-.58-1.5-1-.16-.11-.33-.22-.5-.34V2.31c.16-.11.31-.2.47-.31.61-.41 1.16-.77 1.53-1v11zm2-6h4v1h-4V6zm0 2l4 2v1l-4-2V8zm4-6v1l-4 2V4l4-2z"}))},d=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 896 1023"},wp.element.createElement(o,{id:"Grad"}),wp.element.createElement("path",{fill:"url(#Grad)",d:"M821 491q-41-41-95-60 62-26 100-82t38-125q0-93-65.5-158.5T640 0q-71 0-128.5 41T430 147q-32-39-77-61t-97-22q-93 0-158.5 65.5T32 288q0 69 38 125t100 82q-54 19-95 60Q0 630 0 736v191q0 40 28 68t68 28h320q31 0 55.5-18t34.5-46h294q40 0 68-28t28-68V672q0-106-75-181zM527 111q47-47 113-47t113 47 47 113-47 113-113 47-113-47-47-113 47-113zM143 401q-47-47-47-113t47-113 113-47 113 47 47 113-47 113-113 47-113-47zm305 526q0 13-9.5 22.5T416 959H96q-13 0-22.5-9.5T64 927V736q0-79 56.5-135.5T256 544t136 56q1 2 2 3 54 55 54 133v191zm-27-387q-36-30-79-45 43-18 75.5-52t48.5-78q36 44 88 66-54 19-95 60-22 23-38 49zm411 323q0 13-9.5 22.5T800 895H512V736q0-80-46-146 15-30 38-53 57-57 136-57t135.5 56.5T832 672v191z"}))},b=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 32 8"},wp.element.createElement(o,{id:"Grad"}),wp.element.createElement("path",{fill:"url(#Grad)",d:"M4 0C1.79 0 0 1.79 0 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm24 0c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zM16 0c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"}))},g=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 21.027502059936523 10.284000396728516"},wp.element.createElement(o,{id:"Grad"}),wp.element.createElement("path",{fill:"url(#Grad)",d:"M3.028 10.284a1 1 0 0 1-1-1V2.902l-.553.276A1 1 0 1 1 .58 1.389l2-1a.998.998 0 0 1 1.447.895v8a1 1 0 0 1-1 1zm9 0h-5a1.002 1.002 0 0 1-.707-1.707l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001a1.33 1.33 0 0 0-.393.948 1 1 0 0 1-2 0c0-.894.348-1.733.98-2.364C8.273 0 10.472 0 11.735 1.264c.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.98 2.364L9.443 8.284h2.586a1 1 0 0 1 0 2zm7.955-5.623a2.725 2.725 0 0 0 .545-1.627 2.753 2.753 0 0 0-2.75-2.75 2.739 2.739 0 0 0-2.44 1.484 1 1 0 1 0 1.776.92.75.75 0 1 1 .664 1.096 1 1 0 0 0 0 2c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25a1 1 0 0 0-2 0c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25a3.23 3.23 0 0 0-1.045-2.373z"}))},h=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 1024 896"},wp.element.createElement(o,{id:"Grad"}),wp.element.createElement("path",{fill:"url(#Grad)",d:"M960 0H64Q38 0 19 19T0 64v768q0 26 19 45t45 19h896q26 0 45-19t19-45V64q0-26-19-45T960 0zM64 64h896v714L724 430q-7-12-21-14t-25 7L524 548 350 305q-10-14-28-13t-26 17L64 757V64zm855 768H97l231-447 184 255 179-145zM737 190q13 0 22.5 9.5T769 222t-9.5 22.5T737 254t-22.5-9.5T705 222t9.5-22.5T737 190zm0-64q-40 0-68 28t-28 68 28 68 68 28 68-28 28-68-28-68-68-28z"}))},w=function(){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 38 26"},wp.element.createElement(o,{id:"Grad"}),wp.element.createElement("path",{fill:"url(#Grad)",d:"M2 0h34a2 2 0 0 1 2 2v22a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm5.77 4C6.24 4 5 5.511 5 7.375v11.25C5 20.489 6.24 22 7.77 22h15.46c1.53 0 2.77-1.511 2.77-3.375V16l6 5h1V5h-1l-6 5V7.375C26 5.511 24.76 4 23.23 4H7.77z"}))}},function(e,t){var n={utf8:{stringToBytes:function(e){return n.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(n.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(3),n(6),n(9),n(12),n(15),n(21),n(24),n(27),n(30),n(33),n(36),n(39),n(42),n(45),n(48)},function(e,t,n){"use strict";var l=n(4),o=(n.n(l),n(5)),r=(n.n(o),n(0)),a=wp.i18n.__;(0,wp.blocks.registerBlockType)("ugb/spacer",{title:a("Spacer"),icon:r.j,category:"layout",keywords:[a("Spacer"),a("Stackable")],attributes:{height:{default:50,type:"number"}},edit:function(e){var t=e.isSelected,n=wp.blocks.InspectorControls,l=wp.components,o=l.RangeControl,r=(l.TextControl,e.attributes.height);return[!!t&&wp.element.createElement(n,{key:"inspector"},wp.element.createElement(o,{label:a("Height"),value:r,min:"30",max:"200",onChange:function(t){e.setAttributes({height:t})}})),wp.element.createElement("div",{className:e.className,style:{height:r+"px"}})]},save:function(e){var t=e.attributes.height;return wp.element.createElement("div",{className:e.className,style:{height:t+"px"}})}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(7),o=(n.n(l),n(8)),r=(n.n(o),n(0)),a=wp.i18n.__,i=wp.blocks.registerBlockType,c=wp.components.PanelColor;i("ugb/divider",{title:a("Divider"),icon:r.c,category:"layout",keywords:[a("Divider"),a("Stackable")],attributes:{height:{default:1,type:"number"},width:{default:50,type:"number"},color:{type:"string",default:"#dddddd"},alignment:{type:"string",default:"center"}},edit:function(e){var t=e.isSelected,n=wp.blocks,l=n.InspectorControls,o=n.ColorPalette,r=n.BlockControls,i=n.AlignmentToolbar,u=wp.components.RangeControl,m=e.attributes,s=m.height,p=m.width,d=m.color,b=m.alignment;return[t&&wp.element.createElement(r,{key:"controls"},wp.element.createElement(i,{value:b,onChange:function(t){e.setAttributes({alignment:t})}})),t&&wp.element.createElement(l,{key:"inspector"},wp.element.createElement(u,{label:a("Height"),value:s,min:"1",max:"10",onChange:function(t){e.setAttributes({height:t})}}),wp.element.createElement(u,{label:a("Width"),value:p,min:"10",max:"100",step:"0.1",onChange:function(t){e.setAttributes({width:t})}}),wp.element.createElement(c,{title:a("Divider Color"),colorValue:d,initialOpen:!1},wp.element.createElement(o,{value:d,onChange:function(t){return e.setAttributes({color:t})}}))),wp.element.createElement("div",{className:"ugb-divider",style:{paddingTop:8,paddingBottom:8}},wp.element.createElement("hr",{align:b,style:{marginTop:0,marginBottom:0,backgroundColor:d,width:p+"%",height:s}}))]},save:function(e){var t=e.attributes,n=t.height,l=t.width,o=t.color,r=t.alignment;return wp.element.createElement("div",{className:"ugb-divider"},wp.element.createElement("hr",{align:r,style:{backgroundColor:o,width:l+"%",height:n}}))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function r(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(10),i=(n.n(a),n(11)),c=(n.n(i),n(0)),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}return function(t,n,l){return n&&e(t.prototype,n),l&&e(t,l),t}}(),m=wp.i18n.__,s=wp.element.Component,p=wp.blocks.registerBlockType,d=wp.components,b=d.PanelColor,g=d.Dashicon,h=d.IconButton,w=d.SelectControl,f=d.RangeControl,y=wp.blocks,v=y.InspectorControls,C=y.BlockControls,E=y.AlignmentToolbar,T=y.RichText,k=y.ColorPalette,x=y.UrlInput,N=function(e){function t(){return l(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.isSelected,n=(e.className,e.setAttributes),l=this.props.attributes,o=l.url,r=l.title,a=l.text,i=l.color,c=l.textColor,u=l.size,s=l.textAlignment,p=l.cornerButtonRadius,d=[{value:"small",label:m("Small")},{value:"normal",label:m("Normal")},{value:"medium",label:m("Medium")},{value:"large",label:m("Large")}];return[t&&wp.element.createElement(C,{key:"controls"},wp.element.createElement(E,{value:s,onChange:function(e){n({textAlignment:e})}})),wp.element.createElement("span",{key:"button",title:r,className:"wp-block-button ugb-button-"+s},wp.element.createElement(T,{tagName:"span",placeholder:m("Enter Text"),value:a,onChange:function(e){return n({text:e})},formattingControls:["bold","italic","strikethrough"],className:"wp-ugb-button ugb-button-"+u,style:{backgroundColor:i,color:c,borderRadius:p+"px"},isSelected:t,keepPlaceholderOnFocus:!0}),t&&wp.element.createElement(v,{key:"inspector"},wp.element.createElement(w,{label:m("Size"),value:u,options:d.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){n({size:e})}}),wp.element.createElement(f,{label:m("Corner Radius"),value:p,min:"1",max:"50",onChange:function(e){return n({cornerButtonRadius:e})}}),wp.element.createElement(b,{title:m("Background Color"),colorValue:i,initialOpen:!1},wp.element.createElement(k,{value:i,onChange:function(e){return n({color:e})}})),wp.element.createElement(b,{title:m("Text Color"),colorValue:c,initialOpen:!1},wp.element.createElement(k,{value:c,onChange:function(e){return n({textColor:e})}})))),t&&wp.element.createElement("form",{key:"form-link",onSubmit:function(e){return e.preventDefault()},className:"blocks-button__inline-link ugb-button-"+s},wp.element.createElement(g,{icon:"admin-links"}),wp.element.createElement(x,{value:o,onChange:function(e){return n({url:e})}}),wp.element.createElement(h,{icon:"editor-break",label:m("Apply"),type:"submit"}))]}}]),t}(s);p("ugb/button",{title:m("Button"),icon:c.a,category:"layout",keywords:[m("Button"),m("Stackable")],attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"array",source:"children",selector:"a"},textAlignment:{type:"string",default:"center"},color:{type:"string",default:"#2091e1"},textColor:{type:"string",default:"#ffffff"},size:{type:"string",default:"normal"},cornerButtonRadius:{type:"number",default:4}},edit:N,save:function(e){var t=e.attributes,n=t.url,l=(t.title,t.text),o=t.textAlignment,r=t.color,a=t.textColor,i=t.size,c=t.cornerButtonRadius,u={backgroundColor:r,color:a,borderRadius:c+"px"};return wp.element.createElement("div",{className:"ugb-button-"+o},wp.element.createElement("a",{href:n,className:"wp-ugb-button ugb-button-"+i,style:u},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function r(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(13),i=(n.n(a),n(14)),c=(n.n(i),n(0)),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}return function(t,n,l){return n&&e(t.prototype,n),l&&e(t,l),t}}(),m=wp.i18n.__,s=wp.element.Component,p=wp.blocks,d=p.registerBlockType,b=p.InspectorControls,g=p.BlockControls,h=p.RichText,w=p.AlignmentToolbar,f=p.ColorPalette,y=p.UrlInput,v=wp.components,C=v.PanelColor,E=v.IconButton,T=v.Dashicon,k=v.SelectControl,x=v.RangeControl,N=function(e){function t(){return l(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return r(t,e),u(t,[{key:"render",value:function(){var e=this.props,t=e.isSelected,n=e.setAttributes,l=this.props.attributes,o=l.url,r=l.title,a=l.text,i=l.color,c=l.size,u=l.textAlignment,s=l.cornerButtonRadius,p=l.borderThickness,d=[{value:"small",label:m("Small")},{value:"normal",label:m("Normal ")},{value:"medium",label:m("Medium")},{value:"large",label:m("Large")}];return[t&&wp.element.createElement(g,{key:"controls"},wp.element.createElement(w,{value:u,onChange:function(e){n({textAlignment:e})}})),wp.element.createElement("span",{key:"button",title:r,className:"wp-block-button ugb-button-"+u},wp.element.createElement(h,{tagName:"span",placeholder:m("Enter Text"),value:a,onChange:function(e){return n({text:e})},formattingControls:["bold","italic","strikethrough"],className:"wp-ugb-button ugb-button-"+c+" ugb-ghost-button",style:{borderColor:i,color:i,borderRadius:s+"px",borderWidth:p+"px"},isSelected:t,keepPlaceholderOnFocus:!0}),t&&wp.element.createElement(b,{key:"inspector"},wp.element.createElement(k,{label:m("Size"),value:c,options:d.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){n({size:e})}}),wp.element.createElement(x,{label:m("Corner Radius"),value:s,min:"1",max:"50",onChange:function(e){return n({cornerButtonRadius:e})}}),wp.element.createElement(x,{label:m("Border Thickness"),value:p,min:"1",max:"10",onChange:function(e){return n({borderThickness:e})}}),wp.element.createElement(C,{title:m("Button Color"),colorValue:i,initialOpen:!1},wp.element.createElement(f,{value:i,onChange:function(e){return n({color:e})}})))),t&&wp.element.createElement("form",{key:"form-link",onSubmit:function(e){return e.preventDefault()},className:"blocks-button__inline-link ugb-button-"+u},wp.element.createElement(T,{icon:"admin-links"}),wp.element.createElement(y,{value:o,onChange:function(e){return n({url:e})}}),wp.element.createElement(E,{icon:"editor-break",label:m("Apply"),type:"submit"}))]}}]),t}(s);d("ugb/ghost-button",{title:m("Ghost Button"),icon:c.e,category:"layout",keywords:[m("Ghost Button"),m("Stackable")],attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},text:{type:"array",source:"children",selector:"a"},textAlignment:{type:"string",default:"center"},color:{type:"string"},textColor:{type:"string"},size:{type:"string",default:"normal"},cornerButtonRadius:{type:"number",default:"4"},borderThickness:{type:"number",default:"1"}},edit:N,save:function(e){var t=e.attributes,n=t.url,l=(t.title,t.text),o=t.textAlignment,r=t.color,a=t.size,i=t.cornerButtonRadius,c=t.borderThickness,u={borderColor:r,color:r,borderRadius:i+"px",borderWidth:c+"px"};return wp.element.createElement("div",{className:"ugb-button-"+o},wp.element.createElement("a",{href:n,className:"wp-ugb-button ugb-button-"+a+" ugb-ghost-button",style:u},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(16),o=(n.n(l),n(17)),r=(n.n(o),n(18)),a=n.n(r),i=n(0),c=wp.i18n.__,u=(wp.element.Component,wp.components.PanelColor),m=wp.components.withState,s=wp.blocks,p=s.registerBlockType,d=s.InspectorControls,b=s.RichText,g=s.ColorPalette,h=s.BlockControls,w=wp.blocks.InspectorControls,f=w.SelectControl,y=w.ToggleControl;p("ugb/notification",{title:c("Notification"),icon:i.f,category:"layout",keywords:[c("Notification"),c("Stackable")],attributes:{text:{type:"array",source:"children",selector:"p",default:c("This is an informational alert, usually used for successful subscriptions, promo announcements, and the like.")},color:{type:"string"},textColor:{type:"string"},notifType:{type:"string",default:"success"},dismissible:{type:"boolean",default:!1}},edit:m({editable:"content"})(function(e){var t=[{value:"success",label:c("Success")},{value:"error",label:c("Error")},{value:"warning",label:c("Warning")},{value:"info",label:c("Information")}],n=e.isSelected,l=e.editable,o=e.setState,r=e.setAttributes,a=(e.className,e.attributes),i=a.text,m=a.color,s=a.textColor,p=a.notifType,w=a.dismissible;return[n&&wp.element.createElement(h,{key:"controls"}),wp.element.createElement("div",{key:"editable",className:"ugb-notification type-"+p+" dismissible-"+w},w&&wp.element.createElement("span",{key:"button",className:"close-button"},wp.element.createElement("svg",{viewBox:"0 0 28.3 28.3",style:{fill:s}},wp.element.createElement("path",{d:"M52.4-166.2c3.2,0,3.2-5,0-5C49.2-171.2,49.2-166.2,52.4-166.2L52.4-166.2z"}),wp.element.createElement("path",{d:"M16.8,13.9L26.9,3.8c0.6-0.6,0.6-1.5,0-2.1s-1.5-0.6-2.1,0L14.7,11.8L4.6,1.7C4,1.1,3.1,1.1,2.5,1.7s-0.6,1.5,0,2.1l10.1,10.1L2.5,24c-0.6,0.6-0.6,1.5,0,2.1c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4L14.7,16l10.1,10.1c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4c0.6-0.6,0.6-1.5,0-2.1L16.8,13.9z"}))),wp.element.createElement(b,{tagName:"p",placeholder:e.attributes.text.default,value:i,isSelected:n&&"content"===l,onFocus:function(e){return function(){o({editable:e})}}("content"),onChange:function(e){return r({text:e})},className:"wp-ugb-notif notif-"+p,style:{backgroundColor:m,color:s}}),n&&wp.element.createElement(d,{key:"inspector"},wp.element.createElement(y,{label:c("Dismissible"),checked:w,onChange:function(){return r({dismissible:!w})}}),wp.element.createElement(f,{label:c("Notification Type"),value:p,options:t.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){r({notifType:e})}}),wp.element.createElement(u,{title:c("Background Color"),colorValue:m,initialOpen:!1},wp.element.createElement(g,{value:m,onChange:function(e){return r({color:e})}})),wp.element.createElement(u,{title:c("Text Color"),colorValue:s,initialOpen:!1},wp.element.createElement(g,{value:s,onChange:function(e){return r({textColor:e})}}))))]}),save:function(e){var t=e.attributes,n=t.text,l=t.color,o=t.textColor,r=t.notifType,i=t.dismissible,c={backgroundColor:l,color:o},u=a()(n+r).substr(0,6);return wp.element.createElement("div",{className:"ugb-notification type-"+r+" dismissible-"+i,"data-uid":u},i&&wp.element.createElement("span",{key:"button",className:"close-button"},wp.element.createElement("svg",{viewBox:"0 0 28.3 28.3",style:{fill:o}},wp.element.createElement("path",{d:"M52.4-166.2c3.2,0,3.2-5,0-5C49.2-171.2,49.2-166.2,52.4-166.2L52.4-166.2z"}),wp.element.createElement("path",{d:"M16.8,13.9L26.9,3.8c0.6-0.6,0.6-1.5,0-2.1s-1.5-0.6-2.1,0L14.7,11.8L4.6,1.7C4,1.1,3.1,1.1,2.5,1.7s-0.6,1.5,0,2.1l10.1,10.1L2.5,24c-0.6,0.6-0.6,1.5,0,2.1c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4L14.7,16l10.1,10.1c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4c0.6-0.6,0.6-1.5,0-2.1L16.8,13.9z"}))),wp.element.createElement("p",{className:"wp-ugb-notif notif-"+r,style:c},n))}})},function(e,t){},function(e,t){},function(e,t,n){!function(){var t=n(19),l=n(1).utf8,o=n(20),r=n(1).bin,a=function(e,n){e.constructor==String?e=n&&"binary"===n.encoding?r.stringToBytes(e):l.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var i=t.bytesToWords(e),c=8*e.length,u=1732584193,m=-271733879,s=-1732584194,p=271733878,d=0;d<i.length;d++)i[d]=16711935&(i[d]<<8|i[d]>>>24)|4278255360&(i[d]<<24|i[d]>>>8);i[c>>>5]|=128<<c%32,i[14+(c+64>>>9<<4)]=c;for(var b=a._ff,g=a._gg,h=a._hh,w=a._ii,d=0;d<i.length;d+=16){var f=u,y=m,v=s,C=p;u=b(u,m,s,p,i[d+0],7,-680876936),p=b(p,u,m,s,i[d+1],12,-389564586),s=b(s,p,u,m,i[d+2],17,606105819),m=b(m,s,p,u,i[d+3],22,-1044525330),u=b(u,m,s,p,i[d+4],7,-176418897),p=b(p,u,m,s,i[d+5],12,1200080426),s=b(s,p,u,m,i[d+6],17,-1473231341),m=b(m,s,p,u,i[d+7],22,-45705983),u=b(u,m,s,p,i[d+8],7,1770035416),p=b(p,u,m,s,i[d+9],12,-1958414417),s=b(s,p,u,m,i[d+10],17,-42063),m=b(m,s,p,u,i[d+11],22,-1990404162),u=b(u,m,s,p,i[d+12],7,1804603682),p=b(p,u,m,s,i[d+13],12,-40341101),s=b(s,p,u,m,i[d+14],17,-1502002290),m=b(m,s,p,u,i[d+15],22,1236535329),u=g(u,m,s,p,i[d+1],5,-165796510),p=g(p,u,m,s,i[d+6],9,-1069501632),s=g(s,p,u,m,i[d+11],14,643717713),m=g(m,s,p,u,i[d+0],20,-373897302),u=g(u,m,s,p,i[d+5],5,-701558691),p=g(p,u,m,s,i[d+10],9,38016083),s=g(s,p,u,m,i[d+15],14,-660478335),m=g(m,s,p,u,i[d+4],20,-405537848),u=g(u,m,s,p,i[d+9],5,568446438),p=g(p,u,m,s,i[d+14],9,-1019803690),s=g(s,p,u,m,i[d+3],14,-187363961),m=g(m,s,p,u,i[d+8],20,1163531501),u=g(u,m,s,p,i[d+13],5,-1444681467),p=g(p,u,m,s,i[d+2],9,-51403784),s=g(s,p,u,m,i[d+7],14,1735328473),m=g(m,s,p,u,i[d+12],20,-1926607734),u=h(u,m,s,p,i[d+5],4,-378558),p=h(p,u,m,s,i[d+8],11,-2022574463),s=h(s,p,u,m,i[d+11],16,1839030562),m=h(m,s,p,u,i[d+14],23,-35309556),u=h(u,m,s,p,i[d+1],4,-1530992060),p=h(p,u,m,s,i[d+4],11,1272893353),s=h(s,p,u,m,i[d+7],16,-155497632),m=h(m,s,p,u,i[d+10],23,-1094730640),u=h(u,m,s,p,i[d+13],4,681279174),p=h(p,u,m,s,i[d+0],11,-358537222),s=h(s,p,u,m,i[d+3],16,-722521979),m=h(m,s,p,u,i[d+6],23,76029189),u=h(u,m,s,p,i[d+9],4,-640364487),p=h(p,u,m,s,i[d+12],11,-421815835),s=h(s,p,u,m,i[d+15],16,530742520),m=h(m,s,p,u,i[d+2],23,-995338651),u=w(u,m,s,p,i[d+0],6,-198630844),p=w(p,u,m,s,i[d+7],10,1126891415),s=w(s,p,u,m,i[d+14],15,-1416354905),m=w(m,s,p,u,i[d+5],21,-57434055),u=w(u,m,s,p,i[d+12],6,1700485571),p=w(p,u,m,s,i[d+3],10,-1894986606),s=w(s,p,u,m,i[d+10],15,-1051523),m=w(m,s,p,u,i[d+1],21,-2054922799),u=w(u,m,s,p,i[d+8],6,1873313359),p=w(p,u,m,s,i[d+15],10,-30611744),s=w(s,p,u,m,i[d+6],15,-1560198380),m=w(m,s,p,u,i[d+13],21,1309151649),u=w(u,m,s,p,i[d+4],6,-145523070),p=w(p,u,m,s,i[d+11],10,-1120210379),s=w(s,p,u,m,i[d+2],15,718787259),m=w(m,s,p,u,i[d+9],21,-343485551),u=u+f>>>0,m=m+y>>>0,s=s+v>>>0,p=p+C>>>0}return t.endian([u,m,s,p])};a._ff=function(e,t,n,l,o,r,a){var i=e+(t&n|~t&l)+(o>>>0)+a;return(i<<r|i>>>32-r)+t},a._gg=function(e,t,n,l,o,r,a){var i=e+(t&l|n&~l)+(o>>>0)+a;return(i<<r|i>>>32-r)+t},a._hh=function(e,t,n,l,o,r,a){var i=e+(t^n^l)+(o>>>0)+a;return(i<<r|i>>>32-r)+t},a._ii=function(e,t,n,l,o,r,a){var i=e+(n^(t|~l))+(o>>>0)+a;return(i<<r|i>>>32-r)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,n){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var l=t.wordsToBytes(a(e,n));return n&&n.asBytes?l:n&&n.asString?r.bytesToString(l):t.bytesToHex(l)}}()},function(e,t){!function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,l=0;n<e.length;n++,l+=8)t[l>>>5]|=e[n]<<24-l%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],l=0;l<e.length;l+=3)for(var o=e[l]<<16|e[l+1]<<8|e[l+2],r=0;r<4;r++)8*l+6*r<=8*e.length?n.push(t.charAt(o>>>6*(3-r)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],l=0,o=0;l<e.length;o=++l%4)0!=o&&n.push((t.indexOf(e.charAt(l-1))&Math.pow(2,-2*o+8)-1)<<2*o|t.indexOf(e.charAt(l))>>>6-2*o);return n}};e.exports=n}()},function(e,t){function n(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function l(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&n(e.slice(0,0))}e.exports=function(e){return null!=e&&(n(e)||l(e)||!!e._isBuffer)}},function(e,t,n){"use strict";var l=n(22),o=(n.n(l),n(23)),r=(n.n(o),n(0)),a=wp.i18n.__,i=(wp.element.Component,wp.components),c=i.PanelColor,u=i.withState,m=wp.blocks,s=m.registerBlockType,p=m.InspectorControls,d=m.RichText,b=m.ColorPalette;s("ugb/blockquote",{title:a("Blockquote"),icon:r.i,category:"common",keywords:[a("Blockquote"),a("Stackable")],attributes:{text:{type:"array",source:"children",selector:"p",default:a("It's okay to acknowledge that life can get complicated, but we musn't forget the beauty in its simplicity, too. From the multitude of stars above, to freshly mowed grass in the morning, life is simply wonderful.")},color:{type:"string",default:"#424242"},borderColor:{type:"string",default:"#2091e1"}},edit:u({editable:"content"})(function(e){var t=e.isSelected,n=e.setAttributes,l=(e.className,e.attributes),o=l.color,r=l.text,i=l.borderColor;return[wp.element.createElement("blockquote",{key:"quote",className:"ugb-blockquote",style:{borderLeftColor:i}},wp.element.createElement(d,{tagName:"p",className:"ugb-blockquote-text",value:r,onChange:function(e){return n({text:e})},isSelected:t,style:{color:o}})),t&&wp.element.createElement(p,{key:"inspector"},wp.element.createElement(c,{title:a("Text Color"),colorValue:o,initialOpen:!1},wp.element.createElement(b,{value:o,onChange:function(e){return n({color:e})}})),wp.element.createElement(c,{title:a("Border Color"),colorValue:i,initialOpen:!1},wp.element.createElement(b,{value:i,onChange:function(e){return n({borderColor:e})}})))]}),save:function(e){var t=e.attributes,n=t.color,l=t.text,o=t.borderColor;return wp.element.createElement("blockquote",{className:"ugb-blockquote",style:{borderLeftColor:o}},wp.element.createElement("p",{style:{color:n}},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(25),o=(n.n(l),n(26)),r=(n.n(o),n(0)),a=wp.i18n.__,i=(wp.element.Component,wp.components),c=i.PanelColor,u=i.withState,m=wp.blocks,s=m.registerBlockType,p=m.InspectorControls,d=m.RichText,b=m.ColorPalette;s("ugb/pullquote",{title:a("Pullquote"),icon:r.i,category:"formatting",keywords:[a("Pullquote"),a("Stackable")],attributes:{text:{type:"array",source:"children",selector:"p",default:a("It's okay to acknowledge that life can get complicated, but we musn't forget the beauty in its simplicity, too. From the multitude of stars above, to freshly mowed grass in the morning, life is simply wonderful.")},color:{type:"string",default:"#2091e1"},borderColor:{type:"string",default:"#2091e1"}},edit:u({editable:"content"})(function(e){var t=e.isSelected,n=e.setAttributes,l=(e.className,e.attributes),o=l.color,r=l.text,i=l.borderColor;return[wp.element.createElement("blockquote",{key:"quote",className:"ugb-pullquote",style:{borderTopColor:i,borderBottomColor:i}},wp.element.createElement(d,{tagName:"p",className:"ugb-pullquote-text",value:r,onChange:function(e){return n({text:e})},placeholder:a("Write quote\u2026"),formattingControls:["bold","italic","strikethrough","link"],isSelected:t,keepPlaceholderOnFocus:!0,style:{color:o}})),t&&wp.element.createElement(p,{key:"inspector"},wp.element.createElement(c,{title:a("Text Color"),colorValue:o,initialOpen:!1},wp.element.createElement(b,{value:o,onChange:function(e){return n({color:e})}})),wp.element.createElement(c,{title:a("Border Color"),colorValue:i,initialOpen:!1},wp.element.createElement(b,{value:i,onChange:function(e){return n({borderColor:e})}})))]}),save:function(e){var t=e.attributes,n=t.color,l=t.text,o=t.borderColor;return wp.element.createElement("blockquote",{className:"ugb-pullquote",style:{borderTopColor:o,borderBottomColor:o}},wp.element.createElement("p",{style:{color:n}},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(28),o=(n.n(l),n(29)),r=(n.n(o),n(0)),a=wp.i18n.__,i=(wp.element.Component,wp.components),c=i.PanelColor,u=i.Dashicon,m=i.IconButton,s=i.withState,p=i.SelectControl,d=i.RangeControl,b=wp.blocks,g=b.registerBlockType,h=b.InspectorControls,w=(b.BlockControls,b.AlignmentToolbar,b.RichText),f=b.ColorPalette,y=b.UrlInput;g("ugb/cta",{title:a("Call to Action"),icon:r.b,category:"layout",keywords:[a("Call to Action"),a("Stackable"),a("CTA")],attributes:{url:{type:"string",source:"attribute",selector:"a",attribute:"href"},title:{type:"string",source:"attribute",selector:"a",attribute:"title"},ctaTitle:{type:"array",source:"children",selector:"h3",default:a("Get Started Today")},bodyText:{type:"array",source:"children",selector:"p",default:a("Get Stackable: Ultimate Gutenberg Blocks today.\xa0 Apart from adding new blocks, it gives Gutenberg users more options and settings to tinker with, expanding Gutenberg\u2019s functionality.")},buttonText:{type:"array",source:"children",selector:"a"},color:{type:"string",default:"#2091e1"},textColor:{type:"string",default:"#ffffff"},titleColor:{type:"string"},bodyTextColor:{type:"string"},bgColor:{type:"string"},size:{type:"string",default:"normal"},borderButtonRadius:{type:"number",default:4}},edit:s({editable:"content"})(function(e){var t=e.isSelected,n=e.editable,l=e.setState,o=(e.className,e.setAttributes),r=e.attributes,i=r.url,s=r.buttonText,b=(r.title,r.ctaTitle),g=r.bodyText,v=r.color,C=r.textColor,E=r.size,T=r.borderButtonRadius,k=r.bodyTextColor,x=r.titleColor,N=r.bgColor,S=[{value:"small",label:a("Small")},{value:"normal",label:a("Normal")},{value:"medium",label:a("Medium")},{value:"large",label:a("Large")}],B=function(e){return function(){l({editable:e})}};return[wp.element.createElement("div",{key:"editable",className:"ugb-cta",style:{backgroundColor:N}},wp.element.createElement(w,{className:"ugb-cta-title",tagName:"h3",placeholder:a("Add Title"),value:b,onChange:function(e){return o({ctaTitle:e})},isSelected:t&&"ctaTitle"===n,onFocus:B("ctaTitle"),keepPlaceholderOnFocus:!0,style:{color:x}}),wp.element.createElement(w,{tagName:"p",value:g,className:"ugb-cta-bodyText",onChange:function(e){return o({bodyText:e})},isSelected:t&&"bodyText"===n,onFocus:B("bodyText"),placeholder:a("Write body text\u2026"),style:{color:k}}),wp.element.createElement("span",{key:"button",className:"wp-block-button ugb-cta-button"},wp.element.createElement(w,{tagName:"span",placeholder:a("Add Text"),value:s,onChange:function(e){return o({buttonText:e})},isSelected:t&&"buttonText"===n,onFocus:B("buttonText"),className:"wp-ugb-button ugb-button-"+E,style:{backgroundColor:v,color:C,borderRadius:T+"px"},keepPlaceholderOnFocus:!0}),t&&wp.element.createElement(h,{key:"inspector"},wp.element.createElement(p,{label:a("Button Size"),value:E,options:S.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){o({size:e})}}),wp.element.createElement(d,{label:a("Button Border Radius"),value:T,min:"1",max:"50",onChange:function(e){return o({borderButtonRadius:e})}}),wp.element.createElement(c,{title:a("Title Color"),colorValue:x,initialOpen:!1},wp.element.createElement(f,{value:v,onChange:function(e){return o({titleColor:e})}})),wp.element.createElement(c,{title:a("Body Text Color"),colorValue:k,initialOpen:!1},wp.element.createElement(f,{value:v,onChange:function(e){return o({bodyTextColor:e})}})),wp.element.createElement(c,{title:a("Button Background Color"),colorValue:v,initialOpen:!1},wp.element.createElement(f,{value:v,onChange:function(e){return o({color:e})}})),wp.element.createElement(c,{title:a("Button Text Color"),colorValue:C,initialOpen:!1},wp.element.createElement(f,{value:C,onChange:function(e){return o({textColor:e})}})),wp.element.createElement(c,{title:a("Background Color"),colorValue:N,initialOpen:!1},wp.element.createElement(f,{value:N,onChange:function(e){return o({bgColor:e})}})))),t&&wp.element.createElement("form",{key:"form-link",onSubmit:function(e){return e.preventDefault()},className:"blocks-button__inline-link"},wp.element.createElement(u,{icon:"admin-links"}),wp.element.createElement(y,{value:i,onChange:function(e){return o({url:e})}}),wp.element.createElement(m,{icon:"editor-break",label:a("Apply"),type:"submit"})))]}),save:function(e){var t=e.attributes,n=t.url,l=(t.title,t.buttonText),o=t.ctaTitle,r=t.bodyText,a=t.color,i=t.textColor,c=t.size,u=t.borderButtonRadius,m=t.bodyTextColor,s=t.titleColor,p=t.bgColor,d={backgroundColor:a,color:i,borderRadius:u+"px"};return wp.element.createElement("div",{className:"ugb-cta",style:{backgroundColor:p}},o&&!!o.length&&wp.element.createElement("h3",{className:"ugb-cta-title",style:{color:s}},o),r&&!!r.length&&wp.element.createElement("p",{className:"ugb-cta-bodyText",style:{color:m}},r),l&&!!l.length&&wp.element.createElement("a",{href:n,className:"wp-ugb-button ugb-cta-button ugb-button-"+c,style:d},l))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(31),o=(n.n(l),n(32)),r=(n.n(o),n(0)),a=wp.i18n.__,i=(wp.element.Component,wp.blocks.registerBlockType),c=wp.components,u=c.PanelColor,m=c.Button,s=c.withState,p=wp.blocks,d=p.InspectorControls,b=p.RichText,g=p.ColorPalette,h=p.MediaUpload,w=p.BlockControls,f=(p.AlignmentToolbar,wp.blocks.InspectorControls.SelectControl);i("ugb/testimonial",{title:a("Testimonial"),icon:r.l,category:"common",keywords:[a("Testimonial"),a("Stackable")],attributes:{title:{type:"string",source:"attribute",selector:"a",attribute:"title"},url:{type:"string",source:"attribute",selector:"a",attribute:"href"},href:{type:"url"},hrefTwo:{type:"url"},hrefThree:{type:"url"},mediaID:{type:"number"},mediaIDTwo:{type:"number"},mediaIDThree:{type:"number"},mediaURL:{type:"string",source:"attribute",selector:".ugb-testimonial-column-one .testimonial-image",attribute:"data-src"},mediaURLTwo:{type:"string",source:"attribute",selector:".ugb-testimonial-column-two .testimonial-image",attribute:"data-src"},mediaURLThree:{type:"string",source:"attribute",selector:".ugb-testimonial-column-three .testimonial-image",attribute:"data-src"},testimonialTitle:{type:"array",source:"children",selector:".ugb-testimonial-column-one h4",default:a("Ben Adams")},testimonialTitleTwo:{type:"array",source:"children",selector:".ugb-testimonial-column-two h4",default:a("Alex Johnson")},testimonialTitleThree:{type:"array",source:"children",selector:".ugb-testimonial-column-three h4",default:a("Sammy Simpson")},position:{type:"array",source:"children",selector:".ugb-testimonial-position",default:a("Founder")},positionTwo:{type:"array",source:"children",selector:".ugb-testimonial-position-two",default:a("Editor")},positionThree:{type:"array",source:"children",selector:".ugb-testimonial-position-three",default:a("Programmer")},body:{type:"array",source:"children",selector:".ugb-testimonial-body",default:a("Stackable: Ultimate Blocks from Gutenberg has all the blocks I need to make a great webpage.")},bodyTwo:{type:"array",source:"children",selector:".ugb-testimonial-body-two",default:a("Stackable: Ultimate Blocks from Gutenberg has all the blocks I need to make a great webpage.")},bodyThree:{type:"array",source:"children",selector:".ugb-testimonial-body-three",default:a("Stackable: Ultimate Blocks from Gutenberg has all the blocks I need to make a great webpage.")},titleColor:{type:"string"},posColor:{type:"string"},bodyTextColor:{type:"string"},iconColor:{type:"string"},columns:{type:"select",default:"1"}},edit:s({editable:"content"})(function(e){var t=e.isSelected,n=e.editable,l=e.setState,o=(e.className,e.setAttributes),r=e.attributes,i=(r.url,r.title,r.testimonialTitle),c=r.testimonialTitleTwo,s=r.testimonialTitleThree,p=r.body,y=r.bodyTwo,v=r.bodyThree,C=r.position,E=r.positionTwo,T=r.positionThree,k=(r.href,r.hrefTwo,r.hrefThree,r.mediaID),x=r.mediaIDTwo,N=r.mediaIDThree,S=r.mediaURL,B=r.mediaURLTwo,I=r.mediaURLThree,O=r.columns,A=r.titleColor,P=r.posColor,F=r.bodyTextColor,z=r.iconColor,L=[{value:"1",label:a("One Column")},{value:"2",label:a("Two Column")},{value:"3",label:a("Three Column")}],_=function(e){return function(){l({editable:e})}};return[t&&wp.element.createElement(w,null),t&&wp.element.createElement(d,{key:"inspector"},wp.element.createElement(f,{label:a("Column Number"),value:O,options:L.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){o({columns:e})}}),wp.element.createElement(u,{title:a("Title Color"),colorValue:A,initialOpen:!1},wp.element.createElement(g,{value:A,onChange:function(e){return o({titleColor:e})}})),wp.element.createElement(u,{title:a("Position Color"),colorValue:P,initialOpen:!1},wp.element.createElement(g,{value:P,onChange:function(e){return o({posColor:e})}})),wp.element.createElement(u,{title:a("Body Text Color"),colorValue:F,initialOpen:!1},wp.element.createElement(g,{value:F,onChange:function(e){return o({bodyTextColor:e})}})),wp.element.createElement(u,{title:a("Icon Color"),colorValue:z,initialOpen:!1},wp.element.createElement(g,{value:z,onChange:function(e){return o({iconColor:e})}}))),wp.element.createElement("div",{key:"editable",className:"ugb-testimonial column-"+O},wp.element.createElement("div",{className:"ugb-testimonial-column-one"},wp.element.createElement("div",null,wp.element.createElement(h,{onSelect:function(e){return o({mediaURL:e.url,mediaID:e.id})},type:"image",value:k,render:function(e){return wp.element.createElement(m,{className:k?"":"button button-large",onClick:e.open},k?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+S+")"}}):a("Upload Image"))}})),wp.element.createElement(b,{tagName:"h4",placeholder:a("Add title\u2026"),value:i,onChange:function(e){return o({testimonialTitle:e})},isSelected:t&&"testimonialTitle"===n,onFocus:_("testimonialTitle"),style:{color:A},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:C,className:"ugb-testimonial-position",onChange:function(e){return o({position:e})},isSelected:t&&"position"===n,onFocus:_("position"),placeholder:a("Add position\u2026"),style:{color:P},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:p,className:"ugb-testimonial-body",onChange:function(e){return o({body:e})},isSelected:t&&"body"===n,onFocus:_("body"),placeholder:a("Add body\u2026"),style:{color:F},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-testimonial-column-two"},wp.element.createElement("div",null,wp.element.createElement(h,{onSelect:function(e){return o({mediaURLTwo:e.url,mediaIDTwo:e.id})},type:"image",value:x,render:function(e){return wp.element.createElement(m,{className:x?"":"button button-large",onClick:e.open},x?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+B+")"}}):a("Upload Image"))}})),wp.element.createElement(b,{tagName:"h4",placeholder:a("Add title\u2026"),value:c,onChange:function(e){return o({testimonialTitleTwo:e})},isSelected:t&&"testimonialTitleTwo"===n,onFocus:_("testimonialTitleTwo"),style:{color:A},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:E,className:"ugb-testimonial-position-two",onChange:function(e){return o({positionTwo:e})},isSelected:t&&"positionTwo"===n,onFocus:_("positionTwo"),placeholder:a("Add position\u2026"),style:{color:P},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:y,className:"ugb-testimonial-body-two",onChange:function(e){return o({bodyTwo:e})},isSelected:t&&"bodyTwo"===n,onFocus:_("bodyTwo"),placeholder:a("Add body\u2026"),style:{color:F},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-testimonial-column-three"},wp.element.createElement("div",null,wp.element.createElement(h,{onSelect:function(e){return o({mediaURLThree:e.url,mediaIDThree:e.id})},type:"image",value:N,render:function(e){return wp.element.createElement(m,{className:N?"":"button button-large",onClick:e.open},N?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+I+")"}}):a("Upload Image"))}})),wp.element.createElement(b,{tagName:"h4",placeholder:a("Add title\u2026"),value:s,onChange:function(e){return o({testimonialTitleThree:e})},isSelected:t&&"testimonialTitleThree"===n,onFocus:_("testimonialTitleThree"),style:{color:A},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:T,className:"ugb-testimonial-position-three",onChange:function(e){return o({positionThree:e})},isSelected:t&&"positionThree"===n,onFocus:_("positionThree"),placeholder:a("Add position\u2026"),style:{color:P},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:v,className:"ugb-testimonial-body-three",onChange:function(e){return o({bodyThree:e})},isSelected:t&&"bodyThree"===n,onFocus:_("bodyThree"),placeholder:a("Add body\u2026"),style:{color:F},keepPlaceholderOnFocus:!0})))]}),save:function(e){var t=e.attributes,n=(t.url,t.title,t.testimonialTitle),l=t.testimonialTitleTwo,o=t.testimonialTitleThree,r=t.body,a=t.bodyTwo,i=t.bodyThree,c=t.position,u=t.positionTwo,m=t.positionThree,s=t.mediaURL,p=t.mediaURLTwo,d=t.mediaURLThree,b=(t.mediaID,t.mediaIDTwo,t.mediaIDThree,t.titleColor),g=t.posColor,h=t.bodyTextColor,w=t.iconColor,f=t.columns,y=wp.element.createElement("div",{key:"button",className:"quote-icon"},wp.element.createElement("svg",{viewBox:"0 0 246 187.5",style:{fill:w}},wp.element.createElement("path",{d:"M98.5,0h-93C2.5,0,0,2.5,0,5.5v93c0,3,2.5,5.5,5.5,5.5h39c-1.7,15.5-8.8,50-39,50c-3,0-5.5,2.5-5.5,5.5V182c0,3,2.5,5.5,5.5,5.5c5.2,0,98.5-4.5,98.5-89v-93C104,2.5,101.5,0,98.5,0z"}),wp.element.createElement("path",{d:"M240.5,0h-93c-3,0-5.5,2.5-5.5,5.5v93c0,3,2.5,5.5,5.5,5.5h39c-1.7,15.5-8.8,50-39,50c-3,0-5.5,2.5-5.5,5.5V182c0,3,2.5,5.5,5.5,5.5c5.2,0,98.5-4.5,98.5-89v-93C246,2.5,243.5,0,240.5,0z"}),wp.element.createElement("path",{d:"M161.3-86.3c3.2,0,3.2-5,0-5C158.1-91.3,158.1-86.3,161.3-86.3L161.3-86.3z"})));return wp.element.createElement("div",{className:"ugb-testimonial column-"+f},wp.element.createElement("div",{className:"ugb-testimonial-column-one"},s?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+s+")"},"data-src":s}):y,n&&!!n.length&&wp.element.createElement("h4",{style:{color:b}},n),c&&!!c.length&&wp.element.createElement("p",{className:"ugb-testimonial-position",style:{color:g}},c),r&&!!r.length&&wp.element.createElement("p",{className:"ugb-testimonial-body",style:{color:h}},r)),f>1&&wp.element.createElement("div",{className:"ugb-testimonial-column-two"},p?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+p+")"},"data-src":p}):y,l&&!!l.length&&wp.element.createElement("h4",{style:{color:b}},l),u&&!!u.length&&wp.element.createElement("p",{className:"ugb-testimonial-position-two",style:{color:g}},u),a&&!!a.length&&wp.element.createElement("p",{className:"ugb-testimonial-body-two",style:{color:h}},a)),f>2&&wp.element.createElement("div",{className:"ugb-testimonial-column-three"},d?wp.element.createElement("div",{className:"testimonial-image",style:{backgroundImage:"url("+d+")"},"data-src":d}):y,o&&!!o.length&&wp.element.createElement("h4",{style:{color:b}},o),m&&!!m.length&&wp.element.createElement("p",{className:"ugb-testimonial-position-three",style:{color:g}},m),i&&!!i.length&&wp.element.createElement("p",{className:"ugb-testimonial-body-three",style:{color:h}},i)))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(34),o=(n.n(l),n(35)),r=(n.n(o),n(0)),a=wp.i18n.__,i=(wp.element.Component,wp.components),c=i.PanelColor,u=i.Button,m=i.SelectControl,s=(i.TextControl,i.withState),p=wp.blocks,d=p.registerBlockType,b=p.InspectorControls,g=p.RichText,h=p.ColorPalette,w=p.MediaUpload,f=p.BlockControls;p.AlignmentToolbar;d("ugb/team-member",{title:a("Team Member"),icon:r.k,category:"common",keywords:[a("Team Member"),a("Stackable")],attributes:{title:{type:"string",source:"attribute",selector:"a",attribute:"title"},url:{type:"string",source:"attribute",selector:"a",attribute:"href"},href:{type:"url"},hrefTwo:{type:"url"},hrefThree:{type:"url"},mediaID:{type:"number"},mediaIDTwo:{type:"number"},mediaIDThree:{type:"number"},mediaURL:{type:"string",source:"attribute",selector:".ugb-team-member-column-one .team-member-image",attribute:"data-src"},mediaURLTwo:{type:"string",source:"attribute",selector:".ugb-team-member-column-two .team-member-image",attribute:"data-src"},mediaURLThree:{type:"string",source:"attribute",selector:".ugb-team-member-column-three .team-member-image",attribute:"data-src"},name:{type:"array",source:"children",selector:".ugb-team-member-column-one h4",default:a("Ben Adams")},nameTwo:{type:"array",source:"children",selector:".ugb-team-member-column-two h4",default:a("Alex Johnson")},nameThree:{type:"array",source:"children",selector:".ugb-team-member-column-three h4",default:a("Sammy Simpson")},position:{type:"array",source:"children",selector:".ugb-team-member-column-one .ugb-team-member-position",default:a("Founder")},positionTwo:{type:"array",source:"children",selector:".ugb-team-member-column-two .ugb-team-member-position",default:a("Editor")},positionThree:{type:"array",source:"children",selector:".ugb-team-member-column-three .ugb-team-member-position",default:a("Programmer")},des:{type:"array",source:"children",selector:".ugb-team-member-des",default:a("Ben is the head of our small team. He loves walking his dog, Walter, when he has some free time.")},desTwo:{type:"array",source:"children",selector:".ugb-team-member-des-two",default:a("Alex handles all written content. She enjoys painting and playing softball on the weekends.")},desThree:{type:"array",source:"children",selector:".ugb-team-member-des-three",default:a("Sammy is our programmer. You'll usually find her nose in a book. She has a cat named Skitty.")},nameColor:{type:"string"},posColor:{type:"string"},desColor:{type:"string"},iconColor:{type:"string"},columns:{type:"select",default:"1"},shapes:{type:"select",default:"square"}},edit:s({editable:"content"})(function(e){var t=e.isSelected,n=e.editable,l=e.setState,o=(e.className,e.setAttributes),r=e.attributes,i=(r.url,r.title,r.name),s=r.nameTwo,p=r.nameThree,d=r.des,y=r.desTwo,v=r.desThree,C=r.position,E=r.positionTwo,T=r.positionThree,k=(r.href,r.hrefTwo,r.hrefThree,r.mediaID),x=r.mediaIDTwo,N=r.mediaIDThree,S=r.mediaURL,B=r.mediaURLTwo,I=r.mediaURLThree,O=r.columns,A=r.nameColor,P=r.posColor,F=r.desColor,z=r.iconColor,L=r.shapes,_=[{value:"1",label:a("One Column")},{value:"2",label:a("Two Column")},{value:"3",label:a("Three Column")}],R=[{value:"square",label:a("Square")},{value:"circle",label:a("Circle")}],V=function(e){return function(){l({editable:e})}};return[t&&wp.element.createElement(f,{key:"controls"}),t&&wp.element.createElement(b,{key:"inspector"},wp.element.createElement(m,{label:a("Image Shape"),value:L,options:R.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){o({shapes:e})}}),wp.element.createElement(m,{label:a("Column Number"),value:O,options:_.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){o({columns:e})}}),wp.element.createElement(c,{title:a("Name Color"),colorValue:A,initialOpen:!1},wp.element.createElement(h,{value:A,onChange:function(e){return o({nameColor:e})}})),wp.element.createElement(c,{title:a("Position Color"),colorValue:P,initialOpen:!1},wp.element.createElement(h,{value:P,onChange:function(e){return o({posColor:e})}})),wp.element.createElement(c,{title:a("Description Color"),colorValue:F,initialOpen:!1},wp.element.createElement(h,{value:F,onChange:function(e){return o({desColor:e})}})),wp.element.createElement(c,{title:a("Icon Color"),colorValue:z,initialOpen:!1},wp.element.createElement(h,{value:z,onChange:function(e){return o({iconColor:e})}}))),wp.element.createElement("div",{key:"editable",className:"ugb-team-member column-"+O+" image-"+L},wp.element.createElement("div",{className:"ugb-team-member-column-one"},wp.element.createElement("div",null,wp.element.createElement(w,{onSelect:function(e){return o({mediaURL:e.url,mediaID:e.id})},type:"image",value:k,render:function(e){return wp.element.createElement(u,{className:k?"":"button button-large",onClick:e.open},k?wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+S+")"}}):a("Upload Image"))}})),wp.element.createElement(g,{tagName:"h4",value:i,onChange:function(e){return o({name:e})},isSelected:t&&"name"===n,onFocus:V("name"),placeholder:i.default,style:{color:A},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:C,className:"ugb-team-member-position",onChange:function(e){return o({position:e})},isSelected:t&&"position"===n,onFocus:V("position"),placeholder:C.default,style:{color:P},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:d,className:"ugb-team-member-des",onChange:function(e){return o({des:e})},isSelected:t&&"des"===n,onFocus:V("des"),placeholder:d.default,style:{color:F},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-team-member-column-two"},wp.element.createElement("div",null,wp.element.createElement(w,{onSelect:function(e){return o({mediaURLTwo:e.url,mediaIDTwo:e.id})},type:"image",value:x,render:function(e){return wp.element.createElement(u,{className:x?"":"button button-large",onClick:e.open},x?wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+B+")"}}):a("Upload Image"))}})),wp.element.createElement(g,{tagName:"h4",value:s,onChange:function(e){return o({nameTwo:e})},isSelected:t&&"nameTwo"===n,onFocus:V("nameTwo"),placeholder:s.default,style:{color:A},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:E,className:"ugb-team-member-position",onChange:function(e){return o({positionTwo:e})},isSelected:t&&"positionTwo"===n,onFocus:V("positionTwo"),placeholder:E.default,style:{color:P},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:y,className:"ugb-team-member-des-two",onChange:function(e){return o({desTwo:e})},isSelected:t&&"desTwo"===n,onFocus:V("desTwo"),placeholder:y.default,style:{color:F},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-team-member-column-three"},wp.element.createElement("div",null,wp.element.createElement(w,{onSelect:function(e){return o({mediaURLThree:e.url,mediaIDThree:e.id})},type:"image",value:N,render:function(e){return wp.element.createElement(u,{className:N?"":"button button-large",onClick:e.open},N?wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+I+")"}}):a("Upload Image"))}})),wp.element.createElement(g,{tagName:"h4",value:p,onChange:function(e){return o({nameThree:e})},isSelected:t&&"nameThree"===n,onFocus:V("nameThree"),placeholder:p.default,style:{color:A},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:T,className:"ugb-team-member-position",onChange:function(e){return o({positionThree:e})},isSelected:t&&"positionThree"===n,onFocus:V("positionThree"),placeholder:T.default,style:{color:P},keepPlaceholderOnFocus:!0}),wp.element.createElement(g,{tagName:"p",value:v,className:"ugb-team-member-des-three",onChange:function(e){return o({desThree:e})},isSelected:t&&"desThree"===n,onFocus:V("desThree"),placeholder:v.default,style:{color:F},keepPlaceholderOnFocus:!0})))]}),save:function(e){var t=e.attributes,n=(t.url,t.title,t.name),l=t.nameTwo,o=t.nameThree,r=t.shapes,a=t.des,i=t.desTwo,c=t.desThree,u=t.position,m=t.positionTwo,s=t.positionThree,p=t.mediaURL,d=t.mediaURLTwo,b=t.mediaURLThree,g=(t.mediaID,t.mediaIDTwo,t.mediaIDThree,t.nameColor),h=t.posColor,w=t.desColor,f=(t.iconColor,t.columns);return wp.element.createElement("div",{className:"ugb-team-member column-"+f+" image-"+r},wp.element.createElement("div",{className:"ugb-team-member-column-one"},p&&wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+p+")"},"data-src":p}),n&&!!n.length&&wp.element.createElement("h4",{style:{color:g}},n),u&&!!u.length&&wp.element.createElement("p",{className:"ugb-team-member-position",style:{color:h}},u),a&&!!a.length&&wp.element.createElement("p",{className:"ugb-team-member-des",style:{color:w}},a)),f>1&&wp.element.createElement("div",{className:"ugb-team-member-column-two"},d&&wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+d+")"},"data-src":d}),l&&!!l.length&&wp.element.createElement("h4",{style:{color:g}},l),m&&!!m.length&&wp.element.createElement("p",{className:"ugb-team-member-position",style:{color:h}},m),i&&!!i.length&&wp.element.createElement("p",{className:"ugb-team-member-des-two",style:{color:w}},i)),f>2&&wp.element.createElement("div",{className:"ugb-team-member-column-three"},b&&wp.element.createElement("div",{className:"team-member-image",style:{backgroundImage:"url("+b+")"},"data-src":b}),o&&!!o.length&&wp.element.createElement("h4",{style:{color:g}},o),s&&!!s.length&&wp.element.createElement("p",{className:"ugb-team-member-position",style:{color:h}},s),c&&!!c.length&&wp.element.createElement("p",{className:"ugb-team-member-des-three",style:{color:w}},c)))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(37),r=(n.n(o),n(38)),a=(n.n(r),n(0)),i=wp.i18n.__,c=(wp.element.Component,wp.components.withState),u=wp.blocks,m=u.registerBlockType,s=u.RichText,p=u.BlockControls,d=function(e){return e.map(function(e){return e.children})},b=function(e){return e.map(function(e){return{children:e}})};m("ugb/expand",{title:i("Expand / Show More"),icon:a.d,category:"formatting",keywords:[i("Expand"),i("Show more/less"),i("Stackable")],attributes:{text:{type:"array",source:"query",selector:".ugb-expand-less-text > p",query:{children:{source:"node"}},default:[]},moreText:{type:"array",source:"query",selector:".ugb-expand-more-text > p",query:{children:{source:"node"}},default:[]},moreLabel:{type:"array",source:"children",selector:".ugb-expand-more",default:i("Show more")},lessLabel:{type:"array",source:"children",selector:".ugb-expand-less",default:i("Show less")}},edit:c({editable:"text"})(function(e){var t=(e.focus,e.setFocus,e.editable),n=e.setAttributes,o=e.setState,r=e.className,a=e.isSelected,c=function(e){return function(){o({editable:e})}},u=e.attributes,m=u.text,g=u.moreLabel,h=u.moreText,w=u.lessLabel;return[a&&wp.element.createElement(p,{key:"controls"}),wp.element.createElement("div",{key:"expand",className:r},a&&wp.element.createElement("label",{className:"ugb-editor-label"},"Less text"),wp.element.createElement(s,l({multiline:"p",placeholder:e.attributes.text.default,value:d(m),onChange:function(e){return n({text:b(e)})},isSelected:a&&"text"===t,onFocus:c("text"),className:"ugb-expand-less-text"},"placeholder",i("Some short text that can be expanded to show more details."))),wp.element.createElement(s,l({tagName:"a",placeholder:e.attributes.moreLabel.default,value:g,isSelected:a&&"moreLabel"===t,onFocus:c("moreLabel"),onChange:function(e){return n({moreLabel:e})},formattingControls:["bold","italic","strikethrough"],className:"ugb-expand-more"},"placeholder",i("Show more"))),a&&wp.element.createElement("label",{className:"ugb-editor-label"},"More text"),a&&wp.element.createElement(s,l({multiline:"p",placeholder:e.attributes.moreText.default,value:d(h),isSelected:a&&"moreText"===t,onFocus:c("moreText"),onChange:function(e){return n({moreText:b(e)})},className:"ugb-expand-more-text"},"placeholder",i("Some short text that can be expanded to show more details. Some additional text that can only be seen when expanded."))),a&&wp.element.createElement(s,l({tagName:"a",placeholder:e.attributes.lessLabel.default,value:w,isSelected:a&&"lessLabel"===t,onFocus:c("lessLabel"),onChange:function(e){return n({lessLabel:e})},formattingControls:["bold","italic","strikethrough"],className:"ugb-expand-less"},"placeholder",i("Show less"))))]}),save:function(e){var t=e.attributes,n=t.text,l=t.moreLabel,o=t.moreText,r=t.lessLabel;return wp.element.createElement("div",null,wp.element.createElement("div",{className:"ugb-expand-less-text"},n.map(function(e,t){return wp.element.createElement("p",{key:t},e.children&&e.children.props.children)})),wp.element.createElement("div",{className:"ugb-expand-more-text",style:{display:"none"}},o.map(function(e,t){return wp.element.createElement("p",{key:t},e.children&&e.children.props.children)})),wp.element.createElement("a",{className:"ugb-expand-button",href:"#"},wp.element.createElement("span",{className:"ugb-expand-more"},l),wp.element.createElement("span",{className:"ugb-expand-less",style:{display:"none"}},r)))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(40),o=(n.n(l),n(41)),r=(n.n(o),n(0)),a=wp.i18n.__,i=(wp.element.Component,wp.components),c=i.PanelColor,u=i.withState,m=i.SelectControl,s=wp.blocks,p=s.registerBlockType,d=s.InspectorControls,b=s.RichText,g=s.ColorPalette,h=(s.MediaUpload,s.BlockControls);s.AlignmentToolbar,s.BlockAlignmentToolbar;p("ugb/number-box",{title:a("Number Box"),icon:r.g,category:"common",keywords:[a("Number Box"),a("Stackable")],attributes:{title:{type:"string",source:"attribute",selector:"a",attribute:"title"},numberBox:{type:"array",source:"children",selector:".ugb-number-box-column-one span",default:a("01")},numberBoxTwo:{type:"array",source:"children",selector:".ugb-number-box-column-two span",default:a("02")},numberBoxThree:{type:"array",source:"children",selector:".ugb-number-box-column-three span",default:a("03")},name:{type:"array",source:"children",selector:".ugb-number-box-name",default:a("Registration")},nameTwo:{type:"array",source:"children",selector:".ugb-number-box-name-two",default:a("Waiting Period")},nameThree:{type:"array",source:"children",selector:".ugb-number-box-name-three",default:a("Delivery")},body:{type:"array",source:"children",selector:".ugb-number-box-body",default:a("This is just a sample write-up, but you can check out more info on Gutenberg on the WP repository.")},bodyTwo:{type:"array",source:"children",selector:".ugb-number-box-body-two",default:a("This is just a sample write-up, but you can check out more info on Gutenberg on the WP repository.")},bodyThree:{type:"array",source:"children",selector:".ugb-number-box-body-three",default:a("This is just a sample write-up, but you can check out more info on Gutenberg on the WP repository.")},numberBoxColor:{type:"string"},nameColor:{type:"string"},bodyTextColor:{type:"string"},numberBGColor:{type:"string"},columns:{type:"select",default:"1"}},edit:u({editable:"content"})(function(e){var t=(e.className,e.setAttributes),n=e.isSelected,l=e.editable,o=e.setState,r=e.attributes,i=(r.title,r.numberBox),u=r.numberBoxTwo,s=r.numberBoxThree,p=r.body,w=r.bodyTwo,f=r.bodyThree,y=r.name,v=r.nameTwo,C=r.nameThree,E=r.columns,T=r.numberBoxColor,k=r.nameColor,x=r.bodyTextColor,N=r.numberBGColor,S=[{value:"1",label:a("One Column")},{value:"2",label:a("Two Column")},{value:"3",label:a("Three Column")}],B=function(e){return function(){o({editable:e})}};return[n&&wp.element.createElement(h,{key:"controls"}),n&&wp.element.createElement(d,{key:"inspector"},wp.element.createElement(m,{label:a("Column Number"),value:E,options:S.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){t({columns:e})}}),wp.element.createElement(c,{title:a("Number Color"),colorValue:T,initialOpen:!1},wp.element.createElement(g,{value:T,onChange:function(e){return t({numberBoxColor:e})}})),wp.element.createElement(c,{title:a("Number Background Color"),colorValue:N,initialOpen:!1},wp.element.createElement(g,{value:N,onChange:function(e){return t({numberBGColor:e})}})),wp.element.createElement(c,{title:a("Name Color"),colorValue:k,initialOpen:!1},wp.element.createElement(g,{value:k,onChange:function(e){return t({nameColor:e})}})),wp.element.createElement(c,{title:a("Body Text Color"),colorValue:x,initialOpen:!1},wp.element.createElement(g,{value:x,onChange:function(e){return t({bodyTextColor:e})}}))),wp.element.createElement("div",{key:"editable",className:"ugb-number-box column-"+E},wp.element.createElement("div",{className:"ugb-number-box-column-one"},wp.element.createElement(b,{tagName:"span",placeholder:i.default,value:i,onChange:function(e){return t({numberBox:e})},isSelected:n&&"numberBox"===l,onFocus:B("numberBox"),style:{color:T,backgroundColor:N},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"h4",value:y,className:"ugb-number-box-name",onChange:function(e){return t({name:e})},isSelected:n&&"name"===l,onFocus:B("name"),placeholder:a("Add name\u2026"),style:{color:k},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:p,className:"ugb-number-box-body",onChange:function(e){return t({body:e})},isSelected:n&&"body"===l,onFocus:B("body"),placeholder:a("Add body\u2026"),style:{color:x},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-number-box-column-two"},wp.element.createElement(b,{tagName:"span",placeholder:u.default,value:u,onChange:function(e){return t({numberBoxTwo:e})},isSelected:n&&"numberBoxTwo"===l,onFocus:B("numberBoxTwo"),style:{color:T,backgroundColor:N},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"h4",value:v,className:"ugb-number-box-name-two",onChange:function(e){return t({nameTwo:e})},isSelected:n&&"nameTwo"===l,onFocus:B("nameTwo"),placeholder:a("Add name\u2026"),style:{color:k},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:w,className:"ugb-number-box-body-two",onChange:function(e){return t({bodyTwo:e})},isSelected:n&&"bodyTwo"===l,onFocus:B("bodyTwo"),placeholder:a("Add body\u2026"),style:{color:x},keepPlaceholderOnFocus:!0})),wp.element.createElement("div",{className:"ugb-number-box-column-three"},wp.element.createElement(b,{tagName:"span",placeholder:s.default,value:s,onChange:function(e){return t({numberBoxThree:e})},isSelected:n&&"numberBoxThree"===l,onFocus:B("numberBoxThree"),style:{color:T,backgroundColor:N},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"h4",value:C,className:"ugb-number-box-name-three",onChange:function(e){return t({nameThree:e})},isSelected:n&&"nameThree"===l,onFocus:B("nameThree"),placeholder:a("Add name\u2026"),style:{color:k},keepPlaceholderOnFocus:!0}),wp.element.createElement(b,{tagName:"p",value:f,className:"ugb-number-box-body-three",onChange:function(e){return t({bodyThree:e})},isSelected:n&&"bodyThree"===l,onFocus:B("bodyThree"),placeholder:a("Add body\u2026"),style:{color:x},keepPlaceholderOnFocus:!0})))]}),save:function(e){var t=e.attributes,n=(t.title,t.numberBox),l=t.numberBoxTwo,o=t.numberBoxThree,r=t.body,a=t.bodyTwo,i=t.bodyThree,c=t.name,u=t.nameTwo,m=t.nameThree,s=t.numberBoxColor,p=t.nameColor,d=t.bodyTextColor,b=t.numberBGColor,g=t.columns;return wp.element.createElement("div",{className:"ugb-number-box column-"+g},wp.element.createElement("div",{className:"ugb-number-box-column-one"},n&&!!n.length&&wp.element.createElement("span",{style:{color:s,backgroundColor:b}},n),c&&!!c.length&&wp.element.createElement("h4",{className:"ugb-number-box-name",style:{color:p}},c),r&&!!r.length&&wp.element.createElement("p",{className:"ugb-number-box-body",style:{color:d}},r)),g>1&&wp.element.createElement("div",{className:"ugb-number-box-column-two"},l&&!!l.length&&wp.element.createElement("span",{style:{color:s,backgroundColor:b}},l),u&&!!u.length&&wp.element.createElement("h4",{className:"ugb-number-box-name-two",style:{color:p}},u),a&&!!a.length&&wp.element.createElement("p",{className:"ugb-number-box-body-two",style:{color:d}},a)),g>2&&wp.element.createElement("div",{className:"ugb-number-box-column-three"},o&&!!o.length&&wp.element.createElement("span",{style:{color:s,backgroundColor:b}},o),m&&!!m.length&&wp.element.createElement("h4",{className:"ugb-number-box-name-three",style:{color:p}},m),i&&!!i.length&&wp.element.createElement("p",{className:"ugb-number-box-body-three",style:{color:d}},i)))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(43),o=(n.n(l),n(44)),r=(n.n(o),n(0)),a=wp.i18n.__,i=(wp.element.Component,wp.components),c=i.IconButton,u=i.PanelColor,m=i.Toolbar,s=i.Button,p=i.withState,d=i.RangeControl,b=i.SelectControl,g=i.ToggleControl,h=wp.blocks,w=h.registerBlockType,f=h.RichText,y=h.MediaUpload,v=h.BlockControls,C=h.InspectorControls,E=h.ColorPalette;w("ugb/image-box",{title:a("Image Box"),icon:r.h,category:"common",keywords:[a("Image Box"),a("Stackable")],attributes:{title:{type:"array",source:"children",selector:"h4",default:a("Title")},subtitle:{type:"array",source:"children",selector:"p",default:a("Subtitle goes here")},url:{type:"string",source:"attribute",selector:".ugb-image-box",attribute:"data-url"},titleColor:{type:"string",default:"#ffffff"},subtitleColor:{type:"string",default:"#ffffff"},overlayColor:{type:"string",default:"#42b078"},id:{type:"number"},width:{type:"number",default:"400"},height:{type:"number",default:"400"},verticalAlign:{type:"string",default:"center"},horizontalAlign:{type:"string",default:"center"},full:{type:"boolean",default:!1}},edit:p({editable:"content"})(function(e){var t=(e.className,e.setAttributes),n=e.isSelected,l=e.editable,o=e.setState,r=e.attributes,i=r.url,p=r.title,h=r.titleColor,w=r.subtitle,T=r.subtitleColor,k=r.overlayColor,x=r.id,N=r.height,S=r.width,B=r.verticalAlign,I=r.horizontalAlign,O=r.full,A=i?"has-image":"",P=O?"full-width":"",F=function(e){return function(){o({editable:e})}},z=[{value:"flex-start",label:a("Top")},{value:"center",label:a("Center")},{value:"flex-end",label:a("Bottom")}],L=[{value:"flex-start",label:a("Left")},{value:"center",label:a("Center")},{value:"flex-end",label:a("Right")}];return[n&&wp.element.createElement(v,{key:"controls"},i&&wp.element.createElement(m,null,wp.element.createElement(y,{onSelect:function(e){return t({url:e.url,id:e.id})},type:"image",value:x,render:function(e){var t=e.open;return wp.element.createElement(c,{className:"components-toolbar__control",label:a("Edit image"),icon:"edit",onClick:t})}}))),n&&wp.element.createElement(C,{key:"inspector"},wp.element.createElement(g,{label:"Full-Width",checked:!!O,onChange:function(){return t({full:!O})}}),wp.element.createElement(d,{label:a("Height"),value:N,min:"135",max:"700",onChange:function(e){return t({height:e})}}),wp.element.createElement(d,{label:a("Width"),value:S,min:"400",max:"999",onChange:function(e){return t({width:e})}}),wp.element.createElement(b,{label:a("Vertical Alignment"),value:B,options:z.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){t({verticalAlign:e})}}),wp.element.createElement(b,{label:a("Horizontal Alignment"),value:I,options:L.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){t({horizontalAlign:e})}}),wp.element.createElement(u,{title:a("Title Color"),colorValue:h,initialOpen:!1},wp.element.createElement(E,{value:h,onChange:function(e){return t({titleColor:e})}})),wp.element.createElement(u,{title:a("Subtitle Color"),colorValue:T,initialOpen:!1},wp.element.createElement(E,{value:T,onChange:function(e){return t({subtitleColor:e})}})),wp.element.createElement(u,{title:a("Overlay Color"),colorValue:k,initialOpen:!1},wp.element.createElement(E,{value:k,onChange:function(e){return t({overlayColor:e})}}))),wp.element.createElement("div",{key:"editable",className:"ugb-image-box "+A+" "+P,"data-url":i,style:{width:S+"px",height:N+"px",backgroundImage:"url("+i+")",alignItems:I,justifyContent:B}},wp.element.createElement(y,{onSelect:function(e){return t({url:e.url,id:e.id})},type:"image",value:x,render:function(e){return[!i&&wp.element.createElement(s,{className:x?"":"button button-large",onClick:e.open},a("Upload Image"))]}}),wp.element.createElement("a",{href:"#",style:{backgroundColor:k}}),wp.element.createElement(f,{tagName:"h4",placeholder:p.default,value:p,onChange:function(e){return t({title:e})},isSelected:n&&"title"===l,onFocus:F("title"),style:{color:h}}),wp.element.createElement(f,{tagName:"p",placeholder:w.default,value:w,onChange:function(e){return t({subtitle:e})},isSelected:n&&"subtitle"===l,onFocus:F("subtitle"),style:{color:T}}))]}),save:function(e){var t=e.attributes,n=t.url,l=t.title,o=t.titleColor,r=t.subtitle,a=t.subtitleColor,i=t.overlayColor,c=(t.id,t.height),u=t.width,m=t.verticalAlign,s=t.horizontalAlign,p=t.full,d=n?"has-image":"",b=p?"full-width":"",g=l.length||r.length?"has-content":"has-no-content";return wp.element.createElement("div",{className:"ugb-image-box "+d+" "+g+" "+b,"data-url":n,style:{width:u+"px",height:c+"px",backgroundImage:"url("+n+")",alignItems:s,justifyContent:m}},wp.element.createElement("a",{href:"#",style:{backgroundColor:i}}),l&&!!l.length&&wp.element.createElement("h4",{style:{color:o}},l),r&&!!r.length&&wp.element.createElement("p",{style:{color:a}},r))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(46),o=(n.n(l),n(47)),r=(n.n(o),n(0)),a=wp.i18n.__,i=(wp.element.Component,wp.components),c=i.PanelColor,u=i.withState,m=i.RangeControl,s=wp.blocks,p=s.registerBlockType,d=s.InspectorControls,b=s.RichText,g=s.ColorPalette;p("ugb/count-up",{title:a("Count Up"),icon:r.i,category:"common",keywords:[a("Count Up"),a("Stackable")],attributes:{title:{type:"array",source:"children",selector:"h4",default:a("Happy Customers")},counter:{type:"array",source:"children",selector:".ugb-counter",default:"12,345"},des:{type:"array",source:"children",selector:"p",default:a("and counting")},fontSize:{type:"number",default:"60"},headingColor:{type:"string"},desColor:{type:"string"},color:{type:"string"}},edit:u({editable:"content"})(function(e){var t=function(e){return function(){o({editable:e})}},n=e.isSelected,l=e.editable,o=e.setState,r=e.setAttributes,i=(e.className,e.attributes),u=i.color,s=i.headingColor,p=i.desColor,h=i.title,w=i.counter,f=i.des,y=i.fontSize;return[wp.element.createElement("div",{className:"ugb-countup"},wp.element.createElement(b,{tagName:"h4",value:h,onChange:function(e){return r({title:e})},isSelected:n&&"title"===l,onFocus:t("title"),style:{color:s}}),wp.element.createElement(b,{tagName:"div",className:"ugb-counter",placeholder:w.default,"data-duration":"1000","data-delay":"16",value:w,onChange:function(e){return r({counter:e})},isSelected:n&&"counter"===l,onFocus:t("counter"),style:{color:u,fontSize:y+"px"}}),wp.element.createElement(b,{tagName:"p",className:"ugb-counter-des",value:f,onChange:function(e){return r({des:e})},isSelected:n&&"des"===l,onFocus:t("des"),style:{color:p}})),n&&wp.element.createElement(d,{key:"inspector"},wp.element.createElement(c,{title:a("Heading Color"),colorValue:s,initialOpen:!1},wp.element.createElement(g,{value:s,onChange:function(e){return r({headingColor:e})}})),wp.element.createElement(c,{title:a("Count Up Text Color"),colorValue:u,initialOpen:!1},wp.element.createElement(g,{value:u,onChange:function(e){return r({color:e})}})),wp.element.createElement(c,{title:a("Description Color"),colorValue:p,initialOpen:!1},wp.element.createElement(g,{value:p,onChange:function(e){return r({desColor:e})}})),wp.element.createElement(m,{label:a("Counter Text Font Size"),max:"100",min:"10",value:y,onChange:function(e){return r({fontSize:e})}}))]}),save:function(e){var t=e.attributes,n=t.color,l=t.headingColor,o=t.desColor,r=t.title,a=t.counter,i=t.des,c=t.fontSize;return wp.element.createElement("div",{className:"ugb-countup"},wp.element.createElement("h4",{style:{color:l}}," ",r," "),wp.element.createElement("div",{className:"ugb-counter",style:{color:n,fontSize:c+"px"},"data-duration":"1000","data-delay":"16"},a),wp.element.createElement("p",{style:{color:o}}," ",i," "))}})},function(e,t){},function(e,t){},function(e,t,n){"use strict";var l=n(49),o=(n.n(l),n(50)),r=(n.n(o),n(0)),a=wp.i18n.__,i=(wp.element.Component,wp.components),c=i.IconButton,u=i.PanelColor,m=i.Button,s=i.SelectControl,p=i.Dashicon,d=i.Toolbar,b=wp.blocks,g=b.registerBlockType,h=b.MediaUpload,w=b.InspectorControls,f=b.ColorPalette,y=b.BlockControls,v=b.UrlInput,C={normal:wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 256 320"},wp.element.createElement("path",{d:"M0 0v320l256-160L0 0z"})),circle:wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"50",height:"50",viewBox:"0 0 40 40"},wp.element.createElement("path",{d:"M16 29l12-9-12-9v18zm4-29C8.95 0 0 8.95 0 20s8.95 20 20 20 20-8.95 20-20S31.05 0 20 0zm0 36c-8.82 0-16-7.18-16-16S11.18 4 20 4s16 7.18 16 16-7.18 16-16 16z"})),outline:wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"50",height:"50",viewBox:"0 0 34 34"},wp.element.createElement("path",{d:"M17 34C7.6 34 0 26.4 0 17S7.6 0 17 0s17 7.6 17 17-7.6 17-17 17zm0-32C8.7 2 2 8.7 2 17s6.7 15 15 15 15-6.7 15-15S25.3 2 17 2z"}),wp.element.createElement("path",{d:"M12 25.7V8.3L27 17l-15 8.7zm2-14v10.5l9-5.3-9-5.2z"}))};g("ugb/video-popup",{title:a("Video Popup"),icon:r.m,category:"common",keywords:[a("Video Popup"),a("Stackable")],attributes:{videoLink:{type:"string",source:"attribute",selector:".ugb-video-popup",attribute:"data-video"},mediaLink:{type:"string",source:"attribute",selector:".ugb-video-preview",attribute:"data-url"},mediaID:{type:"number"},overlayColor:{type:"string",default:"#000000"},playButtonType:{type:"string",default:"normal"}},edit:function(e){var t=(e.className,e.setAttributes),n=e.isSelected,l=e.attributes,o=l.videoLink,r=l.mediaLink,i=l.overlayColor,b=l.playButtonType,g=l.mediaID,E=[{value:"normal",label:a("Normal Play Button")},{value:"circle",label:a("Play Button with Circle")},{value:"outline",label:a("Outline Play Button")}];return[n&&wp.element.createElement(y,{key:"controls"},r&&wp.element.createElement(d,null,wp.element.createElement(h,{onSelect:function(e){return t({mediaLink:e.url,mediaID:e.id})},type:"image",value:g,render:function(e){var t=e.open;return wp.element.createElement(c,{className:"components-toolbar__control",label:a("Edit image"),icon:"edit",onClick:t})}}))),n&&wp.element.createElement(w,{key:"inspector"},wp.element.createElement(s,{label:a("Play Button Style"),value:b,options:E.map(function(e){return{value:e.value,label:e.label}}),onChange:function(e){t({playButtonType:e})}}),wp.element.createElement(u,{title:a("Background/Overlay Color"),colorValue:i,initialOpen:!1},wp.element.createElement(f,{value:i,onChange:function(e){return t({overlayColor:e})}}))),wp.element.createElement("div",{className:"ugb-video-popup","data-video":o,style:{backgroundColor:i}},wp.element.createElement("div",{className:"ugb-video-preview",style:{backgroundImage:"url("+r+")"}}),wp.element.createElement("div",{className:"ugb-video-wrapper"},wp.element.createElement(h,{onSelect:function(e){return t({mediaLink:e.url,mediaID:e.id})},type:"image",value:g,render:function(e){return[!r&&wp.element.createElement(m,{className:g?"":"button button-large",onClick:e.open},a("Upload Image"))]}}),wp.element.createElement("div",{className:"ugb-video-overlay",style:{backgroundColor:i}}),wp.element.createElement("span",{className:"ugb-play-button"},C[b]))),n&&wp.element.createElement("form",{key:"form-link",onSubmit:function(e){return e.preventDefault()},className:"ugb-video-popup-link blocks-button__inline-link"},wp.element.createElement(p,{icon:"admin-links"}),wp.element.createElement(v,{value:o,onChange:function(e){return t({videoLink:e})}}),wp.element.createElement(c,{icon:"editor-break",label:a("Apply"),type:"submit"}),wp.element.createElement("p",null,wp.element.createElement("i",null,"Youtube/Vimeo ID only")))]},save:function(e){var t=e.attributes,n=t.videoLink,l=t.mediaLink,o=t.overlayColor,r=t.playButtonType;t.mediaID;return wp.element.createElement("div",{className:"ugb-video-popup","data-video":n,style:{backgroundColor:o}},wp.element.createElement("div",{className:"ugb-video-preview",style:{backgroundImage:"url("+l+")"},"data-url":l}),wp.element.createElement("div",{className:"ugb-video-wrapper"},wp.element.createElement("a",{href:"#",style:{backgroundColor:o}}),wp.element.createElement("span",{className:"ugb-play-button"},C[r])))}})},function(e,t){},function(e,t){}]);
|
dist/blocks.editor.build.css
CHANGED
@@ -10,3 +10,6 @@
|
|
10 |
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
|
11 |
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
|
12 |
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
|
|
|
|
|
|
10 |
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
|
11 |
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
|
12 |
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
|
13 |
+
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
|
14 |
+
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
|
15 |
+
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}
|
dist/blocks.frontend.build.js
CHANGED
@@ -92,7 +92,9 @@ var domReady = function domReady(callback) {
|
|
92 |
/***/ (function(module, exports, __webpack_require__) {
|
93 |
|
94 |
__webpack_require__(2);
|
95 |
-
|
|
|
|
|
96 |
|
97 |
|
98 |
/***/ }),
|
@@ -102,6 +104,912 @@ module.exports = __webpack_require__(3);
|
|
102 |
"use strict";
|
103 |
|
104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
var _domReady = __webpack_require__(0);
|
106 |
|
107 |
var _domReady2 = _interopRequireDefault(_domReady);
|
@@ -127,7 +1035,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
127 |
});
|
128 |
|
129 |
/***/ }),
|
130 |
-
/*
|
131 |
/***/ (function(module, exports, __webpack_require__) {
|
132 |
|
133 |
"use strict";
|
@@ -156,5 +1064,442 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
156 |
});
|
157 |
});
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
/***/ })
|
160 |
/******/ ]);
|
92 |
/***/ (function(module, exports, __webpack_require__) {
|
93 |
|
94 |
__webpack_require__(2);
|
95 |
+
__webpack_require__(4);
|
96 |
+
__webpack_require__(5);
|
97 |
+
module.exports = __webpack_require__(6);
|
98 |
|
99 |
|
100 |
/***/ }),
|
104 |
"use strict";
|
105 |
|
106 |
|
107 |
+
var _domReady = __webpack_require__(0);
|
108 |
+
|
109 |
+
var _domReady2 = _interopRequireDefault(_domReady);
|
110 |
+
|
111 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
112 |
+
|
113 |
+
(0, _domReady2.default)(function () {
|
114 |
+
__webpack_require__(3);
|
115 |
+
var elems = document.querySelectorAll('.ugb-countup .ugb-counter');
|
116 |
+
elems.forEach(function (el) {
|
117 |
+
// initCountUp( el )
|
118 |
+
el.classList.add('ugb-countup-hide');
|
119 |
+
new Waypoint({
|
120 |
+
element: el,
|
121 |
+
handler: function handler() {
|
122 |
+
initCountUp(el);
|
123 |
+
el.classList.remove('ugb-countup-hide');
|
124 |
+
this.destroy();
|
125 |
+
},
|
126 |
+
offset: 'bottom-in-view'
|
127 |
+
});
|
128 |
+
});
|
129 |
+
});
|
130 |
+
|
131 |
+
var stopCountUp = function stopCountUp(el) {
|
132 |
+
clearTimeout(el.countUpTimeout);
|
133 |
+
if (el._countUpOrigInnerHTML) {
|
134 |
+
el.innerHTML = el._countUpOrigInnerHTML;
|
135 |
+
el._countUpOrigInnerHTML = undefined;
|
136 |
+
}
|
137 |
+
el.style.visibility = '';
|
138 |
+
};
|
139 |
+
var initCountUp = function initCountUp(el) {
|
140 |
+
|
141 |
+
var lang, time, delay, divisions, splitValues, nums, k, i, num, isComma;
|
142 |
+
var isFloat, decimalPlaces, val, newNum, _output;
|
143 |
+
|
144 |
+
stopCountUp(el);
|
145 |
+
|
146 |
+
// If no number, don't do anything.
|
147 |
+
if (!/[0-9]/.test(el.innerHTML)) {
|
148 |
+
return;
|
149 |
+
}
|
150 |
+
|
151 |
+
// Remember the element.
|
152 |
+
el._countUpOrigInnerHTML = el.innerHTML;
|
153 |
+
|
154 |
+
// Check location language.
|
155 |
+
lang = document.querySelector('html').getAttribute('lang') || undefined;
|
156 |
+
|
157 |
+
// Get the given time and delay by their attributes.
|
158 |
+
time = el.getAttribute('data-duration');
|
159 |
+
delay = el.getAttribute('data-delay');
|
160 |
+
|
161 |
+
// Number of times the number will change.
|
162 |
+
divisions = time / delay;
|
163 |
+
|
164 |
+
// Split numbers and html tags.
|
165 |
+
splitValues = el.innerHTML.split(/(<[^>]+>|[0-9.][,.0-9]*[0-9]*)/);
|
166 |
+
|
167 |
+
// Contains all numbers to be displayed.
|
168 |
+
nums = [];
|
169 |
+
|
170 |
+
// Set blank strings to ready the split values.
|
171 |
+
for (k = 0; k < divisions; k++) {
|
172 |
+
nums.push('');
|
173 |
+
}
|
174 |
+
|
175 |
+
// Loop through all numbers and html tags.
|
176 |
+
for (i = 0; i < splitValues.length; i++) {
|
177 |
+
|
178 |
+
// If number split it into smaller numbers and insert it to nums.
|
179 |
+
if (/([0-9.][,.0-9]*[0-9]*)/.test(splitValues[i]) && !/<[^>]+>/.test(splitValues[i])) {
|
180 |
+
num = splitValues[i];
|
181 |
+
|
182 |
+
// Test if numbers have comma.
|
183 |
+
isComma = /[0-9]+,[0-9]+/.test(num);
|
184 |
+
|
185 |
+
// Remove comma for computation purposes.
|
186 |
+
num = num.replace(/,/g, '');
|
187 |
+
|
188 |
+
// Test if values have point.
|
189 |
+
isFloat = /^[0-9]+\.[0-9]+$/.test(num);
|
190 |
+
|
191 |
+
// Check number of decimals places.
|
192 |
+
decimalPlaces = isFloat ? (num.split('.')[1] || []).length : 0;
|
193 |
+
|
194 |
+
// Start adding numbers from the end.
|
195 |
+
k = nums.length - 1;
|
196 |
+
|
197 |
+
// Create small numbers
|
198 |
+
for (val = divisions; val >= 1; val--) {
|
199 |
+
newNum = parseInt(num / divisions * val, 10);
|
200 |
+
|
201 |
+
// If has decimal point, add it again.
|
202 |
+
if (isFloat) {
|
203 |
+
newNum = parseFloat(num / divisions * val).toFixed(decimalPlaces);
|
204 |
+
newNum = parseFloat(newNum).toLocaleString(lang);
|
205 |
+
}
|
206 |
+
|
207 |
+
// If has comma, add it again.
|
208 |
+
if (isComma) {
|
209 |
+
newNum = newNum.toLocaleString(lang);
|
210 |
+
}
|
211 |
+
|
212 |
+
// Insert all small numbers.
|
213 |
+
nums[k--] += newNum;
|
214 |
+
}
|
215 |
+
} else {
|
216 |
+
|
217 |
+
// Insert all non-numbers in the same place.
|
218 |
+
for (k = 0; k < divisions; k++) {
|
219 |
+
nums[k] += splitValues[i];
|
220 |
+
}
|
221 |
+
}
|
222 |
+
}
|
223 |
+
|
224 |
+
// The last value of the element should be the original one.
|
225 |
+
nums[nums.length] = el.innerHTML;
|
226 |
+
|
227 |
+
el.innerHTML = nums[0];
|
228 |
+
el.style.visibility = 'visible';
|
229 |
+
|
230 |
+
// Function for displaying output with the set time and delay.
|
231 |
+
_output = function output() {
|
232 |
+
el.innerHTML = nums.shift();
|
233 |
+
if (nums.length) {
|
234 |
+
clearTimeout(el.countUpTimeout);
|
235 |
+
el.countUpTimeout = setTimeout(_output, delay);
|
236 |
+
} else {
|
237 |
+
el._countUpOrigInnerHTML = undefined;
|
238 |
+
}
|
239 |
+
};
|
240 |
+
el.countUpTimeout = setTimeout(_output, delay);
|
241 |
+
};
|
242 |
+
|
243 |
+
/***/ }),
|
244 |
+
/* 3 */
|
245 |
+
/***/ (function(module, exports) {
|
246 |
+
|
247 |
+
/*!
|
248 |
+
Waypoints - 4.0.1
|
249 |
+
Copyright © 2011-2016 Caleb Troughton
|
250 |
+
Licensed under the MIT license.
|
251 |
+
https://github.com/imakewebthings/waypoints/blob/master/licenses.txt
|
252 |
+
*/
|
253 |
+
(function() {
|
254 |
+
'use strict'
|
255 |
+
|
256 |
+
var keyCounter = 0
|
257 |
+
var allWaypoints = {}
|
258 |
+
|
259 |
+
/* http://imakewebthings.com/waypoints/api/waypoint */
|
260 |
+
function Waypoint(options) {
|
261 |
+
if (!options) {
|
262 |
+
throw new Error('No options passed to Waypoint constructor')
|
263 |
+
}
|
264 |
+
if (!options.element) {
|
265 |
+
throw new Error('No element option passed to Waypoint constructor')
|
266 |
+
}
|
267 |
+
if (!options.handler) {
|
268 |
+
throw new Error('No handler option passed to Waypoint constructor')
|
269 |
+
}
|
270 |
+
|
271 |
+
this.key = 'waypoint-' + keyCounter
|
272 |
+
this.options = Waypoint.Adapter.extend({}, Waypoint.defaults, options)
|
273 |
+
this.element = this.options.element
|
274 |
+
this.adapter = new Waypoint.Adapter(this.element)
|
275 |
+
this.callback = options.handler
|
276 |
+
this.axis = this.options.horizontal ? 'horizontal' : 'vertical'
|
277 |
+
this.enabled = this.options.enabled
|
278 |
+
this.triggerPoint = null
|
279 |
+
this.group = Waypoint.Group.findOrCreate({
|
280 |
+
name: this.options.group,
|
281 |
+
axis: this.axis
|
282 |
+
})
|
283 |
+
this.context = Waypoint.Context.findOrCreateByElement(this.options.context)
|
284 |
+
|
285 |
+
if (Waypoint.offsetAliases[this.options.offset]) {
|
286 |
+
this.options.offset = Waypoint.offsetAliases[this.options.offset]
|
287 |
+
}
|
288 |
+
this.group.add(this)
|
289 |
+
this.context.add(this)
|
290 |
+
allWaypoints[this.key] = this
|
291 |
+
keyCounter += 1
|
292 |
+
}
|
293 |
+
|
294 |
+
/* Private */
|
295 |
+
Waypoint.prototype.queueTrigger = function(direction) {
|
296 |
+
this.group.queueTrigger(this, direction)
|
297 |
+
}
|
298 |
+
|
299 |
+
/* Private */
|
300 |
+
Waypoint.prototype.trigger = function(args) {
|
301 |
+
if (!this.enabled) {
|
302 |
+
return
|
303 |
+
}
|
304 |
+
if (this.callback) {
|
305 |
+
this.callback.apply(this, args)
|
306 |
+
}
|
307 |
+
}
|
308 |
+
|
309 |
+
/* Public */
|
310 |
+
/* http://imakewebthings.com/waypoints/api/destroy */
|
311 |
+
Waypoint.prototype.destroy = function() {
|
312 |
+
this.context.remove(this)
|
313 |
+
this.group.remove(this)
|
314 |
+
delete allWaypoints[this.key]
|
315 |
+
}
|
316 |
+
|
317 |
+
/* Public */
|
318 |
+
/* http://imakewebthings.com/waypoints/api/disable */
|
319 |
+
Waypoint.prototype.disable = function() {
|
320 |
+
this.enabled = false
|
321 |
+
return this
|
322 |
+
}
|
323 |
+
|
324 |
+
/* Public */
|
325 |
+
/* http://imakewebthings.com/waypoints/api/enable */
|
326 |
+
Waypoint.prototype.enable = function() {
|
327 |
+
this.context.refresh()
|
328 |
+
this.enabled = true
|
329 |
+
return this
|
330 |
+
}
|
331 |
+
|
332 |
+
/* Public */
|
333 |
+
/* http://imakewebthings.com/waypoints/api/next */
|
334 |
+
Waypoint.prototype.next = function() {
|
335 |
+
return this.group.next(this)
|
336 |
+
}
|
337 |
+
|
338 |
+
/* Public */
|
339 |
+
/* http://imakewebthings.com/waypoints/api/previous */
|
340 |
+
Waypoint.prototype.previous = function() {
|
341 |
+
return this.group.previous(this)
|
342 |
+
}
|
343 |
+
|
344 |
+
/* Private */
|
345 |
+
Waypoint.invokeAll = function(method) {
|
346 |
+
var allWaypointsArray = []
|
347 |
+
for (var waypointKey in allWaypoints) {
|
348 |
+
allWaypointsArray.push(allWaypoints[waypointKey])
|
349 |
+
}
|
350 |
+
for (var i = 0, end = allWaypointsArray.length; i < end; i++) {
|
351 |
+
allWaypointsArray[i][method]()
|
352 |
+
}
|
353 |
+
}
|
354 |
+
|
355 |
+
/* Public */
|
356 |
+
/* http://imakewebthings.com/waypoints/api/destroy-all */
|
357 |
+
Waypoint.destroyAll = function() {
|
358 |
+
Waypoint.invokeAll('destroy')
|
359 |
+
}
|
360 |
+
|
361 |
+
/* Public */
|
362 |
+
/* http://imakewebthings.com/waypoints/api/disable-all */
|
363 |
+
Waypoint.disableAll = function() {
|
364 |
+
Waypoint.invokeAll('disable')
|
365 |
+
}
|
366 |
+
|
367 |
+
/* Public */
|
368 |
+
/* http://imakewebthings.com/waypoints/api/enable-all */
|
369 |
+
Waypoint.enableAll = function() {
|
370 |
+
Waypoint.Context.refreshAll()
|
371 |
+
for (var waypointKey in allWaypoints) {
|
372 |
+
allWaypoints[waypointKey].enabled = true
|
373 |
+
}
|
374 |
+
return this
|
375 |
+
}
|
376 |
+
|
377 |
+
/* Public */
|
378 |
+
/* http://imakewebthings.com/waypoints/api/refresh-all */
|
379 |
+
Waypoint.refreshAll = function() {
|
380 |
+
Waypoint.Context.refreshAll()
|
381 |
+
}
|
382 |
+
|
383 |
+
/* Public */
|
384 |
+
/* http://imakewebthings.com/waypoints/api/viewport-height */
|
385 |
+
Waypoint.viewportHeight = function() {
|
386 |
+
return window.innerHeight || document.documentElement.clientHeight
|
387 |
+
}
|
388 |
+
|
389 |
+
/* Public */
|
390 |
+
/* http://imakewebthings.com/waypoints/api/viewport-width */
|
391 |
+
Waypoint.viewportWidth = function() {
|
392 |
+
return document.documentElement.clientWidth
|
393 |
+
}
|
394 |
+
|
395 |
+
Waypoint.adapters = []
|
396 |
+
|
397 |
+
Waypoint.defaults = {
|
398 |
+
context: window,
|
399 |
+
continuous: true,
|
400 |
+
enabled: true,
|
401 |
+
group: 'default',
|
402 |
+
horizontal: false,
|
403 |
+
offset: 0
|
404 |
+
}
|
405 |
+
|
406 |
+
Waypoint.offsetAliases = {
|
407 |
+
'bottom-in-view': function() {
|
408 |
+
return this.context.innerHeight() - this.adapter.outerHeight()
|
409 |
+
},
|
410 |
+
'right-in-view': function() {
|
411 |
+
return this.context.innerWidth() - this.adapter.outerWidth()
|
412 |
+
}
|
413 |
+
}
|
414 |
+
|
415 |
+
window.Waypoint = Waypoint
|
416 |
+
}())
|
417 |
+
;(function() {
|
418 |
+
'use strict'
|
419 |
+
|
420 |
+
function requestAnimationFrameShim(callback) {
|
421 |
+
window.setTimeout(callback, 1000 / 60)
|
422 |
+
}
|
423 |
+
|
424 |
+
var keyCounter = 0
|
425 |
+
var contexts = {}
|
426 |
+
var Waypoint = window.Waypoint
|
427 |
+
var oldWindowLoad = window.onload
|
428 |
+
|
429 |
+
/* http://imakewebthings.com/waypoints/api/context */
|
430 |
+
function Context(element) {
|
431 |
+
this.element = element
|
432 |
+
this.Adapter = Waypoint.Adapter
|
433 |
+
this.adapter = new this.Adapter(element)
|
434 |
+
this.key = 'waypoint-context-' + keyCounter
|
435 |
+
this.didScroll = false
|
436 |
+
this.didResize = false
|
437 |
+
this.oldScroll = {
|
438 |
+
x: this.adapter.scrollLeft(),
|
439 |
+
y: this.adapter.scrollTop()
|
440 |
+
}
|
441 |
+
this.waypoints = {
|
442 |
+
vertical: {},
|
443 |
+
horizontal: {}
|
444 |
+
}
|
445 |
+
|
446 |
+
element.waypointContextKey = this.key
|
447 |
+
contexts[element.waypointContextKey] = this
|
448 |
+
keyCounter += 1
|
449 |
+
if (!Waypoint.windowContext) {
|
450 |
+
Waypoint.windowContext = true
|
451 |
+
Waypoint.windowContext = new Context(window)
|
452 |
+
}
|
453 |
+
|
454 |
+
this.createThrottledScrollHandler()
|
455 |
+
this.createThrottledResizeHandler()
|
456 |
+
}
|
457 |
+
|
458 |
+
/* Private */
|
459 |
+
Context.prototype.add = function(waypoint) {
|
460 |
+
var axis = waypoint.options.horizontal ? 'horizontal' : 'vertical'
|
461 |
+
this.waypoints[axis][waypoint.key] = waypoint
|
462 |
+
this.refresh()
|
463 |
+
}
|
464 |
+
|
465 |
+
/* Private */
|
466 |
+
Context.prototype.checkEmpty = function() {
|
467 |
+
var horizontalEmpty = this.Adapter.isEmptyObject(this.waypoints.horizontal)
|
468 |
+
var verticalEmpty = this.Adapter.isEmptyObject(this.waypoints.vertical)
|
469 |
+
var isWindow = this.element == this.element.window
|
470 |
+
if (horizontalEmpty && verticalEmpty && !isWindow) {
|
471 |
+
this.adapter.off('.waypoints')
|
472 |
+
delete contexts[this.key]
|
473 |
+
}
|
474 |
+
}
|
475 |
+
|
476 |
+
/* Private */
|
477 |
+
Context.prototype.createThrottledResizeHandler = function() {
|
478 |
+
var self = this
|
479 |
+
|
480 |
+
function resizeHandler() {
|
481 |
+
self.handleResize()
|
482 |
+
self.didResize = false
|
483 |
+
}
|
484 |
+
|
485 |
+
this.adapter.on('resize.waypoints', function() {
|
486 |
+
if (!self.didResize) {
|
487 |
+
self.didResize = true
|
488 |
+
Waypoint.requestAnimationFrame(resizeHandler)
|
489 |
+
}
|
490 |
+
})
|
491 |
+
}
|
492 |
+
|
493 |
+
/* Private */
|
494 |
+
Context.prototype.createThrottledScrollHandler = function() {
|
495 |
+
var self = this
|
496 |
+
function scrollHandler() {
|
497 |
+
self.handleScroll()
|
498 |
+
self.didScroll = false
|
499 |
+
}
|
500 |
+
|
501 |
+
this.adapter.on('scroll.waypoints', function() {
|
502 |
+
if (!self.didScroll || Waypoint.isTouch) {
|
503 |
+
self.didScroll = true
|
504 |
+
Waypoint.requestAnimationFrame(scrollHandler)
|
505 |
+
}
|
506 |
+
})
|
507 |
+
}
|
508 |
+
|
509 |
+
/* Private */
|
510 |
+
Context.prototype.handleResize = function() {
|
511 |
+
Waypoint.Context.refreshAll()
|
512 |
+
}
|
513 |
+
|
514 |
+
/* Private */
|
515 |
+
Context.prototype.handleScroll = function() {
|
516 |
+
var triggeredGroups = {}
|
517 |
+
var axes = {
|
518 |
+
horizontal: {
|
519 |
+
newScroll: this.adapter.scrollLeft(),
|
520 |
+
oldScroll: this.oldScroll.x,
|
521 |
+
forward: 'right',
|
522 |
+
backward: 'left'
|
523 |
+
},
|
524 |
+
vertical: {
|
525 |
+
newScroll: this.adapter.scrollTop(),
|
526 |
+
oldScroll: this.oldScroll.y,
|
527 |
+
forward: 'down',
|
528 |
+
backward: 'up'
|
529 |
+
}
|
530 |
+
}
|
531 |
+
|
532 |
+
for (var axisKey in axes) {
|
533 |
+
var axis = axes[axisKey]
|
534 |
+
var isForward = axis.newScroll > axis.oldScroll
|
535 |
+
var direction = isForward ? axis.forward : axis.backward
|
536 |
+
|
537 |
+
for (var waypointKey in this.waypoints[axisKey]) {
|
538 |
+
var waypoint = this.waypoints[axisKey][waypointKey]
|
539 |
+
if (waypoint.triggerPoint === null) {
|
540 |
+
continue
|
541 |
+
}
|
542 |
+
var wasBeforeTriggerPoint = axis.oldScroll < waypoint.triggerPoint
|
543 |
+
var nowAfterTriggerPoint = axis.newScroll >= waypoint.triggerPoint
|
544 |
+
var crossedForward = wasBeforeTriggerPoint && nowAfterTriggerPoint
|
545 |
+
var crossedBackward = !wasBeforeTriggerPoint && !nowAfterTriggerPoint
|
546 |
+
if (crossedForward || crossedBackward) {
|
547 |
+
waypoint.queueTrigger(direction)
|
548 |
+
triggeredGroups[waypoint.group.id] = waypoint.group
|
549 |
+
}
|
550 |
+
}
|
551 |
+
}
|
552 |
+
|
553 |
+
for (var groupKey in triggeredGroups) {
|
554 |
+
triggeredGroups[groupKey].flushTriggers()
|
555 |
+
}
|
556 |
+
|
557 |
+
this.oldScroll = {
|
558 |
+
x: axes.horizontal.newScroll,
|
559 |
+
y: axes.vertical.newScroll
|
560 |
+
}
|
561 |
+
}
|
562 |
+
|
563 |
+
/* Private */
|
564 |
+
Context.prototype.innerHeight = function() {
|
565 |
+
/*eslint-disable eqeqeq */
|
566 |
+
if (this.element == this.element.window) {
|
567 |
+
return Waypoint.viewportHeight()
|
568 |
+
}
|
569 |
+
/*eslint-enable eqeqeq */
|
570 |
+
return this.adapter.innerHeight()
|
571 |
+
}
|
572 |
+
|
573 |
+
/* Private */
|
574 |
+
Context.prototype.remove = function(waypoint) {
|
575 |
+
delete this.waypoints[waypoint.axis][waypoint.key]
|
576 |
+
this.checkEmpty()
|
577 |
+
}
|
578 |
+
|
579 |
+
/* Private */
|
580 |
+
Context.prototype.innerWidth = function() {
|
581 |
+
/*eslint-disable eqeqeq */
|
582 |
+
if (this.element == this.element.window) {
|
583 |
+
return Waypoint.viewportWidth()
|
584 |
+
}
|
585 |
+
/*eslint-enable eqeqeq */
|
586 |
+
return this.adapter.innerWidth()
|
587 |
+
}
|
588 |
+
|
589 |
+
/* Public */
|
590 |
+
/* http://imakewebthings.com/waypoints/api/context-destroy */
|
591 |
+
Context.prototype.destroy = function() {
|
592 |
+
var allWaypoints = []
|
593 |
+
for (var axis in this.waypoints) {
|
594 |
+
for (var waypointKey in this.waypoints[axis]) {
|
595 |
+
allWaypoints.push(this.waypoints[axis][waypointKey])
|
596 |
+
}
|
597 |
+
}
|
598 |
+
for (var i = 0, end = allWaypoints.length; i < end; i++) {
|
599 |
+
allWaypoints[i].destroy()
|
600 |
+
}
|
601 |
+
}
|
602 |
+
|
603 |
+
/* Public */
|
604 |
+
/* http://imakewebthings.com/waypoints/api/context-refresh */
|
605 |
+
Context.prototype.refresh = function() {
|
606 |
+
/*eslint-disable eqeqeq */
|
607 |
+
var isWindow = this.element == this.element.window
|
608 |
+
/*eslint-enable eqeqeq */
|
609 |
+
var contextOffset = isWindow ? undefined : this.adapter.offset()
|
610 |
+
var triggeredGroups = {}
|
611 |
+
var axes
|
612 |
+
|
613 |
+
this.handleScroll()
|
614 |
+
axes = {
|
615 |
+
horizontal: {
|
616 |
+
contextOffset: isWindow ? 0 : contextOffset.left,
|
617 |
+
contextScroll: isWindow ? 0 : this.oldScroll.x,
|
618 |
+
contextDimension: this.innerWidth(),
|
619 |
+
oldScroll: this.oldScroll.x,
|
620 |
+
forward: 'right',
|
621 |
+
backward: 'left',
|
622 |
+
offsetProp: 'left'
|
623 |
+
},
|
624 |
+
vertical: {
|
625 |
+
contextOffset: isWindow ? 0 : contextOffset.top,
|
626 |
+
contextScroll: isWindow ? 0 : this.oldScroll.y,
|
627 |
+
contextDimension: this.innerHeight(),
|
628 |
+
oldScroll: this.oldScroll.y,
|
629 |
+
forward: 'down',
|
630 |
+
backward: 'up',
|
631 |
+
offsetProp: 'top'
|
632 |
+
}
|
633 |
+
}
|
634 |
+
|
635 |
+
for (var axisKey in axes) {
|
636 |
+
var axis = axes[axisKey]
|
637 |
+
for (var waypointKey in this.waypoints[axisKey]) {
|
638 |
+
var waypoint = this.waypoints[axisKey][waypointKey]
|
639 |
+
var adjustment = waypoint.options.offset
|
640 |
+
var oldTriggerPoint = waypoint.triggerPoint
|
641 |
+
var elementOffset = 0
|
642 |
+
var freshWaypoint = oldTriggerPoint == null
|
643 |
+
var contextModifier, wasBeforeScroll, nowAfterScroll
|
644 |
+
var triggeredBackward, triggeredForward
|
645 |
+
|
646 |
+
if (waypoint.element !== waypoint.element.window) {
|
647 |
+
elementOffset = waypoint.adapter.offset()[axis.offsetProp]
|
648 |
+
}
|
649 |
+
|
650 |
+
if (typeof adjustment === 'function') {
|
651 |
+
adjustment = adjustment.apply(waypoint)
|
652 |
+
}
|
653 |
+
else if (typeof adjustment === 'string') {
|
654 |
+
adjustment = parseFloat(adjustment)
|
655 |
+
if (waypoint.options.offset.indexOf('%') > - 1) {
|
656 |
+
adjustment = Math.ceil(axis.contextDimension * adjustment / 100)
|
657 |
+
}
|
658 |
+
}
|
659 |
+
|
660 |
+
contextModifier = axis.contextScroll - axis.contextOffset
|
661 |
+
waypoint.triggerPoint = Math.floor(elementOffset + contextModifier - adjustment)
|
662 |
+
wasBeforeScroll = oldTriggerPoint < axis.oldScroll
|
663 |
+
nowAfterScroll = waypoint.triggerPoint >= axis.oldScroll
|
664 |
+
triggeredBackward = wasBeforeScroll && nowAfterScroll
|
665 |
+
triggeredForward = !wasBeforeScroll && !nowAfterScroll
|
666 |
+
|
667 |
+
if (!freshWaypoint && triggeredBackward) {
|
668 |
+
waypoint.queueTrigger(axis.backward)
|
669 |
+
triggeredGroups[waypoint.group.id] = waypoint.group
|
670 |
+
}
|
671 |
+
else if (!freshWaypoint && triggeredForward) {
|
672 |
+
waypoint.queueTrigger(axis.forward)
|
673 |
+
triggeredGroups[waypoint.group.id] = waypoint.group
|
674 |
+
}
|
675 |
+
else if (freshWaypoint && axis.oldScroll >= waypoint.triggerPoint) {
|
676 |
+
waypoint.queueTrigger(axis.forward)
|
677 |
+
triggeredGroups[waypoint.group.id] = waypoint.group
|
678 |
+
}
|
679 |
+
}
|
680 |
+
}
|
681 |
+
|
682 |
+
Waypoint.requestAnimationFrame(function() {
|
683 |
+
for (var groupKey in triggeredGroups) {
|
684 |
+
triggeredGroups[groupKey].flushTriggers()
|
685 |
+
}
|
686 |
+
})
|
687 |
+
|
688 |
+
return this
|
689 |
+
}
|
690 |
+
|
691 |
+
/* Private */
|
692 |
+
Context.findOrCreateByElement = function(element) {
|
693 |
+
return Context.findByElement(element) || new Context(element)
|
694 |
+
}
|
695 |
+
|
696 |
+
/* Private */
|
697 |
+
Context.refreshAll = function() {
|
698 |
+
for (var contextId in contexts) {
|
699 |
+
contexts[contextId].refresh()
|
700 |
+
}
|
701 |
+
}
|
702 |
+
|
703 |
+
/* Public */
|
704 |
+
/* http://imakewebthings.com/waypoints/api/context-find-by-element */
|
705 |
+
Context.findByElement = function(element) {
|
706 |
+
return contexts[element.waypointContextKey]
|
707 |
+
}
|
708 |
+
|
709 |
+
window.onload = function() {
|
710 |
+
if (oldWindowLoad) {
|
711 |
+
oldWindowLoad()
|
712 |
+
}
|
713 |
+
Context.refreshAll()
|
714 |
+
}
|
715 |
+
|
716 |
+
|
717 |
+
Waypoint.requestAnimationFrame = function(callback) {
|
718 |
+
var requestFn = window.requestAnimationFrame ||
|
719 |
+
window.mozRequestAnimationFrame ||
|
720 |
+
window.webkitRequestAnimationFrame ||
|
721 |
+
requestAnimationFrameShim
|
722 |
+
requestFn.call(window, callback)
|
723 |
+
}
|
724 |
+
Waypoint.Context = Context
|
725 |
+
}())
|
726 |
+
;(function() {
|
727 |
+
'use strict'
|
728 |
+
|
729 |
+
function byTriggerPoint(a, b) {
|
730 |
+
return a.triggerPoint - b.triggerPoint
|
731 |
+
}
|
732 |
+
|
733 |
+
function byReverseTriggerPoint(a, b) {
|
734 |
+
return b.triggerPoint - a.triggerPoint
|
735 |
+
}
|
736 |
+
|
737 |
+
var groups = {
|
738 |
+
vertical: {},
|
739 |
+
horizontal: {}
|
740 |
+
}
|
741 |
+
var Waypoint = window.Waypoint
|
742 |
+
|
743 |
+
/* http://imakewebthings.com/waypoints/api/group */
|
744 |
+
function Group(options) {
|
745 |
+
this.name = options.name
|
746 |
+
this.axis = options.axis
|
747 |
+
this.id = this.name + '-' + this.axis
|
748 |
+
this.waypoints = []
|
749 |
+
this.clearTriggerQueues()
|
750 |
+
groups[this.axis][this.name] = this
|
751 |
+
}
|
752 |
+
|
753 |
+
/* Private */
|
754 |
+
Group.prototype.add = function(waypoint) {
|
755 |
+
this.waypoints.push(waypoint)
|
756 |
+
}
|
757 |
+
|
758 |
+
/* Private */
|
759 |
+
Group.prototype.clearTriggerQueues = function() {
|
760 |
+
this.triggerQueues = {
|
761 |
+
up: [],
|
762 |
+
down: [],
|
763 |
+
left: [],
|
764 |
+
right: []
|
765 |
+
}
|
766 |
+
}
|
767 |
+
|
768 |
+
/* Private */
|
769 |
+
Group.prototype.flushTriggers = function() {
|
770 |
+
for (var direction in this.triggerQueues) {
|
771 |
+
var waypoints = this.triggerQueues[direction]
|
772 |
+
var reverse = direction === 'up' || direction === 'left'
|
773 |
+
waypoints.sort(reverse ? byReverseTriggerPoint : byTriggerPoint)
|
774 |
+
for (var i = 0, end = waypoints.length; i < end; i += 1) {
|
775 |
+
var waypoint = waypoints[i]
|
776 |
+
if (waypoint.options.continuous || i === waypoints.length - 1) {
|
777 |
+
waypoint.trigger([direction])
|
778 |
+
}
|
779 |
+
}
|
780 |
+
}
|
781 |
+
this.clearTriggerQueues()
|
782 |
+
}
|
783 |
+
|
784 |
+
/* Private */
|
785 |
+
Group.prototype.next = function(waypoint) {
|
786 |
+
this.waypoints.sort(byTriggerPoint)
|
787 |
+
var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
|
788 |
+
var isLast = index === this.waypoints.length - 1
|
789 |
+
return isLast ? null : this.waypoints[index + 1]
|
790 |
+
}
|
791 |
+
|
792 |
+
/* Private */
|
793 |
+
Group.prototype.previous = function(waypoint) {
|
794 |
+
this.waypoints.sort(byTriggerPoint)
|
795 |
+
var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
|
796 |
+
return index ? this.waypoints[index - 1] : null
|
797 |
+
}
|
798 |
+
|
799 |
+
/* Private */
|
800 |
+
Group.prototype.queueTrigger = function(waypoint, direction) {
|
801 |
+
this.triggerQueues[direction].push(waypoint)
|
802 |
+
}
|
803 |
+
|
804 |
+
/* Private */
|
805 |
+
Group.prototype.remove = function(waypoint) {
|
806 |
+
var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
|
807 |
+
if (index > -1) {
|
808 |
+
this.waypoints.splice(index, 1)
|
809 |
+
}
|
810 |
+
}
|
811 |
+
|
812 |
+
/* Public */
|
813 |
+
/* http://imakewebthings.com/waypoints/api/first */
|
814 |
+
Group.prototype.first = function() {
|
815 |
+
return this.waypoints[0]
|
816 |
+
}
|
817 |
+
|
818 |
+
/* Public */
|
819 |
+
/* http://imakewebthings.com/waypoints/api/last */
|
820 |
+
Group.prototype.last = function() {
|
821 |
+
return this.waypoints[this.waypoints.length - 1]
|
822 |
+
}
|
823 |
+
|
824 |
+
/* Private */
|
825 |
+
Group.findOrCreate = function(options) {
|
826 |
+
return groups[options.axis][options.name] || new Group(options)
|
827 |
+
}
|
828 |
+
|
829 |
+
Waypoint.Group = Group
|
830 |
+
}())
|
831 |
+
;(function() {
|
832 |
+
'use strict'
|
833 |
+
|
834 |
+
var Waypoint = window.Waypoint
|
835 |
+
|
836 |
+
function isWindow(element) {
|
837 |
+
return element === element.window
|
838 |
+
}
|
839 |
+
|
840 |
+
function getWindow(element) {
|
841 |
+
if (isWindow(element)) {
|
842 |
+
return element
|
843 |
+
}
|
844 |
+
return element.defaultView
|
845 |
+
}
|
846 |
+
|
847 |
+
function NoFrameworkAdapter(element) {
|
848 |
+
this.element = element
|
849 |
+
this.handlers = {}
|
850 |
+
}
|
851 |
+
|
852 |
+
NoFrameworkAdapter.prototype.innerHeight = function() {
|
853 |
+
var isWin = isWindow(this.element)
|
854 |
+
return isWin ? this.element.innerHeight : this.element.clientHeight
|
855 |
+
}
|
856 |
+
|
857 |
+
NoFrameworkAdapter.prototype.innerWidth = function() {
|
858 |
+
var isWin = isWindow(this.element)
|
859 |
+
return isWin ? this.element.innerWidth : this.element.clientWidth
|
860 |
+
}
|
861 |
+
|
862 |
+
NoFrameworkAdapter.prototype.off = function(event, handler) {
|
863 |
+
function removeListeners(element, listeners, handler) {
|
864 |
+
for (var i = 0, end = listeners.length - 1; i < end; i++) {
|
865 |
+
var listener = listeners[i]
|
866 |
+
if (!handler || handler === listener) {
|
867 |
+
element.removeEventListener(listener)
|
868 |
+
}
|
869 |
+
}
|
870 |
+
}
|
871 |
+
|
872 |
+
var eventParts = event.split('.')
|
873 |
+
var eventType = eventParts[0]
|
874 |
+
var namespace = eventParts[1]
|
875 |
+
var element = this.element
|
876 |
+
|
877 |
+
if (namespace && this.handlers[namespace] && eventType) {
|
878 |
+
removeListeners(element, this.handlers[namespace][eventType], handler)
|
879 |
+
this.handlers[namespace][eventType] = []
|
880 |
+
}
|
881 |
+
else if (eventType) {
|
882 |
+
for (var ns in this.handlers) {
|
883 |
+
removeListeners(element, this.handlers[ns][eventType] || [], handler)
|
884 |
+
this.handlers[ns][eventType] = []
|
885 |
+
}
|
886 |
+
}
|
887 |
+
else if (namespace && this.handlers[namespace]) {
|
888 |
+
for (var type in this.handlers[namespace]) {
|
889 |
+
removeListeners(element, this.handlers[namespace][type], handler)
|
890 |
+
}
|
891 |
+
this.handlers[namespace] = {}
|
892 |
+
}
|
893 |
+
}
|
894 |
+
|
895 |
+
/* Adapted from jQuery 1.x offset() */
|
896 |
+
NoFrameworkAdapter.prototype.offset = function() {
|
897 |
+
if (!this.element.ownerDocument) {
|
898 |
+
return null
|
899 |
+
}
|
900 |
+
|
901 |
+
var documentElement = this.element.ownerDocument.documentElement
|
902 |
+
var win = getWindow(this.element.ownerDocument)
|
903 |
+
var rect = {
|
904 |
+
top: 0,
|
905 |
+
left: 0
|
906 |
+
}
|
907 |
+
|
908 |
+
if (this.element.getBoundingClientRect) {
|
909 |
+
rect = this.element.getBoundingClientRect()
|
910 |
+
}
|
911 |
+
|
912 |
+
return {
|
913 |
+
top: rect.top + win.pageYOffset - documentElement.clientTop,
|
914 |
+
left: rect.left + win.pageXOffset - documentElement.clientLeft
|
915 |
+
}
|
916 |
+
}
|
917 |
+
|
918 |
+
NoFrameworkAdapter.prototype.on = function(event, handler) {
|
919 |
+
var eventParts = event.split('.')
|
920 |
+
var eventType = eventParts[0]
|
921 |
+
var namespace = eventParts[1] || '__default'
|
922 |
+
var nsHandlers = this.handlers[namespace] = this.handlers[namespace] || {}
|
923 |
+
var nsTypeList = nsHandlers[eventType] = nsHandlers[eventType] || []
|
924 |
+
|
925 |
+
nsTypeList.push(handler)
|
926 |
+
this.element.addEventListener(eventType, handler)
|
927 |
+
}
|
928 |
+
|
929 |
+
NoFrameworkAdapter.prototype.outerHeight = function(includeMargin) {
|
930 |
+
var height = this.innerHeight()
|
931 |
+
var computedStyle
|
932 |
+
|
933 |
+
if (includeMargin && !isWindow(this.element)) {
|
934 |
+
computedStyle = window.getComputedStyle(this.element)
|
935 |
+
height += parseInt(computedStyle.marginTop, 10)
|
936 |
+
height += parseInt(computedStyle.marginBottom, 10)
|
937 |
+
}
|
938 |
+
|
939 |
+
return height
|
940 |
+
}
|
941 |
+
|
942 |
+
NoFrameworkAdapter.prototype.outerWidth = function(includeMargin) {
|
943 |
+
var width = this.innerWidth()
|
944 |
+
var computedStyle
|
945 |
+
|
946 |
+
if (includeMargin && !isWindow(this.element)) {
|
947 |
+
computedStyle = window.getComputedStyle(this.element)
|
948 |
+
width += parseInt(computedStyle.marginLeft, 10)
|
949 |
+
width += parseInt(computedStyle.marginRight, 10)
|
950 |
+
}
|
951 |
+
|
952 |
+
return width
|
953 |
+
}
|
954 |
+
|
955 |
+
NoFrameworkAdapter.prototype.scrollLeft = function() {
|
956 |
+
var win = getWindow(this.element)
|
957 |
+
return win ? win.pageXOffset : this.element.scrollLeft
|
958 |
+
}
|
959 |
+
|
960 |
+
NoFrameworkAdapter.prototype.scrollTop = function() {
|
961 |
+
var win = getWindow(this.element)
|
962 |
+
return win ? win.pageYOffset : this.element.scrollTop
|
963 |
+
}
|
964 |
+
|
965 |
+
NoFrameworkAdapter.extend = function() {
|
966 |
+
var args = Array.prototype.slice.call(arguments)
|
967 |
+
|
968 |
+
function merge(target, obj) {
|
969 |
+
if (typeof target === 'object' && typeof obj === 'object') {
|
970 |
+
for (var key in obj) {
|
971 |
+
if (obj.hasOwnProperty(key)) {
|
972 |
+
target[key] = obj[key]
|
973 |
+
}
|
974 |
+
}
|
975 |
+
}
|
976 |
+
|
977 |
+
return target
|
978 |
+
}
|
979 |
+
|
980 |
+
for (var i = 1, end = args.length; i < end; i++) {
|
981 |
+
merge(args[0], args[i])
|
982 |
+
}
|
983 |
+
return args[0]
|
984 |
+
}
|
985 |
+
|
986 |
+
NoFrameworkAdapter.inArray = function(element, array, i) {
|
987 |
+
return array == null ? -1 : array.indexOf(element, i)
|
988 |
+
}
|
989 |
+
|
990 |
+
NoFrameworkAdapter.isEmptyObject = function(obj) {
|
991 |
+
/* eslint no-unused-vars: 0 */
|
992 |
+
for (var name in obj) {
|
993 |
+
return false
|
994 |
+
}
|
995 |
+
return true
|
996 |
+
}
|
997 |
+
|
998 |
+
Waypoint.adapters.push({
|
999 |
+
name: 'noframework',
|
1000 |
+
Adapter: NoFrameworkAdapter
|
1001 |
+
})
|
1002 |
+
Waypoint.Adapter = NoFrameworkAdapter
|
1003 |
+
}())
|
1004 |
+
;
|
1005 |
+
|
1006 |
+
/***/ }),
|
1007 |
+
/* 4 */
|
1008 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1009 |
+
|
1010 |
+
"use strict";
|
1011 |
+
|
1012 |
+
|
1013 |
var _domReady = __webpack_require__(0);
|
1014 |
|
1015 |
var _domReady2 = _interopRequireDefault(_domReady);
|
1035 |
});
|
1036 |
|
1037 |
/***/ }),
|
1038 |
+
/* 5 */
|
1039 |
/***/ (function(module, exports, __webpack_require__) {
|
1040 |
|
1041 |
"use strict";
|
1064 |
});
|
1065 |
});
|
1066 |
|
1067 |
+
/***/ }),
|
1068 |
+
/* 6 */
|
1069 |
+
/***/ (function(module, exports, __webpack_require__) {
|
1070 |
+
|
1071 |
+
"use strict";
|
1072 |
+
|
1073 |
+
|
1074 |
+
var _domReady = __webpack_require__(0);
|
1075 |
+
|
1076 |
+
var _domReady2 = _interopRequireDefault(_domReady);
|
1077 |
+
|
1078 |
+
var _bigpicture = __webpack_require__(7);
|
1079 |
+
|
1080 |
+
var _bigpicture2 = _interopRequireDefault(_bigpicture);
|
1081 |
+
|
1082 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
1083 |
+
|
1084 |
+
(0, _domReady2.default)(function () {
|
1085 |
+
var elems = document.querySelectorAll('.ugb-video-popup');
|
1086 |
+
var openVideo = function openVideo(el) {
|
1087 |
+
if (_bigpicture2.default) {
|
1088 |
+
var videoID = el.getAttribute('data-video');
|
1089 |
+
var args = {
|
1090 |
+
el: el,
|
1091 |
+
noLoader: true
|
1092 |
+
};
|
1093 |
+
if (videoID.match(/^\d+$/g)) {
|
1094 |
+
args['vimeoSrc'] = videoID;
|
1095 |
+
} else if (videoID.match(/^https?:\/\//g)) {
|
1096 |
+
args['vidSrc'] = videoID;
|
1097 |
+
} else {
|
1098 |
+
args['ytSrc'] = videoID;
|
1099 |
+
}
|
1100 |
+
(0, _bigpicture2.default)(args);
|
1101 |
+
}
|
1102 |
+
};
|
1103 |
+
elems.forEach(function (el) {
|
1104 |
+
var a = el.querySelector('a');
|
1105 |
+
a.addEventListener('click', function (ev) {
|
1106 |
+
ev.preventDefault();
|
1107 |
+
openVideo(el);
|
1108 |
+
});
|
1109 |
+
a.addEventListener('touchend', function (ev) {
|
1110 |
+
ev.preventDefault();
|
1111 |
+
openVideo(el);
|
1112 |
+
});
|
1113 |
+
});
|
1114 |
+
});
|
1115 |
+
|
1116 |
+
/***/ }),
|
1117 |
+
/* 7 */
|
1118 |
+
/***/ (function(module, exports) {
|
1119 |
+
|
1120 |
+
// BigPicture.js | license MIT | henrygd.me/bigpicture
|
1121 |
+
(function() {
|
1122 |
+
var
|
1123 |
+
// assign window object to variable
|
1124 |
+
global = window,
|
1125 |
+
// trigger element used to open popup
|
1126 |
+
el,
|
1127 |
+
// set to true after first interaction
|
1128 |
+
initialized,
|
1129 |
+
// container element holding html needed for script
|
1130 |
+
container,
|
1131 |
+
// currently active display element (image, video, youtube / vimeo iframe container)
|
1132 |
+
displayElement,
|
1133 |
+
// popup image element
|
1134 |
+
displayImage,
|
1135 |
+
// popup video element
|
1136 |
+
displayVideo,
|
1137 |
+
// container element to hold youtube / vimeo iframe
|
1138 |
+
iframeContainer,
|
1139 |
+
// iframe to hold youtube / vimeo player
|
1140 |
+
iframeSiteVid,
|
1141 |
+
// store requested image source
|
1142 |
+
imgSrc,
|
1143 |
+
// button that closes the container
|
1144 |
+
closeButton,
|
1145 |
+
// youtube / vimeo video id
|
1146 |
+
siteVidID,
|
1147 |
+
// keeps track of loading icon display state
|
1148 |
+
isLoading,
|
1149 |
+
// timeout to check video status while loading
|
1150 |
+
checkVidTimeout,
|
1151 |
+
// loading icon element
|
1152 |
+
loadingIcon,
|
1153 |
+
// caption element
|
1154 |
+
caption,
|
1155 |
+
// caption content element
|
1156 |
+
captionText,
|
1157 |
+
// store caption content
|
1158 |
+
captionContent,
|
1159 |
+
// hide caption button element
|
1160 |
+
captionHideButton,
|
1161 |
+
// open state for container element
|
1162 |
+
isOpen,
|
1163 |
+
// used during close animation to avoid triggering timeout twice
|
1164 |
+
isClosing,
|
1165 |
+
// array of prev viewed image urls to check if cached before showing loading icon
|
1166 |
+
imgCache,
|
1167 |
+
// store whether remote image is already cached on request
|
1168 |
+
cached,
|
1169 |
+
// store whether image requested is remote or local
|
1170 |
+
remoteImage,
|
1171 |
+
// store animation opening callbacks
|
1172 |
+
animationStart,
|
1173 |
+
animationEnd,
|
1174 |
+
// set to true if user wants to hide loading icon
|
1175 |
+
noLoader,
|
1176 |
+
// Save bytes in the minified version
|
1177 |
+
doc = document,
|
1178 |
+
appendEl = 'appendChild',
|
1179 |
+
createEl = 'createElement',
|
1180 |
+
removeEl = 'removeChild',
|
1181 |
+
htmlInner = 'innerHTML',
|
1182 |
+
pointerEventsAuto = 'pointer-events:auto',
|
1183 |
+
cHeight = 'clientHeight',
|
1184 |
+
cWidth = 'clientWidth',
|
1185 |
+
listenFor = 'addEventListener',
|
1186 |
+
timeout = global.setTimeout,
|
1187 |
+
clearTimeout = global.clearTimeout;
|
1188 |
+
|
1189 |
+
|
1190 |
+
module.exports = function(options) {
|
1191 |
+
// initialize called on initial open to create elements / style / event handlers
|
1192 |
+
initialized || initialize();
|
1193 |
+
|
1194 |
+
// clear currently loading stuff
|
1195 |
+
if (isLoading) {
|
1196 |
+
clearTimeout(checkVidTimeout);
|
1197 |
+
removeContainer();
|
1198 |
+
}
|
1199 |
+
|
1200 |
+
// store video id if youtube / vimeo video is requested
|
1201 |
+
siteVidID = options.ytSrc || options.vimeoSrc;
|
1202 |
+
|
1203 |
+
// store optional callbacks
|
1204 |
+
animationStart = options.animationStart;
|
1205 |
+
animationEnd = options.animationEnd;
|
1206 |
+
|
1207 |
+
// store whether user requests to hide loading icon
|
1208 |
+
noLoader = options.noLoader;
|
1209 |
+
|
1210 |
+
// set trigger element
|
1211 |
+
el = options.el;
|
1212 |
+
|
1213 |
+
// wipe existing remoteImage state
|
1214 |
+
remoteImage = false;
|
1215 |
+
|
1216 |
+
// set caption if provided
|
1217 |
+
captionContent = el.getAttribute('caption');
|
1218 |
+
if (captionContent) {
|
1219 |
+
captionText[htmlInner] = captionContent;
|
1220 |
+
container[appendEl](caption);
|
1221 |
+
}
|
1222 |
+
|
1223 |
+
// if vimeo or youtube video
|
1224 |
+
if (siteVidID) {
|
1225 |
+
toggleLoadingIcon(true);
|
1226 |
+
displayElement = iframeContainer;
|
1227 |
+
createIframe(!!options.ytSrc);
|
1228 |
+
}
|
1229 |
+
// if remote image
|
1230 |
+
else if (options.imgSrc) {
|
1231 |
+
remoteImage = true;
|
1232 |
+
imgSrc = options.imgSrc;
|
1233 |
+
cached = ~imgCache.indexOf(imgSrc);
|
1234 |
+
!cached && toggleLoadingIcon(true);
|
1235 |
+
displayElement = displayImage;
|
1236 |
+
displayElement.src = imgSrc;
|
1237 |
+
}
|
1238 |
+
// if direct video link
|
1239 |
+
else if (options.vidSrc) {
|
1240 |
+
toggleLoadingIcon(true);
|
1241 |
+
displayElement = displayVideo;
|
1242 |
+
displayElement.src = options.vidSrc;
|
1243 |
+
checkVid();
|
1244 |
+
}
|
1245 |
+
// local image / background image already loaded on page
|
1246 |
+
else {
|
1247 |
+
displayElement = displayImage;
|
1248 |
+
// get img source or element background image
|
1249 |
+
displayElement.src = el.tagName === 'IMG' ? el.src :
|
1250 |
+
global.getComputedStyle(el).backgroundImage.replace(/^url|[(|)|'|"]/g, '');
|
1251 |
+
}
|
1252 |
+
|
1253 |
+
// add container to page
|
1254 |
+
container[appendEl](displayElement);
|
1255 |
+
doc.body[appendEl](container);
|
1256 |
+
};
|
1257 |
+
|
1258 |
+
|
1259 |
+
// create all needed methods / store dom elements on first use
|
1260 |
+
function initialize() {
|
1261 |
+
|
1262 |
+
// return close button elements
|
1263 |
+
function createCloseButton() {
|
1264 |
+
var el = doc[createEl]('button');
|
1265 |
+
el.className = 'bp-x';
|
1266 |
+
el[htmlInner] = '×'
|
1267 |
+
return el;
|
1268 |
+
}
|
1269 |
+
|
1270 |
+
// imgCache holds displayed image urls to prevent loader on cached images
|
1271 |
+
imgCache = [];
|
1272 |
+
|
1273 |
+
// add style
|
1274 |
+
// if you want to tweak, grab from doc head & run through beautifier
|
1275 |
+
var style = doc[createEl]('STYLE');
|
1276 |
+
style[htmlInner] = '#bp_caption,#bp_container{bottom:0;left:0;right:0;position:fixed;opacity:0}#bp_container>*,.bp-x,#bp_loader{position:absolute;right:0}#bp_container{top:0;z-index:9999;background:rgba(0,0,0,.7);opacity:0;pointer-events:none;transition:opacity .35s}#bp_loader{top:0;left:0;bottom:0;display:-webkit-flex;display:flex;margin:0;cursor:wait;z-index:9}#bp_loader svg{width:40%;max-height:40%;margin:auto;' + webkitify('animation:', 'ldr .7s infinite linear;') + '}' + webkitifyKeyframes('keyframes ldr{to{' + webkitify('transform:', 'rotate(1turn);') + '}}') + '#bp_container img,#bp_sv,#bp_vid{max-height:96%;max-width:96%;top:0;bottom:0;left:0;margin:auto;box-shadow:0 0 3em rgba(0,0,0,.4);z-index:-1}#bp_sv{width:171vh}#bp_caption{font-size:.9em;padding:1.3em;background:rgba(15,15,15,.94);color:#fff;text-align:center;transition:opacity .3s}.bp-x{font-family:Arial;top:0;cursor:pointer;opacity:.8;font-size:3em;padding:0 .3em;color:#fff;background:transparent;border:0;text-shadow:0 0 2px #000}#bp_caption .bp-x{left:2%;top:auto;right:auto;bottom:100%;padding:0 .6em;background:#d74040;border-radius:2px 2px 0 0;font-size:2.3em;text-shadow:none}.bp-x:hover,.bp-x:focus{opacity:1}.bp-x:active{outline:0}@media (max-aspect-ratio:9/5){#bp_sv{height:53vw}}';
|
1277 |
+
doc.head[appendEl](style);
|
1278 |
+
|
1279 |
+
// create container element
|
1280 |
+
container = doc[createEl]('DIV');
|
1281 |
+
container.id = 'bp_container';
|
1282 |
+
container.onclick = close;
|
1283 |
+
closeButton = createCloseButton();
|
1284 |
+
container[appendEl](closeButton);
|
1285 |
+
|
1286 |
+
// create display image element
|
1287 |
+
displayImage = doc[createEl]('IMG');
|
1288 |
+
|
1289 |
+
// create display video element
|
1290 |
+
displayVideo = doc[createEl]('VIDEO');
|
1291 |
+
displayVideo.id = 'bp_vid';
|
1292 |
+
displayVideo.autoplay = true;
|
1293 |
+
displayVideo.setAttribute('playsinline', true);
|
1294 |
+
displayVideo.controls = true;
|
1295 |
+
displayVideo.loop = true;
|
1296 |
+
|
1297 |
+
// create caption elements
|
1298 |
+
caption = doc[createEl]('DIV');
|
1299 |
+
caption.id = 'bp_caption';
|
1300 |
+
captionHideButton = createCloseButton();
|
1301 |
+
captionHideButton.onclick = function() {
|
1302 |
+
changeCSS(caption, 'opacity:0');
|
1303 |
+
timeout(function() {
|
1304 |
+
captionContent = false;
|
1305 |
+
container[removeEl](caption);
|
1306 |
+
}, 300);
|
1307 |
+
}
|
1308 |
+
caption[appendEl](captionHideButton);
|
1309 |
+
captionText = doc[createEl]('SPAN');
|
1310 |
+
caption[appendEl](captionText);
|
1311 |
+
|
1312 |
+
// create loading icon element
|
1313 |
+
loadingIcon = doc[createEl]('DIV');
|
1314 |
+
loadingIcon.id = 'bp_loader';
|
1315 |
+
loadingIcon[htmlInner] = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 399 399"><path d="M341 58.5C303 20.8 253 0 199.6 0 146.4 0 96.2 20.8 58.5 58.5 20.8 96.2 0 146.5 0 199.7 0 253 20.8 303.2 58.5 341c37.7 37.6 88 58.4 141.2 58.4 53.3 0 103.5-20.8 141.2-58.5 37.6-37.8 58.4-88 58.4-141.3 0-53.3-20.8-103.5-58.5-141.2zm-13 12.8c34.3 34.3 53.2 80 53.2 128.4h-41c0-77.4-63-140.4-140.5-140.4-4.6 0-9 .2-13.6.7V18.7c4.6-.4 9-.5 13.7-.5 48.5 0 94 18.8 128.4 53zM199.8 322c-67.4 0-122.2-55-122.2-122.3S132.3 77.5 199.7 77.5 322 132.3 322 199.7 267 322 199.6 322z"/></svg>';
|
1316 |
+
|
1317 |
+
// create youtube / vimeo container
|
1318 |
+
iframeContainer = doc[createEl]('DIV');
|
1319 |
+
iframeContainer.id = 'bp_sv';
|
1320 |
+
|
1321 |
+
// create iframe to hold youtube / vimeo player
|
1322 |
+
iframeSiteVid = doc[createEl]('IFRAME');
|
1323 |
+
iframeSiteVid.allowFullscreen = true;
|
1324 |
+
iframeSiteVid.onload = open;
|
1325 |
+
changeCSS(iframeSiteVid, 'border:0px;height:100%;width:100%');
|
1326 |
+
iframeContainer[appendEl](iframeSiteVid);
|
1327 |
+
|
1328 |
+
// display image bindings for image load and error
|
1329 |
+
displayImage.onload = open;
|
1330 |
+
displayImage.onerror = open.bind(null, 'image');
|
1331 |
+
|
1332 |
+
// adjust loader position on window resize
|
1333 |
+
global[listenFor]('resize', function() {
|
1334 |
+
isLoading && toggleLoadingIcon(true);
|
1335 |
+
});
|
1336 |
+
|
1337 |
+
// close container on escape key press
|
1338 |
+
doc[listenFor]('keyup', function(e) {
|
1339 |
+
e.keyCode === 27 && isOpen && close(container);
|
1340 |
+
});
|
1341 |
+
|
1342 |
+
// trap focus within conainer while open
|
1343 |
+
doc[listenFor]('focus', function(e) {
|
1344 |
+
if (isOpen && !container.contains(e.target)) {
|
1345 |
+
e.stopPropagation();
|
1346 |
+
closeButton.focus();
|
1347 |
+
}
|
1348 |
+
}, true);
|
1349 |
+
|
1350 |
+
// all done
|
1351 |
+
initialized = true;
|
1352 |
+
}
|
1353 |
+
|
1354 |
+
|
1355 |
+
// return transform style to make full size display el match trigger el size
|
1356 |
+
function getRect() {
|
1357 |
+
var rect = el.getBoundingClientRect();
|
1358 |
+
var leftOffset = rect.left - (container[cWidth] - rect.width) / 2;
|
1359 |
+
var centerTop = rect.top - (container[cHeight] - rect.height) / 2;
|
1360 |
+
var scaleWidth = el[cWidth] / displayElement[cWidth];
|
1361 |
+
var scaleHeight = el[cHeight] / displayElement[cHeight];
|
1362 |
+
return webkitify('transform:', 'translate3D(' + leftOffset + 'px, ' +
|
1363 |
+
centerTop + 'px, 0) scale3D(' + scaleWidth + ', ' + scaleHeight + ', 0);');
|
1364 |
+
}
|
1365 |
+
|
1366 |
+
|
1367 |
+
// create youtube / vimeo video iframe
|
1368 |
+
function createIframe(isYoutube) {
|
1369 |
+
// create appropriate url for youtube or vimeo
|
1370 |
+
var url = isYoutube ?
|
1371 |
+
'www.youtube.com/embed/' + siteVidID + '?html5=1&rel=0&showinfo=0&playsinline=1&' :
|
1372 |
+
'player.vimeo.com/video/' + siteVidID + '?';
|
1373 |
+
|
1374 |
+
// set iframe src to url
|
1375 |
+
iframeSiteVid.src = 'https://' + url + 'autoplay=1';
|
1376 |
+
}
|
1377 |
+
|
1378 |
+
// timeout to check video status while loading
|
1379 |
+
// onloadeddata event doesn't seem to fire in less up-to-date browsers like midori & epiphany
|
1380 |
+
function checkVid() {
|
1381 |
+
if (displayElement.readyState === 4)
|
1382 |
+
open();
|
1383 |
+
else if (displayVideo.error)
|
1384 |
+
open('video');
|
1385 |
+
else
|
1386 |
+
checkVidTimeout = timeout(checkVid, 35);
|
1387 |
+
}
|
1388 |
+
|
1389 |
+
|
1390 |
+
// hide / show loading icon
|
1391 |
+
function toggleLoadingIcon(bool) {
|
1392 |
+
// don't show loading icon if noLoader is specified
|
1393 |
+
if (noLoader) return;
|
1394 |
+
// bool is true if we want to show icon, false if we want to remove
|
1395 |
+
// change style to match trigger element dimensions if we want to show
|
1396 |
+
bool && changeCSS(loadingIcon, 'top:' + el.offsetTop +
|
1397 |
+
'px;left:' + el.offsetLeft + 'px;height:' +
|
1398 |
+
el[cHeight] + 'px;width:' + el[cWidth] + 'px');
|
1399 |
+
// add or remove loader from DOM
|
1400 |
+
el.parentElement[bool ? appendEl : removeEl](loadingIcon);
|
1401 |
+
isLoading = bool;
|
1402 |
+
}
|
1403 |
+
|
1404 |
+
|
1405 |
+
// animate open of image / video; display caption if needed
|
1406 |
+
function open(err) {
|
1407 |
+
// hide loading spinner
|
1408 |
+
isLoading && toggleLoadingIcon();
|
1409 |
+
|
1410 |
+
// execute animationStart callback
|
1411 |
+
animationStart && animationStart();
|
1412 |
+
|
1413 |
+
// check if we have an error string instead of normal event
|
1414 |
+
if (typeof(err) === 'string') {
|
1415 |
+
removeContainer();
|
1416 |
+
return alert('Error: The requested ' + err + ' could not be displayed.');
|
1417 |
+
}
|
1418 |
+
|
1419 |
+
// if remote image is loaded, add url to imgCache array
|
1420 |
+
(remoteImage && !cached) && imgCache.push(imgSrc);
|
1421 |
+
|
1422 |
+
// transform displayEl to match trigger el
|
1423 |
+
changeCSS(displayElement, getRect());
|
1424 |
+
|
1425 |
+
// fade in container
|
1426 |
+
changeCSS(container, 'opacity:1;' + pointerEventsAuto);
|
1427 |
+
|
1428 |
+
// set animationEnd callback to run after animation ends (cleared if container closed)
|
1429 |
+
animationEnd = timeout(animationEnd, 410);
|
1430 |
+
|
1431 |
+
isOpen = true;
|
1432 |
+
|
1433 |
+
// enlarge displayEl, fade in caption if hasCaption
|
1434 |
+
timeout(function() {
|
1435 |
+
changeCSS(displayElement, webkitify('transition:', 'transform .35s;') + webkitify('transform:', 'none;'));
|
1436 |
+
captionContent && timeout(changeCSS.bind(null, caption, 'opacity:1'), 250);
|
1437 |
+
}, 60);
|
1438 |
+
}
|
1439 |
+
|
1440 |
+
|
1441 |
+
// close active display element
|
1442 |
+
function close(e) {
|
1443 |
+
var target = e.target;
|
1444 |
+
var clickEls = [caption, captionHideButton, displayVideo, captionText];
|
1445 |
+
|
1446 |
+
// blur to hide close button focus style
|
1447 |
+
target && target.blur();
|
1448 |
+
|
1449 |
+
// don't close if one of the clickEls was clicked or container is already closing
|
1450 |
+
if (isClosing || ~clickEls.indexOf(target)) {
|
1451 |
+
return;
|
1452 |
+
}
|
1453 |
+
|
1454 |
+
// animate closing
|
1455 |
+
displayElement.style.cssText += getRect();
|
1456 |
+
changeCSS(container, pointerEventsAuto);
|
1457 |
+
|
1458 |
+
// timeout to remove els from dom; use variable to avoid calling more than once
|
1459 |
+
timeout(removeContainer, 350);
|
1460 |
+
|
1461 |
+
// clear animationEnd timeout
|
1462 |
+
clearTimeout(animationEnd);
|
1463 |
+
|
1464 |
+
isOpen = false;
|
1465 |
+
isClosing = true;
|
1466 |
+
}
|
1467 |
+
|
1468 |
+
|
1469 |
+
// remove container / display element from the DOM
|
1470 |
+
function removeContainer() {
|
1471 |
+
// remove container from DOM & clear inline style
|
1472 |
+
doc.body[removeEl](container);
|
1473 |
+
container[removeEl](displayElement);
|
1474 |
+
changeCSS(container, '');
|
1475 |
+
|
1476 |
+
// clear src of displayElement (or iframe if display el is iframe container)
|
1477 |
+
(displayElement === iframeContainer ? iframeSiteVid : displayElement)
|
1478 |
+
.removeAttribute('src');
|
1479 |
+
|
1480 |
+
if (captionContent) {
|
1481 |
+
changeCSS(caption, '');
|
1482 |
+
container[removeEl](caption);
|
1483 |
+
}
|
1484 |
+
isClosing = false;
|
1485 |
+
}
|
1486 |
+
|
1487 |
+
|
1488 |
+
// style helper functions
|
1489 |
+
function changeCSS(element, newStyle) {
|
1490 |
+
element.style.cssText = newStyle;
|
1491 |
+
}
|
1492 |
+
function webkitify(prop, val) {
|
1493 |
+
var webkit = '-webkit-';
|
1494 |
+
var propVal = prop + val;
|
1495 |
+
return webkit + propVal + prop + webkit + val + propVal;
|
1496 |
+
}
|
1497 |
+
function webkitifyKeyframes(css) {
|
1498 |
+
return '@-webkit-' + css + '@' + css;
|
1499 |
+
}
|
1500 |
+
|
1501 |
+
})();
|
1502 |
+
|
1503 |
+
|
1504 |
/***/ })
|
1505 |
/******/ ]);
|
dist/blocks.frontend.build.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var main=function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){if("complete"===document.readyState)return t();document.addEventListener("DOMContentLoaded",t)}},function(t,e,n){n(2),t.exports=n(3)},function(t,e,n){"use strict";var o,r=n(0);(0,((o=r)&&o.__esModule?o:{default:o}).default)(function(){document.querySelectorAll(".wp-block-ugb-expand").forEach(function(t){var e=t.querySelector(".ugb-expand-button"),n=function(e){t.classList.toggle("ugb-more"),e.preventDefault()};e&&(e.addEventListener("click",n),e.addEventListener("tapEnd",n))})})},function(t,e,n){"use strict";var o,r=n(0);(0,((o=r)&&o.__esModule?o:{default:o}).default)(function(){document.querySelectorAll(".ugb-notification.dismissible-true[data-uid]").forEach(function(t){var e=t.getAttribute("data-uid");localStorage.getItem("stckbl-notif-"+e)||(t.style.display="block"),t.querySelector(".close-button").addEventListener("click",function(){localStorage.setItem("stckbl-notif-"+e,1),t.style.display=""})})})}]);
|
1 |
+
var main=function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){if("complete"===document.readyState)return t();document.addEventListener("DOMContentLoaded",t)}},function(t,e,n){n(2),n(4),n(5),t.exports=n(6)},function(t,e,n){"use strict";var i,o=n(0);(0,((i=o)&&i.__esModule?i:{default:i}).default)(function(){n(3),document.querySelectorAll(".ugb-countup .ugb-counter").forEach(function(t){t.classList.add("ugb-countup-hide"),new Waypoint({element:t,handler:function(){r(t),t.classList.remove("ugb-countup-hide"),this.destroy()},offset:"bottom-in-view"})})});var r=function(t){var e,n,i,o,r,s,a,l,u,c,p,d,h,f;if(function(t){clearTimeout(t.countUpTimeout),t._countUpOrigInnerHTML&&(t.innerHTML=t._countUpOrigInnerHTML,t._countUpOrigInnerHTML=void 0),t.style.visibility=""}(t),/[0-9]/.test(t.innerHTML)){for(t._countUpOrigInnerHTML=t.innerHTML,e=document.querySelector("html").getAttribute("lang")||void 0,i=t.getAttribute("data-duration")/(n=t.getAttribute("data-delay")),o=t.innerHTML.split(/(<[^>]+>|[0-9.][,.0-9]*[0-9]*)/),r=[],s=0;s<i;s++)r.push("");for(a=0;a<o.length;a++)if(/([0-9.][,.0-9]*[0-9]*)/.test(o[a])&&!/<[^>]+>/.test(o[a]))for(l=o[a],u=/[0-9]+,[0-9]+/.test(l),l=l.replace(/,/g,""),p=(c=/^[0-9]+\.[0-9]+$/.test(l))?(l.split(".")[1]||[]).length:0,s=r.length-1,d=i;d>=1;d--)h=parseInt(l/i*d,10),c&&(h=parseFloat(l/i*d).toFixed(p),h=parseFloat(h).toLocaleString(e)),u&&(h=h.toLocaleString(e)),r[s--]+=h;else for(s=0;s<i;s++)r[s]+=o[a];r[r.length]=t.innerHTML,t.innerHTML=r[0],t.style.visibility="visible",f=function(){t.innerHTML=r.shift(),r.length?(clearTimeout(t.countUpTimeout),t.countUpTimeout=setTimeout(f,n)):t._countUpOrigInnerHTML=void 0},t.countUpTimeout=setTimeout(f,n)}}},function(t,e){!function(){"use strict";var t=0,e={};function n(i){if(!i)throw new Error("No options passed to Waypoint constructor");if(!i.element)throw new Error("No element option passed to Waypoint constructor");if(!i.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+t,this.options=n.Adapter.extend({},n.defaults,i),this.element=this.options.element,this.adapter=new n.Adapter(this.element),this.callback=i.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=n.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=n.Context.findOrCreateByElement(this.options.context),n.offsetAliases[this.options.offset]&&(this.options.offset=n.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),e[this.key]=this,t+=1}n.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},n.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},n.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete e[this.key]},n.prototype.disable=function(){return this.enabled=!1,this},n.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},n.prototype.next=function(){return this.group.next(this)},n.prototype.previous=function(){return this.group.previous(this)},n.invokeAll=function(t){var n=[];for(var i in e)n.push(e[i]);for(var o=0,r=n.length;o<r;o++)n[o][t]()},n.destroyAll=function(){n.invokeAll("destroy")},n.disableAll=function(){n.invokeAll("disable")},n.enableAll=function(){for(var t in n.Context.refreshAll(),e)e[t].enabled=!0;return this},n.refreshAll=function(){n.Context.refreshAll()},n.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},n.viewportWidth=function(){return document.documentElement.clientWidth},n.adapters=[],n.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},n.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=n}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}var e=0,n={},i=window.Waypoint,o=window.onload;function r(t){this.element=t,this.Adapter=i.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+e,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,n[t.waypointContextKey]=this,e+=1,i.windowContext||(i.windowContext=!0,i.windowContext=new r(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}r.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},r.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),i=this.element==this.element.window;t&&e&&!i&&(this.adapter.off(".waypoints"),delete n[this.key])},r.prototype.createThrottledResizeHandler=function(){var t=this;function e(){t.handleResize(),t.didResize=!1}this.adapter.on("resize.waypoints",function(){t.didResize||(t.didResize=!0,i.requestAnimationFrame(e))})},r.prototype.createThrottledScrollHandler=function(){var t=this;function e(){t.handleScroll(),t.didScroll=!1}this.adapter.on("scroll.waypoints",function(){t.didScroll&&!i.isTouch||(t.didScroll=!0,i.requestAnimationFrame(e))})},r.prototype.handleResize=function(){i.Context.refreshAll()},r.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var n in e){var i=e[n],o=i.newScroll>i.oldScroll?i.forward:i.backward;for(var r in this.waypoints[n]){var s=this.waypoints[n][r];if(null!==s.triggerPoint){var a=i.oldScroll<s.triggerPoint,l=i.newScroll>=s.triggerPoint;(a&&l||!a&&!l)&&(s.queueTrigger(o),t[s.group.id]=s.group)}}}for(var u in t)t[u].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},r.prototype.innerHeight=function(){return this.element==this.element.window?i.viewportHeight():this.adapter.innerHeight()},r.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},r.prototype.innerWidth=function(){return this.element==this.element.window?i.viewportWidth():this.adapter.innerWidth()},r.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var n in this.waypoints[e])t.push(this.waypoints[e][n]);for(var i=0,o=t.length;i<o;i++)t[i].destroy()},r.prototype.refresh=function(){var t,e=this.element==this.element.window,n=e?void 0:this.adapter.offset(),o={};for(var r in this.handleScroll(),t={horizontal:{contextOffset:e?0:n.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:n.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}}){var s=t[r];for(var a in this.waypoints[r]){var l,u,c,p,d=this.waypoints[r][a],h=d.options.offset,f=d.triggerPoint,g=0,m=null==f;d.element!==d.element.window&&(g=d.adapter.offset()[s.offsetProp]),"function"==typeof h?h=h.apply(d):"string"==typeof h&&(h=parseFloat(h),d.options.offset.indexOf("%")>-1&&(h=Math.ceil(s.contextDimension*h/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=Math.floor(g+l-h),u=f<s.oldScroll,c=d.triggerPoint>=s.oldScroll,p=!u&&!c,!m&&(u&&c)?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!m&&p?(d.queueTrigger(s.forward),o[d.group.id]=d.group):m&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return i.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},r.findOrCreateByElement=function(t){return r.findByElement(t)||new r(t)},r.refreshAll=function(){for(var t in n)n[t].refresh()},r.findByElement=function(t){return n[t.waypointContextKey]},window.onload=function(){o&&o(),r.refreshAll()},i.requestAnimationFrame=function(e){(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t).call(window,e)},i.Context=r}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}var n={vertical:{},horizontal:{}},i=window.Waypoint;function o(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),n[this.axis][this.name]=this}o.prototype.add=function(t){this.waypoints.push(t)},o.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},o.prototype.flushTriggers=function(){for(var n in this.triggerQueues){var i=this.triggerQueues[n],o="up"===n||"left"===n;i.sort(o?e:t);for(var r=0,s=i.length;r<s;r+=1){var a=i[r];(a.options.continuous||r===i.length-1)&&a.trigger([n])}}this.clearTriggerQueues()},o.prototype.next=function(e){this.waypoints.sort(t);var n=i.Adapter.inArray(e,this.waypoints);return n===this.waypoints.length-1?null:this.waypoints[n+1]},o.prototype.previous=function(e){this.waypoints.sort(t);var n=i.Adapter.inArray(e,this.waypoints);return n?this.waypoints[n-1]:null},o.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},o.prototype.remove=function(t){var e=i.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},o.prototype.first=function(){return this.waypoints[0]},o.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},o.findOrCreate=function(t){return n[t.axis][t.name]||new o(t)},i.Group=o}(),function(){"use strict";var t=window.Waypoint;function e(t){return t===t.window}function n(t){return e(t)?t:t.defaultView}function i(t){this.element=t,this.handlers={}}i.prototype.innerHeight=function(){return e(this.element)?this.element.innerHeight:this.element.clientHeight},i.prototype.innerWidth=function(){return e(this.element)?this.element.innerWidth:this.element.clientWidth},i.prototype.off=function(t,e){function n(t,e,n){for(var i=0,o=e.length-1;i<o;i++){var r=e[i];n&&n!==r||t.removeEventListener(r)}}var i=t.split("."),o=i[0],r=i[1],s=this.element;if(r&&this.handlers[r]&&o)n(s,this.handlers[r][o],e),this.handlers[r][o]=[];else if(o)for(var a in this.handlers)n(s,this.handlers[a][o]||[],e),this.handlers[a][o]=[];else if(r&&this.handlers[r]){for(var l in this.handlers[r])n(s,this.handlers[r][l],e);this.handlers[r]={}}},i.prototype.offset=function(){if(!this.element.ownerDocument)return null;var t=this.element.ownerDocument.documentElement,e=n(this.element.ownerDocument),i={top:0,left:0};return this.element.getBoundingClientRect&&(i=this.element.getBoundingClientRect()),{top:i.top+e.pageYOffset-t.clientTop,left:i.left+e.pageXOffset-t.clientLeft}},i.prototype.on=function(t,e){var n=t.split("."),i=n[0],o=n[1]||"__default",r=this.handlers[o]=this.handlers[o]||{};(r[i]=r[i]||[]).push(e),this.element.addEventListener(i,e)},i.prototype.outerHeight=function(t){var n,i=this.innerHeight();return t&&!e(this.element)&&(n=window.getComputedStyle(this.element),i+=parseInt(n.marginTop,10),i+=parseInt(n.marginBottom,10)),i},i.prototype.outerWidth=function(t){var n,i=this.innerWidth();return t&&!e(this.element)&&(n=window.getComputedStyle(this.element),i+=parseInt(n.marginLeft,10),i+=parseInt(n.marginRight,10)),i},i.prototype.scrollLeft=function(){var t=n(this.element);return t?t.pageXOffset:this.element.scrollLeft},i.prototype.scrollTop=function(){var t=n(this.element);return t?t.pageYOffset:this.element.scrollTop},i.extend=function(){var t=Array.prototype.slice.call(arguments);function e(t,e){if("object"==typeof t&&"object"==typeof e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}for(var n=1,i=t.length;n<i;n++)e(t[0],t[n]);return t[0]},i.inArray=function(t,e,n){return null==e?-1:e.indexOf(t,n)},i.isEmptyObject=function(t){for(var e in t)return!1;return!0},t.adapters.push({name:"noframework",Adapter:i}),t.Adapter=i}()},function(t,e,n){"use strict";var i,o=n(0);(0,((i=o)&&i.__esModule?i:{default:i}).default)(function(){document.querySelectorAll(".wp-block-ugb-expand").forEach(function(t){var e=t.querySelector(".ugb-expand-button"),n=function(e){t.classList.toggle("ugb-more"),e.preventDefault()};e&&(e.addEventListener("click",n),e.addEventListener("tapEnd",n))})})},function(t,e,n){"use strict";var i,o=n(0);(0,((i=o)&&i.__esModule?i:{default:i}).default)(function(){document.querySelectorAll(".ugb-notification.dismissible-true[data-uid]").forEach(function(t){var e=t.getAttribute("data-uid");localStorage.getItem("stckbl-notif-"+e)||(t.style.display="block"),t.querySelector(".close-button").addEventListener("click",function(){localStorage.setItem("stckbl-notif-"+e,1),t.style.display=""})})})},function(t,e,n){"use strict";var i=r(n(0)),o=r(n(7));function r(t){return t&&t.__esModule?t:{default:t}}(0,i.default)(function(){var t=document.querySelectorAll(".ugb-video-popup"),e=function(t){if(o.default){var e=t.getAttribute("data-video"),n={el:t,noLoader:!0};e.match(/^\d+$/g)?n.vimeoSrc=e:e.match(/^https?:\/\//g)?n.vidSrc=e:n.ytSrc=e,(0,o.default)(n)}};t.forEach(function(t){var n=t.querySelector("a");n.addEventListener("click",function(n){n.preventDefault(),e(t)}),n.addEventListener("touchend",function(n){n.preventDefault(),e(t)})})})},function(t,e){!function(){var e,n,i,o,r,s,a,l,u,c,p,d,h,f,g,m,y,w,v,b,x,S,A,T,k,L,_=window,E=document,H="appendChild",z="createElement",O="removeChild",M="innerHTML",C="pointer-events:auto",q="clientHeight",W="clientWidth",I="addEventListener",P=_.setTimeout,D=_.clearTimeout;function R(){var t=e.getBoundingClientRect();return N("transform:","translate3D("+(t.left-(i[W]-t.width)/2)+"px, "+(t.top-(i[q]-t.height)/2)+"px, 0) scale3D("+e[W]/o[W]+", "+e[q]/o[q]+", 0);")}function F(){4===o.readyState?U():s.error?U("video"):h=P(F,35)}function B(t){L||(t&&V(f,"top:"+e.offsetTop+"px;left:"+e.offsetLeft+"px;height:"+e[q]+"px;width:"+e[W]+"px"),e.parentElement[t?H:O](f),d=t)}function U(t){if(d&&B(),T&&T(),"string"==typeof t)return Q(),alert("Error: The requested "+t+" could not be displayed.");A&&!S&&x.push(u),V(o,R()),V(i,"opacity:1;"+C),k=P(k,410),v=!0,P(function(){V(o,N("transition:","transform .35s;")+N("transform:","none;")),y&&P(V.bind(null,g,"opacity:1"),250)},60)}function j(t){var e=t.target,n=[g,w,s,m];e&&e.blur(),b||~n.indexOf(e)||(o.style.cssText+=R(),V(i,C),P(Q,350),D(k),v=!1,b=!0)}function Q(){E.body[O](i),i[O](o),V(i,""),(o===a?l:o).removeAttribute("src"),y&&(V(g,""),i[O](g)),b=!1}function V(t,e){t.style.cssText=e}function N(t,e){var n=t+e;return"-webkit-"+n+t+"-webkit-"+e+n}t.exports=function(t){var b,C;n||function(){function t(){var t=E[z]("button");return t.className="bp-x",t[M]="×",t}x=[];var e=E[z]("STYLE");e[M]="#bp_caption,#bp_container{bottom:0;left:0;right:0;position:fixed;opacity:0}#bp_container>*,.bp-x,#bp_loader{position:absolute;right:0}#bp_container{top:0;z-index:9999;background:rgba(0,0,0,.7);opacity:0;pointer-events:none;transition:opacity .35s}#bp_loader{top:0;left:0;bottom:0;display:-webkit-flex;display:flex;margin:0;cursor:wait;z-index:9}#bp_loader svg{width:40%;max-height:40%;margin:auto;"+N("animation:","ldr .7s infinite linear;")+"}"+(o="keyframes ldr{to{"+N("transform:","rotate(1turn);")+"}}","@-webkit-"+o+"@"+o)+"#bp_container img,#bp_sv,#bp_vid{max-height:96%;max-width:96%;top:0;bottom:0;left:0;margin:auto;box-shadow:0 0 3em rgba(0,0,0,.4);z-index:-1}#bp_sv{width:171vh}#bp_caption{font-size:.9em;padding:1.3em;background:rgba(15,15,15,.94);color:#fff;text-align:center;transition:opacity .3s}.bp-x{font-family:Arial;top:0;cursor:pointer;opacity:.8;font-size:3em;padding:0 .3em;color:#fff;background:transparent;border:0;text-shadow:0 0 2px #000}#bp_caption .bp-x{left:2%;top:auto;right:auto;bottom:100%;padding:0 .6em;background:#d74040;border-radius:2px 2px 0 0;font-size:2.3em;text-shadow:none}.bp-x:hover,.bp-x:focus{opacity:1}.bp-x:active{outline:0}@media (max-aspect-ratio:9/5){#bp_sv{height:53vw}}",E.head[H](e),(i=E[z]("DIV")).id="bp_container",i.onclick=j,c=t(),i[H](c),r=E[z]("IMG"),(s=E[z]("VIDEO")).id="bp_vid",s.autoplay=!0,s.setAttribute("playsinline",!0),s.controls=!0,s.loop=!0,(g=E[z]("DIV")).id="bp_caption",(w=t()).onclick=function(){V(g,"opacity:0"),P(function(){y=!1,i[O](g)},300)},g[H](w),m=E[z]("SPAN"),g[H](m),(f=E[z]("DIV")).id="bp_loader",f[M]='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 399 399"><path d="M341 58.5C303 20.8 253 0 199.6 0 146.4 0 96.2 20.8 58.5 58.5 20.8 96.2 0 146.5 0 199.7 0 253 20.8 303.2 58.5 341c37.7 37.6 88 58.4 141.2 58.4 53.3 0 103.5-20.8 141.2-58.5 37.6-37.8 58.4-88 58.4-141.3 0-53.3-20.8-103.5-58.5-141.2zm-13 12.8c34.3 34.3 53.2 80 53.2 128.4h-41c0-77.4-63-140.4-140.5-140.4-4.6 0-9 .2-13.6.7V18.7c4.6-.4 9-.5 13.7-.5 48.5 0 94 18.8 128.4 53zM199.8 322c-67.4 0-122.2-55-122.2-122.3S132.3 77.5 199.7 77.5 322 132.3 322 199.7 267 322 199.6 322z"/></svg>',(a=E[z]("DIV")).id="bp_sv",(l=E[z]("IFRAME")).allowFullscreen=!0,l.onload=U,V(l,"border:0px;height:100%;width:100%"),a[H](l),r.onload=U,r.onerror=U.bind(null,"image"),_[I]("resize",function(){d&&B(!0)}),E[I]("keyup",function(t){27===t.keyCode&&v&&j(i)}),E[I]("focus",function(t){v&&!i.contains(t.target)&&(t.stopPropagation(),c.focus())},!0),n=!0;var o}(),d&&(D(h),Q()),p=t.ytSrc||t.vimeoSrc,T=t.animationStart,k=t.animationEnd,L=t.noLoader,e=t.el,A=!1,(y=e.getAttribute("caption"))&&(m[M]=y,i[H](g)),p?(B(!0),o=a,b=!!t.ytSrc,C=b?"www.youtube.com/embed/"+p+"?html5=1&rel=0&showinfo=0&playsinline=1&":"player.vimeo.com/video/"+p+"?",l.src="https://"+C+"autoplay=1"):t.imgSrc?(A=!0,u=t.imgSrc,!(S=~x.indexOf(u))&&B(!0),(o=r).src=u):t.vidSrc?(B(!0),(o=s).src=t.vidSrc,F()):(o=r).src="IMG"===e.tagName?e.src:_.getComputedStyle(e).backgroundImage.replace(/^url|[(|)|'|"]/g,""),i[H](o),E.body[H](i)}}()}]);
|
dist/blocks.style.build.css
CHANGED
@@ -10,3 +10,6 @@
|
|
10 |
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.ugb-team-member .team-member-image{width:300px;height:300px;background-size:cover;background-position:center;margin:0 auto 1.3rem}.ugb-team-member.image-circle .team-member-image{border-radius:100%}.ugb-team-member.column-2 .team-member-image{width:220px;height:220px}.ugb-team-member.column-3 .team-member-image{width:150px;height:150px}.ugb-team-member>div{text-align:center;padding:1rem 0}.ugb-team-member>div p{text-align:center}.ugb-team-member h4{margin:0 0 .5rem !important}.ugb-team-member .ugb-team-member-position{margin:0 0 1rem}.ugb-team-member .ugb-team-member-position{opacity:.3;font-size:.75em;text-transform:uppercase}.ugb-team-member .ugb-team-member-des,.ugb-team-member .ugb-team-member-des-two,.ugb-team-member .ugb-team-member-des-three{opacity:.5;margin:0 0 1rem;left:0}.ugb-team-member.column-1 .ugb-team-member-column-two,.ugb-team-member.column-1 .ugb-team-member-column-three{display:none}.ugb-team-member.column-2{display:-ms-flexbox;display:flex}.ugb-team-member.column-2 .ugb-team-member-column-one{padding-right:1rem}.ugb-team-member.column-2 .ugb-team-member-column-two{padding-left:1rem}.ugb-team-member.column-2 .ugb-team-member-column-one,.ugb-team-member.column-2 .ugb-team-member-column-two{width:50%}.ugb-team-member.column-2 .ugb-team-member-column-three{display:none}.ugb-team-member.column-2 .team-member-image img{height:200px;width:250px}.ugb-team-member.column-3{display:-ms-flexbox;display:flex}.ugb-team-member.column-3 .ugb-team-member-column-one,.ugb-team-member.column-3 .ugb-team-member-column-two,.ugb-team-member.column-3 .ugb-team-member-column-three{width:33.33%}.ugb-team-member.column-3 .ugb-team-member-column-one{padding-right:1rem}.ugb-team-member.column-3 .ugb-team-member-column-two{padding-left:1rem;padding-right:1rem}.ugb-team-member.column-3 .ugb-team-member-column-three{padding-left:1rem}.ugb-team-member.column-3 .team-member-image img{height:200px;width:200px}.team-member-social a{color:#000000;opacity:.30;padding:0 3px}
|
11 |
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.wp-block-ugb-expand p:last-child{margin-bottom:0}.wp-block-ugb-expand.ugb-more .ugb-expand-less-text,.wp-block-ugb-expand.ugb-more .ugb-expand-more{display:none}.wp-block-ugb-expand.ugb-more .ugb-expand-more-text,.wp-block-ugb-expand.ugb-more .ugb-expand-less{display:inline !important}
|
12 |
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.ugb-number-box{display:-ms-flexbox;display:flex;margin:1rem 0}.ugb-number-box span,.ugb-number-box .blocks-rich-text span{background-color:#ddd;border-radius:100%;font-size:3em;display:block;padding:0;text-align:center;overflow:hidden;margin:0 auto;height:2.5em;width:2.5em;line-height:2.5em}.ugb-number-box>div{text-align:center;margin:0 auto}.ugb-number-box>div p{text-align:center}.ugb-number-box .ugb-number-box-name,.ugb-number-box .ugb-number-box-name-two,.ugb-number-box .ugb-number-box-name-three{margin:1.3rem 0 1rem}.ugb-number-box .ugb-number-box-body,.ugb-number-box .ugb-number-box-body-two,.ugb-number-box .ugb-number-box-body-three{opacity:.5;margin:0 0 1rem;left:0}.ugb-number-box.column-1 .ugb-number-box-column-two,.ugb-number-box.column-1 .ugb-number-box-column-three{display:none}.ugb-number-box.column-2 .ugb-number-box-column-one{margin-right:1rem}.ugb-number-box.column-2 .ugb-number-box-column-two{margin-left:1rem}.ugb-number-box.column-2>div{width:50%}.ugb-number-box.column-2 .ugb-number-box-column-three{display:none}.ugb-number-box.column-3>div{width:33.2%;margin-left:1rem;margin-right:1rem}.ugb-number-box.column-3>div:first-child{margin-left:0}.ugb-number-box.column-3>div:last-child{margin-right:0}@media screen and (max-width: 800px){.ugb-number-box.column-3.column-3{display:block}.ugb-number-box.column-3.column-3>div{width:100%;margin:0}}@media screen and (max-width: 600px){.ugb-number-box.column-2.column-2{display:block}.ugb-number-box.column-2.column-2>div{width:100%;margin:0}}
|
|
|
|
|
|
10 |
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.ugb-team-member .team-member-image{width:300px;height:300px;background-size:cover;background-position:center;margin:0 auto 1.3rem}.ugb-team-member.image-circle .team-member-image{border-radius:100%}.ugb-team-member.column-2 .team-member-image{width:220px;height:220px}.ugb-team-member.column-3 .team-member-image{width:150px;height:150px}.ugb-team-member>div{text-align:center;padding:1rem 0}.ugb-team-member>div p{text-align:center}.ugb-team-member h4{margin:0 0 .5rem !important}.ugb-team-member .ugb-team-member-position{margin:0 0 1rem}.ugb-team-member .ugb-team-member-position{opacity:.3;font-size:.75em;text-transform:uppercase}.ugb-team-member .ugb-team-member-des,.ugb-team-member .ugb-team-member-des-two,.ugb-team-member .ugb-team-member-des-three{opacity:.5;margin:0 0 1rem;left:0}.ugb-team-member.column-1 .ugb-team-member-column-two,.ugb-team-member.column-1 .ugb-team-member-column-three{display:none}.ugb-team-member.column-2{display:-ms-flexbox;display:flex}.ugb-team-member.column-2 .ugb-team-member-column-one{padding-right:1rem}.ugb-team-member.column-2 .ugb-team-member-column-two{padding-left:1rem}.ugb-team-member.column-2 .ugb-team-member-column-one,.ugb-team-member.column-2 .ugb-team-member-column-two{width:50%}.ugb-team-member.column-2 .ugb-team-member-column-three{display:none}.ugb-team-member.column-2 .team-member-image img{height:200px;width:250px}.ugb-team-member.column-3{display:-ms-flexbox;display:flex}.ugb-team-member.column-3 .ugb-team-member-column-one,.ugb-team-member.column-3 .ugb-team-member-column-two,.ugb-team-member.column-3 .ugb-team-member-column-three{width:33.33%}.ugb-team-member.column-3 .ugb-team-member-column-one{padding-right:1rem}.ugb-team-member.column-3 .ugb-team-member-column-two{padding-left:1rem;padding-right:1rem}.ugb-team-member.column-3 .ugb-team-member-column-three{padding-left:1rem}.ugb-team-member.column-3 .team-member-image img{height:200px;width:200px}.team-member-social a{color:#000000;opacity:.30;padding:0 3px}
|
11 |
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.wp-block-ugb-expand p:last-child{margin-bottom:0}.wp-block-ugb-expand.ugb-more .ugb-expand-less-text,.wp-block-ugb-expand.ugb-more .ugb-expand-more{display:none}.wp-block-ugb-expand.ugb-more .ugb-expand-more-text,.wp-block-ugb-expand.ugb-more .ugb-expand-less{display:inline !important}
|
12 |
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.ugb-number-box{display:-ms-flexbox;display:flex;margin:1rem 0}.ugb-number-box span,.ugb-number-box .blocks-rich-text span{background-color:#ddd;border-radius:100%;font-size:3em;display:block;padding:0;text-align:center;overflow:hidden;margin:0 auto;height:2.5em;width:2.5em;line-height:2.5em}.ugb-number-box>div{text-align:center;margin:0 auto}.ugb-number-box>div p{text-align:center}.ugb-number-box .ugb-number-box-name,.ugb-number-box .ugb-number-box-name-two,.ugb-number-box .ugb-number-box-name-three{margin:1.3rem 0 1rem}.ugb-number-box .ugb-number-box-body,.ugb-number-box .ugb-number-box-body-two,.ugb-number-box .ugb-number-box-body-three{opacity:.5;margin:0 0 1rem;left:0}.ugb-number-box.column-1 .ugb-number-box-column-two,.ugb-number-box.column-1 .ugb-number-box-column-three{display:none}.ugb-number-box.column-2 .ugb-number-box-column-one{margin-right:1rem}.ugb-number-box.column-2 .ugb-number-box-column-two{margin-left:1rem}.ugb-number-box.column-2>div{width:50%}.ugb-number-box.column-2 .ugb-number-box-column-three{display:none}.ugb-number-box.column-3>div{width:33.2%;margin-left:1rem;margin-right:1rem}.ugb-number-box.column-3>div:first-child{margin-left:0}.ugb-number-box.column-3>div:last-child{margin-right:0}@media screen and (max-width: 800px){.ugb-number-box.column-3.column-3{display:block}.ugb-number-box.column-3.column-3>div{width:100%;margin:0}}@media screen and (max-width: 600px){.ugb-number-box.column-2.column-2{display:block}.ugb-number-box.column-2.column-2>div{width:100%;margin:0}}
|
13 |
+
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.ugb-image-box{background-size:cover;background-position:center;padding:2rem;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin:0 auto;position:relative;background-color:#999}.ugb-image-box *{-webkit-transition:all .4s ease-in-out !important;-o-transition:all .4s ease-in-out !important;transition:all .4s ease-in-out !important;border:0 !important;-webkit-box-shadow:none !important;box-shadow:none !important}.ugb-image-box button.components-button{z-index:3;margin-bottom:1em}.ugb-image-box a{position:absolute;z-index:2;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none}.ugb-image-box h4,.ugb-image-box p{z-index:3}.ugb-image-box h4{margin:0 0 0.5em !important}.ugb-image-box p{margin:0 !important;opacity:0;-webkit-transform:translateY(-15px);-ms-transform:translateY(-15px);transform:translateY(-15px)}.ugb-image-box:hover a{opacity:.7}.ugb-image-box:hover p{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}.ugb-image-box.full-width{width:100% !important}.wp-block-ugb-image-box.has-no-content{display:none}
|
14 |
+
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.ugb-countup{text-align:center;margin-bottom:1em}.ugb-countup h4,.ugb-countup div,.ugb-countup p{margin:0 !important;line-height:1em}.ugb-countup h4{margin-bottom:1em !important}.ugb-countup p{margin-top:1em !important}.ugb-countup .ugb-countup-hide{visibility:hidden}
|
15 |
+
.gutenberg .ugb-editor-label{font-size:12px;text-transform:uppercase;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#8e979e;padding:2em 0 0;background:#fff;border:none;-webkit-box-shadow:none;box-shadow:none;white-space:nowrap;display:block}.gutenberg .ugb-editor-label:first-child{padding-top:0}.video-popup-image{height:220px;width:220px;background-position:center;background-size:cover;margin-bottom:10px}.ugb-video-popup{position:relative;margin:0 auto;width:100%;max-width:600px}.ugb-video-popup .ugb-video-preview,.ugb-video-popup a,.ugb-video-popup .ugb-video-overlay,.ugb-video-popup .ugb-play-button{position:absolute;top:0;left:0;right:0;bottom:0}.ugb-video-popup .ugb-video-preview{background-size:cover;background-position:center;opacity:.4;-webkit-transition:all .3s ease-in-out;-o-transition:all .3s ease-in-out;transition:all .3s ease-in-out;z-index:1}.ugb-video-popup:hover .ugb-video-preview{opacity:.5}.ugb-video-popup .ugb-video-wrapper{position:relative;width:100%;padding-bottom:56.25%;border:0 !important;-webkit-box-shadow:none !important;box-shadow:none !important}.ugb-video-popup a,.ugb-video-popup .ugb-video-overlay{z-index:3;-webkit-box-shadow:none !important;box-shadow:none !important;background:transparent !important;display:block !important}.ugb-video-popup .ugb-play-button{z-index:2;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column}.ugb-video-popup svg{fill:#fff !important}.ugb-video-popup button.components-button.button{position:absolute;z-index:4;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);top:30%}.ugb-video-popup button.components-button.button:active{-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%)}.ugb-video-popup-link.blocks-button__inline-link{margin:5px auto}.ugb-video-popup-link.blocks-button__inline-link>p{font-size:.8em;margin-left:30px}
|
plugin.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Essential Gutenberg blocks in one plugin. Simple, flexible, and customizable.
|
6 |
* Author: Gambit Technologies, Inc
|
7 |
* Author URI: http://gambit.ph
|
8 |
-
* Version: 0.
|
9 |
*
|
10 |
* @package Stackable
|
11 |
*/
|
5 |
* Description: Essential Gutenberg blocks in one plugin. Simple, flexible, and customizable.
|
6 |
* Author: Gambit Technologies, Inc
|
7 |
* Author URI: http://gambit.ph
|
8 |
+
* Version: 0.3
|
9 |
*
|
10 |
* @package Stackable
|
11 |
*/
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: gutenberg, blocks, gutenberg blocks, editor, addon, add on, add-on, gutenb
|
|
4 |
Requires at least: 4.8
|
5 |
Tested up to: 4.9.4
|
6 |
Requires PHP: 5.3
|
7 |
-
Stable tag: 0.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -12,13 +12,15 @@ Essential Gutenberg blocks in one plugin. Simple, flexible, and customizable.
|
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
Stackable adds the missing design blocks and options you need in the Gutenberg editor.
|
16 |
|
17 |
-
|
18 |
|
19 |
-
|
20 |
|
21 |
-
|
|
|
|
|
22 |
|
23 |
With Stackable: Ultimate Blocks for Gutenberg, you get your essential blocks and more in a single install.
|
24 |
|
@@ -26,52 +28,55 @@ With Stackable: Ultimate Blocks for Gutenberg, you get your essential blocks and
|
|
26 |
|
27 |
= More Gutenberg blocks for added functionality =
|
28 |
|
29 |
-
These blocks are built with usability in mind. Stackable is also designed to suit Gutenberg's interface, simple and straightforward:
|
30 |
-
|
31 |
-
1.
|
32 |
-
2.
|
33 |
-
3.
|
34 |
-
4.
|
35 |
-
5.
|
36 |
-
6.
|
37 |
-
7.
|
38 |
-
8.
|
39 |
-
9.
|
40 |
-
10.
|
41 |
-
11.
|
42 |
-
12.
|
|
|
|
|
|
|
43 |
|
44 |
We plan to add more in the future.
|
45 |
|
46 |
= Adjustable settings for each block =
|
47 |
|
48 |
-
Each Stackable block has unique features you can modify. Change colors, tweak text sizes, change background images, add hover animations, and much more.
|
49 |
|
50 |
= Our current list of blocks =
|
51 |
|
52 |
**1. Testimonials**
|
53 |
|
54 |
-
|
55 |
|
56 |
**2. Team Members**
|
57 |
|
58 |
-
Introduce your team through individual photos and write-ups in columns. Comes with optional social media icons for each member.
|
59 |
|
60 |
**3. Call to Action**
|
61 |
|
62 |
-
Persuade your visitors to take action. Feature , and engage with Call to Action blocks.
|
63 |
|
64 |
**4. Notification**
|
65 |
|
66 |
-
Add alerts on your Gutenberg-built website. Use these to notify your site visitors of promos, license expiration, and other important alerts. Choose from a range of basic settings and styles.
|
67 |
|
68 |
**5. Blockquote**
|
69 |
|
70 |
-
Customize the current Gutenberg blockqoute by changing both text and background color.
|
71 |
|
72 |
**6. Pullquote**
|
73 |
|
74 |
-
Perfect for pulling quotes from your chosen article and showcasing them as your readers scroll down. Change text and background color to suit your page's design.
|
75 |
|
76 |
**7. Number Box**
|
77 |
|
@@ -79,19 +84,19 @@ Highlight steps or procedures that only take a few steps.
|
|
79 |
|
80 |
**8. Button**
|
81 |
|
82 |
-
A more flexible, customizable button block for Gutenberg. Change size, alignment, color, text color, and even corner radius to match the overall look of your site. Modify more by placing links and icons inside.
|
83 |
|
84 |
**9. Ghost Button**
|
85 |
|
86 |
Just like the Button block, but presented in a sleek, minimalistic way: outlines only.
|
87 |
|
88 |
-
**10. Expand / Show More**
|
89 |
|
90 |
Show snippets of text as short previews of longer text, and let visitors have the option to show more details.
|
91 |
|
92 |
**11. Divider**
|
93 |
|
94 |
-
Extended options for Gutenberg's divider. Adjust height, weight, color, and more.
|
95 |
|
96 |
**12. Spacer**
|
97 |
|
@@ -128,6 +133,13 @@ Nope. Stackable only works with Gutenberg.
|
|
128 |
|
129 |
== Changelog ==
|
130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
= 0.2 =
|
132 |
|
133 |
* New: Expand block
|
4 |
Requires at least: 4.8
|
5 |
Tested up to: 4.9.4
|
6 |
Requires PHP: 5.3
|
7 |
+
Stable tag: 0.3
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
Stackable adds the missing design blocks and options you need in the Gutenberg editor.
|
16 |
|
17 |
+
> [Website](https://wpstackable.com/) | [Want more blocks? Join our newsletter](https://wpstackable.com/#newsletter)
|
18 |
|
19 |
+
**15 Blocks so far and counting...**
|
20 |
|
21 |
+
> We are in alpha stage until Gutenberg is merged into core. As features, APIs, and best practices change in Gutenberg, so will this plugin.
|
22 |
+
|
23 |
+
Stackable gives you more customization options that aren't found in the current set Gutenberg blocks ' like adjusting corner radius for buttons and different styled dividers.
|
24 |
|
25 |
With Stackable: Ultimate Blocks for Gutenberg, you get your essential blocks and more in a single install.
|
26 |
|
28 |
|
29 |
= More Gutenberg blocks for added functionality =
|
30 |
|
31 |
+
These blocks are built with usability in mind. Stackable is also designed to suit Gutenberg's interface, simple and straightforward:
|
32 |
+
|
33 |
+
1. Image box (New!)
|
34 |
+
2. Count up (New!)
|
35 |
+
3. Video Popup (New!)
|
36 |
+
4. Testimonials
|
37 |
+
5. Team Members
|
38 |
+
6. Call to Action
|
39 |
+
7. Notification
|
40 |
+
8. Blockquote (Improved!)
|
41 |
+
9. Pullquote
|
42 |
+
10. Number box
|
43 |
+
11. Button (Improved!)
|
44 |
+
12. Ghost Button
|
45 |
+
13. Expand / Show more
|
46 |
+
14. Divider (Improved!)
|
47 |
+
15. Spacer
|
48 |
|
49 |
We plan to add more in the future.
|
50 |
|
51 |
= Adjustable settings for each block =
|
52 |
|
53 |
+
Each Stackable block has unique features you can modify. Change colors, tweak text sizes, change background images, add hover animations, and much more.
|
54 |
|
55 |
= Our current list of blocks =
|
56 |
|
57 |
**1. Testimonials**
|
58 |
|
59 |
+
Add testimonial sections on your website. Add a text description, and choose between uploading a thumbnail image or icon for each testimonial.
|
60 |
|
61 |
**2. Team Members**
|
62 |
|
63 |
+
Introduce your team through individual photos and write-ups in columns. Comes with optional social media icons for each member.
|
64 |
|
65 |
**3. Call to Action**
|
66 |
|
67 |
+
Persuade your visitors to take action. Feature , and engage with Call to Action blocks.
|
68 |
|
69 |
**4. Notification**
|
70 |
|
71 |
+
Add alerts on your Gutenberg-built website. Use these to notify your site visitors of promos, license expiration, and other important alerts. Choose from a range of basic settings and styles.
|
72 |
|
73 |
**5. Blockquote**
|
74 |
|
75 |
+
Customize the current Gutenberg blockqoute by changing both text and background color.
|
76 |
|
77 |
**6. Pullquote**
|
78 |
|
79 |
+
Perfect for pulling quotes from your chosen article and showcasing them as your readers scroll down. Change text and background color to suit your page's design.
|
80 |
|
81 |
**7. Number Box**
|
82 |
|
84 |
|
85 |
**8. Button**
|
86 |
|
87 |
+
A more flexible, customizable button block for Gutenberg. Change size, alignment, color, text color, and even corner radius to match the overall look of your site. Modify more by placing links and icons inside.
|
88 |
|
89 |
**9. Ghost Button**
|
90 |
|
91 |
Just like the Button block, but presented in a sleek, minimalistic way: outlines only.
|
92 |
|
93 |
+
**10. Expand / Show More**
|
94 |
|
95 |
Show snippets of text as short previews of longer text, and let visitors have the option to show more details.
|
96 |
|
97 |
**11. Divider**
|
98 |
|
99 |
+
Extended options for Gutenberg's divider. Adjust height, weight, color, and more.
|
100 |
|
101 |
**12. Spacer**
|
102 |
|
133 |
|
134 |
== Changelog ==
|
135 |
|
136 |
+
= 0.3 =
|
137 |
+
* New: Image box block
|
138 |
+
* New: Count up block
|
139 |
+
* New: Video Popup block
|
140 |
+
* Fixed: Compatibility with Gutenberg 2.4.0
|
141 |
+
* Fixed: Removed "0" displayed in Number box when editing
|
142 |
+
|
143 |
= 0.2 =
|
144 |
|
145 |
* New: Expand block
|
src/block/blockquote/index.js
CHANGED
@@ -36,7 +36,7 @@ import { QuoteIcon } from '../../icons'
|
|
36 |
*/
|
37 |
registerBlockType( 'ugb/blockquote', {
|
38 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
39 |
-
title: __( 'Blockquote'
|
40 |
icon: QuoteIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
41 |
category: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
42 |
keywords: [
|
36 |
*/
|
37 |
registerBlockType( 'ugb/blockquote', {
|
38 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
39 |
+
title: __( 'Blockquote' ), // Block title.
|
40 |
icon: QuoteIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
41 |
category: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
42 |
keywords: [
|
src/block/button/index.js
CHANGED
@@ -151,7 +151,7 @@ class UGBButtonBlock extends Component {
|
|
151 |
*/
|
152 |
registerBlockType( 'ugb/button', {
|
153 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
154 |
-
title: __( 'Button'
|
155 |
icon: ButtonIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
156 |
category: 'layout', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
157 |
keywords: [
|
151 |
*/
|
152 |
registerBlockType( 'ugb/button', {
|
153 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
154 |
+
title: __( 'Button' ), // Block title.
|
155 |
icon: ButtonIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
156 |
category: 'layout', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
157 |
keywords: [
|
src/block/call-to-action/index.js
CHANGED
@@ -48,7 +48,7 @@ import { CTAIcon } from '../../icons'
|
|
48 |
*/
|
49 |
registerBlockType( 'ugb/cta', {
|
50 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
51 |
-
title: __( 'Call to Action'
|
52 |
icon: CTAIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
53 |
category: 'layout', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
54 |
keywords: [
|
48 |
*/
|
49 |
registerBlockType( 'ugb/cta', {
|
50 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
51 |
+
title: __( 'Call to Action' ), // Block title.
|
52 |
icon: CTAIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
53 |
category: 'layout', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
54 |
keywords: [
|
src/block/count-up/editor.scss
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* #.# Editor Styles for Count Up Block
|
3 |
+
*
|
4 |
+
* CSS for just Backend enqueued after style.scss
|
5 |
+
* which makes it higher in priority.
|
6 |
+
*/
|
src/block/count-up/frontend.js
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import domReady from '@wordpress/dom-ready'
|
2 |
+
|
3 |
+
domReady( () => {
|
4 |
+
require( 'waypoints/lib/noframework.waypoints.js' )
|
5 |
+
const elems = document.querySelectorAll( '.ugb-countup .ugb-counter' )
|
6 |
+
elems.forEach( el => {
|
7 |
+
// initCountUp( el )
|
8 |
+
el.classList.add( 'ugb-countup-hide' )
|
9 |
+
new Waypoint( {
|
10 |
+
element: el,
|
11 |
+
handler: function() {
|
12 |
+
initCountUp( el )
|
13 |
+
el.classList.remove( 'ugb-countup-hide' )
|
14 |
+
this.destroy()
|
15 |
+
},
|
16 |
+
offset: 'bottom-in-view',
|
17 |
+
} )
|
18 |
+
|
19 |
+
} )
|
20 |
+
} )
|
21 |
+
|
22 |
+
const stopCountUp = ( el ) => {
|
23 |
+
clearTimeout( el.countUpTimeout );
|
24 |
+
if ( el._countUpOrigInnerHTML ) {
|
25 |
+
el.innerHTML = el._countUpOrigInnerHTML;
|
26 |
+
el._countUpOrigInnerHTML = undefined;
|
27 |
+
}
|
28 |
+
el.style.visibility = '';
|
29 |
+
}
|
30 |
+
const initCountUp = ( el ) => {
|
31 |
+
|
32 |
+
var lang, time, delay, divisions, splitValues, nums, k, i, num, isComma;
|
33 |
+
var isFloat, decimalPlaces, val, newNum, output;
|
34 |
+
|
35 |
+
stopCountUp( el );
|
36 |
+
|
37 |
+
// If no number, don't do anything.
|
38 |
+
if ( ! /[0-9]/.test( el.innerHTML ) ) {
|
39 |
+
return;
|
40 |
+
}
|
41 |
+
|
42 |
+
// Remember the element.
|
43 |
+
el._countUpOrigInnerHTML = el.innerHTML;
|
44 |
+
|
45 |
+
// Check location language.
|
46 |
+
lang = document.querySelector( 'html' ).getAttribute( 'lang' ) || undefined;
|
47 |
+
|
48 |
+
// Get the given time and delay by their attributes.
|
49 |
+
time = el.getAttribute( 'data-duration' );
|
50 |
+
delay = el.getAttribute( 'data-delay' );
|
51 |
+
|
52 |
+
// Number of times the number will change.
|
53 |
+
divisions = time / delay;
|
54 |
+
|
55 |
+
// Split numbers and html tags.
|
56 |
+
splitValues = el.innerHTML.split( /(<[^>]+>|[0-9.][,.0-9]*[0-9]*)/ );
|
57 |
+
|
58 |
+
// Contains all numbers to be displayed.
|
59 |
+
nums = [];
|
60 |
+
|
61 |
+
// Set blank strings to ready the split values.
|
62 |
+
for ( k = 0; k < divisions; k++ ) {
|
63 |
+
nums.push( '' );
|
64 |
+
}
|
65 |
+
|
66 |
+
// Loop through all numbers and html tags.
|
67 |
+
for ( i = 0; i < splitValues.length; i++ ) {
|
68 |
+
|
69 |
+
// If number split it into smaller numbers and insert it to nums.
|
70 |
+
if ( /([0-9.][,.0-9]*[0-9]*)/.test( splitValues[ i ] ) && ! /<[^>]+>/.test( splitValues[ i ] ) ) {
|
71 |
+
num = splitValues[ i ];
|
72 |
+
|
73 |
+
// Test if numbers have comma.
|
74 |
+
isComma = /[0-9]+,[0-9]+/.test( num );
|
75 |
+
|
76 |
+
// Remove comma for computation purposes.
|
77 |
+
num = num.replace( /,/g, '' );
|
78 |
+
|
79 |
+
// Test if values have point.
|
80 |
+
isFloat = /^[0-9]+\.[0-9]+$/.test( num );
|
81 |
+
|
82 |
+
// Check number of decimals places.
|
83 |
+
decimalPlaces = isFloat ? ( num.split( '.' )[1] || [] ).length : 0;
|
84 |
+
|
85 |
+
// Start adding numbers from the end.
|
86 |
+
k = nums.length - 1;
|
87 |
+
|
88 |
+
// Create small numbers
|
89 |
+
for ( val = divisions; val >= 1; val-- ) {
|
90 |
+
newNum = parseInt( num / divisions * val, 10 );
|
91 |
+
|
92 |
+
// If has decimal point, add it again.
|
93 |
+
if ( isFloat ) {
|
94 |
+
newNum = parseFloat( num / divisions * val ).toFixed( decimalPlaces );
|
95 |
+
newNum = parseFloat( newNum ).toLocaleString( lang );
|
96 |
+
}
|
97 |
+
|
98 |
+
// If has comma, add it again.
|
99 |
+
if ( isComma ) {
|
100 |
+
newNum = newNum.toLocaleString( lang );
|
101 |
+
}
|
102 |
+
|
103 |
+
// Insert all small numbers.
|
104 |
+
nums[ k-- ] += newNum;
|
105 |
+
|
106 |
+
}
|
107 |
+
} else {
|
108 |
+
|
109 |
+
// Insert all non-numbers in the same place.
|
110 |
+
for ( k = 0; k < divisions; k++ ) {
|
111 |
+
nums[ k ] += splitValues[ i ];
|
112 |
+
}
|
113 |
+
}
|
114 |
+
}
|
115 |
+
|
116 |
+
// The last value of the element should be the original one.
|
117 |
+
nums[ nums.length ] = el.innerHTML;
|
118 |
+
|
119 |
+
el.innerHTML = nums[0];
|
120 |
+
el.style.visibility = 'visible';
|
121 |
+
|
122 |
+
// Function for displaying output with the set time and delay.
|
123 |
+
output = function() {
|
124 |
+
el.innerHTML = nums.shift();
|
125 |
+
if ( nums.length ) {
|
126 |
+
clearTimeout( el.countUpTimeout );
|
127 |
+
el.countUpTimeout = setTimeout( output, delay );
|
128 |
+
} else {
|
129 |
+
el._countUpOrigInnerHTML = undefined;
|
130 |
+
}
|
131 |
+
};
|
132 |
+
el.countUpTimeout = setTimeout( output, delay );
|
133 |
+
};
|
src/block/count-up/index.js
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* BLOCK: Count Up
|
3 |
+
*
|
4 |
+
* Registering a basic block with Gutenberg.
|
5 |
+
* Simple block, renders and saves the same content without any interactivity.
|
6 |
+
*/
|
7 |
+
|
8 |
+
// Import CSS.
|
9 |
+
import './style.scss';
|
10 |
+
import './editor.scss';
|
11 |
+
|
12 |
+
|
13 |
+
const { __ } = wp.i18n; // Import __() from wp.i18n
|
14 |
+
const { Component } = wp.element
|
15 |
+
const { PanelColor, withState, RangeControl } = wp.components
|
16 |
+
const {
|
17 |
+
registerBlockType, // Import registerBlockType() from wp.blocks
|
18 |
+
InspectorControls,
|
19 |
+
RichText,
|
20 |
+
ColorPalette
|
21 |
+
} = wp.blocks
|
22 |
+
|
23 |
+
import { QuoteIcon } from '../../icons'
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Register: Gutenberg Block.
|
27 |
+
*
|
28 |
+
* Registers a new block provided a unique name and an object defining its
|
29 |
+
* behavior. Once registered, the block is made editor as an option to any
|
30 |
+
* editor interface where blocks are implemented.
|
31 |
+
*
|
32 |
+
* @param {string} name Block name.
|
33 |
+
* @param {Object} settings Block settings.
|
34 |
+
* @return {?WPBlock} The block, if it has been successfully
|
35 |
+
* registered; otherwise `undefined`.
|
36 |
+
*/
|
37 |
+
registerBlockType( 'ugb/count-up', {
|
38 |
+
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
39 |
+
title: __( 'Count Up' ), // Block title.
|
40 |
+
icon: QuoteIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
41 |
+
category: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
42 |
+
keywords: [
|
43 |
+
__( 'Count Up' ),
|
44 |
+
__( 'Stackable' ),
|
45 |
+
],
|
46 |
+
attributes: {
|
47 |
+
title: {
|
48 |
+
type: 'array',
|
49 |
+
source: 'children',
|
50 |
+
selector: 'h4',
|
51 |
+
default: __( 'Happy Customers' )
|
52 |
+
},
|
53 |
+
counter: {
|
54 |
+
type: 'array',
|
55 |
+
source: 'children',
|
56 |
+
selector: '.ugb-counter',
|
57 |
+
default: '12,345'
|
58 |
+
},
|
59 |
+
des: {
|
60 |
+
type: 'array',
|
61 |
+
source: 'children',
|
62 |
+
selector: 'p',
|
63 |
+
default: __( 'and counting' )
|
64 |
+
},
|
65 |
+
fontSize: {
|
66 |
+
type: 'number',
|
67 |
+
default: '60',
|
68 |
+
},
|
69 |
+
headingColor: {
|
70 |
+
type: 'string',
|
71 |
+
},
|
72 |
+
desColor: {
|
73 |
+
type: 'string',
|
74 |
+
},
|
75 |
+
color: {
|
76 |
+
type: 'string',
|
77 |
+
},
|
78 |
+
|
79 |
+
},
|
80 |
+
|
81 |
+
// The "edit" property must be a valid function.
|
82 |
+
edit: withState( { editable: 'content', } )( ( props ) => {
|
83 |
+
|
84 |
+
const onSetActiveEditable = ( newEditable ) => () => {
|
85 |
+
setState( { editable: newEditable } )
|
86 |
+
}
|
87 |
+
|
88 |
+
const { isSelected, editable, setState, setAttributes, className } = props
|
89 |
+
|
90 |
+
const { color, headingColor, desColor, title, counter, des, fontSize } = props.attributes
|
91 |
+
|
92 |
+
return [
|
93 |
+
<div className={ 'ugb-countup' }>
|
94 |
+
<RichText
|
95 |
+
tagName={ 'h4' }
|
96 |
+
value={ title }
|
97 |
+
onChange={ ( nextValue ) => setAttributes( { title: nextValue } ) }
|
98 |
+
isSelected={ isSelected && editable === 'title' }
|
99 |
+
onFocus={ onSetActiveEditable( 'title' ) }
|
100 |
+
style={{ color: headingColor }}
|
101 |
+
/>
|
102 |
+
<RichText
|
103 |
+
tagName={ 'div' }
|
104 |
+
className={ 'ugb-counter' }
|
105 |
+
placeholder={ counter.default }
|
106 |
+
data-duration="1000"
|
107 |
+
data-delay="16"
|
108 |
+
value={ counter }
|
109 |
+
onChange={ ( nextValue ) => setAttributes( { counter: nextValue } ) }
|
110 |
+
isSelected={ isSelected && editable === 'counter' }
|
111 |
+
onFocus={ onSetActiveEditable( 'counter' ) }
|
112 |
+
style={ {
|
113 |
+
color: color,
|
114 |
+
fontSize: fontSize + 'px'
|
115 |
+
} }
|
116 |
+
/>
|
117 |
+
<RichText
|
118 |
+
tagName={ 'p' }
|
119 |
+
className={ 'ugb-counter-des' }
|
120 |
+
value={ des }
|
121 |
+
onChange={ ( nextValue ) => setAttributes( { des: nextValue } ) }
|
122 |
+
isSelected={ isSelected && editable === 'des' }
|
123 |
+
onFocus={ onSetActiveEditable( 'des' ) }
|
124 |
+
style={{ color: desColor }}
|
125 |
+
/>
|
126 |
+
</div>,
|
127 |
+
isSelected && (
|
128 |
+
<InspectorControls key='inspector'>
|
129 |
+
<PanelColor
|
130 |
+
title={ __( 'Heading Color' ) }
|
131 |
+
colorValue={ headingColor }
|
132 |
+
initialOpen={ false }>
|
133 |
+
<ColorPalette
|
134 |
+
value={ headingColor }
|
135 |
+
onChange={ ( colorValue ) => setAttributes( { headingColor: colorValue } ) }
|
136 |
+
/>
|
137 |
+
</PanelColor>
|
138 |
+
<PanelColor
|
139 |
+
title={ __( 'Count Up Text Color' ) }
|
140 |
+
colorValue={ color }
|
141 |
+
initialOpen={ false }>
|
142 |
+
<ColorPalette
|
143 |
+
value={ color }
|
144 |
+
onChange={ ( colorValue ) => setAttributes( { color: colorValue } ) }
|
145 |
+
/>
|
146 |
+
</PanelColor>
|
147 |
+
<PanelColor
|
148 |
+
title={ __( 'Description Color' ) }
|
149 |
+
colorValue={ desColor }
|
150 |
+
initialOpen={ false }>
|
151 |
+
<ColorPalette
|
152 |
+
value={ desColor }
|
153 |
+
onChange={ ( colorValue ) => setAttributes( { desColor: colorValue } ) }
|
154 |
+
/>
|
155 |
+
</PanelColor>
|
156 |
+
<RangeControl
|
157 |
+
label={ __( 'Counter Text Font Size' ) }
|
158 |
+
max="100"
|
159 |
+
min="10"
|
160 |
+
value={ fontSize }
|
161 |
+
onChange={ ( newFontSize ) => setAttributes( { fontSize: newFontSize } ) }
|
162 |
+
>
|
163 |
+
</RangeControl>
|
164 |
+
</InspectorControls>
|
165 |
+
)
|
166 |
+
];
|
167 |
+
} ),
|
168 |
+
|
169 |
+
// The "save" property must be specified and must be a valid function.
|
170 |
+
save: function( props ) {
|
171 |
+
const { color, headingColor, desColor, title, counter, des, fontSize } = props.attributes
|
172 |
+
|
173 |
+
return (
|
174 |
+
<div className={ 'ugb-countup' }>
|
175 |
+
<h4 style={{ color: headingColor }}> { title } </h4>
|
176 |
+
<div
|
177 |
+
className={ 'ugb-counter' }
|
178 |
+
style={ { color: color, fontSize: fontSize + 'px' } }
|
179 |
+
data-duration="1000"
|
180 |
+
data-delay="16"
|
181 |
+
>
|
182 |
+
{ counter }
|
183 |
+
</div>
|
184 |
+
<p style={{ color: desColor }}> { des } </p>
|
185 |
+
</div>
|
186 |
+
);
|
187 |
+
},
|
188 |
+
} );
|
src/block/count-up/style.scss
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* #.# Styles for Count Up Block.
|
3 |
+
*
|
4 |
+
* CSS for both Frontend+Backend.
|
5 |
+
*/
|
6 |
+
.ugb-countup {
|
7 |
+
text-align: center;
|
8 |
+
margin-bottom: 1em;
|
9 |
+
h4, div, p {
|
10 |
+
margin: 0 !important;
|
11 |
+
line-height: 1em;
|
12 |
+
}
|
13 |
+
h4 {
|
14 |
+
margin-bottom: 1em !important;
|
15 |
+
}
|
16 |
+
p {
|
17 |
+
margin-top: 1em !important;
|
18 |
+
}
|
19 |
+
.ugb-countup-hide {
|
20 |
+
visibility: hidden;
|
21 |
+
}
|
22 |
+
}
|
src/block/divider/index.js
CHANGED
@@ -29,7 +29,7 @@ import { DividerIcon } from '../../icons'
|
|
29 |
*/
|
30 |
registerBlockType( 'ugb/divider', {
|
31 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
32 |
-
title: __( 'Divider'
|
33 |
icon: DividerIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
34 |
category: 'layout', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
35 |
keywords: [
|
@@ -58,13 +58,13 @@ registerBlockType( 'ugb/divider', {
|
|
58 |
// The "edit" property must be a valid function.
|
59 |
edit: function( props ) {
|
60 |
|
61 |
-
const {
|
62 |
const { InspectorControls, ColorPalette, BlockControls, AlignmentToolbar } = wp.blocks;
|
63 |
const { RangeControl } = wp.components
|
64 |
const { height, width, color, alignment } = props.attributes;
|
65 |
|
66 |
return [
|
67 |
-
|
68 |
<BlockControls key='controls'>
|
69 |
<AlignmentToolbar
|
70 |
value={alignment}
|
@@ -74,7 +74,7 @@ registerBlockType( 'ugb/divider', {
|
|
74 |
/>
|
75 |
</BlockControls>
|
76 |
),
|
77 |
-
|
78 |
<InspectorControls key='inspector'>
|
79 |
<RangeControl
|
80 |
label={__('Height')}
|
29 |
*/
|
30 |
registerBlockType( 'ugb/divider', {
|
31 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
32 |
+
title: __( 'Divider' ), // Block title.
|
33 |
icon: DividerIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
34 |
category: 'layout', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
35 |
keywords: [
|
58 |
// The "edit" property must be a valid function.
|
59 |
edit: function( props ) {
|
60 |
|
61 |
+
const { isSelected } = props;
|
62 |
const { InspectorControls, ColorPalette, BlockControls, AlignmentToolbar } = wp.blocks;
|
63 |
const { RangeControl } = wp.components
|
64 |
const { height, width, color, alignment } = props.attributes;
|
65 |
|
66 |
return [
|
67 |
+
isSelected && (
|
68 |
<BlockControls key='controls'>
|
69 |
<AlignmentToolbar
|
70 |
value={alignment}
|
74 |
/>
|
75 |
</BlockControls>
|
76 |
),
|
77 |
+
isSelected && (
|
78 |
<InspectorControls key='inspector'>
|
79 |
<RangeControl
|
80 |
label={__('Height')}
|
src/block/expand/index.js
CHANGED
@@ -40,12 +40,12 @@ const fromRichTextMultilineValue = value => value.map( ( subValue ) => ( {
|
|
40 |
*/
|
41 |
registerBlockType( 'ugb/expand', {
|
42 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
43 |
-
title: __( 'Expand / Show More'
|
44 |
icon: ExpandIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
45 |
category: 'formatting', // Block category — Group blocks together based on common traits E.g. common, formatting, layout, widgets, embed.
|
46 |
keywords: [
|
47 |
__( 'Expand' ),
|
48 |
-
__( 'Show more' ),
|
49 |
__( 'Stackable' ),
|
50 |
],
|
51 |
attributes: {
|
40 |
*/
|
41 |
registerBlockType( 'ugb/expand', {
|
42 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
43 |
+
title: __( 'Expand / Show More' ), // Block title.
|
44 |
icon: ExpandIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
45 |
category: 'formatting', // Block category — Group blocks together based on common traits E.g. common, formatting, layout, widgets, embed.
|
46 |
keywords: [
|
47 |
__( 'Expand' ),
|
48 |
+
__( 'Show more/less' ),
|
49 |
__( 'Stackable' ),
|
50 |
],
|
51 |
attributes: {
|
src/block/image-box/editor.scss
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* #.# Editor Styles for Image Box Block
|
3 |
+
*
|
4 |
+
* CSS for just Backend enqueued after style.scss
|
5 |
+
* which makes it higher in priority.
|
6 |
+
*/
|
src/block/image-box/index.js
ADDED
@@ -0,0 +1,356 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* BLOCK: Image Box Block.
|
3 |
+
*
|
4 |
+
* Registering a basic block with Gutenberg.
|
5 |
+
* Simple block, renders and saves the same content without any interactivity.
|
6 |
+
*/
|
7 |
+
|
8 |
+
// Import CSS.
|
9 |
+
import './style.scss';
|
10 |
+
import './editor.scss';
|
11 |
+
|
12 |
+
const { __ } = wp.i18n; // Import __() from wp.i18n
|
13 |
+
const { Component } = wp.element
|
14 |
+
const {
|
15 |
+
IconButton,
|
16 |
+
PanelColor,
|
17 |
+
Toolbar,
|
18 |
+
Button,
|
19 |
+
withState,
|
20 |
+
RangeControl,
|
21 |
+
SelectControl,
|
22 |
+
ToggleControl
|
23 |
+
} = wp.components;
|
24 |
+
|
25 |
+
const {
|
26 |
+
registerBlockType, // Import registerBlockType() from wp.blocks
|
27 |
+
RichText,
|
28 |
+
MediaUpload,
|
29 |
+
BlockControls,
|
30 |
+
InspectorControls,
|
31 |
+
ColorPalette
|
32 |
+
} = wp.blocks;
|
33 |
+
|
34 |
+
import { PictureIcon } from '../../icons'
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Register: Gutenberg Block.
|
38 |
+
*
|
39 |
+
* Registers a new block provided a unique name and an object defining its
|
40 |
+
* behavior. Once registered, the block is made editor as an option to any
|
41 |
+
* editor interface where blocks are implemented.
|
42 |
+
*
|
43 |
+
* @param {string} name Block name.
|
44 |
+
* @param {Object} settings Block settings.
|
45 |
+
* @return {?WPBlock} The block, if it has been successfully
|
46 |
+
* registered; otherwise `undefined`.
|
47 |
+
*/
|
48 |
+
registerBlockType( 'ugb/image-box', {
|
49 |
+
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
50 |
+
title: __( 'Image Box' ), // Block title.
|
51 |
+
icon: PictureIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
52 |
+
category: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
53 |
+
keywords: [
|
54 |
+
__( 'Image Box' ),
|
55 |
+
__( 'Stackable' ),
|
56 |
+
],
|
57 |
+
attributes: {
|
58 |
+
title: {
|
59 |
+
type: 'array',
|
60 |
+
source: 'children',
|
61 |
+
selector: 'h4',
|
62 |
+
default: __( 'Title' )
|
63 |
+
},
|
64 |
+
subtitle: {
|
65 |
+
type: 'array',
|
66 |
+
source: 'children',
|
67 |
+
selector: 'p',
|
68 |
+
default: __( 'Subtitle goes here' )
|
69 |
+
},
|
70 |
+
url: {
|
71 |
+
type: 'string',
|
72 |
+
source: 'attribute',
|
73 |
+
selector: '.ugb-image-box',
|
74 |
+
attribute: 'data-url',
|
75 |
+
},
|
76 |
+
titleColor: {
|
77 |
+
type: 'string',
|
78 |
+
default: '#ffffff',
|
79 |
+
},
|
80 |
+
subtitleColor: {
|
81 |
+
type: 'string',
|
82 |
+
default: '#ffffff',
|
83 |
+
},
|
84 |
+
overlayColor: {
|
85 |
+
type: 'string',
|
86 |
+
default: '#42b078'
|
87 |
+
},
|
88 |
+
id: {
|
89 |
+
type: 'number',
|
90 |
+
},
|
91 |
+
width: {
|
92 |
+
type: 'number',
|
93 |
+
default: '400'
|
94 |
+
},
|
95 |
+
height: {
|
96 |
+
type: 'number',
|
97 |
+
default: '400'
|
98 |
+
},
|
99 |
+
verticalAlign: {
|
100 |
+
type: 'string',
|
101 |
+
default: 'center'
|
102 |
+
},
|
103 |
+
horizontalAlign: {
|
104 |
+
type: 'string',
|
105 |
+
default: 'center'
|
106 |
+
},
|
107 |
+
full: {
|
108 |
+
type: 'boolean',
|
109 |
+
default: false
|
110 |
+
}
|
111 |
+
},
|
112 |
+
|
113 |
+
// The "edit" property must be a valid function.
|
114 |
+
edit: withState( { editable: 'content', } )( ( props ) => {
|
115 |
+
|
116 |
+
const {
|
117 |
+
className,
|
118 |
+
setAttributes,
|
119 |
+
isSelected,
|
120 |
+
editable,
|
121 |
+
setState
|
122 |
+
} = props
|
123 |
+
|
124 |
+
const {
|
125 |
+
url,
|
126 |
+
title,
|
127 |
+
titleColor,
|
128 |
+
subtitle,
|
129 |
+
subtitleColor,
|
130 |
+
overlayColor,
|
131 |
+
id,
|
132 |
+
height,
|
133 |
+
width,
|
134 |
+
verticalAlign,
|
135 |
+
horizontalAlign,
|
136 |
+
full
|
137 |
+
} = props.attributes
|
138 |
+
|
139 |
+
const imageClass = url ? 'has-image' : ''
|
140 |
+
|
141 |
+
const fullWidth = full ? 'full-width': ''
|
142 |
+
|
143 |
+
const onSetActiveEditable = ( newEditable ) => () => {
|
144 |
+
setState( { editable: newEditable } )
|
145 |
+
}
|
146 |
+
|
147 |
+
const vertical = [
|
148 |
+
{ value: 'flex-start', label: __( 'Top' ) },
|
149 |
+
{ value: 'center', label: __( 'Center' ) },
|
150 |
+
{ value: 'flex-end', label: __( 'Bottom' ) }
|
151 |
+
];
|
152 |
+
|
153 |
+
const horizontal = [
|
154 |
+
{ value: 'flex-start', label: __( 'Left' ) },
|
155 |
+
{ value: 'center', label: __( 'Center' ) },
|
156 |
+
{ value: 'flex-end', label: __( 'Right' ) },
|
157 |
+
];
|
158 |
+
|
159 |
+
return [
|
160 |
+
isSelected && (
|
161 |
+
<BlockControls key='controls'>
|
162 |
+
{ url && (
|
163 |
+
<Toolbar>
|
164 |
+
<MediaUpload
|
165 |
+
onSelect={ ( media ) => setAttributes( { url: media.url, id: media.id } ) }
|
166 |
+
type="image"
|
167 |
+
value={ id }
|
168 |
+
render={ ( { open } ) => (
|
169 |
+
<IconButton
|
170 |
+
className="components-toolbar__control"
|
171 |
+
label={ __( 'Edit image' ) }
|
172 |
+
icon="edit"
|
173 |
+
onClick={ open }
|
174 |
+
/>
|
175 |
+
) }
|
176 |
+
/>
|
177 |
+
</Toolbar>
|
178 |
+
)}
|
179 |
+
</BlockControls>
|
180 |
+
),
|
181 |
+
isSelected && (
|
182 |
+
<InspectorControls key={ 'inspector' }>
|
183 |
+
<ToggleControl
|
184 |
+
label='Full-Width'
|
185 |
+
checked={ !! full }
|
186 |
+
onChange={ () => setAttributes( { full: ! full } ) }
|
187 |
+
/>
|
188 |
+
<RangeControl
|
189 |
+
label={ __( 'Height' ) }
|
190 |
+
value={ height }
|
191 |
+
min='135'
|
192 |
+
max='700'
|
193 |
+
onChange={ ( height ) => setAttributes( { height: height } ) }
|
194 |
+
/>
|
195 |
+
<RangeControl
|
196 |
+
label={ __( 'Width' ) }
|
197 |
+
value={ width }
|
198 |
+
min='400'
|
199 |
+
max='999'
|
200 |
+
onChange={ ( width ) => setAttributes( { width: width } ) }
|
201 |
+
/>
|
202 |
+
<SelectControl
|
203 |
+
label={ __( 'Vertical Alignment' ) }
|
204 |
+
value={ verticalAlign }
|
205 |
+
options={ vertical.map( ({ value, label }) => ( {
|
206 |
+
value: value,
|
207 |
+
label: label,
|
208 |
+
} ) ) }
|
209 |
+
onChange={ ( newSize ) => { setAttributes( { verticalAlign: newSize } ) } }
|
210 |
+
/>
|
211 |
+
<SelectControl
|
212 |
+
label={ __( 'Horizontal Alignment' ) }
|
213 |
+
value={ horizontalAlign }
|
214 |
+
options={ horizontal.map( ({ value, label }) => ( {
|
215 |
+
value: value,
|
216 |
+
label: label,
|
217 |
+
} ) ) }
|
218 |
+
onChange={ ( newSize ) => { setAttributes( { horizontalAlign: newSize } ) } }
|
219 |
+
/>
|
220 |
+
<PanelColor
|
221 |
+
title={ __( 'Title Color' ) }
|
222 |
+
colorValue={ titleColor }
|
223 |
+
initialOpen={ false }
|
224 |
+
>
|
225 |
+
<ColorPalette
|
226 |
+
value={ titleColor }
|
227 |
+
onChange={ ( colorValue ) => setAttributes( { titleColor: colorValue } ) }
|
228 |
+
/>
|
229 |
+
</PanelColor>
|
230 |
+
<PanelColor
|
231 |
+
title={ __( 'Subtitle Color' ) }
|
232 |
+
colorValue={ subtitleColor }
|
233 |
+
initialOpen={ false }
|
234 |
+
>
|
235 |
+
<ColorPalette
|
236 |
+
value={ subtitleColor }
|
237 |
+
onChange={ ( colorValue ) => setAttributes( { subtitleColor: colorValue } ) }
|
238 |
+
/>
|
239 |
+
</PanelColor>
|
240 |
+
<PanelColor
|
241 |
+
title={ __( 'Overlay Color' ) }
|
242 |
+
colorValue={ overlayColor }
|
243 |
+
initialOpen={ false }
|
244 |
+
>
|
245 |
+
<ColorPalette
|
246 |
+
value={ overlayColor }
|
247 |
+
onChange={ ( colorValue ) => setAttributes( { overlayColor: colorValue } ) }
|
248 |
+
/>
|
249 |
+
</PanelColor>
|
250 |
+
</InspectorControls>
|
251 |
+
),
|
252 |
+
<div key={'editable'}
|
253 |
+
className={ `ugb-image-box ${imageClass} ${fullWidth}` }
|
254 |
+
data-url={ url }
|
255 |
+
style={ {
|
256 |
+
width: width + 'px',
|
257 |
+
height: height + 'px',
|
258 |
+
backgroundImage: `url(${url})`,
|
259 |
+
alignItems: horizontalAlign,
|
260 |
+
justifyContent: verticalAlign
|
261 |
+
} }
|
262 |
+
>
|
263 |
+
<MediaUpload
|
264 |
+
onSelect={ ( media ) => setAttributes( { url: media.url, id: media.id } ) }
|
265 |
+
type={'image'}
|
266 |
+
value={id}
|
267 |
+
render={ function( obj ) {
|
268 |
+
return [
|
269 |
+
! url && (
|
270 |
+
<Button
|
271 |
+
className={ id ? '' : 'button button-large' }
|
272 |
+
onClick={ obj.open }
|
273 |
+
>
|
274 |
+
{__('Upload Image')}
|
275 |
+
</Button>
|
276 |
+
)
|
277 |
+
]
|
278 |
+
} }
|
279 |
+
/>
|
280 |
+
<a href="#" style={ { backgroundColor: overlayColor } } />
|
281 |
+
<RichText
|
282 |
+
tagName="h4"
|
283 |
+
placeholder={ title.default }
|
284 |
+
value={ title }
|
285 |
+
onChange={ ( value ) => setAttributes( { title: value } ) }
|
286 |
+
isSelected={ isSelected && editable === 'title' }
|
287 |
+
onFocus={ onSetActiveEditable( 'title' ) }
|
288 |
+
style={ {
|
289 |
+
color: titleColor
|
290 |
+
} }
|
291 |
+
/>
|
292 |
+
<RichText
|
293 |
+
tagName="p"
|
294 |
+
placeholder={ subtitle.default }
|
295 |
+
value={ subtitle }
|
296 |
+
onChange={ ( value ) => setAttributes( { subtitle: value } ) }
|
297 |
+
isSelected={ isSelected && editable === 'subtitle' }
|
298 |
+
onFocus={ onSetActiveEditable( 'subtitle' ) }
|
299 |
+
style={ {
|
300 |
+
color: subtitleColor
|
301 |
+
} }
|
302 |
+
/>
|
303 |
+
</div>
|
304 |
+
];
|
305 |
+
} ),
|
306 |
+
|
307 |
+
// The "save" property must be specified and must be a valid function.
|
308 |
+
save: function( props ) {
|
309 |
+
|
310 |
+
const {
|
311 |
+
url,
|
312 |
+
title,
|
313 |
+
titleColor,
|
314 |
+
subtitle,
|
315 |
+
subtitleColor,
|
316 |
+
overlayColor,
|
317 |
+
id,
|
318 |
+
height,
|
319 |
+
width,
|
320 |
+
verticalAlign,
|
321 |
+
horizontalAlign,
|
322 |
+
full
|
323 |
+
} = props.attributes
|
324 |
+
|
325 |
+
const imageClass = url ? 'has-image' : ''
|
326 |
+
|
327 |
+
const fullWidth = full ? 'full-width': ''
|
328 |
+
|
329 |
+
const displayNone = ( ! title.length && ! subtitle.length ) ? 'has-no-content' : 'has-content'
|
330 |
+
|
331 |
+
return (
|
332 |
+
<div className={ `ugb-image-box ${imageClass} ${displayNone} ${fullWidth}` }
|
333 |
+
data-url={ url }
|
334 |
+
style={ {
|
335 |
+
width: width + 'px',
|
336 |
+
height: height + 'px',
|
337 |
+
backgroundImage: `url(${url})`,
|
338 |
+
alignItems: horizontalAlign,
|
339 |
+
justifyContent: verticalAlign
|
340 |
+
} }
|
341 |
+
>
|
342 |
+
<a href="#" style={ { backgroundColor: overlayColor } } />
|
343 |
+
{ title && !! title.length && (
|
344 |
+
<h4 style={ { color: titleColor } }>
|
345 |
+
{ title }
|
346 |
+
</h4>
|
347 |
+
) }
|
348 |
+
{ subtitle && !! subtitle.length && (
|
349 |
+
<p style={ { color: subtitleColor } }>
|
350 |
+
{ subtitle }
|
351 |
+
</p>
|
352 |
+
) }
|
353 |
+
</div>
|
354 |
+
);
|
355 |
+
}
|
356 |
+
} );
|
src/block/image-box/style.scss
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* #.# Styles for Image Box Block.
|
3 |
+
*
|
4 |
+
* CSS for both Frontend+Backend.
|
5 |
+
*/
|
6 |
+
.ugb-image-box {
|
7 |
+
background-size: cover;
|
8 |
+
background-position: center;
|
9 |
+
padding: 2rem;
|
10 |
+
display: flex;
|
11 |
+
flex-direction: column;
|
12 |
+
justify-content: center;
|
13 |
+
align-items: center;
|
14 |
+
margin: 0 auto;
|
15 |
+
position: relative;
|
16 |
+
background-color: #999;
|
17 |
+
* {
|
18 |
+
transition: all .4s ease-in-out !important;
|
19 |
+
border: 0 !important;
|
20 |
+
box-shadow: none !important;
|
21 |
+
}
|
22 |
+
button.components-button {
|
23 |
+
z-index: 3;
|
24 |
+
margin-bottom: 1em;
|
25 |
+
}
|
26 |
+
a {
|
27 |
+
position: absolute;
|
28 |
+
z-index: 2;
|
29 |
+
top: 0;
|
30 |
+
left: 0;
|
31 |
+
right: 0;
|
32 |
+
bottom: 0;
|
33 |
+
opacity: 0;
|
34 |
+
pointer-events: none;
|
35 |
+
}
|
36 |
+
h4, p {
|
37 |
+
z-index: 3;
|
38 |
+
// pointer-events: none;
|
39 |
+
}
|
40 |
+
h4 {
|
41 |
+
margin: 0 0 0.5em !important;
|
42 |
+
}
|
43 |
+
p {
|
44 |
+
margin: 0 !important;
|
45 |
+
opacity: 0;
|
46 |
+
transform: translateY(-15px);
|
47 |
+
}
|
48 |
+
&:hover a {
|
49 |
+
opacity: .7;
|
50 |
+
}
|
51 |
+
&:hover p {
|
52 |
+
opacity: 1;
|
53 |
+
transform: translateY(0);
|
54 |
+
}
|
55 |
+
}
|
56 |
+
.ugb-image-box.full-width {
|
57 |
+
width: 100% !important;
|
58 |
+
}
|
59 |
+
/**
|
60 |
+
* Frontend Styles.
|
61 |
+
*/
|
62 |
+
.wp-block-ugb-image-box.has-no-content {
|
63 |
+
display: none;
|
64 |
+
}
|
src/block/notification/index.js
CHANGED
@@ -44,7 +44,7 @@ import { NotificationIcon } from '../../icons'
|
|
44 |
*/
|
45 |
registerBlockType( 'ugb/notification', {
|
46 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
47 |
-
title: __( 'Notification'
|
48 |
icon: NotificationIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
49 |
category: 'layout', // Block category — Group blocks together based on common traits E.g. common, formatting, layout, widgets, embed.
|
50 |
keywords: [
|
44 |
*/
|
45 |
registerBlockType( 'ugb/notification', {
|
46 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
47 |
+
title: __( 'Notification' ), // Block title.
|
48 |
icon: NotificationIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
49 |
category: 'layout', // Block category — Group blocks together based on common traits E.g. common, formatting, layout, widgets, embed.
|
50 |
keywords: [
|
src/block/number-box/index.js
CHANGED
@@ -44,7 +44,7 @@ import { NumberBoxIcon } from '../../icons'
|
|
44 |
*/
|
45 |
registerBlockType( 'ugb/number-box', {
|
46 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
47 |
-
title: __( 'Number Box'
|
48 |
icon: NumberBoxIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
49 |
category: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
50 |
keywords: [
|
@@ -170,7 +170,9 @@ registerBlockType( 'ugb/number-box', {
|
|
170 |
}
|
171 |
|
172 |
return [
|
173 |
-
|
|
|
|
|
174 |
isSelected && (
|
175 |
<InspectorControls key={ 'inspector' }>
|
176 |
<SelectControl
|
44 |
*/
|
45 |
registerBlockType( 'ugb/number-box', {
|
46 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
47 |
+
title: __( 'Number Box' ), // Block title.
|
48 |
icon: NumberBoxIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
49 |
category: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
50 |
keywords: [
|
170 |
}
|
171 |
|
172 |
return [
|
173 |
+
isSelected && (
|
174 |
+
<BlockControls key="controls"/>
|
175 |
+
),
|
176 |
isSelected && (
|
177 |
<InspectorControls key={ 'inspector' }>
|
178 |
<SelectControl
|
src/block/pullquote/index.js
CHANGED
@@ -36,7 +36,7 @@ import { QuoteIcon } from '../../icons'
|
|
36 |
*/
|
37 |
registerBlockType( 'ugb/pullquote', {
|
38 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
39 |
-
title: __( 'Pullquote'
|
40 |
icon: QuoteIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
41 |
category: 'formatting', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
42 |
keywords: [
|
36 |
*/
|
37 |
registerBlockType( 'ugb/pullquote', {
|
38 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
39 |
+
title: __( 'Pullquote' ), // Block title.
|
40 |
icon: QuoteIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
41 |
category: 'formatting', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
42 |
keywords: [
|
src/block/spacer/index.js
CHANGED
@@ -28,7 +28,7 @@ import { SpacerIcon } from '../../icons'
|
|
28 |
*/
|
29 |
registerBlockType( 'ugb/spacer', {
|
30 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
31 |
-
title: __( 'Spacer'
|
32 |
icon: SpacerIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
33 |
category: 'layout', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
34 |
keywords: [
|
28 |
*/
|
29 |
registerBlockType( 'ugb/spacer', {
|
30 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
31 |
+
title: __( 'Spacer' ), // Block title.
|
32 |
icon: SpacerIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
33 |
category: 'layout', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
34 |
keywords: [
|
src/block/team-member/index.js
CHANGED
@@ -45,7 +45,7 @@ import { TeamMemberIcon } from '../../icons'
|
|
45 |
*/
|
46 |
registerBlockType( 'ugb/team-member', {
|
47 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
48 |
-
title: __( 'Team Member'
|
49 |
icon: TeamMemberIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
50 |
category: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
51 |
keywords: [
|
@@ -188,8 +188,6 @@ registerBlockType( 'ugb/team-member', {
|
|
188 |
setAttributes
|
189 |
} = props;
|
190 |
|
191 |
-
const focusedEditable = focus ? focus.editable || 'name' : null;
|
192 |
-
|
193 |
const {
|
194 |
url,
|
195 |
title,
|
@@ -234,7 +232,9 @@ registerBlockType( 'ugb/team-member', {
|
|
234 |
}
|
235 |
|
236 |
return [
|
237 |
-
|
|
|
|
|
238 |
isSelected && (
|
239 |
<InspectorControls key={ 'inspector' }>
|
240 |
<SelectControl
|
45 |
*/
|
46 |
registerBlockType( 'ugb/team-member', {
|
47 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
48 |
+
title: __( 'Team Member' ), // Block title.
|
49 |
icon: TeamMemberIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
50 |
category: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
51 |
keywords: [
|
188 |
setAttributes
|
189 |
} = props;
|
190 |
|
|
|
|
|
191 |
const {
|
192 |
url,
|
193 |
title,
|
232 |
}
|
233 |
|
234 |
return [
|
235 |
+
isSelected && (
|
236 |
+
<BlockControls key="controls"/>
|
237 |
+
),
|
238 |
isSelected && (
|
239 |
<InspectorControls key={ 'inspector' }>
|
240 |
<SelectControl
|
src/block/testimonial/index.js
CHANGED
@@ -45,7 +45,7 @@ import { TestimonialIcon } from '../../icons'
|
|
45 |
*/
|
46 |
registerBlockType( 'ugb/testimonial', {
|
47 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
48 |
-
title: __( 'Testimonial'
|
49 |
icon: TestimonialIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
50 |
category: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
51 |
keywords: [
|
@@ -223,7 +223,9 @@ registerBlockType( 'ugb/testimonial', {
|
|
223 |
}
|
224 |
|
225 |
return [
|
226 |
-
|
|
|
|
|
227 |
isSelected && (
|
228 |
<InspectorControls key={ 'inspector' }>
|
229 |
<SelectControl
|
45 |
*/
|
46 |
registerBlockType( 'ugb/testimonial', {
|
47 |
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
48 |
+
title: __( 'Testimonial' ), // Block title.
|
49 |
icon: TestimonialIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
50 |
category: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
51 |
keywords: [
|
223 |
}
|
224 |
|
225 |
return [
|
226 |
+
isSelected && (
|
227 |
+
<BlockControls/>
|
228 |
+
),
|
229 |
isSelected && (
|
230 |
<InspectorControls key={ 'inspector' }>
|
231 |
<SelectControl
|
src/block/video-popup/editor.scss
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* #.# Editor Styles for Video Popup Block
|
3 |
+
*
|
4 |
+
* CSS for just Backend enqueued after style.scss
|
5 |
+
* which makes it higher in priority.
|
6 |
+
*/
|
src/block/video-popup/frontend.js
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import domReady from '@wordpress/dom-ready'
|
2 |
+
import BigPicture from 'bigpicture'
|
3 |
+
|
4 |
+
domReady( () => {
|
5 |
+
const elems = document.querySelectorAll( '.ugb-video-popup' )
|
6 |
+
const openVideo = el => {
|
7 |
+
if ( BigPicture ) {
|
8 |
+
const videoID = el.getAttribute( 'data-video' )
|
9 |
+
const args = {
|
10 |
+
el,
|
11 |
+
noLoader: true,
|
12 |
+
}
|
13 |
+
if ( videoID.match( /^\d+$/g ) ) {
|
14 |
+
args['vimeoSrc'] = videoID
|
15 |
+
} else if ( videoID.match( /^https?:\/\//g ) ) {
|
16 |
+
args['vidSrc'] = videoID
|
17 |
+
} else {
|
18 |
+
args['ytSrc'] = videoID
|
19 |
+
}
|
20 |
+
BigPicture( args )
|
21 |
+
}
|
22 |
+
}
|
23 |
+
elems.forEach( el => {
|
24 |
+
const a = el.querySelector( 'a' )
|
25 |
+
a.addEventListener( 'click', ev => {
|
26 |
+
ev.preventDefault()
|
27 |
+
openVideo( el )
|
28 |
+
} )
|
29 |
+
a.addEventListener( 'touchend', ev => {
|
30 |
+
ev.preventDefault()
|
31 |
+
openVideo( el )
|
32 |
+
} )
|
33 |
+
} )
|
34 |
+
} )
|
src/block/video-popup/index.js
ADDED
@@ -0,0 +1,235 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* BLOCK: Video Popup Block.
|
3 |
+
*
|
4 |
+
* Registering a basic block with Gutenberg.
|
5 |
+
* Simple block, renders and saves the same content without any interactivity.
|
6 |
+
*/
|
7 |
+
|
8 |
+
// Import CSS.
|
9 |
+
import './style.scss';
|
10 |
+
import './editor.scss';
|
11 |
+
|
12 |
+
const { __ } = wp.i18n; // Import __() from wp.i18n
|
13 |
+
const { Component } = wp.element
|
14 |
+
const {
|
15 |
+
IconButton,
|
16 |
+
PanelColor,
|
17 |
+
Button,
|
18 |
+
SelectControl,
|
19 |
+
Dashicon,
|
20 |
+
Toolbar
|
21 |
+
} = wp.components;
|
22 |
+
|
23 |
+
const {
|
24 |
+
registerBlockType, // Import registerBlockType() from wp.blocks
|
25 |
+
MediaUpload,
|
26 |
+
InspectorControls,
|
27 |
+
ColorPalette,
|
28 |
+
BlockControls,
|
29 |
+
UrlInput
|
30 |
+
} = wp.blocks;
|
31 |
+
|
32 |
+
import { VideoPopupIcon } from '../../icons'
|
33 |
+
|
34 |
+
const playButton = {
|
35 |
+
normal: <svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 256 320"><path d="M0 0v320l256-160L0 0z"/></svg>,
|
36 |
+
circle: <svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 40 40"><path d="M16 29l12-9-12-9v18zm4-29C8.95 0 0 8.95 0 20s8.95 20 20 20 20-8.95 20-20S31.05 0 20 0zm0 36c-8.82 0-16-7.18-16-16S11.18 4 20 4s16 7.18 16 16-7.18 16-16 16z"/></svg>,
|
37 |
+
outline: <svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 34 34"><path d="M17 34C7.6 34 0 26.4 0 17S7.6 0 17 0s17 7.6 17 17-7.6 17-17 17zm0-32C8.7 2 2 8.7 2 17s6.7 15 15 15 15-6.7 15-15S25.3 2 17 2z"/><path d="M12 25.7V8.3L27 17l-15 8.7zm2-14v10.5l9-5.3-9-5.2z"/></svg>
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Register: Gutenberg Block.
|
42 |
+
*
|
43 |
+
* Registers a new block provided a unique name and an object defining its
|
44 |
+
* behavior. Once registered, the block is made editor as an option to any
|
45 |
+
* editor interface where blocks are implemented.
|
46 |
+
*
|
47 |
+
* @param {string} name Block name.
|
48 |
+
* @param {Object} settings Block settings.
|
49 |
+
* @return {?WPBlock} The block, if it has been successfully
|
50 |
+
* registered; otherwise `undefined`.
|
51 |
+
*/
|
52 |
+
registerBlockType( 'ugb/video-popup', {
|
53 |
+
// Block name. Block names must be string that contains a namespace prefix. Example: my-plugin/my-custom-block.
|
54 |
+
title: __( 'Video Popup' ), // Block title.
|
55 |
+
icon: VideoPopupIcon, // Block icon from Dashicons → https://developer.wordpress.org/resource/dashicons/.
|
56 |
+
category: 'common', // Block category — Group blocks together based on common traits E.g. common, formatting, layout widgets, embed.
|
57 |
+
keywords: [
|
58 |
+
__( 'Video Popup' ),
|
59 |
+
__( 'Stackable' ),
|
60 |
+
],
|
61 |
+
attributes: {
|
62 |
+
videoLink: {
|
63 |
+
type: 'string',
|
64 |
+
source: 'attribute',
|
65 |
+
selector: '.ugb-video-popup',
|
66 |
+
attribute: 'data-video',
|
67 |
+
},
|
68 |
+
mediaLink: {
|
69 |
+
type: 'string',
|
70 |
+
source: 'attribute',
|
71 |
+
selector: '.ugb-video-preview',
|
72 |
+
attribute: 'data-url',
|
73 |
+
},
|
74 |
+
mediaID: {
|
75 |
+
type: 'number',
|
76 |
+
},
|
77 |
+
overlayColor: {
|
78 |
+
type: 'string',
|
79 |
+
default: '#000000',
|
80 |
+
},
|
81 |
+
playButtonType: {
|
82 |
+
type: 'string',
|
83 |
+
default: 'normal'
|
84 |
+
}
|
85 |
+
},
|
86 |
+
|
87 |
+
// The "edit" property must be a valid function.
|
88 |
+
edit: function( props ) {
|
89 |
+
|
90 |
+
const {
|
91 |
+
className,
|
92 |
+
setAttributes,
|
93 |
+
isSelected,
|
94 |
+
} = props
|
95 |
+
|
96 |
+
const {
|
97 |
+
videoLink,
|
98 |
+
mediaLink,
|
99 |
+
overlayColor,
|
100 |
+
playButtonType,
|
101 |
+
mediaID
|
102 |
+
} = props.attributes
|
103 |
+
|
104 |
+
const playButtonTypes = [
|
105 |
+
{ value: 'normal', label: __( 'Normal Play Button' ) },
|
106 |
+
{ value: 'circle', label: __( 'Play Button with Circle' ) },
|
107 |
+
{ value: 'outline', label: __( 'Outline Play Button' ) }
|
108 |
+
];
|
109 |
+
|
110 |
+
return [
|
111 |
+
isSelected && (
|
112 |
+
<BlockControls key='controls'>
|
113 |
+
{ mediaLink && (
|
114 |
+
<Toolbar>
|
115 |
+
<MediaUpload
|
116 |
+
onSelect={ ( media ) => setAttributes( { mediaLink: media.url, mediaID: media.id } ) }
|
117 |
+
type="image"
|
118 |
+
value={ mediaID }
|
119 |
+
render={ ( { open } ) => (
|
120 |
+
<IconButton
|
121 |
+
className="components-toolbar__control"
|
122 |
+
label={ __( 'Edit image' ) }
|
123 |
+
icon="edit"
|
124 |
+
onClick={ open }
|
125 |
+
/>
|
126 |
+
) }
|
127 |
+
/>
|
128 |
+
</Toolbar>
|
129 |
+
)}
|
130 |
+
</BlockControls>
|
131 |
+
),
|
132 |
+
isSelected && (
|
133 |
+
<InspectorControls key={ 'inspector' }>
|
134 |
+
|
135 |
+
<SelectControl
|
136 |
+
label={ __( 'Play Button Style' ) }
|
137 |
+
value={ playButtonType }
|
138 |
+
options={ playButtonTypes.map( ({ value, label }) => ( {
|
139 |
+
value: value,
|
140 |
+
label: label,
|
141 |
+
} ) ) }
|
142 |
+
onChange={ ( newSize ) => { setAttributes( { playButtonType: newSize } ) } }
|
143 |
+
/>
|
144 |
+
<PanelColor
|
145 |
+
title={ __( 'Background/Overlay Color' ) }
|
146 |
+
colorValue={ overlayColor }
|
147 |
+
initialOpen={ false }
|
148 |
+
>
|
149 |
+
<ColorPalette
|
150 |
+
value={ overlayColor }
|
151 |
+
onChange={ ( colorValue ) => setAttributes( { overlayColor: colorValue } ) }
|
152 |
+
/>
|
153 |
+
</PanelColor>
|
154 |
+
</InspectorControls>
|
155 |
+
),
|
156 |
+
<div className='ugb-video-popup'
|
157 |
+
data-video={ videoLink }
|
158 |
+
style={ { backgroundColor: overlayColor } }>
|
159 |
+
<div className='ugb-video-preview'
|
160 |
+
style={ { backgroundImage: `url(${mediaLink})` } }>
|
161 |
+
</div>
|
162 |
+
<div className='ugb-video-wrapper' >
|
163 |
+
<MediaUpload
|
164 |
+
onSelect={ ( media ) => setAttributes( { mediaLink: media.url, mediaID: media.id } ) }
|
165 |
+
type={'image'}
|
166 |
+
value={ mediaID }
|
167 |
+
render={ function( obj ) {
|
168 |
+
return [
|
169 |
+
! mediaLink && (
|
170 |
+
<Button
|
171 |
+
className={ mediaID ? '' : 'button button-large' }
|
172 |
+
onClick={ obj.open }
|
173 |
+
>
|
174 |
+
{__('Upload Image')}
|
175 |
+
</Button>
|
176 |
+
)
|
177 |
+
]
|
178 |
+
} }
|
179 |
+
/>
|
180 |
+
<div className='ugb-video-overlay' style={ { backgroundColor: overlayColor } } />
|
181 |
+
<span className="ugb-play-button">
|
182 |
+
{ playButton[ playButtonType ] }
|
183 |
+
</span>
|
184 |
+
</div>
|
185 |
+
</div>,
|
186 |
+
isSelected && (
|
187 |
+
<form
|
188 |
+
key={ 'form-link' }
|
189 |
+
onSubmit={ ( event ) => event.preventDefault() }
|
190 |
+
className='ugb-video-popup-link blocks-button__inline-link'>
|
191 |
+
<Dashicon icon={ 'admin-links' } />
|
192 |
+
<UrlInput
|
193 |
+
value={ videoLink }
|
194 |
+
onChange={ ( value ) => setAttributes( { videoLink: value } ) }
|
195 |
+
/>
|
196 |
+
<IconButton
|
197 |
+
icon={ 'editor-break' }
|
198 |
+
label={ __( 'Apply' ) }
|
199 |
+
type={ 'submit' }
|
200 |
+
/>
|
201 |
+
<p><i>Youtube/Vimeo ID only</i></p>
|
202 |
+
</form>
|
203 |
+
)
|
204 |
+
];
|
205 |
+
},
|
206 |
+
|
207 |
+
// The "save" property must be specified and must be a valid function.
|
208 |
+
save: function( props ) {
|
209 |
+
|
210 |
+
const {
|
211 |
+
videoLink,
|
212 |
+
mediaLink,
|
213 |
+
overlayColor,
|
214 |
+
playButtonType,
|
215 |
+
mediaID
|
216 |
+
} = props.attributes
|
217 |
+
|
218 |
+
return (
|
219 |
+
<div className='ugb-video-popup'
|
220 |
+
data-video={ videoLink }
|
221 |
+
style={ { backgroundColor: overlayColor } }>
|
222 |
+
<div className='ugb-video-preview'
|
223 |
+
style={ { backgroundImage: `url(${mediaLink})` } }
|
224 |
+
data-url={ mediaLink }>
|
225 |
+
</div>
|
226 |
+
<div className='ugb-video-wrapper' >
|
227 |
+
<a href="#" style={ { backgroundColor: overlayColor } } />
|
228 |
+
<span className='ugb-play-button'>
|
229 |
+
{ playButton[ playButtonType ] }
|
230 |
+
</span>
|
231 |
+
</div>
|
232 |
+
</div>
|
233 |
+
);
|
234 |
+
}
|
235 |
+
} );
|
src/block/video-popup/style.scss
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* #.# Styles for Video Popup Block.
|
3 |
+
*
|
4 |
+
* CSS for both Frontend+Backend.
|
5 |
+
*/
|
6 |
+
.video-popup-image {
|
7 |
+
height: 220px;
|
8 |
+
width: 220px;
|
9 |
+
background-position: center;
|
10 |
+
background-size: cover;
|
11 |
+
margin-bottom: 10px;
|
12 |
+
}
|
13 |
+
|
14 |
+
.ugb-video-popup {
|
15 |
+
position: relative;
|
16 |
+
margin: 0 auto;
|
17 |
+
width: 100%;
|
18 |
+
max-width: 600px;
|
19 |
+
.ugb-video-preview, a, .ugb-video-overlay, .ugb-play-button {
|
20 |
+
position: absolute;
|
21 |
+
top: 0;
|
22 |
+
left: 0;
|
23 |
+
right: 0;
|
24 |
+
bottom: 0;
|
25 |
+
}
|
26 |
+
.ugb-video-preview {
|
27 |
+
background-size: cover;
|
28 |
+
background-position: center;
|
29 |
+
opacity: .4;
|
30 |
+
transition: all .3s ease-in-out;
|
31 |
+
z-index: 1;
|
32 |
+
}
|
33 |
+
&:hover .ugb-video-preview {
|
34 |
+
opacity: .5;
|
35 |
+
}
|
36 |
+
.ugb-video-wrapper {
|
37 |
+
position: relative;
|
38 |
+
width: 100%;
|
39 |
+
padding-bottom: 56.25%;
|
40 |
+
border: 0 !important;
|
41 |
+
box-shadow: none !important;
|
42 |
+
}
|
43 |
+
a, .ugb-video-overlay {
|
44 |
+
z-index: 3;
|
45 |
+
box-shadow: none !important;
|
46 |
+
background: transparent !important;
|
47 |
+
display: block !important;
|
48 |
+
}
|
49 |
+
.ugb-play-button {
|
50 |
+
z-index: 2;
|
51 |
+
display: flex;
|
52 |
+
justify-content: center;
|
53 |
+
align-items: center;
|
54 |
+
flex-direction: column;
|
55 |
+
}
|
56 |
+
svg {
|
57 |
+
fill: #fff !important;
|
58 |
+
}
|
59 |
+
button.components-button.button {
|
60 |
+
position: absolute;
|
61 |
+
z-index: 4;
|
62 |
+
left: 50%;
|
63 |
+
transform: translateX(-50%);
|
64 |
+
top: 30%;
|
65 |
+
&:active {
|
66 |
+
transform: translateX(-50%);
|
67 |
+
}
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
.ugb-video-popup-link.blocks-button__inline-link {
|
72 |
+
margin: 5px auto;
|
73 |
+
> p {
|
74 |
+
font-size: .8em;
|
75 |
+
margin-left: 30px;
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Frontend Styles.
|
82 |
+
*/
|
83 |
+
.wp-block-ugb-video-popup {
|
84 |
+
}
|
src/blocks.js
CHANGED
@@ -10,15 +10,20 @@
|
|
10 |
* this is the file that Webpack is compiling.
|
11 |
*/
|
12 |
|
13 |
-
import './block/spacer
|
14 |
-
import './block/divider
|
15 |
-
import './block/button
|
16 |
-
import './block/ghost-button
|
17 |
-
import './block/notification
|
18 |
-
import './block/blockquote
|
19 |
-
import './block/pullquote
|
20 |
-
import './block/call-to-action
|
21 |
-
import './block/testimonial
|
22 |
-
import './block/team-member
|
23 |
-
import './block/expand
|
24 |
-
import './block/number-box
|
|
|
|
|
|
|
|
|
|
10 |
* this is the file that Webpack is compiling.
|
11 |
*/
|
12 |
|
13 |
+
import './block/spacer';
|
14 |
+
import './block/divider';
|
15 |
+
import './block/button';
|
16 |
+
import './block/ghost-button';
|
17 |
+
import './block/notification';
|
18 |
+
import './block/blockquote';
|
19 |
+
import './block/pullquote';
|
20 |
+
import './block/call-to-action';
|
21 |
+
import './block/testimonial';
|
22 |
+
import './block/team-member';
|
23 |
+
import './block/expand';
|
24 |
+
import './block/number-box';
|
25 |
+
// import './block/pricing-box';
|
26 |
+
// import './block/header';
|
27 |
+
import './block/image-box';
|
28 |
+
import './block/count-up';
|
29 |
+
import './block/video-popup';
|
src/icons.js
CHANGED
@@ -60,9 +60,9 @@ export const TestimonialIcon = () => (
|
|
60 |
)
|
61 |
|
62 |
export const CTAIcon = () => (
|
63 |
-
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0
|
64 |
<Gradient id="Grad" />
|
65 |
-
<path fill="url(#Grad)" d="
|
66 |
</svg>
|
67 |
)
|
68 |
|
@@ -86,3 +86,31 @@ export const NumberBoxIcon = () => (
|
|
86 |
<path fill="url(#Grad)" d="M3.028 10.284a1 1 0 0 1-1-1V2.902l-.553.276A1 1 0 1 1 .58 1.389l2-1a.998.998 0 0 1 1.447.895v8a1 1 0 0 1-1 1zm9 0h-5a1.002 1.002 0 0 1-.707-1.707l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001a1.33 1.33 0 0 0-.393.948 1 1 0 0 1-2 0c0-.894.348-1.733.98-2.364C8.273 0 10.472 0 11.735 1.264c.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.98 2.364L9.443 8.284h2.586a1 1 0 0 1 0 2zm7.955-5.623a2.725 2.725 0 0 0 .545-1.627 2.753 2.753 0 0 0-2.75-2.75 2.739 2.739 0 0 0-2.44 1.484 1 1 0 1 0 1.776.92.75.75 0 1 1 .664 1.096 1 1 0 0 0 0 2c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25a1 1 0 0 0-2 0c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25a3.23 3.23 0 0 0-1.045-2.373z"/>
|
87 |
</svg>
|
88 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
)
|
61 |
|
62 |
export const CTAIcon = () => (
|
63 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 14">
|
64 |
<Gradient id="Grad" />
|
65 |
+
<path fill="url(#Grad)" d="M10 0c-.17 0-.36.05-.52.14C8.04 1.02 4.5 3.58 3 4c-1.38 0-3 .67-3 2.5S1.63 9 3 9c.3.08.64.23 1 .41V14h2v-3.45c1.34.86 2.69 1.83 3.48 2.31.16.09.34.14.52.14.52 0 1-.42 1-1V1c0-.58-.48-1-1-1zm0 12c-.38-.23-.89-.58-1.5-1-.16-.11-.33-.22-.5-.34V2.31c.16-.11.31-.2.47-.31.61-.41 1.16-.77 1.53-1v11zm2-6h4v1h-4V6zm0 2l4 2v1l-4-2V8zm4-6v1l-4 2V4l4-2z"/>
|
66 |
</svg>
|
67 |
)
|
68 |
|
86 |
<path fill="url(#Grad)" d="M3.028 10.284a1 1 0 0 1-1-1V2.902l-.553.276A1 1 0 1 1 .58 1.389l2-1a.998.998 0 0 1 1.447.895v8a1 1 0 0 1-1 1zm9 0h-5a1.002 1.002 0 0 1-.707-1.707l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001a1.33 1.33 0 0 0-.393.948 1 1 0 0 1-2 0c0-.894.348-1.733.98-2.364C8.273 0 10.472 0 11.735 1.264c.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.98 2.364L9.443 8.284h2.586a1 1 0 0 1 0 2zm7.955-5.623a2.725 2.725 0 0 0 .545-1.627 2.753 2.753 0 0 0-2.75-2.75 2.739 2.739 0 0 0-2.44 1.484 1 1 0 1 0 1.776.92.75.75 0 1 1 .664 1.096 1 1 0 0 0 0 2c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25a1 1 0 0 0-2 0c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25a3.23 3.23 0 0 0-1.045-2.373z"/>
|
87 |
</svg>
|
88 |
)
|
89 |
+
|
90 |
+
export const HeaderIcon = () => (
|
91 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 32 38">
|
92 |
+
<Gradient id="Grad" />
|
93 |
+
<path fill="url(#Grad)" d="M0 0h32v38H0V0zm3 3v32h26V3H3zm2 2h22v7H5V5zm0 9h14v19H5V14zm16 19V14h6v19h-6zM6 6v5h20V6H6z"/>
|
94 |
+
</svg>
|
95 |
+
)
|
96 |
+
|
97 |
+
export const PictureIcon = () => (
|
98 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 1024 896">
|
99 |
+
<Gradient id="Grad" />
|
100 |
+
<path fill="url(#Grad)" d="M960 0H64Q38 0 19 19T0 64v768q0 26 19 45t45 19h896q26 0 45-19t19-45V64q0-26-19-45T960 0zM64 64h896v714L724 430q-7-12-21-14t-25 7L524 548 350 305q-10-14-28-13t-26 17L64 757V64zm855 768H97l231-447 184 255 179-145zM737 190q13 0 22.5 9.5T769 222t-9.5 22.5T737 254t-22.5-9.5T705 222t9.5-22.5T737 190zm0-64q-40 0-68 28t-28 68 28 68 68 28 68-28 28-68-28-68-68-28z"/>
|
101 |
+
</svg>
|
102 |
+
)
|
103 |
+
|
104 |
+
export const VideoPopupIcon = () => (
|
105 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 38 26">
|
106 |
+
<Gradient id="Grad" />
|
107 |
+
<path fill="url(#Grad)" d="M2 0h34a2 2 0 0 1 2 2v22a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2zm5.77 4C6.24 4 5 5.511 5 7.375v11.25C5 20.489 6.24 22 7.77 22h15.46c1.53 0 2.77-1.511 2.77-3.375V16l6 5h1V5h-1l-6 5V7.375C26 5.511 24.76 4 23.23 4H7.77z"/>
|
108 |
+
</svg>
|
109 |
+
)
|
110 |
+
|
111 |
+
export const PricingIcon = () => (
|
112 |
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 448 448">
|
113 |
+
<Gradient id="Grad" />
|
114 |
+
<path fill="url(#Grad)" d="M416 32V0H256L0 288l160 160 23.471-23.904L208 448l240-272V32h-32zM160 425.371L22.39 288 262.621 16H400v137.377l-216.555 247.99-11.34 11.363L160 425.371zm272-255.994L208 425.371l-13.182-12.65L416 160V48h16v121.377z"/><path d="M320 128c17.645 0 32-14.355 32-32s-14.355-32-32-32-32 14.355-32 32 14.355 32 32 32zm0-48c8.836 0 16 7.163 16 16s-7.164 16-16 16-16-7.163-16-16 7.164-16 16-16z"/>
|
115 |
+
</svg>
|
116 |
+
)
|