stream.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. {% extends "layout.html" %}
  2. {% import 'utils.html' as utils %}
  3. {% block title %}{% if request.path == url_for('admin_stream') %}Stream{% else %}Notifications{% endif %} - {{ config.NAME }}{% endblock %}
  4. {% block content %}
  5. {% include "header.html" %}
  6. <div class="content" style="margin-left:10%;margin-right:10%">
  7. <div id="notes">
  8. <div class="posts">
  9. <h1 class="content-subhead">Recent Activities</h1>
  10. {% for item in inbox_data %}
  11. {% if 'actor' in item.meta %}
  12. {% if item | has_type('Create') %}
  13. {{ utils.display_note(item.activity.object, default_avatar=config.DEFAULT_ICON, ui=True, meta=item.meta) }}
  14. {% else %}
  15. {% if item | has_type('Announce') %}
  16. {% set boost_actor = item.meta.actor %}
  17. {% if boost_actor %}
  18. <p><span class="bar-item-no-hover"><a style="color:#808080;" href="{{ boost_actor.url | get_url }}">{{ boost_actor.name or boost_actor.preferredUsername }}</a> boosted</span></p>
  19. {% endif %}
  20. {% if item.meta.object %}
  21. {{ utils.display_note(item.meta.object, default_avatar=config.DEFAULT_ICON, ui=True) }}
  22. {% endif %}
  23. {% endif %}
  24. {% if item | has_type('Like') %}
  25. {% set boost_actor = item.meta.actor %}
  26. <p><span class="bar-item-no-hover"><a style="color:#808080;" href="{{ boost_actor.url | get_url }}">{{ boost_actor.name or boost_actor.preferredUsername }}</a> liked</span></p>
  27. {% if item.meta.object %}
  28. {{ utils.display_note(item.meta.object, default_avatar=config.DEFAULT_ICON, ui=False, meta={'actor': item.meta.object_actor}) }}
  29. {% endif %}
  30. {% endif %}
  31. {% if item | has_type('Follow') %}
  32. <p><span class="bar-item-no-hover">new follower</span> <!-- <a href="" class="bar-item">follow back</a></p> -->
  33. <div style="height: 100px;">
  34. {{ utils.display_actor_inline(item.meta.actor, default_avatar=config.DEFAULT_ICON, size=50) }}
  35. </div>
  36. {% elif item | has_type('Accept') %}
  37. <p><span class="bar-item-no-hover">you started following</span></p>
  38. <div style="height: 100px;">
  39. {{ utils.display_actor_inline(item.meta.actor, default_avatar=config.DEFAULT_ICON, size=50) }}
  40. </div>
  41. {% elif item | has_type('Undo') %}
  42. <p><span class="bar-item-no-hover">unfollowed you</span></p>
  43. <div style="height: 100px;">
  44. {{ utils.display_actor_inline(item.meta.actor, default_avatar=config.DEFAULT_ICON, size=50) }}
  45. </div>
  46. {% else %}
  47. {% endif %}
  48. {% endif %}
  49. {% endif %}
  50. {% endfor %}
  51. {{ utils.display_pagination(older_than, newer_than) }}
  52. </div>
  53. </div>
  54. </div>
  55. {% endblock %}