comments_page.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {% set page_title = ('Replies' if comments_info['is_replies'] else 'Comments page ' + comments_info['page_number']|string) %}
  2. {% import "comments.html" as comments with context %}
  3. {% if not slim %}
  4. {% extends "base.html" %}
  5. {% block style %}
  6. <link href="/youtube.com/static/comments.css" rel="stylesheet">
  7. {% endblock style %}
  8. {% endif %}
  9. {% block main %}
  10. <section class="comments-area">
  11. {% if not comments_info['is_replies'] %}
  12. <section class="video-metadata">
  13. <a class="video-metadata-thumbnail-box" href="{{ comments_info['video_url'] }}" title="{{ comments_info['video_title'] }}">
  14. <img class="video-metadata-thumbnail-img" src="{{ comments_info['video_thumbnail'] }}" height="180px" width="320px">
  15. </a>
  16. <a class="title" href="{{ comments_info['video_url'] }}" title="{{ comments_info['video_title'] }}">{{ comments_info['video_title'] }}</a>
  17. <h2>Comments page {{ comments_info['page_number'] }}</h2>
  18. <span>Sorted by {{ comments_info['sort_text'] }}</span>
  19. </section>
  20. {% endif %}
  21. {% if not comments_info['is_replies'] %}
  22. <div class="comment-links">
  23. {% for link_text, link_url in comments_info['comment_links'] %}
  24. <a class="sort-button" href="{{ link_url }}">{{ link_text }}</a>
  25. {% endfor %}
  26. </div>
  27. {% endif %}
  28. <div class="comments">
  29. {% for comment in comments_info['comments'] %}
  30. {{ comments.render_comment(comment, comments_info['include_avatars'], slim) }}
  31. {% endfor %}
  32. </div>
  33. {% if 'more_comments_url' is in comments_info %}
  34. <a class="page-button more-comments" href="{{ comments_info['more_comments_url'] }}">More comments</a>
  35. {% endif %}
  36. </section>
  37. {% if settings.use_comments_js %}
  38. <script src="/youtube.com/static/js/common.js"></script>
  39. <script src="/youtube.com/static/js/comments.js"></script>
  40. {% endif %}
  41. {% endblock main %}