Merge pull request #131 from jtpio/logo

Update logo
pull/6294/head
Jeremy Tuloup 5 years ago committed by GitHub
commit 16d2a1ad9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)
@ -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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@ -0,0 +1,190 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="2048"
height="2048"
viewBox="0 0 541.86664 541.86664"
version="1.1"
id="svg319"
inkscape:version="1.0.2 (1.0.2+r75+1)"
sodipodi:docname="logo.svg"
inkscape:export-filename="/home/jtp/git/jtpio/retrolab/logo.png"
inkscape:export-xdpi="24.000002"
inkscape:export-ydpi="24.000002">
<defs
id="defs313">
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4992"
id="linearGradient11104-2"
gradientUnits="userSpaceOnUse"
x1="-276.77515"
y1="181.02182"
x2="-276.77515"
y2="208.4868"
gradientTransform="matrix(2.3946699,0,0,2.3946699,444.53851,-117.45212)" />
<linearGradient
inkscape:collect="always"
id="linearGradient4992">
<stop
style="stop-color:#faf327;stop-opacity:1"
offset="0"
id="stop4988" />
<stop
style="stop-color:#fa2c8d;stop-opacity:1"
offset="1"
id="stop4990" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4992"
id="linearGradient22598"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(8.1220011,0,0,8.1220011,2145.002,-4828.808)"
x1="-143.43352"
y1="645.45728"
x2="-143.43352"
y2="751.20312" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient19205"
id="linearGradient22600"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(18.88122,-401.28647)"
x1="-33.991322"
y1="344.72861"
x2="-25.952034"
y2="362.60028" />
<linearGradient
inkscape:collect="always"
id="linearGradient19205">
<stop
style="stop-color:#ff9955;stop-opacity:1"
offset="0"
id="stop19201" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop19203" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient19205"
id="linearGradient22602"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.49643156,0,0,0.49643156,-126.97876,-208.55879)"
x1="-33.991322"
y1="344.72861"
x2="-25.952034"
y2="362.60028" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient19205"
id="linearGradient22604"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.64522564,0,0,0.64522564,-113.30702,-194.34482)"
x1="-33.991322"
y1="344.72861"
x2="-25.952034"
y2="362.60028" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35"
inkscape:cx="800.99538"
inkscape:cy="1222.6708"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="2048"
inkscape:window-height="1128"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
units="px" />
<metadata
id="metadata316">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(436.78015,15.801637)">
<g
id="g526"
transform="translate(0,44.18345)">
<g
id="g20249-3-3"
transform="matrix(2.1489458,0,0,2.1489458,4.8812138,178.19814)"
style="stroke-width:0.739316">
<path
id="path4608-8-6-9"
style="mix-blend-mode:normal;fill:url(#linearGradient22598);fill-opacity:1;stroke:none;stroke-width:3.00235;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="M 995.89258 373.20117 A 434.86336 434.86336 0 0 0 561.0293 808.06445 A 434.86336 434.86336 0 0 0 561.50977 828.48633 L 1430.2754 828.48633 A 434.86336 434.86336 0 0 0 1430.7559 808.06445 A 434.86336 434.86336 0 0 0 995.89258 373.20117 z M 569.38672 892.90625 A 434.86336 434.86336 0 0 0 578.19336 929.0293 L 1413.5918 929.0293 A 434.86336 434.86336 0 0 0 1422.3984 892.90625 L 569.38672 892.90625 z M 602.52734 993.44922 A 434.86336 434.86336 0 0 0 620.32617 1027.2773 L 1371.459 1027.2773 A 434.86336 434.86336 0 0 0 1389.2598 993.44922 L 602.52734 993.44922 z M 648.51172 1069.6543 A 434.86336 434.86336 0 0 0 674.72852 1101.248 L 1317.0586 1101.248 A 434.86336 434.86336 0 0 0 1343.2773 1069.6543 L 648.51172 1069.6543 z M 717.91211 1142.4746 A 434.86336 434.86336 0 0 0 752.45508 1168.4004 L 1239.332 1168.4004 A 434.86336 434.86336 0 0 0 1273.877 1142.4746 L 717.91211 1142.4746 z M 842.85742 1215.1074 A 434.86336 434.86336 0 0 0 995.89258 1242.9277 A 434.86336 434.86336 0 0 0 1148.9355 1215.1074 L 842.85742 1215.1074 z "
transform="matrix(0.12312239,0,0,0.12312239,-205.52466,-110.83724)" />
<g
id="g1000">
<g
id="g5254-4-1-4"
style="mix-blend-mode:normal;fill:#ffffff;stroke-width:0.739316"
transform="translate(58.57305,-701.24771)" />
</g>
<circle
style="mix-blend-mode:normal;fill:url(#linearGradient22600);fill-opacity:1;stroke:none;stroke-width:0.739316;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="circle21057-1-4-4-9"
cx="-17.47628"
cy="-50.398323"
r="11.615452" />
<circle
style="mix-blend-mode:normal;fill:url(#linearGradient22602);fill-opacity:1;stroke:none;stroke-width:0.36702;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="circle19287-4-7-0"
cx="-145.02777"
cy="-34.366829"
r="5.7662768" />
<circle
style="mix-blend-mode:normal;fill:url(#linearGradient22604);fill-opacity:1;stroke:none;stroke-width:0.477026;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="circle19291-4-8-8"
cx="-136.76582"
cy="32.057243"
r="7.4945874" />
</g>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:100;font-stretch:normal;font-size:89.8398px;line-height:1.25;font-family:Overpass;-inkscape-font-specification:'Overpass Thin';letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient11104-2);fill-opacity:1;stroke:none;stroke-width:0.285801"
x="-430.27777"
y="381.86655"
id="text6471-7-96"><tspan
sodipodi:role="line"
id="tspan6469-9-3"
style="font-style:italic;font-variant:normal;font-weight:800;font-stretch:normal;font-family:'JetBrains Mono';-inkscape-font-specification:'JetBrains Mono Ultra-Bold Italic';fill:url(#linearGradient11104-2);fill-opacity:1;stroke-width:0.285801"
x="-430.27777"
y="381.86655">RETROLAB</tspan></text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.7 KiB

