aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_web')
-rw-r--r--python/fatcat_web/__init__.py2
-rw-r--r--python/fatcat_web/routes.py5
-rw-r--r--python/fatcat_web/static/ia_logo.pngbin0 -> 8867 bytes
-rw-r--r--python/fatcat_web/static/orcid_icon.pngbin0 -> 21160 bytes
-rw-r--r--python/fatcat_web/templates/auth_ia_login.html34
-rw-r--r--python/fatcat_web/templates/auth_login.html105
6 files changed, 112 insertions, 34 deletions
diff --git a/python/fatcat_web/__init__.py b/python/fatcat_web/__init__.py
index 3a332e84..fa7d005a 100644
--- a/python/fatcat_web/__init__.py
+++ b/python/fatcat_web/__init__.py
@@ -15,7 +15,7 @@ from fatcat_web.web_config import Config
toolbar = DebugToolbarExtension()
-app = Flask(__name__)
+app = Flask(__name__, static_url_path='/static')
app.config.from_object(Config)
toolbar = DebugToolbarExtension(app)
FlaskUUID(app)
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index f7f10f44..f6b08f54 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -733,8 +733,3 @@ def robots():
'robots.txt',
mimetype='text/plain')
-@app.route('/static/fatcat.jpg', methods=['GET'])
-def fatcat_photo():
- return send_from_directory(os.path.join(app.root_path, 'static'),
- 'fatcat.jpg',
- mimetype='image/jpeg')
diff --git a/python/fatcat_web/static/ia_logo.png b/python/fatcat_web/static/ia_logo.png
new file mode 100644
index 00000000..97cc4457
--- /dev/null
+++ b/python/fatcat_web/static/ia_logo.png
Binary files differ
diff --git a/python/fatcat_web/static/orcid_icon.png b/python/fatcat_web/static/orcid_icon.png
new file mode 100644
index 00000000..d0180e63
--- /dev/null
+++ b/python/fatcat_web/static/orcid_icon.png
Binary files differ
diff --git a/python/fatcat_web/templates/auth_ia_login.html b/python/fatcat_web/templates/auth_ia_login.html
index ebf08021..8e1e3026 100644
--- a/python/fatcat_web/templates/auth_ia_login.html
+++ b/python/fatcat_web/templates/auth_ia_login.html
@@ -1,12 +1,10 @@
{% extends "base.html" %}
-{% block body %}
-<h1>Login with Internet Archive account</h1>
-<p>Warning: still experimental!
+{% block fullbody %}
+<div class="ui centered grid container">
+<div class="eight wide column" style="font-size: 1.14285714rem;">
-<br>
-<br>
-<br>
+<h1>Login via Internet Archive</h1>
{% if current_user.is_authenticated %}
<div class="ui negative message">
@@ -14,18 +12,28 @@
<p>You should logout first. Re-authenticating would be undefined behavior.
</div>
{% else %}
+
+ <p>Use your <a href="https://archive.org">archive.org</a> username (or email)
+ and password to log in to Fatcat.
+
<form class="" role="login" action="/auth/ia/login" method="post">
<div class="ui form">
- <div class="ui input huge fluid">
- <input type="email" placeholder="user@domain.tdl..." name="email" {% if email %}value="{{ email }}"{% endif %} aria-label="email for login">
- </div>
- <div class="ui action input huge fluid">
- <input type="password" placeholder="password" name="password" aria-label="internet archive password">
- <button class="ui button">Login</button>
- </div>
+ <div class="ui left icon input large fluid">
+ <i class="user icon"></i>
+ <input type="email" placeholder="user@domain.tdl..." name="email" {% if email %}value="{{ email }}"{% endif %} aria-label="email for login">
</div>
+ <br>
+ <div class="ui left icon input large fluid">
+ <i class="lock icon"></i>
+ <input type="password" placeholder="Password" name="password" aria-label="internet archive password">
+ </div>
+ <br>
+ <button class="ui primary large button fluid">Login</button>
</div>
</form>
{% endif %}
+</div>
+</div>
+
{% endblock %}
diff --git a/python/fatcat_web/templates/auth_login.html b/python/fatcat_web/templates/auth_login.html
index 9ccae816..bcb11680 100644
--- a/python/fatcat_web/templates/auth_login.html
+++ b/python/fatcat_web/templates/auth_login.html
@@ -1,18 +1,93 @@
{% extends "base.html" %}
-{% block body %}
-<h1>Login</h1>
-
-<p>via OAuth / OpenID Connect:
-<ul>
- <li><a href="/auth/gitlab/login">gitlab.com</a>
- <li><strike><a href="/auth/google/login">google.com</a></strike>
- <li><strike><a href="/auth/orcid/login">orcid.org</a></strike>
-</ul>
-
-<p>Other options...
-<ul>
- <li><a href="/auth/token_login">Using auth token</a> (admin/operator)
- <li><a href="/auth/ia/login">With Internet Archive account</a> (experimental)
-</ul>
+{% block fullbody %}
+<div class="ui centered grid container">
+<div class="eight wide column" style="font-size: 1.14285714rem;">
+
+<h1>Login / Signup</h1>
+
+<p>Select a provider below to create a Fatcat editor account or log back in.
+Note that currently editor accounts are locked 1-to-1 with external identities.
+
+<p>Before creating an account, please review our
+<a href="https://guide.fatcat.wiki/policies.html">Norms and Policies</a>.
+
+<br>
+<a href="/auth/ia/login">
+<div class="ui segment attached">
+ <h2 class="ui header">
+ <img src="/static/ia_logo.png" style="width: 1.5em;">
+ <div class="content">
+ Internet Archive
+ <div class="sub header">via email/password</div>
+ </div>
+ </h2>
+</div>
+</a>
+
+<a href="/auth/orcid/login">
+<div class="ui segment attached">
+ <h2 class="ui header">
+ <img src="/static/orcid_icon.png" style="width: 1.5em;">
+ <div class="content">
+ ORCiD
+ <div class="sub header">via OpenID Connect</div>
+ </div>
+ </h2>
+</div>
+</a>
+
+<a href="/auth/wikipedia/login">
+<div class="ui segment attached">
+ <h2 class="ui header">
+ <i class="wikipedia w icon"></i>
+ <div class="content">
+ Wikipedia
+ <div class="sub header">via OpenID Connect</div>
+ </div>
+ </h2>
+</div>
+</a>
+
+<a href="/auth/gitlab/login">
+<div class="ui segment attached">
+ <h2 class="ui header">
+ <i class="orange gitlab icon"></i>
+ <div class="content">
+ Gitlab
+ <div class="sub header">via OpenID Connect</div>
+ </div>
+ </h2>
+</div>
+</a>
+
+<a href="/auth/google/login">
+<div class="ui segment attached">
+ <h2 class="ui header">
+ <i class="red google icon"></i>
+ <div class="content">
+ Google
+ <div class="sub header">via OpenID Connect</div>
+ </div>
+ </h2>
+</div>
+</a>
+
+{# alternative style
+<br>
+<button class="massive ui button fluid">
+ <i class="gitlab icon orange"></i>
+ Gitlab
+ <small>via OpenID Connect</small>
+</button>
+#}
+
+<br>
+<p>Operators can also <a href="/auth/token_login">authenticate directly using
+an auth token</a>.
+<p>If you have problems getting logged in, please
+<a href="mailto:webservices@archive.org">contact us</a>.
+
+</div>
+</div>
{% endblock %}