From b9d0cdc5f79237bbf107cdc9ddc2278e316ffe72 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Tue, 8 Dec 2020 17:06:11 +0100 Subject: [PATCH] Add link to the Jupyter logo --- jupyterlab_classic/templates/notebooks.html | 2 +- jupyterlab_classic/templates/tree.html | 2 +- packages/application-extension/package.json | 1 + packages/application-extension/src/index.ts | 11 +++++++++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/jupyterlab_classic/templates/notebooks.html b/jupyterlab_classic/templates/notebooks.html index 6f794eba6..e0d63b637 100644 --- a/jupyterlab_classic/templates/notebooks.html +++ b/jupyterlab_classic/templates/notebooks.html @@ -3,7 +3,7 @@ - {{page_config['appName'] | e}} + {{page_config['appName'] | e}} - Notebook diff --git a/jupyterlab_classic/templates/tree.html b/jupyterlab_classic/templates/tree.html index f8abf0f27..afd11eab5 100644 --- a/jupyterlab_classic/templates/tree.html +++ b/jupyterlab_classic/templates/tree.html @@ -3,7 +3,7 @@ - {{page_config['appName'] | e}} + {{page_config['appName'] | e}} - Tree diff --git a/packages/application-extension/package.json b/packages/application-extension/package.json index 7220c9f1b..fd75796dc 100644 --- a/packages/application-extension/package.json +++ b/packages/application-extension/package.json @@ -42,6 +42,7 @@ "@jupyterlab/apputils": "^3.0.0-rc.12", "@jupyterlab/codeeditor": "^3.0.0-rc.12", "@jupyterlab/codemirror": "^3.0.0-rc.12", + "@jupyterlab/coreutils": "^5.0.0-rc.12", "@jupyterlab/docregistry": "^3.0.0-rc.12", "@jupyterlab/mainmenu": "^3.0.0-rc.12", "@jupyterlab/settingregistry": "^3.0.0-rc.12", diff --git a/packages/application-extension/src/index.ts b/packages/application-extension/src/index.ts index 94aa79d14..c53e81d65 100644 --- a/packages/application-extension/src/index.ts +++ b/packages/application-extension/src/index.ts @@ -15,6 +15,8 @@ import { ICommandPalette } from '@jupyterlab/apputils'; +import { PageConfig } from '@jupyterlab/coreutils'; + import { IMainMenu } from '@jupyterlab/mainmenu'; import { ITranslator, TranslationManager } from '@jupyterlab/translation'; @@ -68,9 +70,14 @@ const logo: JupyterFrontEndPlugin = { id: '@jupyterlab-classic/application-extension:logo', autoStart: true, activate: (app: JupyterFrontEnd) => { - const logo = new Widget(); + const baseUrl = PageConfig.getBaseUrl(); + const node = document.createElement('a'); + node.href = `${baseUrl}classic/tree`; + node.target = '_blank'; + node.rel = 'noopener noreferrer'; + const logo = new Widget({ node }); jupyterIcon.element({ - container: logo.node, + container: node, elementPosition: 'center', padding: '2px 2px 2px 8px', height: '28px',