You are here

facebook-post.html.twig in Facebook Feed Block 8

Template for displaying a post in a Facebook feed block.

Available variables:

  • id: Description.
  • created_time: Description.
  • message: Description.
  • link: Description.
  • picture: Description.
  • show_socials: Description.
  • num_likes: Description.
  • num_comments: Description.
  • num_shares: Description.

File

templates/facebook-post.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Template for displaying a post in a Facebook feed block.
  5. *
  6. * Available variables:
  7. * - id: Description.
  8. * - created_time: Description.
  9. * - message: Description.
  10. * - link: Description.
  11. * - picture: Description.
  12. * - show_socials: Description.
  13. * - num_likes: Description.
  14. * - num_comments: Description.
  15. * - num_shares: Description.
  16. */
  17. #}
  18. <article data-post-id="{{ id }}" class="facebook-post">
  19. <div>
  20. <a href="{{ link }}">
  21. <img src="{{ picture }}">
  22. </a>
  23. </div>
  24. <div>
  25. <time datetime="{{ date }}">{{ created_time|date('j M Y') }}</time>
  26. <p>{{ message }}</p>
  27. {% if show_socials %}
  28. <p class="sharing-data">
  29. <i class="fa fa-thumbs-up" aria-hidden="true"></i>
  30. {{ num_likes }}
  31. <i class="fa fa-comment" aria-hidden="true"></i>
  32. {{ num_comments }}
  33. <i class="fa fa-share" aria-hidden="true"></i>
  34. {{ num_shares }}
  35. </p>
  36. {% endif %}
  37. </div>
  38. </article>