and i think that's it, we now support user accounts (lite)git commit -m 'and i think that\'s it, we now support user accounts litegit status sweet.'! sweet.

This commit is contained in:
Andrej Karpathy
2021-11-26 16:38:36 -08:00
parent 54157c6e9c
commit c5b5c7833c
5 changed files with 112 additions and 6 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ var gvars = {{ gvars | tojson }};
</div>
</div>
{% if user %}
{% if user and tags %}
<div id="tagwrap">
</div>
{% endif %}
+33 -1
View File
@@ -5,7 +5,39 @@
{% block content %}
<div id="wrap">
This is where the user gets to log in, or see information about their account if logged in.
{% if user %}
<div>
<div>Logged in user: {{ user }}</div>
<div>
<a href="{{ url_for('logout') }}">Log out</a>
</div>
</div>
{% else %}
<div>
<div id="profile-warning">
<p>
Okay, arxiv-sanity-lite uses a super lite version of
"user accounts" where there are no passwords. Basically, you can "log in"
with any arbitrary username. If you want to share your library with a
friend, you can just tell them the username. And if you'd like to keep your
account private, just make your username be something unique
and write it down somewhere safe.
</p>
<b>TLDR: there are no passwords!</b>
</div>
<form id="profile-login-form" action="/login" method="POST">
<div class="form-group">
<label>Username:</label>
<input class="form-control" type="text" name="username">
</div>
<button type="submit" class="btn btn-primary">Log in</button>
</form>
</div>
{% endif %}
</div>
{% endblock %}