You are here

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

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. {{ attach_library('socialbase/page-node')}}
  20. {%
  21. set classes = [
  22. 'margin-top-m',
  23. 'iframe-container',
  24. logged_in ? 'margin-bottom-m',
  25. ]
  26. %}
  27. {% if content.links %}
  28. {{ content.links }}
  29. {% endif %}
  30. <div{{ attributes.addClass(classes) }}>
  31. {# body-text is necessary for theme colors to be applied #}
  32. <div class="body-text">
  33. {{ content|without('links', 'field_post_comments', 'like_and_dislike', 'field_post_image', 'user_id') }}
  34. </div>
  35. {% if content.field_post_image|render %}
  36. <p>{{ content.field_post_image }}</p>
  37. {% endif %}
  38. <div class="clearfix"></div>
  39. {{ content.like_and_dislike }}
  40. </div>
  41. {% if logged_in %}
  42. {{ content.field_post_comments }}
  43. {% endif %}