You are here

activity--followed.html.twig in Open Social 10.1.x

activity.html.twig Default theme implementation to present Activity data.

This template is used when viewing Activity pages.

Available variables:

  • content: A list of content items. Use 'content' to print all content, or
  • attributes: HTML attributes for the container element.

File

modules/social_features/social_follow_taxonomy/templates/activity--followed.html.twig
View source
  1. {#
  2. /**
  3. * @file activity.html.twig
  4. * Default theme implementation to present Activity data.
  5. *
  6. * This template is used when viewing Activity pages.
  7. *
  8. *
  9. * Available variables:
  10. * - content: A list of content items. Use 'content' to print all content, or
  11. * - attributes: HTML attributes for the container element.
  12. *
  13. * @see template_preprocess_activity()
  14. *
  15. * @ingroup themeable
  16. */
  17. #}
  18. {{ attach_library('socialbase/stream') }}
  19. {{ attach_library('social_follow_taxonomy/activity-followed') }}
  20. {%
  21. set classes = [
  22. 'media',
  23. post and not published ? 'post-unpublished',
  24. ]
  25. %}
  26. <li class="stream-item">
  27. <i class="stream-icon"></i>
  28. <div class="card card--stream">
  29. <div class="card__block">
  30. {% if followed_tags %}
  31. <div class="card__activity-followed">
  32. <span>{{ content_type }} related to tag(s) you follow:</span>
  33. {% for tag in followed_tags %}
  34. <div class="activity-followed">
  35. <p class="tag__name">{{ tag.name }}</p>
  36. <div class="tag__arrow">
  37. {{ tag.flag }}
  38. <svg>
  39. <use xlink:href="#icon-expand_more"></use>
  40. </svg>
  41. </div>
  42. </div>
  43. {% endfor %}
  44. </div>
  45. {% endif %}
  46. <div class="media-wrapper">
  47. <div {{ attributes.addClass(classes) }}>
  48. <div class="media-left avatar">
  49. {% if actor %}
  50. {{- actor -}}
  51. {% endif %}
  52. </div>
  53. <div class="media-body">
  54. <div class="media-heading text-m">
  55. {% if content.field_activity_output_text %}
  56. {{- content.field_activity_output_text -}}
  57. {% endif %}
  58. <div class="post-date">
  59. {{ date }}
  60. {% if visibility_icon and visibility_label %}
  61. <svg class="margin-left-s icon-visibility">
  62. <use xlink:href="#icon-{{ visibility_icon }}"></use>
  63. </svg>
  64. <strong>{{ visibility_label }}</strong>
  65. {% endif %}
  66. {% if post and not published %}
  67. <span class="badge badge-default badge--pill">
  68. {% trans %} unpublished {% endtrans %}
  69. </span>
  70. {% endif %}
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. {% if content.field_activity_entity %}
  76. {{ content.field_activity_entity }}
  77. {% endif %}
  78. </div>
  79. </div>
  80. </div>
  81. </li>