From 34b24a0dcb044cb755e201ad1a83253d0690e78e Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 13 Nov 2022 16:14:38 -0700 Subject: More UI! --- templates/activities/_home_menu.html | 6 ++++++ templates/activities/_post.html | 15 ++++++++------- templates/activities/federated.html | 21 +++++++++++++++++++++ templates/activities/home.html | 31 ++++++++++++++++++++++++------- templates/auth/login.html | 17 ++++++++++++----- templates/base.html | 1 + templates/forms/_field.html | 13 +++++++++++++ templates/identity/create.html | 18 ++++++++++++------ templates/index.html | 4 ++++ 9 files changed, 101 insertions(+), 25 deletions(-) create mode 100644 templates/activities/_home_menu.html create mode 100644 templates/activities/federated.html create mode 100644 templates/forms/_field.html (limited to 'templates') diff --git a/templates/activities/_home_menu.html b/templates/activities/_home_menu.html new file mode 100644 index 0000000..29d19e9 --- /dev/null +++ b/templates/activities/_home_menu.html @@ -0,0 +1,6 @@ + diff --git a/templates/activities/_post.html b/templates/activities/_post.html index eef09db..a5e637f 100644 --- a/templates/activities/_post.html +++ b/templates/activities/_post.html @@ -1,4 +1,5 @@ {% load static %} +{% load activity_tags %}
{% if post.author.icon_uri %} @@ -7,20 +8,20 @@ {% endif %} -

- - {{ post.author.name_or_handle }} @{{ post.author.handle }} - -

+ + + {{ post.author.name_or_handle }} @{{ post.author.handle }} + +
{{ post.safe_content }}
diff --git a/templates/activities/federated.html b/templates/activities/federated.html new file mode 100644 index 0000000..8d8297b --- /dev/null +++ b/templates/activities/federated.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} + +{% block title %}Federated Timeline{% endblock %} + +{% block content %} + {% include "activities/_home_menu.html" %} + +
+
+ {% for post in timeline_posts %} + {% include "activities/_post.html" %} + {% empty %} + No posts yet. + {% endfor %} +
+
+

?

+
+ +
+{% endblock %} diff --git a/templates/activities/home.html b/templates/activities/home.html index 9fe4bba..c777ce8 100644 --- a/templates/activities/home.html +++ b/templates/activities/home.html @@ -1,15 +1,32 @@ {% extends "base.html" %} -{% load crispy_forms_tags %} {% block title %}Home{% endblock %} {% block content %} + {% include "activities/_home_menu.html" %} - {% crispy form form.helper %} +
- {% for post in timeline_posts %} - {% include "activities/_post.html" %} - {% empty %} - No posts yet. - {% endfor %} +
+ {% for post in timeline_posts %} + {% include "activities/_post.html" %} + {% empty %} + No posts yet. + {% endfor %} +
+ +
+

Compose

+
+ {% csrf_token %} + {{ form.text }} + {{ form.content_warning }} +
+ CW + +
+
+
+ +
{% endblock %} diff --git a/templates/auth/login.html b/templates/auth/login.html index f8e1c9d..c892c78 100644 --- a/templates/auth/login.html +++ b/templates/auth/login.html @@ -1,11 +1,18 @@ {% extends "base.html" %} -{% load crispy_forms_tags %} {% block title %}Login{% endblock %} {% block content %} - + +
+ {% csrf_token %} + {% for field in form %} + {% include "forms/_field.html" %} + {% endfor %} +
+ +
+
{% endblock %} diff --git a/templates/base.html b/templates/base.html index 0f9edfb..d50fdcf 100644 --- a/templates/base.html +++ b/templates/base.html @@ -8,6 +8,7 @@ + {% block extra_head %}{% endblock %} diff --git a/templates/forms/_field.html b/templates/forms/_field.html new file mode 100644 index 0000000..120724e --- /dev/null +++ b/templates/forms/_field.html @@ -0,0 +1,13 @@ +
+ + {% if field.help_text %} +

+ {{ field.help_text }} +

+ {% endif %} + {{ field.errors }} + {{ field }} +
diff --git a/templates/identity/create.html b/templates/identity/create.html index 8e78e10..c69b55f 100644 --- a/templates/identity/create.html +++ b/templates/identity/create.html @@ -1,13 +1,19 @@ {% extends "base.html" %} -{% load crispy_forms_tags %} - {% block title %}Create Identity{% endblock %} {% block content %} {% include "identity/_identity_menu.html" %} - +
+

Create New Identity

+

You can have multiple identities - they are totally separate, and share + nothing apart from your login details. Use them for alternates, projects, and more.

+ {% csrf_token %} + {% for field in form %} + {% include "forms/_field.html" %} + {% endfor %} +
+ +
+
{% endblock %} diff --git a/templates/index.html b/templates/index.html index dfd1805..9e09a43 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3,6 +3,10 @@ {% block title %}Welcome{% endblock %} {% block content %} + + {% for identity in identities %} {{ identity }} {% endfor %} -- cgit v1.2.3