<%!
def inherit(context):
  if context.get('chrome'):
    return 'master.html'
  return None
%>
<%inherit file="${inherit(context)}"/>

<%namespace name="fragments" file="fragments.html"/>


% if chrome:
<%block name="css">
${parent.css()}
<link rel="alternate" type="application/atom+xml" title="New Comments" href="${request.route_url('comments_rss') + '?' + request.query_string}"/>
</%block>
<div class="subheader py-3">
  <div class="container">
    <div class="row">
      <div class="col-md-12">
        <h2>Comments</h2>
      </div>
    </div>
  </div>
</div>
<div class="container pt-4">
<div class="row">
  <div class="col-12">
% endif
<div class="list-group">
    % if chrome:
    <div class="list-group-item bg-light d-flex fw-bold">
      ${total} Comments
      % if page == 1:
      <a class="ms-1" href="${request.route_url('comments_rss') + '?' + request.query_string}">
        <span class="fa fa-rss"></span>
      </a>
      % endif
    </div>
    % endif
    <div class="list-group-item">
    % for comment in comments:
      ${fragments.comment(comment)}
    % endfor
    </div>
    %if chrome:
    <div class="list-group-item bg-light">
      ${self.pager.render(page, pages)}
    </div>
    %endif
  </div>


% if chrome:
  </div>
</div>
</div>
% endif
