Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove notebook templates and add basic server templates. #54

Merged
merged 2 commits into from
Jun 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions jupyter_server/base/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,16 @@ def get(self):
post = put = get


class MainHandler(JupyterHandler):
"""Simple handler for base_url."""

def get(self):
html = self.render_template("main.html")
self.write(html)

post = put = get


class FilesRedirectHandler(JupyterHandler):
"""Handler for redirecting relative URLs to the /files/ handler"""

Expand Down Expand Up @@ -859,6 +869,7 @@ def get(self):

default_handlers = [
(r".*/", TrailingSlashHandler),
(r"/", MainHandler),
(r"api", APIVersionHandler),
(r'/(robots\.txt|favicon\.ico)', web.StaticFileHandler),
(r'/metrics', PrometheusMetricsHandler)
Expand Down
Binary file added jupyter_server/static/favicon.ico
Binary file not shown.
103 changes: 0 additions & 103 deletions jupyter_server/templates/edit.html

This file was deleted.

25 changes: 2 additions & 23 deletions jupyter_server/templates/error.html
Original file line number Diff line number Diff line change
@@ -1,42 +1,21 @@
{% extends "page.html" %}

{% block login_widget %}
{% endblock %}

{% block stylesheet %}
{{super()}}
<style type="text/css">
/* disable initial hide */
div#header, div#site {
display: block;
}
</style>
{% endblock %}
{% block site %}

<div class="error">
{% block h1_error %}
<h1>{{status_code}} : {{status_message}}</h1>
{% endblock h1_error %}

{% block error_detail %}
{% if message %}
<p>{% trans %}The error was:{% endtrans %}</p>
<div class="traceback-wrapper">
<pre class="traceback">{{message}}</pre>
</div>
{% endif %}
{% endblock %}
{% endblock error_detail %}
</div>

{% endblock %}

{% block script %}
{{super()}}
<script type='text/javascript'>
require(['jquery'], function($) {
// scroll long tracebacks to the bottom
var tb = $(".traceback")[0];
tb.scrollTop = tb.scrollHeight;
});
</script>
{% endblock script %}
125 changes: 0 additions & 125 deletions jupyter_server/templates/login.html

This file was deleted.

50 changes: 0 additions & 50 deletions jupyter_server/templates/logout.html

This file was deleted.

5 changes: 5 additions & 0 deletions jupyter_server/templates/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% extends "page.html" %}

{% block site %}
<h1>A Jupyter Server is running.</h1>
{% endblock site %}
Loading