You are here

heartbeat-stream.html.twig in Heartbeat 8

heartbeat-stream.html.twig Default theme implementation to present Heartbeat stream data.

This template is used when viewing Heartbeat stream pages.

Available variables:

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

File

templates/heartbeat-stream.html.twig
View source
  1. {#
  2. /**
  3. * @file heartbeat-stream.html.twig
  4. * Default theme implementation to present Heartbeat stream data.
  5. *
  6. * This template is used when viewing Heartbeat stream 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_heartbeat_stream()
  14. *
  15. * @ingroup themeable
  16. */
  17. #}
  18. <div class="heartbeat-stream">
  19. {% if content %}
  20. {{- content -}}
  21. {% endif %}
  22. {% autoescape false %}
  23. {% for message in messages %}
  24. <div{{ attributes.addClass('heartbeat-message') }} id="heartbeat-{{ message.id }}">
  25. {#{{ message }}#}
  26. <div class="heartbeat-message-wrap">
  27. <div class="heartbeat-owner">
  28. <a href="/user/{{ message.userId }}"><img src="{{ message.userPicture }}" />
  29. {{ message.userName }}
  30. </a>
  31. {{ message.user }}
  32. <div class="time-ago">{{ message.timeAgo }}</div>
  33. </div>
  34. <div class="heartbeat-content hid-{{ message.id }}">
  35. {{ message.heartbeat }}
  36. </div>
  37. </div>
  38. <div class="heartbeat-interaction-wrap">
  39. <div class="heartbeat-like">
  40. {{ message.likeFlag }}
  41. </div>
  42. <div class="heartbeat-unlike">
  43. {{ message.unlikeFlag }}
  44. </div>
  45. <div class="heartbeat-comment-button">
  46. {% if message.commentCount > 1 %}
  47. {{ message.commentCount }} comments
  48. {% elseif message.commentCount == 1 %}
  49. {{ message.commentCount }} comment
  50. {% else %}
  51. Comment
  52. {% endif %}
  53. </div>
  54. <div class="heartbeat-comment" id="comment-{{ message.id }}">
  55. {{ message.commentForm }}
  56. <div class="heartbeat-comments">
  57. {% for comment in message.comments %}
  58. <div id="heartbeat-comment-{{ comment.id }}">
  59. <span class="comment-owner">{{ comment.owner }}
  60. <span class="comment-username">{{ comment.username }}</span><br>
  61. <span class="comment-ago">{{ comment.timeAgo }}</span>
  62. </span>
  63. <span class="comment-body">{{ comment.body }}
  64. <div class="comment-like">{{ comment.commentLike}}</div>
  65. </span>
  66. <span class ="sub-comment">
  67. {% for subComment in comment.subComments %}
  68. <div class="heartbeat-subcomment" id="sub-comment-{{ subComment.id }}">
  69. <span class="sub-comment-owner">{{ subComment.owner }}
  70. <span class="sub-comment-username">{{ subComment.username }}</span><br>
  71. <span class="sub-comment-ago">{{ subComment.timeAgo }}</span>
  72. </span>
  73. <span class="sub-comment-body">{{ subComment.body }}
  74. <div class="sub-comment-like">{{ subComment.commentLike}}</div>
  75. </span>
  76. </div>
  77. {% endfor %}
  78. {{ comment.reply }}
  79. </span>
  80. </div>
  81. {% endfor %}
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. {% endfor %}
  87. {% endautoescape %}
  88. </div>
  89. <div id="heartbeat-friendship-action"></div>