Skip to content

Commit 9dc52c3

Browse files
Merge pull request #8 from markellekelly/master
the final commit :(
2 parents e57b520 + c792ac4 commit 9dc52c3

File tree

6 files changed

+17
-54
lines changed

6 files changed

+17
-54
lines changed

clarity/static/bundle.js

Lines changed: 3 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clarity/templates/error.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<h1>ERROR: NOT FOUND!!!</h1>
1+
<h1>ERROR: NOT FOUND</h1>

clarity/templates/index.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@
1212
}
1313
})();
1414
</script>
15+
<style>
16+
body {
17+
background-color: #F37626;
18+
color:white;
19+
font-size:20vh;
20+
}
21+
</style>
22+
</script>
1523
</head>
1624
<body id="clarity-container">
1725
<h1>HOME</h1>
18-
</body>
26+
</body>

src/widget.ts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import '@jupyterlab/application/style/index.css';
22
import '@jupyterlab/theme-light-extension/style/index.css';
33
import '@jupyterlab/notebook/style/index.css';
4-
import '@jupyterlab/notebook/style/base.css';
54
import '../styles/notebook.css';
65
import '../styles/index.css';
76

@@ -30,8 +29,6 @@ export class ClarityWidget extends Widget {
3029
this.addShortcuts();
3130
this.layout = new BoxLayout({spacing:0, direction:"top-to-bottom"});
3231
this.setup();
33-
this._content;
34-
this._toolbar;
3532
}
3633

3734
setup = () => {
@@ -41,13 +38,8 @@ export class ClarityWidget extends Widget {
4138
this.addClass("jp-Document");
4239
this.addClass("jp-NotebookPanel");
4340
let children = this.nbWidget.children();
44-
const toolbar = (this._toolbar = children.next() as Toolbar);
45-
//let toolChild = tools.children();
46-
//let tool = toolChild.next();
47-
// while (!tool.node.className.includes("jp-KernelName")) {
48-
// tool = toolChild.next();
49-
// }
50-
const content = (this._content = children.next() as Notebook);
41+
const toolbar = children.next() as Toolbar;
42+
const content = children.next() as Notebook;
5143
BoxLayout.setStretch(toolbar, 0);
5244
BoxLayout.setStretch(content, 1);
5345
layout.addWidget(toolbar);
@@ -74,7 +66,6 @@ export class ClarityWidget extends Widget {
7466
const commandMode = '.jp-Notebook.jp-mod-commandMode:focus';
7567
const editMode = '.jp-Notebook.jp-mod-editMode';
7668
let bindings = [
77-
// Tab / code completor shortcuts
7869
{
7970
selector: editModeWithCompleter,
8071
keys: ['Tab'],
@@ -85,20 +76,16 @@ export class ClarityWidget extends Widget {
8576
keys: ['Enter'],
8677
command: CmdIds.selectNotebook
8778
},
88-
// General shortcut available at all times
8979
{ selector: all, keys: ['Shift Enter'], command: CmdIds.runAndAdvance },
9080
];
9181
const editModeShortcuts = [
92-
// Shortcuts available in edit mode
9382
{ keys: ['Ctrl Shift -'], command: CmdIds.split },
9483
{ keys: ['Escape'], command: CmdIds.commandMode }
9584
];
9685

9786
const commandModeShortcuts = [
98-
// Kernel related shortcuts
9987
{ keys: ['I', 'I'], command: CmdIds.interrupt },
10088
{ keys: ['0', '0'], command: CmdIds.restart },
101-
// Cell operation shortcuts
10289
{ keys: ['Enter'], command: CmdIds.editMode },
10390
{ keys: ['Shift M'], command: CmdIds.merge },
10491
{ keys: ['Shift K'], command: CmdIds.extendAbove },
@@ -107,12 +94,10 @@ export class ClarityWidget extends Widget {
10794
{ keys: ['B'], command: CmdIds.insertBelow },
10895
{ keys: ['R', 'R'], command: CmdIds.restartAndRunAll },
10996
{ keys: ['D', 'D'], command: CmdIds.deleteCell },
110-
// Cell movement shortcuts
11197
{ keys: ['J'], command: CmdIds.selectBelow },
11298
{ keys: ['ArrowDown'], command: CmdIds.selectBelow },
11399
{ keys: ['K'], command: CmdIds.selectAbove },
114100
{ keys: ['ArrowUp'], command: CmdIds.selectAbove },
115-
// Other shortcuts
116101
{ keys: ['Z'], command: CmdIds.undo },
117102
{ keys: ['Y'], command: CmdIds.redo }
118103
];
@@ -239,8 +224,6 @@ export class ClarityWidget extends Widget {
239224

240225
private commands: CommandRegistry;
241226
private nbWidget: NotebookPanel;
242-
private _toolbar: Toolbar;
243-
private _content: Notebook;
244227
}
245228

246229
const CmdIds = {

styles/index.css

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,5 @@
11
.clarity-container {
22
margin: 0px auto;
33
padding: 0px 24px;
4-
max-width: 960px; /* Match max-width of notebook */
4+
max-width: 960px;
55
}
6-
/*
7-
body {
8-
background-color: var(--jp-layout-color0);
9-
}
10-
11-
:root {
12-
/* We consisently stick to Roboto if possible *//*
13-
--jp-code-font-family: 'Roboto Mono', monospace;
14-
--jp-content-font-family: 'Roboto', sans-serif;
15-
--jp-ui-font-family: var(--jp-content-font-family);
16-
--jp-cell-prompt-font-family: var(--jp-code-font-family);
17-
--sn-title-font-family: 'Roboto Slab', serif;
18-
}
19-
20-
.sn-RestartAndRunAllIcon {
21-
background-image: url('./restart-runall.svg');
22-
} */

styles/notebook.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
position: relative;
33
height: 100vh;
44
box-shadow: var(--jp-elevation-z4);
5-
}
5+
}

0 commit comments

Comments
 (0)