@ -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';
@ -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',

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

@ -1,3 +1,7 @@
.jp-AboutRetro .jp-Dialog-header {
justify-content: center;
}
.jp-AboutRetro-header {
display: flex;
flex-direction: row;

@ -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';
@ -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);
}

@ -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
@ -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
});

@ -1,69 +1,39 @@
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="127.99995"
height="20.667049"
version="1.1"
viewBox="0 0 33.866486 5.4682107"
id="svg54"
sodipodi:docname="retrolab.svg"
inkscape:version="1.0.2 (1.0.2+r75+1)"
inkscape:export-filename="/home/jtp/git/jtpio/retrolab/retrolab.png"
inkscape:export-xdpi="595.31201"
inkscape:export-ydpi="595.31201">
<metadata
id="metadata60">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs58" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2048"
inkscape:window-height="1128"
id="namedview56"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="5.1367188"
inkscape:cx="79.912993"
inkscape:cy="44.490967"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg54"
inkscape:document-rotation="0" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.96428px;line-height:1.25;font-family:'3270 Condensed';-inkscape-font-specification:'3270 Condensed, ';letter-spacing:0px;word-spacing:0px;fill:#7f006d;fill-opacity:1;stroke-width:0.224108"
x="-0.53815222"
y="5.9074607"
id="text887"><tspan
sodipodi:role="line"
id="tspan885"
x="-0.53815222"
y="5.9074607"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'3270 Condensed';-inkscape-font-specification:'3270 Condensed, ';fill:#7f006d;fill-opacity:1;stroke-width:0.224108">RetroLab</tspan></text>
<svg width="2048" height="2048" version="1.1" viewBox="0 0 541.87 541.87" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<linearGradient id="linearGradient11104-2" x1="-276.78" x2="-276.78" y1="181.02" y2="208.49" gradientTransform="matrix(2.3947 0 0 2.3947 444.54 -117.45)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient4992"/>
<linearGradient id="linearGradient4992">
<stop stop-color="#faf327" offset="0"/>
<stop stop-color="#fa2c8d" offset="1"/>
</linearGradient>
<linearGradient id="linearGradient22598" x1="-143.43" x2="-143.43" y1="645.46" y2="751.2" gradientTransform="matrix(8.122 0 0 8.122 2145 -4828.8)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient4992"/>
<linearGradient id="linearGradient22600" x1="-33.991" x2="-25.952" y1="344.73" y2="362.6" gradientTransform="translate(18.881 -401.29)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient19205"/>
<linearGradient id="linearGradient19205">
<stop stop-color="#f95" offset="0"/>
<stop stop-color="#fff" stop-opacity="0" offset="1"/>
</linearGradient>
<linearGradient id="linearGradient22602" x1="-33.991" x2="-25.952" y1="344.73" y2="362.6" gradientTransform="matrix(.49643 0 0 .49643 -126.98 -208.56)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient19205"/>
<linearGradient id="linearGradient22604" x1="-33.991" x2="-25.952" y1="344.73" y2="362.6" gradientTransform="matrix(.64523 0 0 .64523 -113.31 -194.34)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient19205"/>
</defs>
<g transform="translate(436.78 15.802)">
<g transform="translate(0 44.183)">
<g transform="matrix(2.1489 0 0 2.1489 4.8812 178.2)" stroke-width=".73932">
<path transform="matrix(.12312 0 0 .12312 -205.52 -110.84)" d="m995.89 373.2a434.86 434.86 0 0 0-434.86 434.86 434.86 434.86 0 0 0 0.48047 20.422h868.77a434.86 434.86 0 0 0 0.4805-20.422 434.86 434.86 0 0 0-434.86-434.86zm-426.51 519.71a434.86 434.86 0 0 0 8.8066 36.123h835.4a434.86 434.86 0 0 0 8.8066-36.123h-853.01zm33.141 100.54a434.86 434.86 0 0 0 17.799 33.828h751.13a434.86 434.86 0 0 0 17.801-33.828h-786.73zm45.984 76.205a434.86 434.86 0 0 0 26.217 31.594h642.33a434.86 434.86 0 0 0 26.219-31.594h-694.77zm69.4 72.82a434.86 434.86 0 0 0 34.543 25.926h486.88a434.86 434.86 0 0 0 34.545-25.926h-555.96zm124.95 72.633a434.86 434.86 0 0 0 153.04 27.82 434.86 434.86 0 0 0 153.04-27.82h-306.08z" fill="url(#linearGradient22598)" style="mix-blend-mode:normal"/>
<g>
<circle cx="-17.476" cy="-50.398" r="11.615" fill="url(#linearGradient22600)" style="mix-blend-mode:normal"/>
<circle cx="-145.03" cy="-34.367" r="5.7663" fill="url(#linearGradient22602)" style="mix-blend-mode:normal"/>
<circle cx="-136.77" cy="32.057" r="7.4946" fill="url(#linearGradient22604)" style="mix-blend-mode:normal"/>
</g>
</g>
<g fill="url(#linearGradient11104-2)" stroke-width=".2858" aria-label="RETROLAB">
<path d="m-397.29 345.41q5.7466 0 8.6857-2.6759 2.983-2.6759 2.983-7.8522 0-3.2462-2.0618-4.7376-2.0179-1.5354-6.4046-1.5354h-6.9749l-3.3339 16.801zm-9.3437 11.669-4.8692 24.785h-16.889l12.765-65.494h24.96q10.791 0 16.362 4.0358 5.5711 4.0358 5.5711 11.888 0 7.9399-4.3867 13.072-4.3867 5.1324-11.888 5.8782 3.4216 0.70187 5.7027 3.5094 2.2811 2.7636 3.9919 8.5102l5.5711 18.6h-16.801l-4.9131-16.275q-1.4915-4.8692-3.641-6.6678-2.1056-1.8424-6.1414-1.8424z"/>
<path d="m-346.45 316.37h45.534l-2.5004 12.765h-28.645l-2.3688 12.195h26.978l-2.5443 12.765h-26.934l-2.8952 15.003h29.566l-2.4127 12.765h-46.543z"/>
<path d="m-292.89 316.37h60.361l-2.5004 12.765h-21.758l-10.265 52.728h-16.889l10.265-52.728h-21.758z"/>
<path d="m-205.46 345.41q5.7466 0 8.6857-2.6759 2.983-2.6759 2.983-7.8522 0-3.2462-2.0618-4.7376-2.0179-1.5354-6.4046-1.5354h-6.9749l-3.3339 16.801zm-9.3437 11.669-4.8692 24.785h-16.889l12.765-65.494h24.96q10.791 0 16.362 4.0358 5.5711 4.0358 5.5711 11.888 0 7.9399-4.3867 13.072-4.3867 5.1324-11.888 5.8782 3.4216 0.70187 5.7027 3.5094 2.2811 2.7636 3.9919 8.5102l5.5711 18.6h-16.801l-4.9131-16.275q-1.4915-4.8692-3.641-6.6678-2.1056-1.8424-6.1414-1.8424z"/>
<path d="m-114 343.22q0-7.7206-3.5094-11.756-3.4655-4.0358-10.089-4.0358-8.7734 0-14.739 7.8961-5.9221 7.8522-5.9221 19.696 0 7.5451 3.4655 11.713t9.6508 4.1674q5.0447 0 8.9489-2.1056 3.948-2.1495 6.7117-6.3169 2.632-3.9919 4.0358-8.9928 1.4476-5.0008 1.4476-10.265zm-11.142-28.031q13.072 0 21.012 7.2819 7.9838 7.2381 7.9838 18.951 0 7.9838-2.4566 15.09-2.4127 7.1065-7.0626 12.765-5.7027 6.9749-13.511 10.44-7.7645 3.4216-17.942 3.4216-13.029 0-20.968-7.2381-7.9399-7.2381-7.9399-18.994 0-8.0277 2.4127-15.134t7.1065-12.809q5.615-6.931 13.379-10.353 7.8083-3.4216 17.986-3.4216z"/>
<path d="m-78.244 316.37h16.889l-10.265 52.728h29.566l-2.4127 12.765h-46.543z"/>
<path d="m8.4808 369.93h-26.145l-6.4923 11.932h-17.328l37.024-65.494h19.302l11.581 65.494h-16.055zm-19.784-11.888h17.591l-3.948-25.224z"/>
<path d="m69.807 341.73q4.5183 0 7.0626-2.2811t2.5443-6.273q0-2.5882-1.7986-3.948-1.7547-1.3599-5.0886-1.3599h-9.4314l-2.7198 13.862zm-5.0008 28.645q5.7905 0 8.905-2.7636 3.1146-2.7636 3.1146-7.9399 0-3.29-2.1495-4.8692-2.1495-1.5792-6.5801-1.5792h-9.9578l-3.3339 17.152zm20.003-23.557q4.299 1.2283 6.6239 4.5183 2.3688 3.2462 2.3688 8.0716 0 10.572-7.8961 16.538-7.8522 5.9221-22.109 5.9221h-28.031l12.765-65.494h25.311q11.669 0 17.24 3.4216 5.615 3.4216 5.615 10.572 0 6.0098-3.29 10.572-3.29 4.5183-8.5979 5.8782z"/>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

