diff --git a/lemonauth/templates/lemonauth/indie.html b/lemonauth/templates/lemonauth/indie.html new file mode 100644 index 0000000..cfe6615 --- /dev/null +++ b/lemonauth/templates/lemonauth/indie.html @@ -0,0 +1,70 @@ +{% extends 'lemoncurry/layout.html' %} +{% load markdown static %} + +{% block styles %} + +{% endblock %} + +{% block main %} +
+
+

+ {% if app %}{% endif %} + sign in to + {% if app %}{{ app.name | first }}{% endif %} + {% if app %}({% endif %}{{ params.client_id }}{% if app %}){% endif %}? + {% if verified %} + + + + {% else %} + + + + {% endif %} +

+ +
+

do you want to confirm your identity, {{ me }}, with this app?

+ {% if params.response_type == 'code' %} +

additionally, this app is requesting the following scopes - you can edit the scopes that will be granted to the app, if you wish

+
+ {% for scope in scopes %} +
+ + +
+ {% endfor %} +
+ {% endif %} +

you will be redirected to {{ redirect_uri }} after authorising this app

+
+ + + + {% csrf_token %} + + + + {% if params.state %}{% endif %} + +
+
+ + + +{% endblock %} +{% block foot %} + +{% endblock %} diff --git a/lemonauth/templates/lemonauth/login.html b/lemonauth/templates/lemonauth/login.html new file mode 100644 index 0000000..9297f27 --- /dev/null +++ b/lemonauth/templates/lemonauth/login.html @@ -0,0 +1,51 @@ +{% extends 'lemoncurry/layout.html' %} +{% load lemonauth_tags static %} + +{% block styles %} + +{% endblock %} + +{% block main %} +
+ {% if form.errors %} +

+ Uh oh! Your username and password didn't match. Please try again. +

+ {% endif %} + + {% if next %} + {% if user.is_authenticated %} +

+ Hang on! Your account doesn't have access to this page. To proceed, please log in to an account that does have access. +

+ {% else %} +

+ Oops! Please log in to see this page. +

+ {% endif %} + {% endif %} + +
+
+ {% form_field form.username %} + {% form_field form.password %} + {% form_field form.otp_token %} + +
+ + +
+
+ + + + {% csrf_token %} + +
+
+{% endblock %} diff --git a/lemonauth/templates/lemonauth/tags/form_field.html b/lemonauth/templates/lemonauth/tags/form_field.html new file mode 100644 index 0000000..2fa811f --- /dev/null +++ b/lemonauth/templates/lemonauth/tags/form_field.html @@ -0,0 +1,6 @@ +
+ + + {% if field.help_text %}

{{ field.help_text }}

{% endif %} +
diff --git a/lemonauth/templatetags/__init__.py b/lemonauth/templatetags/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/lemonauth/templatetags/lemonauth_tags.py b/lemonauth/templatetags/lemonauth_tags.py new file mode 100644 index 0000000..65a196d --- /dev/null +++ b/lemonauth/templatetags/lemonauth_tags.py @@ -0,0 +1,8 @@ +from django import template + +register = template.Library() + + +@register.inclusion_tag('lemonauth/tags/form_field.html') +def form_field(field): + return {'field': field} diff --git a/lemoncurry/jinja2/lemoncurry/layout.html b/lemoncurry/jinja2/lemoncurry/layout.html index 6987368..2d870e5 100644 --- a/lemoncurry/jinja2/lemoncurry/layout.html +++ b/lemoncurry/jinja2/lemoncurry/layout.html @@ -78,7 +78,7 @@