Files
slump-x-land-studio/templates/stream.html
T

56 lines
3.9 KiB
HTML

{% extends 'base.html' %}{% load slx_community slx_brand %}
{% block title %}SLX Live · SLUMP X LAND{% endblock %}
{% block content %}
<main class="section live-landing">
<header class="live-hero">
<div class="live-hero-content">
<div class="live-kicker"><span class="kicker">{{ "SLUMP X LAND"|slx_brand }} · Broadcasts</span>
<span class="live-state live-state-{{ settings.stream_status }}"><span aria-hidden="true"></span>{{ settings.get_stream_status_display }}</span></div>
<h1>{{ settings.stream_title|default:'SLX Live'|slx_brand }}</h1>
{% if settings.stream_description %}<p>{{ settings.stream_description|slx_brand|linebreaksbr }}</p>
{% else %}<p>Draw with Seji, go behind the pages, and watch {{ "SLUMP X LAND"|slx_brand }} come together.</p>{% endif %}
{% if settings.stream_status == 'upcoming' and settings.stream_starts_at %}
<div class="live-clock"><time datetime="{{ settings.stream_starts_at|date:'c' }}" data-countdown>{{ settings.stream_starts_at|date:'M j, Y · g:i a T' }}</time>
<span class="countdown ticker" data-output aria-hidden="true"></span></div>
{% endif %}
</div>
</header>
<div class="live-grid">
<section class="live-watch" aria-labelledby="live-watch-title">
<h2 id="live-watch-title">Watch the broadcast</h2><p class="muted-copy">Invite-only viewing for approved SLX accounts.</p>
{% if embed and settings.stream_status != 'offline' %}
<div class="stream-embed {% if settings.stream_provider == 'twitch' %}twitch-embed{% endif %}"><iframe src="{{ embed }}" title="SLX Live stream player" loading="lazy" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen referrerpolicy="strict-origin-when-cross-origin"></iframe></div>
{% if settings.stream_provider == 'twitch' %}<p class="twitch-small-note">Open SLX Live on a larger screen to watch here.</p>{% endif %}
{% else %}
<div class="live-poster">{% if settings.stream_cover %}<img src="{{ settings.stream_cover.url }}" alt="">{% endif %}
<div><strong>{% if settings.stream_status != 'offline' %}The player is unavailable{% else %}The studio is offline{% endif %}</strong>
<p>Check back for the next broadcast.</p></div>
</div>
{% endif %}
</section>
<section id="stream-discussion" class="fan-panel live-discussion" aria-labelledby="stream-discussion-heading">
<div class="section-head"><h2 id="stream-discussion-heading">Stream discussion</h2></div>
{% for message in messages %}<p class="fan-message" role="status">{{ message }}</p>{% endfor %}
{% if settings.stream_comments_open %}
<form class="fan-compose" method="post" action="{% url 'stream-comment' %}">{% csrf_token %}
<input type="hidden" name="discussion_key" value="{{ discussion_key }}">
<label for="stream-comment-body">Leave a comment</label>
<textarea id="stream-comment-body" name="body" rows="3" maxlength="1800" required></textarea>
<button class="cta" type="submit">Post comment</button>
</form>
<p class="muted-copy">Comments appear after moderation.</p>
{% else %}<p>Comments are closed for this broadcast.</p>{% endif %}
{% prime_ranks comments %}{% for comment in comments %}
<article class="fan-comment manga-comment">{% include 'comment-byline.html' %}
<div class="manga-balloon"><p>{{ comment.body|slx_brand|linebreaksbr }}</p></div>
</article>
{% empty %}<p class="muted-copy">No published comments yet.</p>{% endfor %}
{% if comments.has_other_pages %}<nav class="live-comment-pages" aria-label="Comment pages">
{% if comments.has_previous %}<a href="?page={{ comments.previous_page_number }}#stream-discussion">Newer comments</a>{% endif %}
{% if comments.has_next %}<a href="?page={{ comments.next_page_number }}#stream-discussion">Older comments</a>{% endif %}
</nav>{% endif %}
</section>
</div>
</main>
{% endblock %}