@ -0,0 +1,39 @@
<svg width="4240.5" height="879.73" version="1.1" viewBox="0 0 1122 232.76" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<linearGradient id="linearGradient11104-2" x1="-276.78" x2="-276.78" y1="181.02" y2="208.49" gradientTransform="matrix(2.3947 0 0 2.3947 444.54 -117.45)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient4992"/>
<linearGradient id="linearGradient4992">
<stop stop-color="#faf327" offset="0"/>
<stop stop-color="#fa2c8d" offset="1"/>
</linearGradient>
<linearGradient id="linearGradient22598" x1="-143.43" x2="-143.43" y1="645.46" y2="751.2" gradientTransform="matrix(8.122 0 0 8.122 2145 -4828.8)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient4992"/>
<linearGradient id="linearGradient22600" x1="-33.991" x2="-25.952" y1="344.73" y2="362.6" gradientTransform="translate(18.881 -401.29)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient19205"/>
<linearGradient id="linearGradient19205">
<stop stop-color="#f95" offset="0"/>
<stop stop-color="#fff" stop-opacity="0" offset="1"/>
</linearGradient>
<linearGradient id="linearGradient22602" x1="-33.991" x2="-25.952" y1="344.73" y2="362.6" gradientTransform="matrix(.49643 0 0 .49643 -126.98 -208.56)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient19205"/>
<linearGradient id="linearGradient22604" x1="-33.991" x2="-25.952" y1="344.73" y2="362.6" gradientTransform="matrix(.64523 0 0 .64523 -113.31 -194.34)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient19205"/>
</defs>
<g transform="translate(838.25 -264.07)">
<g transform="translate(0 44.183)">
<g transform="matrix(2.1489 0 0 2.1489 -512.88 360.65)" stroke-width=".73932">
<path transform="matrix(.12312 0 0 .12312 -205.52 -110.84)" d="m995.89 373.2a434.86 434.86 0 0 0-434.86 434.86 434.86 434.86 0 0 0 0.48047 20.422h868.77a434.86 434.86 0 0 0 0.4805-20.422 434.86 434.86 0 0 0-434.86-434.86zm-426.51 519.71a434.86 434.86 0 0 0 8.8066 36.123h835.4a434.86 434.86 0 0 0 8.8066-36.123zm33.141 100.54a434.86 434.86 0 0 0 17.799 33.828h751.13a434.86 434.86 0 0 0 17.801-33.828zm45.984 76.205a434.86 434.86 0 0 0 26.217 31.594h642.33a434.86 434.86 0 0 0 26.219-31.594zm69.4 72.82a434.86 434.86 0 0 0 34.543 25.926h486.88a434.86 434.86 0 0 0 34.545-25.926zm124.95 72.633a434.86 434.86 0 0 0 153.04 27.82 434.86 434.86 0 0 0 153.04-27.82z" fill="url(#linearGradient22598)" style="mix-blend-mode:normal"/>
<g>
<circle cx="-17.476" cy="-50.398" r="11.615" fill="url(#linearGradient22600)" style="mix-blend-mode:normal"/>
<circle cx="-145.03" cy="-34.367" r="5.7663" fill="url(#linearGradient22602)" style="mix-blend-mode:normal"/>
<circle cx="-136.77" cy="32.057" r="7.4946" fill="url(#linearGradient22604)" style="mix-blend-mode:normal"/>
</g>
</g>
<g transform="matrix(1.5533 0 0 1.5533 132.2 -206.08)" fill="url(#linearGradient11104-2)" stroke-width=".2858" aria-label="RETROLAB">
<path d="m-397.29 345.41q5.7466 0 8.6857-2.6759 2.983-2.6759 2.983-7.8522 0-3.2462-2.0618-4.7376-2.0179-1.5354-6.4046-1.5354h-6.9749l-3.3339 16.801zm-9.3437 11.669-4.8692 24.785h-16.889l12.765-65.494h24.96q10.791 0 16.362 4.0358 5.5711 4.0358 5.5711 11.888 0 7.9399-4.3867 13.072-4.3867 5.1324-11.888 5.8782 3.4216 0.70187 5.7027 3.5094 2.2811 2.7636 3.9919 8.5102l5.5711 18.6h-16.801l-4.9131-16.275q-1.4915-4.8692-3.641-6.6678-2.1056-1.8424-6.1414-1.8424z"/>
<path d="m-346.45 316.37h45.534l-2.5004 12.765h-28.645l-2.3688 12.195h26.978l-2.5443 12.765h-26.934l-2.8952 15.003h29.566l-2.4127 12.765h-46.543z"/>
<path d="m-292.89 316.37h60.361l-2.5004 12.765h-21.758l-10.265 52.728h-16.889l10.265-52.728h-21.758z"/>
<path d="m-205.46 345.41q5.7466 0 8.6857-2.6759 2.983-2.6759 2.983-7.8522 0-3.2462-2.0618-4.7376-2.0179-1.5354-6.4046-1.5354h-6.9749l-3.3339 16.801zm-9.3437 11.669-4.8692 24.785h-16.889l12.765-65.494h24.96q10.791 0 16.362 4.0358 5.5711 4.0358 5.5711 11.888 0 7.9399-4.3867 13.072-4.3867 5.1324-11.888 5.8782 3.4216 0.70187 5.7027 3.5094 2.2811 2.7636 3.9919 8.5102l5.5711 18.6h-16.801l-4.9131-16.275q-1.4915-4.8692-3.641-6.6678-2.1056-1.8424-6.1414-1.8424z"/>
<path d="m-114 343.22q0-7.7206-3.5094-11.756-3.4655-4.0358-10.089-4.0358-8.7734 0-14.739 7.8961-5.9221 7.8522-5.9221 19.696 0 7.5451 3.4655 11.713t9.6508 4.1674q5.0447 0 8.9489-2.1056 3.948-2.1495 6.7117-6.3169 2.632-3.9919 4.0358-8.9928 1.4476-5.0008 1.4476-10.265zm-11.142-28.031q13.072 0 21.012 7.2819 7.9838 7.2381 7.9838 18.951 0 7.9838-2.4566 15.09-2.4127 7.1065-7.0626 12.765-5.7027 6.9749-13.511 10.44-7.7645 3.4216-17.942 3.4216-13.029 0-20.968-7.2381-7.9399-7.2381-7.9399-18.994 0-8.0277 2.4127-15.134t7.1065-12.809q5.615-6.931 13.379-10.353 7.8083-3.4216 17.986-3.4216z"/>
<path d="m-78.244 316.37h16.889l-10.265 52.728h29.566l-2.4127 12.765h-46.543z"/>
<path d="m8.4808 369.93h-26.145l-6.4923 11.932h-17.328l37.024-65.494h19.302l11.581 65.494h-16.055zm-19.784-11.888h17.591l-3.948-25.224z"/>
<path d="m69.807 341.73q4.5183 0 7.0626-2.2811t2.5443-6.273q0-2.5882-1.7986-3.948-1.7547-1.3599-5.0886-1.3599h-9.4314l-2.7198 13.862zm-5.0008 28.645q5.7905 0 8.905-2.7636 3.1146-2.7636 3.1146-7.9399 0-3.29-2.1495-4.8692-2.1495-1.5792-6.5801-1.5792h-9.9578l-3.3339 17.152zm20.003-23.557q4.299 1.2283 6.6239 4.5183 2.3688 3.2462 2.3688 8.0716 0 10.572-7.8961 16.538-7.8522 5.9221-22.109 5.9221h-28.031l12.765-65.494h25.311q11.669 0 17.24 3.4216 5.615 3.4216 5.615 10.572 0 6.0098-3.29 10.572-3.29 4.5183-8.5979 5.8782z"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.4 KiB

