From: Stephen Cameron Date: Thu, 19 Aug 2021 14:42:29 +0000 (+0200) Subject: Shared template widget improvements. Done #4615 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=03df21ba881e34420c382e28ed1ba940b2e56e97;p=ccv-wordpress.git Shared template widget improvements. Done #4615 @1.5 --- diff --git a/wp-content/mu-plugins/cube/src/Elementor/Widgets/Template.php b/wp-content/mu-plugins/cube/src/Elementor/Widgets/Template.php index da8362a..8e13bd6 100644 --- a/wp-content/mu-plugins/cube/src/Elementor/Widgets/Template.php +++ b/wp-content/mu-plugins/cube/src/Elementor/Widgets/Template.php @@ -70,7 +70,7 @@ class Template extends _Base { 'description', [ 'type' => Controls_Manager::RAW_HTML, - 'raw' => 'This widget allows shared content blocks to be embedded in multiple places via templates. This enables all embedded blocks to be updated centrally by editing the template. It is possible to nest templates. To appear in the list, the template must be in the "Global" category.
Manage templates >>.', + 'raw' => 'This widget allows shared content blocks to be embedded in multiple places via templates. This enables all embedded blocks to be updated centrally by editing the template. It is possible to nest templates. To appear in the list, the template must be in the "Global" category.
Manage templates >>.', 'content_classes' => 'elementor-descriptor', ] ); diff --git a/wp-content/themes/CCV/resources/assets/styles/widgets/shared-template.styl b/wp-content/themes/CCV/resources/assets/styles/widgets/shared-template.styl new file mode 100644 index 0000000..090d4c5 --- /dev/null +++ b/wp-content/themes/CCV/resources/assets/styles/widgets/shared-template.styl @@ -0,0 +1,22 @@ +//== Shared Elementor Template widget +// When the editor is active, clearly show which blocks are templates (not directly editable) +.elementor-editor-active + .cube-template + &:before + content: '' + width: 100% + height: 100% + position: absolute + z-index: 10 + //pointer-events: none + //outline: 2px dashed #FF078B + //outline-offset: -3px + background-repeat: no-repeat, repeat + background-size: 150px, auto + background-position: center + background-color: rgba(#fff, 0.5) + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cstyle%3E.st2%7Bfill:%23ff078b%7D.st3%7Bfill:%239999ba%7D.st4%7Bfill:%23999%7D.st5%7Bfill:%23666%7D%3C/style%3E%3Ccircle cx='32' cy='32' r='30' fill='%232e2c40'/%3E%3Cpath fill='none' d='M-1-1h582v402H-1z'/%3E%3Cpath class='st2' d='M39 52h-6.8c-2.1 0-3.8-1.7-3.8-3.8 0-2.1 1.7-3.8 3.8-3.8h4.5c.5 0 .8.3.8.8s-.3.8-.8.8h-4.5c-1.3 0-2.3 1-2.3 2.3s1 2.3 2.3 2.3H39c1.3 0 2.3-1 2.3-2.3 0-.2 0-.4-.1-.6-.2-.4.1-.8.5-1 .4-.2.8.1 1 .5v.2c.1.3.2.6.2.9-.2 2-1.8 3.7-3.9 3.7z'/%3E%3Cpath class='st2' d='M47.2 52h-4.5c-.5 0-.8-.3-.8-.8s.3-.8.8-.8h4.5c1.3 0 2.3-1 2.3-2.3s-1-2.3-2.3-2.3h-6.8c-1.3 0-2.3 1-2.3 2.3 0 .2 0 .4.1.6.2.4-.1.8-.5 1-.4.2-.8-.1-1-.5V49c-.1-.4-.2-.7-.2-1 0-2.1 1.7-3.8 3.8-3.8h6.8c2.1 0 3.8 1.7 3.8 3.8.1 2.3-1.6 4-3.7 4z'/%3E%3Cpath class='st3' d='M26.3 47.6c-.2 0-.5-.2-.7-.4-1.6-2-2.5-4.7-2.5-7.3v-.3c.1-6.4 5.4-11.5 11.9-11.6h.5c6.5.1 11.7 5.3 11.7 11.8v.2c0 .8-.1 1.6-.2 2.4-.1.5-.5.7-.9.6-.5-.1-.7-.5-.6-.9.2-.7.2-1.4.2-2.1v-.2c-.1-5.7-4.7-10.3-10.4-10.4H35c-5.7.1-10.3 4.7-10.5 10.4v.2c0 2.3.8 4.7 2.3 6.5.2.3.2.8-.1 1.1 0 0-.2.1-.4 0z'/%3E%3Cpath class='st3' d='M30.1 43.4c-.5 0-.8-.3-.8-.8-.1-.8-.2-1.7-.2-2.6 0-1.7.2-3.3.5-5 .9-4.2 2.9-6.9 5.3-7.1h.5c2.3.2 4.3 2.9 5.3 7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3.2-.5.5-.7l1.7-.8c.4-.2.8.1 1 .5.2.4 0 .8-.4.9l-1.7.8c-.1.1-.2.1-.3.1z'/%3E%3Cpath class='st4' d='M21.1 38.5c-.3 0-.5-.2-.7-.4-.5-.9-.7-2-.4-2.9l6.2-22.4c.5-2 2.6-3.2 4.6-2.6l17.5 4.7c1 .2 1.8.9 2.3 1.7.5.9.6 1.9.4 2.9l-3.4 12.4c-.2.4-.5.6-.9.5-.4-.2-.6-.5-.5-.9l3.4-12.4c.2-.6.1-1.2-.2-1.7-.3-.5-.8-.9-1.4-1.1l-17.5-4.7c-1.2-.3-2.4.4-2.7 1.6l-6.2 22.4c-.2.6-.1 1.2.2 1.7.2.4.1.8-.2 1.1-.2 0-.4.1-.5.1z'/%3E%3Cpath class='st5' d='M41.6 20h-.2l-6.5-1.8c-.4-.1-.6-.5-.5-.9.1-.4.5-.7.9-.6l6.5 1.8c.5.1.7.5.7.8-.2.5-.5.8-.9.7zM42.6 24.9h-.2l-11-2.9c-.5-.2-.7-.5-.5-1 .2-.5.5-.7 1-.5l10.8 3c.5.1.7.5.7.8-.1.5-.5.8-.8.6zM32.3 26.8h-.2l-1.7-.5c-.4-.2-.7-.5-.5-.9.2-.4.5-.7.9-.5l1.7.5c.4.1.6.5.5.9-.1.3-.4.5-.7.5z'/%3E%3C/svg%3E"), repeating-linear-gradient(135deg, transparent, transparent 6px, rgba(0, 0, 0, 0.1) 6px, rgba(0, 0, 0, 0.1) 12px) + + // Only highlight the outermost template - avoids weird things when templates are nested + .cube-template:before + display: none