File size: 1,943 Bytes
a11165b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
{% extends "base.html" %}
{% block content %}
<section class="chart-page" data-chart="{{ chart_name }}" data-page-type="{{ page_type }}">
  <header class="chart-header">
    <p class="browse-kicker">IMDb Charts</p>
    <h1>{{ chart_title }}</h1>
    <p>{{ chart_deck }}</p>
    <strong>{{ total_movies }} titles</strong>
  </header>

  {% if movies %}
    <ol class="chart-grid" data-chart-state="loaded" start="{{ (current_page - 1) * 50 + 1 }}">
      {% for movie in movies %}
      <li class="chart-card" data-title-id="{{ movie.id }}">
        <a class="chart-poster" href="/title/{{ movie.id }}/">
          <img src="{{ movie.poster }}" alt="{{ movie.title }} poster" width="300" height="450" loading="lazy">
          <span class="rank-badge">{{ movie.rank }}</span>
        </a>
        <div class="chart-card-copy">
          <a href="/title/{{ movie.id }}/"><strong>{{ movie.title }}</strong></a>
          <span>{{ movie.year }} · Movie</span>
          {% if movie.rating %}<span><b class="star-glyph">★</b> {{ movie.rating }}{% if movie.votes %} · {{ movie.votes }} votes{% endif %}</span>{% else %}<span class="popularity-label">↗ {{ rank_label }} #{{ movie.rank }}</span>{% endif %}
          {% if movie.credit %}<small>{{ movie.credit }}</small>{% endif %}
        </div>
      </li>
      {% endfor %}
    </ol>
  {% else %}
    <div class="empty-state" data-chart-state="empty">
      <h2>No ranked titles yet</h2>
      <p>This local chart is empty. Try the other chart or return later.</p>
    </div>
  {% endif %}

  <nav class="chart-pagination" aria-label="Chart pages">
    {% if current_page > 1 %}<a href="/chart/{{ chart_name }}/?page={{ current_page - 1 }}">‹ Previous</a>{% endif %}
    <span>Page {{ current_page }} of {{ page_count }}</span>
    {% if current_page < page_count %}<a href="/chart/{{ chart_name }}/?page={{ current_page + 1 }}">Next ›</a>{% endif %}
  </nav>
</section>
{% endblock %}