From 310a7f243e9568d1f80f27a3595d60e62b17ba45 Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Wed, 20 May 2020 14:53:41 +0200 Subject: [PATCH 1/3] chore(powered-by): integrate new logo --- lib/BaseViewer.js | 5 +++-- lib/util/PoweredByUtil.js | 30 +++++++++++++++++------------- resources/logo.svg | 2 +- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/lib/BaseViewer.js b/lib/BaseViewer.js index 26ce4570ef..81136697d5 100644 --- a/lib/BaseViewer.js +++ b/lib/BaseViewer.js @@ -745,7 +745,8 @@ function findBPMNDiagram(definitions, diagramId) { import { open as openPoweredBy, - BPMNIO_IMG + BPMNIO_IMG, + LINK_STYLES as BPMNIO_LINK_STYLES } from './util/PoweredByUtil'; import { @@ -768,7 +769,7 @@ function addProjectLogo(container) { 'target="_blank" ' + 'class="bjs-powered-by" ' + 'title="Powered by bpmn.io" ' + - 'style="position: absolute; bottom: 15px; right: 15px; z-index: 100">' + + 'style="position: absolute; bottom: 15px; right: 15px; z-index: 100; ' + BPMNIO_LINK_STYLES + '">' + img + ''; diff --git a/lib/util/PoweredByUtil.js b/lib/util/PoweredByUtil.js index 2b968e2323..b3250e38e7 100644 --- a/lib/util/PoweredByUtil.js +++ b/lib/util/PoweredByUtil.js @@ -11,16 +11,18 @@ import { // inlined ../../resources/logo.svg -var BPMNIO_LOGO_SVG = ''; +var BPMNIO_LOGO_SVG = ''; -var BPMNIO_LOGO_URL = 'data:image/svg+xml,' + encodeURIComponent(BPMNIO_LOGO_SVG); - -export var BPMNIO_IMG = ''; +export var BPMNIO_IMG = BPMNIO_LOGO_SVG; function css(attrs) { return attrs.join(';'); } +export var LINK_STYLES = css([ + 'color: #404040' +]); + var LIGHTBOX_STYLES = css([ 'z-index: 1001', 'position: fixed', @@ -33,33 +35,35 @@ var LIGHTBOX_STYLES = css([ var BACKDROP_STYLES = css([ 'width: 100%', 'height: 100%', - 'background: rgba(0,0,0,0.2)' + 'background: rgba(40,40,40,0.2)' ]); var NOTICE_STYLES = css([ 'position: absolute', 'left: 50%', 'top: 40%', - 'margin: 0 -130px', + 'transform: translate(-50%)', 'width: 260px', 'padding: 10px', 'background: white', - 'border: solid 1px #AAA', - 'border-radius: 3px', + 'box-shadow: 0 1px 4px rgba(0,0,0,0.3)', 'font-family: Helvetica, Arial, sans-serif', 'font-size: 14px', - 'line-height: 1.2em' + 'display: flex', + 'line-height: 1.3' ]); var LIGHTBOX_MARKUP = '
' + '
' + '
' + - '' + + '' + BPMNIO_IMG + '' + - 'Web-based tooling for BPMN, DMN and CMMN diagrams ' + - 'powered by bpmn.io.' + + '' + + 'Web-based tooling for BPMN, DMN and CMMN diagrams ' + + 'powered by bpmn.io.' + + '' + '
' + '
'; @@ -77,4 +81,4 @@ export function open() { } document.body.appendChild(lightbox); -} \ No newline at end of file +} diff --git a/resources/logo.svg b/resources/logo.svg index 47f2492d7f..1b3e1f0a2b 100644 --- a/resources/logo.svg +++ b/resources/logo.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file From 7a598630b077a1663f98ab31929a130fb8a8d3c3 Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Wed, 20 May 2020 14:54:56 +0200 Subject: [PATCH 2/3] chore(project): update license Reflect changes in project logo. Rename "logo" to "project watermark". --- LICENSE | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/LICENSE b/LICENSE index ff37d36187..b20e936ddb 100644 --- a/LICENSE +++ b/LICENSE @@ -10,14 +10,14 @@ following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -The source code responsible for displaying the bpmn.io logo (two green cogwheels in -a box) that links back to http://bpmn.io as part of rendered diagrams MUST NOT be +The source code responsible for displaying the bpmn.io project watermark that +links back to https://bpmn.io as part of rendered diagrams MUST NOT be removed or changed. When this software is being used in a website or application, -the logo must stay fully visible and not visually overlapped by other elements. +the watermark must stay fully visible and not visually overlapped by other elements. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +OR OTHER DEALINGS IN THE SOFTWARE. From b768fa16e8f85c4da21639cbba6df94f5a0a9909 Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Wed, 20 May 2020 14:55:54 +0200 Subject: [PATCH 3/3] chore(powered-by): open external link with rel="noopener" --- lib/util/PoweredByUtil.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util/PoweredByUtil.js b/lib/util/PoweredByUtil.js index b3250e38e7..721d6ba127 100644 --- a/lib/util/PoweredByUtil.js +++ b/lib/util/PoweredByUtil.js @@ -57,12 +57,12 @@ var LIGHTBOX_MARKUP = '
' + '
' + '
' + - '' + + '' + BPMNIO_IMG + '' + '' + 'Web-based tooling for BPMN, DMN and CMMN diagrams ' + - 'powered by bpmn.io.' + + 'powered by bpmn.io.' + '' + '
' + '
';