Yusin commited on
Commit
6aafb2e
·
verified ·
1 Parent(s): 8d193bb

Update login.html

Browse files
Files changed (1) hide show
  1. login.html +27 -31
login.html CHANGED
@@ -1,21 +1,20 @@
1
  {% extends "page.html" %}
2
 
 
3
  {% block stylesheet %}
4
  {% endblock %}
5
 
6
  {% block site %}
 
7
  <div id="jupyter-main-app" class="container">
 
8
  <img src="https://huggingface.co/front/assets/huggingface_logo-noborder.svg" alt="Hugging Face Logo">
9
- <h4>You can just run here or duplicate this Space to run it private.</h4>
10
- <br>
11
- <a class="duplicate-button" style="display:inline-block" target="_blank" href="https://huggingface.co/spaces/DockerTemplates/jupyterlab?duplicate=true">
12
- <img style="margin: 0" src="https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&amp;style=flat&amp;logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&amp;logoWidth=14" alt="Duplicate Space">
13
- </a>
14
- <br><br>
15
- <h4>The default token is <span style="color:orange;">huggingface</span></h4>
16
- <h4>You can keep all settings default</h4>
17
-
18
  {% if login_available %}
 
19
  <div class="row">
20
  <div class="navbar col-sm-8">
21
  <div class="navbar-inner">
@@ -24,12 +23,14 @@
24
  <form action="{{base_url}}login?next={{next}}" method="post" class="navbar-form pull-left">
25
  {{ xsrf_form_html() | safe }}
26
  {% if token_available %}
27
- <label for="password_input"><strong>Token:</strong></label>
 
28
  {% else %}
29
- <label for="password_input"><strong>Password:</strong></label>
30
  {% endif %}
31
  <input type="password" name="password" id="password_input" class="form-control">
32
- <button type="submit" class="btn btn-default" id="login_submit">Log in</button>
 
33
  </form>
34
  </div>
35
  </div>
@@ -37,11 +38,13 @@
37
  </div>
38
  </div>
39
  {% else %}
40
- <p>No login available, you shouldn't be seeing this page.</p>
41
  {% endif %}
42
 
43
- <p>This template was created by <a href="https://twitter.com/camenduru" target="_blank">camenduru</a> and others.</p>
44
-
 
 
45
  {% if message %}
46
  <div class="row">
47
  {% for key in message %}
@@ -51,22 +54,15 @@
51
  {% endfor %}
52
  </div>
53
  {% endif %}
 
 
 
 
 
54
  </div>
 
55
  {% endblock %}
56
 
57
- //{% block script %}
58
- //<script>
59
- // 自动填入 token 并自动登录
60
- //window.onload = function () {
61
- // const token = "GeoAgent"; // 你可以改成自己的 token
62
- // const input = document.getElementById("password_input");
63
- // const button = document.getElementById("login_submit");
64
- // if (input && button) {
65
- // input.value = token;
66
- // setTimeout(() => {
67
- // button.click();
68
- // }, 500); // 等页面渲染后再点击
69
- // }
70
- //};
71
- //</script>
72
- //{% endblock %}
 
1
  {% extends "page.html" %}
2
 
3
+
4
  {% block stylesheet %}
5
  {% endblock %}
6
 
7
  {% block site %}
8
+
9
  <div id="jupyter-main-app" class="container">
10
+
11
  <img src="https://huggingface.co/front/assets/huggingface_logo-noborder.svg" alt="Hugging Face Logo">
12
+ <h4>Welcome to JupyterLab</h4>
13
+
14
+ <h5>The default token is <span style="color:orange;"> the one I told you </span></h5>
15
+
 
 
 
 
 
16
  {% if login_available %}
17
+ {# login_available means password-login is allowed. Show the form. #}
18
  <div class="row">
19
  <div class="navbar col-sm-8">
20
  <div class="navbar-inner">
 
23
  <form action="{{base_url}}login?next={{next}}" method="post" class="navbar-form pull-left">
24
  {{ xsrf_form_html() | safe }}
25
  {% if token_available %}
26
+ <label for="password_input"><strong>{% trans %}Jupyter token <span title="This is the secret you set up when deploying your JupyterLab space">ⓘ</span> {% endtrans
27
+ %}</strong></label>
28
  {% else %}
29
+ <label for="password_input"><strong>{% trans %}Jupyter password:{% endtrans %}</strong></label>
30
  {% endif %}
31
  <input type="password" name="password" id="password_input" class="form-control">
32
+ <button type="submit" class="btn btn-default" id="login_submit">{% trans %}Log in{% endtrans
33
+ %}</button>
34
  </form>
35
  </div>
36
  </div>
 
38
  </div>
39
  </div>
40
  {% else %}
41
+ <p>{% trans %}No login available, you shouldn't be seeing this page.{% endtrans %}</p>
42
  {% endif %}
43
 
44
+ <h5>If you don't have the credentials for this Jupyter space, <a target="_blank" href="https://huggingface.co/spaces/SpacesExamples/jupyterlab?duplicate=true">create your own.</a></h5>
45
+ <br>
46
+
47
+ <p>This template was created by <a href="https://twitter.com/camenduru" target="_blank" >camenduru</a> and <a href="https://huggingface.co/nateraw" target="_blank" >nateraw</a>, with contributions of <a href="https://huggingface.co/osanseviero" target="_blank" >osanseviero</a> and <a href="https://huggingface.co/azzr" target="_blank" >azzr</a> </p>
48
  {% if message %}
49
  <div class="row">
50
  {% for key in message %}
 
54
  {% endfor %}
55
  </div>
56
  {% endif %}
57
+ {% if token_available %}
58
+ {% block token_message %}
59
+
60
+ {% endblock token_message %}
61
+ {% endif %}
62
  </div>
63
+
64
  {% endblock %}
65
 
66
+
67
+ {% block script %}
68
+ {% endblock %}