Add filename to header area

This commit is contained in:
Thomas Kluyver 2014-11-22 21:58:02 -08:00
parent d567331d4d
commit bc769d24f6
2 changed files with 15 additions and 1 deletions

View File

@ -9,6 +9,12 @@
#texteditor-container {
border-bottom: 1px solid #ccc;
}
#filename {
font-size: 16pt;
display: table;
padding: 0px 5px;
}
</style>
{{super()}}
@ -21,6 +27,12 @@ data-file-path="{{file_path}}"
{% endblock %}
{% block header %}
<span id="filename">{{ basename }}</span>
{% endblock %}
{% block site %}
<div id="menubar-container" class="container">

View File

@ -16,9 +16,11 @@ class EditorHandler(IPythonHandler):
if not self.contents_manager.file_exists(path):
raise web.HTTPError(404, u'File does not exist: %s' % path)
basename = path.rsplit('/', 1)[-1]
self.write(self.render_template('texteditor.html',
file_path=url_escape(path),
page_title=path.rsplit('/', 1)[-1] + " (editing)",
basename=basename,
page_title=basename + " (editing)",
)
)