post.html.twig in Open Social 8
Same filename in this branch
Same filename and directory in other branches
- 8.9 themes/socialbase/templates/post/post.html.twig
- 8.2 themes/socialbase/templates/post/post.html.twig
- 8.3 themes/socialbase/templates/post/post.html.twig
- 8.4 themes/socialbase/templates/post/post.html.twig
- 8.5 themes/socialbase/templates/post/post.html.twig
- 8.6 themes/socialbase/templates/post/post.html.twig
- 8.7 themes/socialbase/templates/post/post.html.twig
- 8.8 themes/socialbase/templates/post/post.html.twig
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.
See also
File
themes/socialbase/templates/post/post.html.twigView source
- {#
- /**
- * @file 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.
- *
- * @see template_preprocess_post()
- *
- * @ingroup themeable
- */
- #}
-
- {{ attach_library('socialbase/comment') }}
- <div class="card">
- <div class="card__block">
-
- <div class="media-wrapper">
- <div class="media">
- <div class="media-left avatar">
- {% if author_picture %}
- {{ author_picture }}
- {% endif %}
- </div>
- <div class="media-body">
- <div class="media-heading text-m">
- {% if content.user_id %}
- {{ content.user_id }}
- {% endif %}
- <div class="post-date">{{ date }}</div>
- </div>
- </div>
- </div>
-
- {{ content.links }}
- </div>
-
- <div class="margin-top-s iframe-container">
-
- {{ content|without('links', 'field_post_comments', 'like_and_dislike', 'field_post_image', 'user_id') }}
-
- {% if content.field_post_image|render %}
- <p>{{ content.field_post_image }}</p>
- {% endif %}
-
- <div class="clearfix"></div>
- {{ content.like_and_dislike }}
- </div>
-
-
- {% if logged_in %}
- <div class="card__nested-section">
- {{ content.field_post_comments }}
- </div>
- {% endif %}
-
- </div>
- </div>