@ -0,0 +1,25 @@
<svg width="2048" height="1935.1" version="1.1" viewBox="0 0 541.87 512" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<linearGradient id="linearGradient22598" x1="-143.43" x2="-143.43" y1="645.46" y2="751.2" gradientTransform="matrix(8.122 0 0 8.122 2145 -4828.8)" gradientUnits="userSpaceOnUse">
<stop stop-color="#faf327" offset="0"/>
<stop stop-color="#fa2c8d" offset="1"/>
</linearGradient>
<linearGradient id="linearGradient22600" x1="-33.991" x2="-25.952" y1="344.73" y2="362.6" gradientTransform="translate(18.881 -401.29)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient19205"/>
<linearGradient id="linearGradient19205">
<stop stop-color="#f95" offset="0"/>
<stop stop-color="#fff" stop-opacity="0" offset="1"/>
</linearGradient>
<linearGradient id="linearGradient22602" x1="-33.991" x2="-25.952" y1="344.73" y2="362.6" gradientTransform="matrix(.49643 0 0 .49643 -126.98 -208.56)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient19205"/>
<linearGradient id="linearGradient22604" x1="-33.991" x2="-25.952" y1="344.73" y2="362.6" gradientTransform="matrix(.64523 0 0 .64523 -113.31 -194.34)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient19205"/>
</defs>
<g transform="translate(164.04 182.34)">
<g transform="matrix(3.5327 0 0 3.5327 383.6 103.21)" stroke-width=".73932">
<path transform="matrix(.12312 0 0 .12312 -205.52 -110.84)" d="m995.89 373.2a434.86 434.86 0 0 0-434.86 434.86 434.86 434.86 0 0 0 0.48047 20.422h868.77a434.86 434.86 0 0 0 0.4805-20.422 434.86 434.86 0 0 0-434.86-434.86zm-426.51 519.71a434.86 434.86 0 0 0 8.8066 36.123h835.4a434.86 434.86 0 0 0 8.8066-36.123zm33.141 100.54a434.86 434.86 0 0 0 17.799 33.828h751.13a434.86 434.86 0 0 0 17.801-33.828zm45.984 76.205a434.86 434.86 0 0 0 26.217 31.594h642.33a434.86 434.86 0 0 0 26.219-31.594zm69.4 72.82a434.86 434.86 0 0 0 34.543 25.926h486.88a434.86 434.86 0 0 0 34.545-25.926zm124.95 72.633a434.86 434.86 0 0 0 153.04 27.82 434.86 434.86 0 0 0 153.04-27.82z" fill="url(#linearGradient22598)" style="mix-blend-mode:normal"/>
<g>
<circle cx="-17.476" cy="-50.398" r="11.615" fill="url(#linearGradient22600)" style="mix-blend-mode:normal"/>
<circle cx="-145.03" cy="-34.367" r="5.7663" fill="url(#linearGradient22602)" style="mix-blend-mode:normal"/>
<circle cx="-136.77" cy="32.057" r="7.4946" fill="url(#linearGradient22604)" style="mix-blend-mode:normal"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -1,7 +1,8 @@
import os
from os.path import join as pjoin
from jupyter_core.application import base_aliases, base_flags
from jupyter_core.application import base_aliases
from jupyter_server.serverapp import flags
from jupyter_server.base.handlers import JupyterHandler
from jupyter_server.extension.handler import (
ExtensionHandlerMixin,
@ -33,11 +34,12 @@ class RetroHandler(ExtensionHandlerJinjaMixin, ExtensionHandlerMixin, JupyterHan
page_config = {
"appVersion": version,
"baseUrl": self.base_url,
"terminalsAvailable": self.settings.get('terminals_available', False),
"terminalsAvailable": self.settings.get("terminals_available", False),
"token": self.settings["token"],
"fullStaticUrl": ujoin(self.base_url, "static", self.name),
"frontendUrl": ujoin(self.base_url, "retro/"),
"collaborative": app.collaborative,
"retroLogo": app.retro_logo,
}
mathjax_config = self.settings.get("mathjax_config", "TeX-AMS_HTML-full,Safe")
@ -103,6 +105,12 @@ class RetroNotebookHandler(RetroHandler):
return self.write(tpl)
aliases = dict(base_aliases)
aliases.update({
"retro-logo": "RetroApp.retro_logo"
})
class RetroApp(NBClassicConfigShimMixin, LabServerApp):
name = "retro"
app_name = "RetroLab"
@ -122,20 +130,26 @@ class RetroApp(NBClassicConfigShimMixin, LabServerApp):
collaborative = Bool(
False, config=True, help="Whether to enable collaborative mode."
)
retro_logo = Bool(
False, config=True, help="Whether to use the RetroLab inline logo."
)
aliases = dict(base_aliases)
flags = dict(base_flags)
flags = flags
flags["collaborative"] = (
{"RetroApp": {"collaborative": True}},
"Whether to enable collaborative mode.",
)
flags["retro-logo"] = (
{"RetroApp": {"retro_logo": True}},
"Whether to use the RetroLab inline logo",
)
def initialize_handlers(self):
self.handlers.append(
(
rf"/{self.file_url_prefix}/((?!.*\.ipynb($|\?)).*)",
web.RedirectHandler,
{"url": "/retro/edit/{0}"}
{"url": "/retro/edit/{0}"},
)
)
self.handlers.append(("/retro/tree(.*)", RetroTreeHandler))

Loading…
Cancel
Save