自定义ipython notebook的欢迎页面 [英] Customize welcome page of ipython notebook
问题描述
我可以自订iPython记事本伺服器(2.3版)的到达网页吗?
Can I customize the landing page of an iPython notebook server (version 2.3)?
我的意思是,在起始网页(例如: http:// localhost:8888 / tree
),我想显示欢迎使用John Doe的i [Py]笔记本或修改现有的横幅。 。
这是否可能?
I mean that, at the starting page (something like: http://localhost:8888/tree
), I'd like to display Welcome to the i[Py] Notebook of John Doe or modify the existing banner..
Is this possible?
推荐答案
您可以使用自定义更改横幅标志或替换为文本。 css。
You can change the banner logo or replace it with a text using your custom.css.
要简单地更改文本,请添加以下行:
To simply change the text add the following lines
#ipython_notebook::before{content:"Welcome to my notebook"}
#ipython_notebook img{display:none;}
当然可能还需要一些额外的样式。
Of course some additional styling may be necessary.
要更改横幅标志,请准备标志和安全标志在〜/ .ipython / profile_default / static / custom / logo.png。将以下内容添加到您的custom.css中
To change the banner logo, prepare a logo and safe it e.g. in ~/.ipython/profile_default/static/custom/logo.png. The add the following to your custom.css
#ipython_notebook img{
display:block;
background: url(/static/custom/logo.png) no-repeat;
width: 233px;
height: 33px;
padding-left: 233px;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
使用后面的(和一些额外的CSS着色)
>
With the later (and some additional CSS coloring) my dashboard looks like :)
我从最近的邮件中获得了大部分信息列表处理,以及此处。 这个黑客笔记本也可能感兴趣。
I got most information from this recent mailing list treat, and the necessary CSS from here. This set of "hacking" notebooks might also be of interest.
这篇关于自定义ipython notebook的欢迎页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!