From 02a2c2acb208d101b2e409ab31bbfe39e9d53193 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 21 Sep 2017 23:10:15 +0200 Subject: [PATCH] Add version indicator --- demo.html | 45 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/demo.html b/demo.html index e3192c8a2..0c8f726ef 100644 --- a/demo.html +++ b/demo.html @@ -134,11 +134,16 @@ } #gjs-sm-float, - #gjs-pn-commands, - #gjs-pn-views .fa-cog { + #gjs-pn-views .fa-cog, + #gjs-pn-commands .gjs-pn-buttons { display: none; } + .gjs-pn-panel#gjs-pn-commands { + width: 200px; + box-shadow: none; + } + [data-tooltip]::after { background: rgba(51, 51, 51, 0.9); } @@ -147,9 +152,35 @@ height: 100px; width: 100%; } + + .gjs-logo { + height: 25px; + } + + .gjs-logo-cont { + position: absolute; + left: 25px; + top: 8px; + } + + .gjs-logo-version { + position: absolute; + background-color: #756467; + font-size: 10px; + padding: 1px 7px; + border-radius: 15px; + bottom: 2px; + right: -43px; + } +
+
+ +
+
+
@@ -1313,10 +1344,16 @@ // Store and load events editor.on('storage:load', function(e) { console.log('Loaded ', e); - }) + }); editor.on('storage:store', function(e) { console.log('Stored ', e); - }) + }); + editor.on('load', function() { + var logoCont = document.querySelector('.gjs-logo-cont'); + document.querySelector('.gjs-logo-version').innerHTML = 'v' + grapesjs.version; + var logoPanel = document.querySelector('#gjs-pn-commands'); + logoPanel.appendChild(logoCont); + });