You are here

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

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 published %}
  28. {{ content.links }}
  29. {% endif %}
  30. {% if not published %}
  31. <div class="node--unpublished__label">{% trans %} unpublished {% endtrans %}</div>
  32. {% endif %}
  33. <div{{ attributes.addClass(classes) }}>
  34. {{ content|without('links', 'field_post_comments', 'like_and_dislike', 'field_post_image', 'user_id') }}
  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. <div class="card__nested-section">
  43. {{ content.field_post_comments }}
  44. </div>
  45. {% endif %}