Files

21 lines
3.5 KiB
HTML

{% load slx_community slx_brand %}
<div class="home-grid"><div class="home-primary">
{% if perms.catalog.watch_slx_live and settings.stream_status != 'offline' and settings.stream_provider %}<section class="section live-announcement" id="map-live" tabindex="-1"><div class="section-head"><h2>SLX Live</h2><span class="kicker">{{ settings.get_stream_status_display }}</span></div><div class="card"><div><h3>{{ settings.stream_title|default:'Behind the pages, live' }}</h3>{% if settings.stream_starts_at and settings.stream_status == 'upcoming' %}<p><time datetime="{{ settings.stream_starts_at|date:'c' }}">{{ settings.stream_starts_at|date:'M j, Y · g:i a T' }}</time></p>{% endif %}<p><a href="{% url 'stream' %}">Open the watch page →</a></p></div></div></section>{% endif %}
{% if news %}<section class="section" id="map-blog" tabindex="-1"><div class="section-head"><h2>Latest from the blog</h2><a href="{% url 'blog' %}">View all →</a></div>{% include "entry-cards.html" with items=news %}</section>{% endif %}
{% if not countdown_chapters and not chapters %}<section class="section" id="map-chapters" tabindex="-1"><div class="section-head"><h2>Chapters</h2><a href="{% url 'chapters' %}">View all →</a></div>{% include "chapter-cards.html" %}</section>{% endif %}
{% if upcoming %}<section class="section" id="map-upcoming" tabindex="-1"><div class="section-head"><h2>Next up</h2><a href="{% url 'upcoming' %}">Release forecast →</a></div>{% include 'upcoming-cards.html' %}</section>{% endif %}
{% if cast %}<section class="section" id="map-cast" tabindex="-1"><div class="section-head"><h2>Meet the cast</h2><a href="{% url 'entries' 'cast' %}">View all →</a></div>{% include "entry-cards.html" with items=cast %}</section>{% endif %}
{% if world %}<section class="section" id="map-world" tabindex="-1"><div class="section-head"><h2>World archive</h2><a href="{% url 'entries' 'world' %}">View all →</a></div>{% include "entry-cards.html" with items=world %}</section>{% endif %}
</div>
<aside class="home-reviews" id="map-reviews" tabindex="-1" aria-labelledby="home-review-heading">
{% if newsletter_signup_open %}<section class="newsletter-home" id="map-newsletter" tabindex="-1"><p class="kicker">Studio dispatch</p><h2>Get the next drop</h2><p>SLX chapter launches and studio news in your inbox.</p><a class="cta" href="{% url 'newsletter-signup' %}" data-newsletter-open>Join the newsletter</a></section>{% endif %}
<div class="home-reviews-head"><p class="kicker">Fan corner</p><h2 id="home-review-heading">Recent Reviews</h2><a href="{% url 'slx-series-reviews' %}">Series reviews →</a></div>
{% prime_ranks recent_reviews %}{% for review in recent_reviews %}
<article class="mini-review">
{% if review.chapter.cover %}<img src="{{ review.chapter.cover.url }}" alt="" loading="lazy">{% else %}<span class="mini-review-art" aria-hidden="true">SX</span>{% endif %}
<div><p class="kicker">Chapter #{{ review.chapter.number|stringformat:"03d" }}</p><h3><a href="{% url 'slx-review' review.chapter.number review.pk %}">{% if review.contains_spoilers %}Review with spoilers{% else %}{{ review.headline|slx_brand }}{% endif %}</a></h3><small><a href="{% url 'slx-profile' review.author_id %}">{{ review.author.username }}</a> {% rank_badge review.author %}</small></div>
<span class="review-score" aria-label="{{ review.score }} out of 5">{{ review.score }}/5</span>
</article>
{% empty %}<p class="muted-copy">The first reader reviews will appear here. <a href="{% url 'chapters' %}">Pick a chapter to review →</a></p>{% endfor %}
</aside></div>