Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
VvvebJs CSS editor
givanzaa4bc511e234
diff --git a/public/js/vvvebjs/builder.js b/public/js/vvvebjs/builder.jsindex 9895800..4a580e1 100755--- a/public/js/vvvebjs/builder.js+++ b/public/js/vvvebjs/builder.js@@ -188,6 +188,7 @@ Vvveb.imgBaseUrl = Vvveb.baseUrl;Vvveb.ComponentsGroup = {};Vvveb.SectionsGroup = {};Vvveb.BlocksGroup = {};+Vvveb.StylesGroup = {};Vvveb.Components = {@@ -617,6 +618,19 @@ Vvveb.Sections = {},};+Vvveb.Styles = {++ _styles: {},++ get: function(type) {+ return this._styles[type];+ },++ add: function(type, data) {+ data.type = type;+ this._styles[type] = data;+ },+};Vvveb.WysiwygEditor = {@@ -834,6 +848,7 @@ Vvveb.Builder = {self.loadControlGroups();self.loadBlockGroups();self.loadSectionGroups();+ self.loadStylesGroups();self.selectedEl = null;self.highlightEl = null;@@ -949,13 +964,6 @@ Vvveb.Builder = {if (section.image) {let image = ((section.image.indexOf('/') == -1) ? Vvveb.imgBaseUrl:'') + section.image;-- /*- Object.assign(item.style,{- //backgroundImage: "url(" + image + ")",- //backgroundRepeat: "no-repeat"- });*/-item.querySelector("img").setAttribute("src", image);}@@ -1001,15 +1009,7 @@ Vvveb.Builder = {if (block.image) {let image = ((block.image.indexOf('/') == -1) ? Vvveb.imgBaseUrl:'') + block.image;- /*- Object.assign(item.style,{- //backgroundImage: "url(" + image + ")",- //backgroundRepeat: "no-repeat"- });*/-item.querySelector("img").setAttribute("src", image);--}blocksSubList.append(item);@@ -1017,6 +1017,51 @@ Vvveb.Builder = {}}});+ },++ loadStylesGroups : function() {++ let stylesList = document.querySelectorAll(".styles-list");+ let item = {};++ stylesList.forEach(function (list, i) {+ let type = list.dataset.type;+ list.replaceChildren();++ for (group in Vvveb.BlocksGroup) {+ list.append(generateElements(+ `<li class="header" data-section="${group}" data-search="">+ <label class="header" for="${type}_stylehead_${group}">+ ${group}<div class="header-arrow"></div>+ </label>+ <input class="header_check" type="checkbox" checked="true" id="${type}_stylehead_${group}">+ <ol></ol>+ </li>`)[0]);++ let stylesSubList = list.querySelector('li[data-section="' + group + '"] ol');+ styles = Vvveb.BlocksGroup[ group ];++ for (i in styles) {+ styleType = styles[i];+ style = Vvveb.Blocks.get(styleType);++ if (style) {+ item = generateElements(`<li data-section="${group}" data-drag-type="style" data-type="${styleType}" data-search="${style.name.toLowerCase()}">+ <span class="name">${style.name}</span>+ <img class="preview" src="" loading="lazy">+ </li>`)[0];++ if (style.image) {++ let image = ((style.image.indexOf('/') == -1) ? Vvveb.imgBaseUrl:'') + style.image;+ item.querySelector("img").setAttribute("src", image);+ }++ stylesSubList.append(item);+ }+ }+ }+ });},adjustListsHeight: function () {@@ -1291,6 +1336,9 @@ Vvveb.Builder = {selectNode: function(node) {let self = this;let SelectBox = document.getElementById("select-box");+ let SelectActions = document.getElementById("select-actions");+ let AddSectionBtn = document.getElementById("add-section-btn");+ let elementType = this._getElementType(node);if (!node) {SelectBox.style.display = "none";@@ -1300,11 +1348,19 @@ Vvveb.Builder = {if (self.texteditEl && (self.selectedEl != node)) {Vvveb.WysiwygEditor.destroy(self.texteditEl);self.selectPadding = 0;- document.getElementById("select-box").classList.remove("text-edit");- document.getElementById("select-actions").style.display = "";+ SelectBox.classList.remove("text-edit");+ SelectActions.style.display = "";self.texteditEl = null;}+ if (elementType[1] == "BODY") {+ SelectActions.style.display = "none";+ AddSectionBtn.style.display = "none";+ } else {+ SelectActions.style.display = "";+ AddSectionBtn.style.display = "";+ }+let target = node;self.selectedEl = target;@@ -1324,7 +1380,6 @@ Vvveb.Builder = {return false;}- let elementType = this._getElementType(node);document.querySelector("#highlight-name .type").innerHTML = elementType[0];document.querySelector("#highlight-name .name").innerHTML = elementType[1];@@ -2242,11 +2297,13 @@ Vvveb.CodeEditor = {isActive: false,oldValue: '',doc:false,+ textarea:false,init: function(doc) {- document.querySelector("#vvveb-code-editor textarea").val(Vvveb.Builder.getHtml());+ this.textarea = document.querySelector("#vvveb-code-editor textarea");+ this.textarea.value = Vvveb.Builder.getHtml();- document.querySelector("#vvveb-code-editor textarea").keyup(function () {+ this.textarea.addEventListener("keyup", e => {delay(() => Vvveb.Builder.setHtml(this.value), 1000);});@@ -2262,7 +2319,7 @@ Vvveb.CodeEditor = {setValue: function(value) {if (this.isActive) {- document.querySelector("#vvveb-code-editor textarea").val(Vvveb.Builder.getHtml());+ this.textarea.value = Vvveb.Builder.getHtml();}},@@ -2281,6 +2338,40 @@ Vvveb.CodeEditor = {}+Vvveb.CssEditor = {++ isActive: false,+ oldValue: '',+ doc:false,+ textarea:false,++ init: function(doc) {+ this.textarea = document.getElementById("css-editor")+ this.textarea.value = Vvveb.StyleManager.getCss();+ let self = this;++ document.querySelectorAll('[href="#css-tab"],[href="#configuration"]').forEach( t => t.addEventListener("click", e => {+ self.textarea.value = Vvveb.StyleManager.getCss();+ }));++ this.textarea.addEventListener("keyup", e => {+ delay(() => Vvveb.StyleManager.setCss(self.textarea.value), 1000);+ });+ },++ getValue: function() {+ return this.textarea.value;+ },++ setValue: function(value) {+ this.textarea.value = value;+ Vvveb.StyleManager.setCss(value);+ },++ destroy: function() {+ }+}+function displayToast(bg, title, message, id = "top-toast") {document.querySelector("#" + id + " .toast-body .message").innerHTML = message;let header = document.querySelector("#" + id + " .toast-header");@@ -2410,7 +2501,7 @@ Vvveb.Gui = {viewport : function () {document.getElementById("canvas").setAttribute("class", this.dataset.view);document.getElementById("iframe1").removeAttribute("style");- document.querySelector(".responsive-btns .active").classList.remove("active");+ document.querySelectorAll(".responsive-btns .active").forEach(e => e.classList.remove("active"));if (this.dataset.view) this.classList.add("active");},@@ -2505,11 +2596,13 @@ Vvveb.Gui = {Vvveb.FileManager.loadPage(data.name);Vvveb.FileManager.scrollToPage(page);bsModal.hide();- }, this.action);+ });};- form.removeEventListener("submit", submitForm);- form.addEventListener("submit", submitForm);+ if (!form.dataset.init) {+ form.addEventListener("submit", submitForm);+ form.dataset.init = true;+ }},setDesignerMode : function () {@@ -2593,47 +2686,56 @@ Vvveb.StyleManager = {for (let i = 0; i < doc.styleSheets.length; i++) {_style = doc.styleSheets[i];if (_style.ownerNode.id && _style.ownerNode.id == "vvvebjs-styles") {- style = _style;+ style = _style.ownerNode;break;}}+ document.getElementById("vvvebjs-styles-css")?.remove();+//if style element does not exist create itif (!style) {- this.cssContainer = generateElements('<style id="vvvebjs-styles"></style>')[0];- doc.head.append(this.cssContainer);- return this.cssContainer;+ style = generateElements('<style id="vvvebjs-styles"></style>')[0];+ doc.head.append(style);+ return this.cssContainer = style;}- //if style exist then load all css styles for editor- for (let j = 0; j < style.cssRules.length; j++) {- media = (typeof style.cssRules[j].media === "undefined") ?- "desktop" : (style.cssRules[j].media[0] === "screen and (max-width: 1220px)")- ? "tablet" : (style.cssRules[j].media[0] === "screen and (max-width: 320px)")- ? "mobile" : "desktop";-- selector = (media === "desktop") ? style.cssRules[j].selectorText : style.cssRules[j].cssRules[0].selectorText;- styles = (media === "desktop") ? style.cssRules[j].style : style.cssRules[j].cssRules[0].style;+ //if it exists+ this.cssContainer = style;+ this.loadCss();++ return this.cssContainer;+ }+ },++ loadCss: function() {+ let style = this.cssContainer.sheet;+ //if style exist then load all css styles for editor+ for (let j = 0; j < style.cssRules.length; j++) {+ media = (typeof style.cssRules[j].media === "undefined") ?+ "desktop" : (style.cssRules[j].media[0] === "screen and (max-width: 1220px)")+ ? "tablet" : (style.cssRules[j].media[0] === "screen and (max-width: 320px)")+ ? "mobile" : "desktop";++ selector = (media === "desktop") ? style.cssRules[j].selectorText : style.cssRules[j].cssRules[0].selectorText;+ styles = (media === "desktop") ? style.cssRules[j].style : style.cssRules[j].cssRules[0].style;- if (media) {- this.styles[media] = this.styles[media] ?? {};- if (selector) {- this.styles[media][selector] = {};+ if (media) {+ this.styles[media] = this.styles[media] ?? {};+ if (selector) {+ this.styles[media][selector] = {};++ for (let k = 0; k < styles.length; k++) {++ property = styles[k];+ value = styles[property];- for (let k = 0; k < styles.length; k++) {-- property = styles[k];- value = styles[property];-- this.styles[media][selector][property] = value;- }+ this.styles[media][selector][property] = value;}}}-- return this.cssContainer = doc.getElementById("vvvebjs-styles");- }- },+ }+ },getSelectorForElement: function(element) {if (!element) return '';@@ -2648,6 +2750,13 @@ Vvveb.StyleManager = {return "." + className;}}).join("");++ //element (tag) selector+ let tag = currentElement.tagName.toLowerCase();+ //exclude top most element body unless the parent element is body+ if (tag == "body" && selector.length > 1) {+ break;+ }//stop at a unique element (with id)if (currentElement.id) {@@ -2657,14 +2766,9 @@ Vvveb.StyleManager = {} else if (classSelector) {//class selectorelementSelector = classSelector;-} else {- //element (tag) selector- let tag = currentElement.tagName.toLowerCase();- //exclude top most element body unless the parent element is body- if (tag != "body" || (tag == "body" && selector.length <= 1)) {- elementSelector = tag- }+ //element selector+ elementSelector = tag}if (elementSelector) {@@ -2714,6 +2818,15 @@ Vvveb.StyleManager = {//return element.css(styleProp, value);},+ setCss: function (css) {+ this.cssContainer.innerHTML = css;+ this.loadCss();+ },++ getCss: function (css) {+ return this.cssContainer.innerHTML;+ },+generateCss: function (media) {//let css = "";//for (selector in this.styles[media]) {@@ -2732,22 +2845,22 @@ Vvveb.StyleManager = {let css = "";for (media in this.styles) {if (media === "tablet" || media === "mobile") {- css += `@media screen and (max-width: ${(media === 'tablet') ? this.tabletWidth : this.mobileWidth}){`+ css += `@media screen and (max-width: ${(media === 'tablet') ? this.tabletWidth : this.mobileWidth}){\n\n`}for (selector in this.styles[media]) {- css += `${selector} {`;+ css += `${selector} {\n`;for (property in this.styles[media][selector]) {value = this.styles[media][selector][property];- css += `${property}: ${value};`;+ css += `\t${property}: ${value};\n`;}- css += '}';+ css += '}\n\n';}if (media === "tablet" || media === "mobile") {- css += `}`+ css += `}\n\n`}}- this.cssContainer.innerHTML = css;+ return this.cssContainer.innerHTML = css;},@@ -2914,7 +3027,7 @@ Vvveb.SectionList = {document.querySelector(this.selector).addEventListener("click", function (e) {let element = e.target.closest(":scope > div .controls");if (element) {- let node = e.currentTarget.parentNode._node;+ let node = element.parentNode._node;if (node) {node.scrollIntoView({behavior: "smooth", block: "center", inline: "center"});//node.click();@@ -2927,7 +3040,7 @@ Vvveb.SectionList = {document.querySelector(this.selector).addEventListener("dblclick", function (e) {let element = e.target.closest(":scope > div");if (element) {- node = e.currentTarget._node;+ node = element._node;node.click();}});@@ -2936,7 +3049,7 @@ Vvveb.SectionList = {document.querySelector(this.selector).addEventListener("click", function (e) {let element = e.target.closest("li[data-component] label");if (element) {- let node = e.currentTarget.parentNode._node;+ let node = element.parentNode._node;if (node) {node.scrollIntoView({behavior: "smooth", block: "center", inline: "center"});node.click();@@ -2947,7 +3060,7 @@ Vvveb.SectionList = {document.querySelector(this.selector).addEventListener("mouseenter", function (e) {let element = e.target.closest("li[data-component] label");if (element) {- node = document.querySelector(e.currentTarget.parentNode._node);+ node = document.querySelector(element.parentNode._node);node.css("outline","1px dashed blue");}});@@ -2955,7 +3068,7 @@ Vvveb.SectionList = {document.querySelector(this.selector).addEventListener("mouseleave", function (e){let element = e.target.closest("li[data-component] label");if (element) {- node = document.querySelector(e.currentTarget.parentNode._node);+ node = document.querySelector(element.parentNode._node);node.css("outline","");if (node.getAttribute("style") == "") node.removeAttribute("style");}@@ -2968,7 +3081,7 @@ Vvveb.SectionList = {document.querySelector(this.selector).addEventListener("click", function (e) {let element = e.target.closest(".delete-btn");if (element) {- let section = e.currentTarget.closest(".section-item");+ let section = element.closest(".section-item");let node = section._node;node.remove();section.remove();@@ -2977,24 +3090,29 @@ Vvveb.SectionList = {e.preventDefault();}});-- document.querySelector(".sections-list").addEventListener("mouseenter", function (e) {- let element = e.target.closest("li[data-section]");++ let sectionIn;+ let img = document.querySelector(".block-preview img");+ document.querySelector(".sections-list").addEventListener("mouseover", function (e) {+ let element = e.target.closest("li[data-type]");if (element) {- let src = document.querySelector("img", this).getAttribute("src");- document.querySelector(".block-preview img").setAttribute("src", src ).style.display = "";+ if (sectionIn != element) {+ let src = element.querySelector("img").getAttribute("src");+ sectionIn = element;+ img.setAttribute("src", src);+ img.style.display = "";+ }+ } else {+ sectionIn = element;+ img.setAttribute("src", "");+ img.style.display = "none";}})- document.querySelector(".sections-list").addEventListener("mouseleave", function (e) {- let element = e.target.closest("li[data-section]");- if (element) {- document.querySelector(".block-preview img").setAttribute("src", "").style.display = "none";- }- });+/*document.querySelector(this.selector).addEventListener("click", ".up-btn", function (e) {- let section = e.currentTarget.closest(".section-item");+ let section = e.target.closest(".section-item");let node = section._node;Vvveb.Builder.moveNodeUp(node);Vvveb.Builder.moveNodeUp(section);@@ -3004,7 +3122,7 @@ Vvveb.SectionList = {document.querySelector(this.selector).addEventListener("click", ".down-btn", function (e) {- let section = e.currentTarget.closest(".section-item");+ let section = e.target.closest(".section-item");let node = section._node;Vvveb.Builder.moveNodeDown(node);Vvveb.Builder.moveNodeDown(section);@@ -3236,6 +3354,7 @@ Vvveb.TreeList = {event.preventDefault();let left = Math.max(event.clientX + offset[0], 0);let top = Math.max(event.clientY + offset[1], 0);+if (left >= 0 && (left < (window.innerWidth - self.container.clientWidth))) self.container.style.left = left + "px";if (top >= 0 && (top < (window.innerHeight - self.container.clientHeight))) self.container.style.top = top + "px";}@@ -3255,23 +3374,17 @@ Vvveb.TreeList = {}})- document.querySelector(this.selector).addEventListener("mouseenter", function (e) {+ document.querySelector(this.selector).addEventListener("mousemove", function (e) {let element = e.target.closest("li[data-component]");if (element) {node = element._treeNode;- node.css("outline","1px dashed blue");++ node.dispatchEvent(new MouseEvent("mousemove", {+ bubbles: true,+ cancelable: true,+ }));}})-- document.querySelector(this.selector).addEventListener("mouseleave", function (e){- let element = e.target.closest("li[data-component]");- if (element) {- node = element._treeNode;- node.css("outline","");- if (node.getAttribute("style") == "") node.removeAttribute("style");- }- });-},selectComponent: function(node) {diff --git a/public/js/vvvebjs/components-html.js b/public/js/vvvebjs/components-html.jsindex ffa05c8..a91c877 100755--- a/public/js/vvvebjs/components-html.js+++ b/public/js/vvvebjs/components-html.js@@ -211,7 +211,7 @@ Vvveb.Components.extend("_base", "html/image", {return node;},init: function (node) {- let value = node.parentNode.tagName.toLowerCase() == "a"+ let value = node.parentNode.tagName.toLowerCase() == "a";this.setGroup(value);return value;}diff --git a/public/js/vvvebjs/components-widgets.js b/public/js/vvvebjs/components-widgets.jsindex bf6f360..5feb68c 100755--- a/public/js/vvvebjs/components-widgets.js+++ b/public/js/vvvebjs/components-widgets.js@@ -16,7 +16,7 @@ limitations under the License.https://github.com/givanz/VvvebJs*/-Vvveb.ComponentsGroup['Widgets'] = ["widgets/googlemaps", "widgets/embed-video", "widgets/chartjs",/* "widgets/facebookpage", */"widgets/paypal", /*"widgets/instagram",*/ "widgets/twitter", "widgets/openstreetmap"/*, "widgets/facebookcomments"*/];+Vvveb.ComponentsGroup['Widgets'] = ["widgets/googlemaps", "widgets/embed-video", "widgets/chartjs", "widgets/lottie",/* "widgets/facebookpage", */"widgets/paypal", /*"widgets/instagram",*/ "widgets/twitter", "widgets/openstreetmap"/*, "widgets/facebookcomments"*/];Vvveb.Components.extend("_base", "widgets/googlemaps", {name: "Google Maps",@@ -189,9 +189,9 @@ Vvveb.Components.extend("_base", "widgets/embed-video", {document.querySelector(".component-properties [data-key=poster]").style.display = "none";//check if html5- if (video.length) {+ if (video) {this.url = video.src;- } else if (iframe.length) {//vimeo or youtube+ } else if (iframe) {//vimeo or youtubelet src = iframe.getAttribute("src");let match;@@ -241,7 +241,7 @@ Vvveb.Components.extend("_base", "widgets/embed-video", {break;}- node.querySelector("> iframe, > video").replaceWith(newnode);+ node.querySelector(":scope > iframe,:scope > video").replaceWith(newnode);return node;}@@ -749,3 +749,91 @@ Vvveb.Components.extend("_base", "widgets/chartjs", {}}]});++function lottieAfterDrop(node) {+ //check if lottie js is included and if not add it when drag starts to allow the script to load+ body = Vvveb.Builder.frameBody;++ if (!body.querySelector("#lottie-js")) {+ let lib = document.createElement('script');+ let code = document.createElement('script');+ lib.id = 'lottie-js';+ lib.type = 'text/javascript';+ lib.src = 'https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js';+ code.type = 'text/javascript';+ code.text = `+ let lottie = [];+ function initLottie(onlyNew = false) {+ if (typeof bodymovin == "undefined") return;+++ let list = document.querySelectorAll('.lottie' + (onlyNew ? ":not(.lottie-initialized)" : "") );+ list.forEach(el => {+ el.replaceChildren();+ let animItem = bodymovin.loadAnimation({+ wrapper: el,+ animType: 'svg',+ loop: (el.dataset.loop == "true" ? true : false),+ autoplay: (el.dataset.autoplay == "true" ? true : false),+ path: el.dataset.path+ });++ });+ }++ if (document.readyState !== 'loading') {+ initLottie();+ } else {+ document.addEventListener('DOMContentLoaded', initLottie);+ }`;++ body.appendChild(lib);+ body.appendChild(code);++ lib.addEventListener('load', function() {+ Vvveb.Builder.iframe.contentWindow.initLottie();+ });+ } else {+ Vvveb.Builder.iframe.contentWindow.initLottie(true);+ }++ return node;+};++Vvveb.Components.add("widgets/lottie", {+ name: "Lottie",+ image: "icons/lottie.svg",+ attributes: ["data-component-lottie"],+ html: `+ <div class="lottie" data-component-lottie data-path="https://labs.nearpod.com/bodymovin/demo/markus/isometric/markus2.json" data-loop="true" data-autoplay="true">+ </div>+ `,+ afterDrop: lottieAfterDrop,++ onChange: function (node, property, value) {+ Vvveb.Builder.iframe.contentWindow.initLottie();+ Vvveb.Builder.selectNode(node);+ return node;+ },++ properties: [{+ name: "Path",+ key: "path",+ //inputtype: ImageInput,+ inputtype: TextInput,+ htmlAttr:"data-path",+ },{+ name: "Autoplay",+ key: "autoplay",+ htmlAttr:"data-autoplay",+ inputtype: CheckboxInput,+ inline:true,+ col:4+ },{ name: "Loop",+ key: "loop",+ htmlAttr:"data-loop",+ inputtype: CheckboxInput,+ inline:true,+ col:4+ }]+});diff --git a/public/js/vvvebjs/icons/file-manager-layout.svg b/public/js/vvvebjs/icons/file-manager-layout.svgindex 3cba974..24d9c8e 100755--- a/public/js/vvvebjs/icons/file-manager-layout.svg+++ b/public/js/vvvebjs/icons/file-manager-layout.svg@@ -1 +1 @@-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -64 512 512"><path d="M82.17 25.763h352v352h-352v-336zm32 32v288h128v-288zm160 0v288h128v-288z" fill="#4d4d4d"/><rect width="158.373" height="130.983" x="114.169" y="57.763" ry="1.069" fill="#a0a0a0"/></svg>\ No newline at end of file+<svg viewBox="0 -64 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M63.633-5.914h394.856v394.857H63.633V12.034ZM88.31 16.521v349.002h167.335V16.521Zm190.698 0v351.183h156.08V16.521Z" fill="#4d4d4d" style="stroke-width:1.12175"/><path d="M88.311 109.535V16.521h167.335V202.55H88.311Z" fill="gray" fill-opacity=".329" style="fill:gray;fill-opacity:.33333334;stroke-width:.923722"/></svg>\ No newline at end of filediff --git a/public/js/vvvebjs/icons/left-column-layout.svg b/public/js/vvvebjs/icons/left-column-layout.svgindex f15ddb9..f38a18e 100755--- a/public/js/vvvebjs/icons/left-column-layout.svg+++ b/public/js/vvvebjs/icons/left-column-layout.svg@@ -1 +1 @@-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -64 512 512"><path d="M82.17 25.763h352v352h-352v-336zm32 32v288h128v-288zm160 0v288h128v-288z" fill="#4d4d4d"/><path d="M114.414 201.792V58.063H241.329v287.458H114.414z" fill="gray" fill-opacity=".329"/></svg>\ No newline at end of file+<svg viewBox="0 -64 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M61.812-4.921h394.856v394.856H61.812V13.027ZM86.49 17.514v349.002h167.336V17.514Zm190.698 0v351.182H433.27V17.514Z" fill="#4d4d4d" style="stroke-width:1.12175"/><path d="M86.49 190.924V15.334h167.336v351.182H86.49Z" fill="gray" fill-opacity=".329" style="fill:gray;fill-opacity:.27058825;stroke-width:1.26917"/></svg>\ No newline at end of filediff --git a/public/js/vvvebjs/icons/lottie.svg b/public/js/vvvebjs/icons/lottie.svgnew file mode 100644index 0000000..555f5bb--- /dev/null+++ b/public/js/vvvebjs/icons/lottie.svg@@ -0,0 +1 @@+<svg width="180" height="180" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient x1=".003" y1=".103" x2=".954" y2=".725" id="a"><stop stop-color="#2BEAED" offset="0%"/><stop stop-color="#0FCCCE" offset="100%"/></linearGradient></defs><g transform="translate(13.637 13.58)" style="stroke-width:3;stroke-miterlimit:4;stroke-dasharray:none" fill="none" fill-rule="evenodd"><rect fill="url(#a)" width="156.235" height="156.644" rx="12.688" style="fill:none;fill-opacity:1;stroke:#000;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"/><path d="M119.052 30.826c4.285.634 7.243 4.628 6.61 8.918-.632 4.292-4.618 7.26-8.905 6.624-7.591-1.124-18.963 10.697-31.695 35.003-16.254 31.03-31.382 45.815-47.31 44.635-4.32-.32-7.562-4.088-7.243-8.413.319-4.326 4.079-7.576 8.4-7.256 7.865.583 19.418-11.742 32.264-36.266 16.357-31.229 31.691-45.644 47.879-43.245Z" fill="#FFF" style="fill:none;stroke:#000;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"/></g></svg>\ No newline at end of filediff --git a/public/js/vvvebjs/icons/right-column-layout.svg b/public/js/vvvebjs/icons/right-column-layout.svgindex a65477e..e85ff7c 100755--- a/public/js/vvvebjs/icons/right-column-layout.svg+++ b/public/js/vvvebjs/icons/right-column-layout.svg@@ -1 +1 @@-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -64 512 512"><path d="M82.17 25.763h352v352h-352v-336zm32 32v288h128v-288zm160 0v288h128v-288z" fill="#4d4d4d"/><path d="M274.956 201.792V58.063H401.871v287.458H274.956z" fill="gray" fill-opacity=".329"/></svg>\ No newline at end of file+<svg viewBox="0 -64 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M62.945-1.63H457.8v394.855H62.945V16.317Zm24.678 22.434v349.002H254.96V20.804Zm190.698 0v351.183h156.081V20.804Z" fill="#4d4d4d" style="stroke-width:1.12175"/><path d="M278.32 196.395V20.805h156.082v351.182H278.321z" fill="gray" fill-opacity=".329" style="fill:gray;fill-opacity:.27058825;stroke-width:1.22575"/></svg>\ No newline at end of filediff --git a/public/js/vvvebjs/plugin-codemirror.js b/public/js/vvvebjs/plugin-codemirror.jsindex 44d7c86..78e0857 100755--- a/public/js/vvvebjs/plugin-codemirror.js+++ b/public/js/vvvebjs/plugin-codemirror.js@@ -103,3 +103,53 @@ Vvveb.ModalCodeEditor.setValue = function (value) {Vvveb.ModalCodeEditor.getValue = function (value) {return this.editor.getValue();};+++Vvveb.CssEditor = {++ oldValue: '',+ doc:false,+ textarea:false,+ editor:false,++ init: function(doc) {+ this.textarea = document.getElementById("css-editor");+ this.editor = CodeMirror.fromTextArea(this.textarea, {+ mode: 'text/css',+ lineNumbers: true,+ autofocus: true,+ lineWrapping: true,+ //viewportMargin:Infinity,+ theme: 'material'+ });++ let self = this;++ document.querySelectorAll('[href="#css-tab"],[href="#configuration"]').forEach( t => t.addEventListener("click", e => {+ self.setValue(Vvveb.StyleManager.getCss());+ }));++ this.editor.getDoc().on("change", function (e, v) {+ if (v.origin != "setValue")+ delay(() => Vvveb.StyleManager.setCss(e.getValue()), 1000);+ });+ },++ getValue: function() {+ return this.editor.getValue();+ },++ setValue: function(value) {+ let scrollInfo = this.editor.getScrollInfo();+ this.editor.setValue(value);+ this.editor.scrollTo(scrollInfo.left, scrollInfo.top);+ let self = this;+ setTimeout(function() {+ self.editor.refresh();+ }, 300);+ //Vvveb.StyleManager.setCss(value);+ },++ destroy: function(element) {+ }+}