From ebef8e0e73ea69191545c309bb3f0b602dcc93ca Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 9 Apr 2019 15:44:19 -0700 Subject: resyle login views --- python/fatcat_web/__init__.py | 2 +- python/fatcat_web/routes.py | 5 -- python/fatcat_web/static/ia_logo.png | Bin 0 -> 8867 bytes python/fatcat_web/static/orcid_icon.png | Bin 0 -> 21160 bytes python/fatcat_web/templates/auth_ia_login.html | 34 +++++--- python/fatcat_web/templates/auth_login.html | 105 +++++++++++++++++++++---- 6 files changed, 112 insertions(+), 34 deletions(-) create mode 100644 python/fatcat_web/static/ia_logo.png create mode 100644 python/fatcat_web/static/orcid_icon.png (limited to 'python') 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 Binary files /dev/null and b/python/fatcat_web/static/ia_logo.png 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 Binary files /dev/null and b/python/fatcat_web/static/orcid_icon.png 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 %} -

Login with Internet Archive account

-

Warning: still experimental! +{% block fullbody %} +

+
-
-
-
+

Login via Internet Archive

{% if current_user.is_authenticated %}
@@ -14,18 +12,28 @@

You should logout first. Re-authenticating would be undefined behavior.

{% else %} + +

Use your archive.org username (or email) + and password to log in to Fatcat. +

-
- -
-
- - -
+
+ +
+
+
+ + +
+
+
{% endif %} +
+
+ {% 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 %} -

Login

- -

via OAuth / OpenID Connect: -

- -

Other options... -

+{% block fullbody %} +
+
+ +

Login / Signup

+ +

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. + +

Before creating an account, please review our +Norms and Policies. + +
+ +

+ + + +
+

+ +
+ ORCiD +
via OpenID Connect
+
+

+
+
+ + +
+

+ +
+ Wikipedia +
via OpenID Connect
+
+

+
+
+ + +
+

+ +
+ Gitlab +
via OpenID Connect
+
+

+
+
+ + +
+

+ +
+ Google +
via OpenID Connect
+
+

+
+
+ +{# alternative style +
+ +#} + +
+

Operators can also authenticate directly using +an auth token. +

If you have problems getting logged in, please +contact us. + +

+
{% endblock %} -- cgit v1.2.3