Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #131 from jtpio/logo
Browse files Browse the repository at this point in the history
Update logo
  • Loading branch information
jtpio authored May 26, 2021
2 parents 4826d8d + b545003 commit 16d2a1a
Show file tree
Hide file tree
Showing 12 changed files with 360 additions and 80 deletions.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
![retrolab-logo](./retrolab.png)
<h1 align="center">
<img
alt="RetroLab"
src="./logo.png"
width="256"
/>
</h1>

![Github Actions Status](https://github.com/jtpio/retrolab/workflows/Build/badge.svg)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gist/jtpio/77c82c512f6779a1a05ab59d915dfc36/master?urlpath=/retro/notebooks/tour.ipynb)
Expand Down Expand Up @@ -68,6 +74,19 @@ Support for existing JupyterLab themes!

![themes](https://user-images.githubusercontent.com/591645/101953333-75d9c180-3bfa-11eb-868f-af54d1ea7091.gif)

For an even more retro look, you might want to start `retrolab` with the `--retro-logo` CLI flag:

```bash
jupyter retro --retro-logo

# or
# jupyter retro --RetroApp.retro_logo=True
```

Example with the [JupyterLab Miami Nights Theme](https://github.com/timkpaine/jupyterlab_miami_nights) installed as a prebuilt extension:

![image](https://user-images.githubusercontent.com/591645/119634905-77e3b580-be13-11eb-9c4c-d187ebea9df8.png)

### Zen Mode 😌

![compact-zen-mode](https://user-images.githubusercontent.com/591645/101923740-149cf880-3bd0-11eb-9617-e3349a76d034.gif)
Expand Down
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
190 changes: 190 additions & 0 deletions logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions packages/application-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { ITranslator, TranslationManager } from '@jupyterlab/translation';

import { RetroApp, RetroShell, IRetroShell } from '@retrolab/application';

import { jupyterIcon } from '@retrolab/ui-components';
import { jupyterIcon, retroInlineIcon } from '@retrolab/ui-components';

import { Widget } from '@lumino/widgets';

Expand Down Expand Up @@ -84,7 +84,10 @@ const logo: JupyterFrontEndPlugin<void> = {
node.target = '_blank';
node.rel = 'noopener noreferrer';
const logo = new Widget({ node });
jupyterIcon.element({

const retroLogo = PageConfig.getOption('retroLogo') === 'true';
const icon = retroLogo ? retroInlineIcon : jupyterIcon;
icon.element({
container: node,
elementPosition: 'center',
padding: '2px 2px 2px 8px',
Expand Down
6 changes: 4 additions & 2 deletions packages/help-extension/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
const title = (
<>
<span className="jp-AboutRetro-header">
<retroIcon.react height="128px" width="auto" />
<retroIcon.react height="256px" width="auto" />
</span>
</>
);
Expand All @@ -136,7 +136,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
</>
);

return showDialog({
const dialog = new Dialog({
title,
body,
buttons: [
Expand All @@ -147,6 +147,8 @@ const plugin: JupyterFrontEndPlugin<void> = {
})
]
});
dialog.addClass('jp-AboutRetro');
void dialog.launch();
}
});

Expand Down
4 changes: 4 additions & 0 deletions packages/help-extension/style/base.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.jp-AboutRetro .jp-Dialog-header {
justify-content: center;
}

.jp-AboutRetro-header {
display: flex;
flex-direction: row;
Expand Down
4 changes: 2 additions & 2 deletions packages/lab-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
NotebookPanel
} from '@jupyterlab/notebook';

import { jupyterIcon } from '@jupyterlab/ui-components';
import { retroSunIcon } from '@retrolab/ui-components';

import { CommandRegistry } from '@lumino/commands';

Expand Down Expand Up @@ -56,7 +56,7 @@ class RetroButton
createNew(panel: NotebookPanel): IDisposable {
const button = new ToolbarButton({
tooltip: 'Open with RetroLab',
icon: jupyterIcon,
icon: retroSunIcon,
onClick: () => {
this._commands.execute(CommandIDs.openRetro);
}
Expand Down
14 changes: 14 additions & 0 deletions packages/ui-components/src/icon/iconimports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import jupyterSvgstr from '../../style/icons/jupyter.svg';

import retroSvgstr from '../../style/icons/retrolab.svg';

import retroInlineSvgstr from '../../style/icons/retrolabInline.svg';

import retroSunSvgstr from '../../style/icons/retrolabSun.svg';

export const jupyterIcon = new LabIcon({
name: 'retro-ui-components:jupyter',
svgstr: jupyterSvgstr
Expand All @@ -18,3 +22,13 @@ export const retroIcon = new LabIcon({
name: 'retro-ui-components:retrolab',
svgstr: retroSvgstr
});

export const retroInlineIcon = new LabIcon({
name: 'retro-ui-components:retrolabInline',
svgstr: retroInlineSvgstr
});

export const retroSunIcon = new LabIcon({
name: 'retro-ui-components:retroSun',
svgstr: retroSunSvgstr
});
Loading

0 comments on commit 16d2a1a

Please sign in to comment.