-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.html
52 lines (46 loc) · 1.52 KB
/
home.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{% extends "page.html" %}
{% if announcement_home %}
{% set announcement = announcement_home %}
{% endif %}
{% block main %}
<div class="container">
<div id="login-main" class="container-fluid">
<div class="row">
<div class="service-login">
<h1><a href="https://spinnakermanchester.github.io/latest/jupyter.html">User Guide</a></h1>
</div>
</div>
<div class="row">
<div class="text-center">
{% if user.running %}
<a id="stop" role="button" class="btn btn-lg btn-danger" href="/hub/home">Stop My Server</a>
{% endif %}
</div>
</div>
<div class="row">
<p></p>
</div>
<div class="row">
<div class="text-center">
<a role="button" class="btn btn-lg btn-primary" href="/user/{{ user.name }}/tree">Jupyter Notebook Interface</a>
<a role="button" class="btn btn-lg btn-primary" href="/user/{{ user.name }}/lab">JupyterLab Interface</a>
</div>
</div>
<input type="hidden" id="referrer_box" value=""/>
</div>
{% endblock %}
{% block script %}
{{ super() }}
<script type="text/javascript">
require(["home"]);
document.getElementById("referrer_box").value = document.referrer;
if (document.referrer == "https://collab.humanbrainproject.eu/" || document.referrer.includes("ebrains.eu")) {
redirect_to = "/user/{{ user.name }}/lab";
const urlParams = new URLSearchParams(window.location.search);
if (urlParams.has("start_with")) {
redirect_to += "/tree/" + urlParams.get("start_with")
}
window.location.href = redirect_to;
}
</script>
{% endblock %}