You are here

post.html.twig in Open Social 10.0.x

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

modules/social_features/social_post/templates/post.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. <div{{ attributes.addClass('card', 'post') }}>
  19. {% if content.user_id %}
  20. {{- content.user_id -}}
  21. {% endif %}
  22. {{ date }}
  23. {% if visibility_icon and visibility_label %}
  24. <svg class="margin-left-s icon-visibility">
  25. <use xlink:href="#icon-{{ visibility_icon }}"></use>
  26. </svg>
  27. <strong>{{ visibility_label }}</strong>
  28. {% endif %}
  29. {% if content.field_post_image %}
  30. {{- content.field_post_image -}}
  31. {% endif %}
  32. {% if content.field_post %}
  33. {{- content.field_post -}}
  34. {% endif %}
  35. {% if content.like_and_dislike %}
  36. {{- content.like_and_dislike -}}
  37. {% endif %}
  38. {% if content.field_post_comments %}
  39. {{- content.field_post_comments -}}
  40. {% endif %}
  41. </div>