aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/templates/comments_page.html
blob: c7947fac018d90eba031a12fcd50f31b217c8dfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{% extends "base.html" %}
{% import "comments.html" as comments %}

{% block page_title %}{{ 'Replies' if comments_info['is_replies'] else 'Comments page ' + comments_info['page_number'] }}{% endblock %}


{% block style %}
    main{
        display:grid;
        grid-template-columns: 3fr 2fr;
    }
    #left{
        background-color:#bcbcbc;
        
        display: grid;
        grid-column: 1;
        grid-row: 1;
        grid-template-columns: 1fr 640px;
        grid-template-rows: 0fr 0fr 0fr;
    }
        .comments-area{
            grid-column:2;
        }
            .comment{
                width:640px;
            }
{% endblock style %}


{% block main %}
    <div id="left">
        <section class="comments-area">
            {% if not comments_info['is_replies'] %}
                <section class="video-metadata">
                    <a class="video-metadata-thumbnail-box" href="{{ comments_info['video_url'] }}" title="{{ comments_info['video_title'] }}">
                        <img class="video-metadata-thumbnail-img" src="{{ comments_info['video_thumbnail'] }}" height="180px" width="320px">
                    </a>
                    <a class="title" href="{{ comments_info['video_url'] }}" title="{{ comments_info['video_title'] }}">{{ comments_info['video_title'] }}</a>

                    <h2>Comments page {{ comments_info['page_number'] }}</h2>
                    <span>Sorted by {{ comments_info['sort_text'] }}</span>
                </section>
            {% endif %}

            {{ comments.comment_posting_box(comment_posting_box_info) }}

            {% if not comments_info['is_replies'] %}
                <div class="comment-links">
                    {% for link_text, link_url in comments_info['comment_links'] %}
                        <a class="sort-button" href="{{ link_url }}">{{ link_text }}</a>
                    {% endfor %}
                </div>
            {% endif %}

            <div class="comments">
                {% for comment in comments_info['comments'] %}
                    {{ comments.render_comment(comment, comments_info['include_avatars']) }}
                {% endfor %}
            </div>
            {% if 'more_comments_url' is in comments_info %}
                <a class="page-button more-comments" href="{{ comments_info['more_comments_url'] }}">More comments</a>
            {% endif %}
        </section>
    </div>
{% endblock main %}