You are here

post--activity.html.twig in Open Social 8

post.html.twig Default theme implementation to present Post data.

This template is used when viewing Post pages.

Available variables:

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

File

themes/socialbase/templates/post/post--activity.html.twig
View source
  1. {#
  2. /**
  3. * @file post.html.twig
  4. * Default theme implementation to present Post data.
  5. *
  6. * This template is used when viewing Post 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_post()
  14. *
  15. * @ingroup themeable
  16. */
  17. #}
  18. {{ attach_library('socialbase/comment') }}
  19. {%
  20. set classes = [
  21. 'margin-top-m',
  22. 'iframe-container',
  23. logged_in ? 'margin-bottom-m',
  24. ]
  25. %}
  26. {{ content.links }}
  27. <div{{ attributes.addClass(classes) }}>
  28. {{ content|without('links', 'field_post_comments', 'like_and_dislike', 'field_post_image', 'user_id') }}
  29. {% if content.field_post_image|render %}
  30. <p>{{ content.field_post_image }}</p>
  31. {% endif %}
  32. <div class="clearfix"></div>
  33. {{ content.like_and_dislike }}
  34. </div>
  35. {% if logged_in %}
  36. <div class="card__nested-section">
  37. {{ content.field_post_comments }}
  38. </div>
  39. {% endif %}