如何编辑jupyter实验室主题

Sea*_*123 8 css jupyter-lab

前一个问题所述,现在可以编辑Jupyter Lab主题.但是,这个主题对我个人来说有一些问题.例如,它使绘图轴难以阅读,因为它们的默认颜色是黑色.其他用户 类似的问题.因此,我想分叉现有主题并使绘图显示单元格呈浅灰色.怎么做到这一点?

我试图找到相应的.css文件,但我能找到的只是/usr/local/share/jupyter/lab/themes/@jupyterlab/theme-dark-extension/.我知道我可以编辑它index.css以实现我想要的,但是我该如何分叉该主题并进行编辑呢?如何让Jupyter Lab了解我的自定义主题?

adn*_*2nd 1

我们正在使用版本 0.35.x ...以下步骤对我有用...它将创建浅色主题的克隆,将其安装在 jupyter lab 中,您可以从设置菜单中选择它。你可以自定义这个主题,构建它并在jupyter lab中产生效果

  • 从这里安装miniconda https://docs.conda.io/en/latest/miniconda.html(选择python3.7之一)
  • 打开 Anaconda 终端,[在 Windows 中转到搜索类型​​ Anaconda,选择终端]
  • 然后运行这个conda create -n jupyterlab-ext -c conda-forge --override-channels nodejs jupyterlab cookiecutter git
  • 从这里克隆 jupyterlab https://github.com/jupyterlab/jupyterlab.git
  • 切换分支与git checkout 0.35.x
  • 然后 jlpm install jlpm build npm run create:theme
  • 将主题文件夹复制到您选择的本地主题文件夹以进行扩展开发。将 tsconfig.json 内容替换为以下内容

{ "compilerOptions": { "declaration": true, "lib": ["es2015", "dom"], "module": "commonjs", "moduleResolution": "node", "noEmitOnError": true, "noUnusedLocals": true, "outDir": "lib", "rootDir": "src", "strict": true, "strictNullChecks": false, "target": "es2015", "types": [] }, "include": ["src/*"] } [通过此处的步骤创建https://jupyterlab.readthedocs.io/en/stable/developer/xkcd_extension_tutorial.html#xkcd-extension-tutorial]

主题文件夹内..

  • 运行以下命令jlpm install,,jlpm run buildjlpm run build:webpack
  • 打开另一个 conda 终端,进入 repo 文件夹并运行conda activate jupyterlab-ext then jupyter labextension install .
  • conda activate jupyterlab-ext然后在 conda 终端中,jupyter lab --watch

对于 1.0 版本,可以使用这个饼干切割器... https://github.com/jupyterlab/theme-cookiecutter