diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/activities/_event.html | 4 | ||||
-rw-r--r-- | templates/activities/_post.html | 14 | ||||
-rw-r--r-- | templates/activities/compose.html | 19 | ||||
-rw-r--r-- | templates/activities/home.html | 2 | ||||
-rw-r--r-- | templates/base.html | 4 |
5 files changed, 41 insertions, 2 deletions
diff --git a/templates/activities/_event.html b/templates/activities/_event.html index bbe0ae5..375e475 100644 --- a/templates/activities/_event.html +++ b/templates/activities/_event.html @@ -14,6 +14,10 @@ {{ event.subject_identity.name_or_handle }} followed you {% elif event.type == "like" %} {{ event.subject_identity.name_or_handle }} liked {{ event.subject_post }} + {% elif event.type == "mentioned" %} + {{ event.subject_post.author.name_or_handle }} mentioned you in {{ event.subject_post }} + {% elif event.type == "boosted" %} + {{ event.subject_identity.name_or_handle }} boosted your post {{ event.subject_post }} {% else %} Unknown event type {{event.type}} {% endif %} diff --git a/templates/activities/_post.html b/templates/activities/_post.html index d05f7ad..6392c89 100644 --- a/templates/activities/_post.html +++ b/templates/activities/_post.html @@ -9,6 +9,15 @@ {% endif %} <time> + {% if post.visibility == 0 %} + <i class="visibility fa-solid fa-earth-oceania" title="Public"></i> + {% elif post.visibility == 1 %} + <i class="visibility fa-solid fa-lock-open" title="Unlisted"></i> + {% elif post.visibility == 2 %} + <i class="visibility fa-solid fa-lock" title="Followers Only"></i> + {% elif post.visibility == 3 %} + <i class="visibility fa-solid fa-at" title="Mentioned Only"></i> + {% endif %} <a href="{{ post.url }}"> {% if post.published %} {{ post.published | timedeltashort }} @@ -36,6 +45,11 @@ <div class="actions"> {% include "activities/_like.html" %} {% include "activities/_boost.html" %} + {% if request.user.admin %} + <a title="Admin" href="/djadmin/activities/post/{{ post.pk }}/change/"> + <i class="fa-solid fa-file-code"></i> + </a> + {% endif %} </div> {% endif %} </div> diff --git a/templates/activities/compose.html b/templates/activities/compose.html new file mode 100644 index 0000000..ad0457b --- /dev/null +++ b/templates/activities/compose.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} + +{% block title %}Compose{% endblock %} + +{% block content %} + <nav> + <a href="." class="selected">Compose</a> + </nav> + + <form action="." method="POST"> + {% csrf_token %} + {% for field in form %} + {% include "forms/_field.html" %} + {% endfor %} + <div class="buttons"> + <button>Post</button> + </div> + </form> +{% endblock %} diff --git a/templates/activities/home.html b/templates/activities/home.html index 2cdaaea..bfa11f7 100644 --- a/templates/activities/home.html +++ b/templates/activities/home.html @@ -26,7 +26,7 @@ <div class="right-column"> <h2>Compose</h2> - <form action="." method="POST" class="compose"> + <form action="/compose/" method="POST" class="compose"> {% csrf_token %} {{ form.text }} {{ form.content_warning }} diff --git a/templates/base.html b/templates/base.html index e465f05..553a2cc 100644 --- a/templates/base.html +++ b/templates/base.html @@ -8,6 +8,7 @@ <link rel="stylesheet" href="{% static "css/style.css" %}" type="text/css" media="screen" /> <link rel="stylesheet" href="{% static "fonts/raleway/raleway.css" %}" type="text/css" /> <link rel="stylesheet" href="{% static "fonts/font_awesome/all.min.css" %}" type="text/css" /> + <link rel="manifest" href="/manifest.json" /> <script src="{% static "js/hyperscript.min.js" %}"></script> <script src="{% static "js/htmx.min.js" %}"></script> {% block extra_head %}{% endblock %} @@ -22,7 +23,8 @@ </a> <menu> {% if user.is_authenticated %} - <a href="#"><i class="fa-solid fa-gear"></i> Settings</a> + <a href="/compose/"><i class="fa-solid fa-feather"></i> Compose</a> + <a href="/settings/"><i class="fa-solid fa-gear"></i> Settings</a> <div class="gap"></div> <a href="/identity/select/" class="identity"> {% if not request.identity %} |