diff options
author | Andrew Godwin | 2022-11-17 18:52:00 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-11-17 15:10:09 -0700 |
commit | 0851fbd1ec09b142608667bf90ee806e59cafb28 (patch) | |
tree | eb4bfa7e52ef0a66460840747ea83b7685e1a5e8 /templates/activities/_event.html | |
parent | 2154e6f02252576d8652e66f26fa4ae635d0f8ee (diff) | |
download | takahe-0851fbd1ec09b142608667bf90ee806e59cafb28.tar.gz takahe-0851fbd1ec09b142608667bf90ee806e59cafb28.tar.bz2 takahe-0851fbd1ec09b142608667bf90ee806e59cafb28.zip |
Add search and better notifications
Diffstat (limited to 'templates/activities/_event.html')
-rw-r--r-- | templates/activities/_event.html | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/templates/activities/_event.html b/templates/activities/_event.html index 375e475..81e9dd2 100644 --- a/templates/activities/_event.html +++ b/templates/activities/_event.html @@ -1,24 +1,28 @@ -{% load static %} {% load activity_tags %} -<div class="post"> - <time> - {% if event.published %} - {{ event.published | timedeltashort }} - {% else %} - {{ event.created | timedeltashort }} - {% endif %} - </time> - - {% if event.type == "follow" %} - {{ 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 %} -</div> +{% if event.type == "followed" %} + <div class="follow-banner"> + <a href="{{ event.subject_identity.urls.view }}"> + {{ event.subject_identity.name_or_handle }} + </a> followed you + </div> + {% include "activities/_identity.html" with identity=event.subject_identity created=event.created %} +{% elif event.type == "liked" %} + <div class="like-banner"> + <a href="{{ event.subject_identity.urls.view }}"> + {{ event.subject_identity.name_or_handle }} + </a> liked your post + </div> + {% include "activities/_post.html" with post=event.subject_post %} +{% elif event.type == "mentioned" %} + <div class="mention-banner"> + <a href="{{ event.subject_identity.urls.view }}"> + {{ event.subject_identity.name_or_handle }} + </a> mentioned you + </div> + {% include "activities/_post.html" with post=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 %} |