Browse Source

Changed buttons in about dialog to be clickable and have outwards links that open in a new tab

cameronoelsen 7 năm trước cách đây
mục cha
commit
8ab8031116

+ 3 - 2
packages/help-extension/src/index.ts

@@ -217,6 +217,7 @@ function activate(app: JupyterLab, mainMenu: IMainMenu, palette: ICommandPalette
   commands.addCommand(CommandIDs.about, {
     label: `About ${info.name}`,
     execute: () => {
+      let jupyterURL = 'https://jupyter.org/about.html';
       let headerLogo = h.div({className: 'jp-About-header-logo'});
       let headerWordmark = h.div({className: 'jp-About-header-wordmark'});
       let release = 'alpha release';
@@ -235,8 +236,8 @@ function activate(app: JupyterLab, mainMenu: IMainMenu, palette: ICommandPalette
 
 
       let externalLinks = h.span({className: 'jp-About-externalLinks'},
-        h.span({className: 'jp-Button-flat'}, "CORE CONTRIBUTORS"),
-        h.span({className: 'jp-Button-flat'}, "ABOUT PROJECT JUPYTER")
+        h.a({href: '#', className: 'jp-Button-flat'}, "CORE CONTRIBUTORS"),
+        h.a({href: jupyterURL, target: '_blank', className: 'jp-Button-flat'}, "ABOUT PROJECT JUPYTER")
       );
       let copyright = h.span({className: 'jp-About-copyright'}, "© 2017 Project Jupyter");
 

+ 1 - 0
packages/theming/style/buttons.css

@@ -36,6 +36,7 @@ button.jp-mod-styled.jp-mod-warn {
 }
 
 .jp-Button-flat {
+    text-decoration: none;
     padding: var(--jp-flat-button-padding);
     color: var(--jp-warn-color1);
     font-weight: 500;