From 2154e6f02252576d8652e66f26fa4ae635d0f8ee Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Thu, 17 Nov 2022 17:43:00 -0700 Subject: Rework UI to have vertical menus --- templates/activities/_home_menu.html | 29 ++++++++++++++++--- templates/activities/compose.html | 13 ++++----- templates/activities/federated.html | 20 ++++---------- templates/activities/home.html | 49 ++++++++++----------------------- templates/activities/local.html | 20 ++++---------- templates/activities/notifications.html | 21 ++++---------- 6 files changed, 60 insertions(+), 92 deletions(-) (limited to 'templates/activities') diff --git a/templates/activities/_home_menu.html b/templates/activities/_home_menu.html index c88a1d7..db441a2 100644 --- a/templates/activities/_home_menu.html +++ b/templates/activities/_home_menu.html @@ -1,6 +1,27 @@ + +{% if current_page == "home" %} +

Compose

+
+ {% csrf_token %} + {{ form.text }} + {{ form.content_warning }} +
+ CW + +
+
+{% endif %} diff --git a/templates/activities/compose.html b/templates/activities/compose.html index dfa6d1e..55b4eb3 100644 --- a/templates/activities/compose.html +++ b/templates/activities/compose.html @@ -3,15 +3,14 @@ {% block title %}Compose{% endblock %} {% block content %} - -
{% csrf_token %} - {% for field in form %} - {% include "forms/_field.html" %} - {% endfor %} +
+ Content + {% include "forms/_field.html" with field=form.text %} + {% include "forms/_field.html" with field=form.content_warning %} + {% include "forms/_field.html" with field=form.visibility %} +
diff --git a/templates/activities/federated.html b/templates/activities/federated.html index b6143c3..4b57b9d 100644 --- a/templates/activities/federated.html +++ b/templates/activities/federated.html @@ -3,19 +3,9 @@ {% block title %}Federated Timeline{% endblock %} {% block content %} - {% include "activities/_home_menu.html" %} - -
-
- {% for post in posts %} - {% include "activities/_post.html" %} - {% empty %} - No posts yet. - {% endfor %} -
-
-

?

-
- -
+ {% for post in posts %} + {% include "activities/_post.html" %} + {% empty %} + No posts yet. + {% endfor %} {% endblock %} diff --git a/templates/activities/home.html b/templates/activities/home.html index 08e338e..5171842 100644 --- a/templates/activities/home.html +++ b/templates/activities/home.html @@ -3,39 +3,18 @@ {% block title %}Home{% endblock %} {% block content %} - {% include "activities/_home_menu.html" %} - -
- -
- {% for event in events %} - {% if event.type == "post" %} - {% include "activities/_post.html" with post=event.subject_post %} - {% elif event.type == "boost" %} - - {% include "activities/_post.html" with post=event.subject_post %} - {% endif %} - {% empty %} - Nothing to show yet. - {% endfor %} -
- -
-

Compose

- - {% csrf_token %} - {{ form.text }} - {{ form.content_warning }} -
- CW - -
- -
- -
+ {% for event in events %} + {% if event.type == "post" %} + {% include "activities/_post.html" with post=event.subject_post %} + {% elif event.type == "boost" %} +
+ + {{ event.subject_identity.name_or_handle }} + boosted +
+ {% include "activities/_post.html" with post=event.subject_post %} + {% endif %} + {% empty %} + Nothing to show yet. + {% endfor %} {% endblock %} diff --git a/templates/activities/local.html b/templates/activities/local.html index 520a0ce..79ce9a3 100644 --- a/templates/activities/local.html +++ b/templates/activities/local.html @@ -3,19 +3,9 @@ {% block title %}Local Timeline{% endblock %} {% block content %} - {% include "activities/_home_menu.html" %} - -
-
- {% for post in posts %} - {% include "activities/_post.html" %} - {% empty %} - No posts yet. - {% endfor %} -
-
-

?

-
- -
+ {% for post in posts %} + {% include "activities/_post.html" %} + {% empty %} + No posts yet. + {% endfor %} {% endblock %} diff --git a/templates/activities/notifications.html b/templates/activities/notifications.html index c071a49..9bf66bb 100644 --- a/templates/activities/notifications.html +++ b/templates/activities/notifications.html @@ -3,20 +3,9 @@ {% block title %}Notifications{% endblock %} {% block content %} - {% include "activities/_home_menu.html" %} - -
-
- {% for event in events %} - {% include "activities/_event.html" %} - {% empty %} - No events yet. - {% endfor %} -
- -
-

?

-
- -
+ {% for event in events %} + {% include "activities/_event.html" %} + {% empty %} + No events yet. + {% endfor %} {% endblock %} -- cgit v1.2.3