Skip to content

Commit 3ea85bd

Browse files
DenisaCGhbcarlos
authored andcommitted
removed personalized colors from categories
1 parent d6fe036 commit 3ea85bd

File tree

2 files changed

+6
-107
lines changed

2 files changed

+6
-107
lines changed

Untitled.ipynb

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/utils.ts

Lines changed: 6 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ export const TOOLBOX = {
77
{
88
kind: 'category',
99
name: 'Logic',
10-
categorystyle: "logic_category",
11-
blockstyle: 'logic_blocks',
10+
colour: '210',
1211
contents: [
1312
{
1413
kind: 'block',
@@ -48,8 +47,7 @@ export const TOOLBOX = {
4847
{
4948
kind: 'category',
5049
name: 'Loops',
51-
categorystyle: "loops_category",
52-
blockstyle: 'loops_blocks',
50+
colour: '120',
5351
contents: [
5452
{
5553
kind: 'BLOCK',
@@ -83,8 +81,7 @@ export const TOOLBOX = {
8381
{
8482
kind: 'CATEGORY',
8583
name: 'Math',
86-
categorystyle: "math_category",
87-
blockstyle: 'math_blocks',
84+
colour: '230',
8885
contents: [
8986
{
9087
kind: 'BLOCK',
@@ -165,8 +162,7 @@ export const TOOLBOX = {
165162
{
166163
kind: 'CATEGORY',
167164
name: 'Text',
168-
categorystyle: "text_category",
169-
blockstyle: 'text_blocks',
165+
colour: '160',
170166
contents: [
171167
{
172168
kind: 'BLOCK',
@@ -243,8 +239,7 @@ export const TOOLBOX = {
243239
{
244240
kind: 'CATEGORY',
245241
name: 'Lists',
246-
categorystyle: "list_category",
247-
blockstyle: 'list_blocks',
242+
colour: '260',
248243
contents: [
249244
{
250245
kind: 'BLOCK',
@@ -313,8 +308,7 @@ export const TOOLBOX = {
313308
{
314309
kind: 'CATEGORY',
315310
name: 'Color',
316-
categorystyle: "color_category",
317-
blockstyle: 'color_blocks',
311+
colour: '20',
318312
contents: [
319313
{
320314
kind: 'BLOCK',
@@ -346,16 +340,12 @@ export const TOOLBOX = {
346340
{
347341
kind: 'CATEGORY',
348342
colour: '330',
349-
// categorystyle: "variables_category",
350-
// blockstyle: 'variables_blocks',
351343
custom: 'VARIABLE',
352344
name: 'Variables'
353345
},
354346
{
355347
kind: 'CATEGORY',
356348
colour: '290',
357-
// categorystyle: "functions_category",
358-
// blockstyle: 'functions_blocks',
359349
custom: 'PROCEDURE',
360350
name: 'Functions'
361351
}
@@ -368,64 +358,6 @@ export function define_jupyter_theme() : Blockly.Theme{
368358

369359
var jupyterlab_theme = Blockly.Theme.defineTheme('jupyterlab', {
370360
'base': Blockly.Themes.Classic,
371-
'blockStyles': {
372-
"logic_blocks": {
373-
"colourPrimary": getComputedStyle(document.documentElement).getPropertyValue('--jp-error-color1'),
374-
"colourSecondary": getComputedStyle(document.documentElement).getPropertyValue('--jp-error-color3')
375-
},
376-
"loops_blocks": {
377-
"colourPrimary": getComputedStyle(document.documentElement).getPropertyValue('--jp-accent-color0'),
378-
"colourSecondary": getComputedStyle(document.documentElement).getPropertyValue('--jp-accent-color3')
379-
},
380-
"math_blocks": {
381-
"colourPrimary": getComputedStyle(document.documentElement).getPropertyValue('--jp-brand-color0'),
382-
"colourSecondary": getComputedStyle(document.documentElement).getPropertyValue('--jp-brand-color3')
383-
},
384-
"text_blocks": {
385-
"colourPrimary": getComputedStyle(document.documentElement).getPropertyValue('--jp-icon-contrast-color0'),
386-
},
387-
"list_blocks": {
388-
"colourPrimary": getComputedStyle(document.documentElement).getPropertyValue('--jp-icon-contrast-color2')
389-
},
390-
"color_blocks": {
391-
"colourPrimary": getComputedStyle(document.documentElement).getPropertyValue('--jp-warn-color0'),
392-
"colourSecondary": getComputedStyle(document.documentElement).getPropertyValue('--jp-warn-color3')
393-
},
394-
"variables_blocks": {
395-
"colourPrimary": getComputedStyle(document.documentElement).getPropertyValue('--jp-accent-color2'),
396-
"colourSecondary": getComputedStyle(document.documentElement).getPropertyValue('--jp-accent-color3')
397-
},
398-
"functions_blocks": {
399-
"colourPrimary": getComputedStyle(document.documentElement).getPropertyValue('--jp-info-color0'),
400-
"colourSecondary": getComputedStyle(document.documentElement).getPropertyValue('--jp-info-color3')
401-
}
402-
},
403-
'categoryStyles': {
404-
"logic_category": {
405-
"colour": getComputedStyle(document.documentElement).getPropertyValue('--jp-error-color1')
406-
},
407-
"loops_category": {
408-
"colour": getComputedStyle(document.documentElement).getPropertyValue('--jp-accent-color0')
409-
},
410-
"math_category": {
411-
"colour": getComputedStyle(document.documentElement).getPropertyValue('--jp-brand-color0')
412-
},
413-
"text_category": {
414-
"colour": getComputedStyle(document.documentElement).getPropertyValue('--jp-icon-contrast-color0')
415-
},
416-
"list_category": {
417-
"colour": getComputedStyle(document.documentElement).getPropertyValue('--jp-icon-contrast-color2')
418-
},
419-
"color_category": {
420-
"colour": getComputedStyle(document.documentElement).getPropertyValue('--jp-warn-color0')
421-
},
422-
"variables_category": {
423-
"colour": getComputedStyle(document.documentElement).getPropertyValue('--jp-accent-color2')
424-
},
425-
"functions_category": {
426-
"colour": getComputedStyle(document.documentElement).getPropertyValue('--jp-info-color0')
427-
}
428-
},
429361
'componentStyles': {
430362
'workspaceBackgroundColour': getComputedStyle(document.documentElement).getPropertyValue('--jp-layout-color0'),
431363
'toolboxBackgroundColour': getComputedStyle(document.documentElement).getPropertyValue('--jp-layout-color2'),

0 commit comments

Comments
 (0)