AgPerry's picture
Add files using upload-large-folder tool
a11165b verified
Raw History Blame Contribute Delete
7.17 kB
{% extends "base.html" %}
{% macro title_grid(items, section_name) -%}
<div class="discovery-title-grid" data-discovery-collection="{{ section_name }}">
{% for title in items %}<a href="/title/{{ title.id }}/"><img src="{{ title.card }}" alt="{{ title.title }} poster" loading="lazy"><span><strong>{{ title.title }}</strong><small>{{ title.year }}</small></span></a>{% endfor %}
</div>
{%- endmacro %}
{% block content %}
<article class="discovery-page" data-page-type="{{ page_type }}" data-page-key="{{ page_key }}">
<header class="discovery-hero"><p class="browse-kicker">IMDb discovery</p><h1>{{ browse_title }}</h1><p>{{ browse_deck }}</p></header>
{% if page_type == 'calendar' %}
<div class="calendar-directory" data-discovery-section="release-years">
{% for group in calendar_groups %}<section data-calendar-year="{{ group.year }}"><h2>{{ group.year }}</h2><ul>{% for title in group.titles %}<li><a href="/title/{{ title.id }}/"><strong>{{ title.title }}</strong><span>{{ title.title_type|title }}</span></a></li>{% endfor %}</ul></section>{% endfor %}
</div>
{% elif page_type == 'news' %}
<section class="news-directory" data-discovery-section="{{ page_key }}-desk" aria-labelledby="news-desk-heading">
<h2 id="news-desk-heading">{{ browse_title }} desk</h2>
<div>{% for item in news_items %}<article><img src="{{ item.image }}" alt="" loading="lazy"><span><h3><a href="{{ item.href }}">{{ item.heading }}</a></h3><p>{{ item.summary }}</p><a href="{{ item.href }}">Explore ›</a></span></article>{% endfor %}</div>
</section>
{% elif page_type == 'editorial-picks' %}
<section class="discovery-collection" data-discovery-section="editorial-{{ page_key }}"><h2>{{ browse_title }} collection</h2><p>Titles selected from the included directory for this destination.</p>{{ title_grid(collection_titles, page_key) }}</section>
{% elif page_type == 'awards' %}
<nav class="discovery-route-links" data-discovery-section="awards-hubs" aria-label="Awards destinations">{% for label, href in route_links %}<a href="{{ href }}">{{ label }} <span>›</span></a>{% endfor %}</nav>
<section class="discovery-collection"><h2>Titles in awards coverage</h2><p>Explore title entries; no live nominations or results are claimed.</p>{{ title_grid(collection_titles, page_key) }}</section>
{% elif page_type == 'events' %}
<nav class="discovery-route-links" data-discovery-section="event-guides" aria-label="Event destinations">{% for label, href in route_links %}<a href="{{ href }}">{{ label }} <span>›</span></a>{% endfor %}</nav>
<section class="discovery-collection"><h2>Event guide titles</h2><p>Directory entries connected to this guide; schedules and live results are not shown.</p>{{ title_grid(collection_titles, page_key) }}</section>
{% elif page_type == 'people-chart' %}
<ol class="people-directory" data-discovery-section="people-ranking">
{% for person in people %}<li><a href="/name/{{ person.id }}/"><img src="{{ person.thumb }}" alt="{{ person.name }}" width="160" height="160" loading="lazy"><span><b>{{ loop.index }}. {{ person.name }}</b><small>{{ person.roles }}</small><em>Known for {{ person.known_for }}</em></span></a></li>{% endfor %}
</ol>
{% elif page_type == 'genres' %}
<div class="genre-directory" data-discovery-section="genre-groups">
{% for genre in genre_sections %}<section><h2>{{ genre.name }}</h2><ul>{% for title in genre.titles %}<li><a href="/title/{{ title.id }}/">{{ title.title }} <small>({{ title.year }})</small></a></li>{% endfor %}</ul></section>{% endfor %}
</div>
{% elif page_type == 'gallery' %}
<div class="media-gallery" data-gallery data-discovery-section="summer-cast-gallery">
{% for item in media %}<figure data-media-id="{{ item.id }}" data-media-type="image"><button type="button" class="gallery-open" data-gallery-open="{{ loop.index0 }}" data-gallery-type="image" data-gallery-src="{{ item.local_path }}" data-gallery-caption="{{ item.caption }}" aria-label="Open {{ item.caption }}"><img src="{{ item.local_path }}" alt="{{ item.caption }}" loading="lazy"></button><figcaption>{{ item.caption }}</figcaption></figure>{% endfor %}
</div>
<div class="gallery-dialog" data-gallery-dialog role="dialog" aria-modal="true" aria-label="Media viewer" hidden><button type="button" class="dialog-close" data-gallery-close aria-label="Close media viewer">×</button><img data-gallery-image alt=""><video data-gallery-video controls tabindex="0" preload="metadata" hidden><source data-gallery-video-source type="video/mp4"><track data-gallery-video-track kind="captions" srclang="en" label="English" default></video><p data-gallery-caption></p><a data-gallery-video-page hidden>Open dedicated video page</a></div>
{% elif page_type == 'originals' %}
<div class="trailer-grid" data-discovery-section="original-video-series">{% for video in videos %}<article><a href="/video/{{ video.id }}/"><img src="{{ video.poster_path }}" alt="{{ video.caption }}" loading="lazy"></a><h2><a href="/video/{{ video.id }}/">{{ video.caption }}</a></h2><p><a href="/title/{{ video.title.id }}/">{{ video.title.title }}</a></p></article>{% endfor %}</div>
{% elif page_type == 'tv-discovery' %}
<section class="discovery-collection" data-discovery-section="series-directory"><h2>Series in the directory</h2>{{ title_grid(series, 'series') }}</section>
{% elif page_type == 'movie-discovery' %}
<section class="discovery-collection" data-discovery-section="india-movie-directory"><h2>Indian films in the directory</h2>{{ title_grid(collection_titles, 'india') }}</section>
{% elif page_type == 'title-search' %}
<section class="title-search-directory" data-discovery-section="podcast-search"><h2>Search the included directory</h2><p>No podcast-series entries are represented in the included 338-title directory.</p><form action="/find/" method="get" role="search"><label for="discovery-query">Title or person</label><input id="discovery-query" name="q" required><button type="submit">Search</button></form></section>
{% elif page_type == 'product-discovery' %}
<section class="product-directory" data-discovery-section="local-product-tools"><h2>Try IMDb features</h2><div>{% for title, description, href in product_cards %}<a href="{{ href }}"><strong>{{ title }}</strong><span>{{ description }}</span></a>{% endfor %}</div></section>
{% elif page_type == 'polls' %}
<section class="poll-directory" data-discovery-section="title-exploration-poll"><p class="browse-kicker">Question</p><h2>Which top-rated film would you explore next?</h2><p>Choose a title to open its directory page. No vote is recorded.</p><div>{% for label, href in poll_choices %}<a href="{{ href }}">{{ label }}</a>{% endfor %}</div></section>
{% elif page_type == 'site-index' %}
<div class="site-index-directory" data-discovery-section="site-navigation-index">{% for group_title, links in site_groups %}<section><h2>{{ group_title }}</h2><ul>{% for label, href in links %}<li><a href="{{ href }}">{{ label }}</a></li>{% endfor %}</ul></section>{% endfor %}</div>
{% endif %}
</article>
{% endblock %}