更改Jupyter笔记本版本4.x +徽标 [英] Change Jupyter notebook version 4.x+ logo
问题描述
在IPython笔记本版本2.x
中,您可以通过自定义文件夹.ipython/profile_name/static/base/images/logo.png
添加徽标,它将显示我们在笔记本标题上制作的自定义徽标.
In IPython notebook version 2.x
, you can add logo by customizing folder .ipython/profile_name/static/base/images/logo.png
and it will display the custom logo that we made on the header of the notebook.
在Jupyter笔记本电脑版本4.x
中,我们知道它们将目录移动到.jupyter/
而不是.jupyter/base/
和.jupyter/custom/custom.css
.但是,当我尝试自定义~/.jupyter/base/images/logo.png
中的默认配置文件时,就无法自定义徽标了.
In Jupyter notebook version 4.x
, we know that they move directory to .jupyter/
instead i.e. .jupyter/base/
and .jupyter/custom/custom.css
. However, when I try to customize default profile in ~/.jupyter/base/images/logo.png
, I couldn't custom the logo anymore.
问题是:如何在Jupyter笔记本版本4.x
中自定义徽标.我想知道是否有自定义Jupyter笔记本徽标(版本4.x
)的解决方案.我在下面的早期版本2.x
中放置了自定义笔记本徽标的示例快照.
The question is: How to custom logo in Jupyter notebook version 4.x
. I'm wondering if there is a solution to custom Jupyter notebook logo (version 4.x
) or not. I put example snapshot of customized notebook logo in previous version 2.x
below.
推荐答案
So here is the quick solution thanks to @Eric comment (referring to this post). First, I add logo.png
into .jupyter/custom/logo.png
. Then add the following lines to .jupyter/custom/custom.css
in order to load the logo.
#ipython_notebook img{
display:block;
/* logo url here */
background: url("logo.png") no-repeat;
background-size: contain;
width: 233px;
height: 33px;
padding-left: 233px;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
您还可以添加以下css标记以增加徽标填充高度:
You can also add this css tag to increase logo padding height by adding:
#ipython_notebook {
height: 40px !important;
}
这篇关于更改Jupyter笔记本版本4.x +徽标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!