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

65 lines
4.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "base.html" %}{% load static slx_brand %}{% block title %}{{ chapter.title }} · SLUMP X LAND{% endblock %}
{% block scripts %}<link rel="stylesheet" href="{% static 'manaa-reader.css' %}"><script defer src="{% static 'manaa-reader.js' %}"></script>{% endblock %}
{% block content %}<main class="section reader manaa-reader">
{% if frames %}
<section class="reading-deck" data-reader data-direction="{{ chapter.reader_direction }}" aria-label="ManaA reader">
<div class="reading-heading">
<a class="reading-icon" href="{% url 'chapters' %}" aria-label="Chapter archive">‹</a>
<h1><span class="kicker">#{{ chapter.number|stringformat:"03d" }}</span> {{ chapter.title|slx_brand }}</h1>
<a class="reading-icon" href="#discussion" aria-label="Discussion" title="Discussion"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" aria-hidden="true"><path d="M4 4h16v12H9l-5 4z"/></svg></a>
<details class="reading-settings" data-reader-settings hidden>
<summary class="reading-icon" aria-label="Reading settings" title="Reading settings">⚙</summary>
<div class="reading-settings-panel">
<label class="reading-view">Reading mode <select data-reader-mode>
<option value="double" selected>Double page</option><option value="single">Single page</option><option value="scroll">Scroll</option>
</select></label>
<small>{{ chapter.get_reader_direction_display }}</small>
<div class="reading-zoom" aria-label="Zoom controls">
<button type="button" class="fan-button" data-zoom="-1" aria-label="Zoom out">−</button>
<button type="button" class="fan-button" data-zoom="0" aria-label="Reset zoom to fit">Fit</button>
<button type="button" class="fan-button" data-zoom="1" aria-label="Zoom in">+</button>
</div>
<label><input type="checkbox" data-reader-reactions> Show page reactions</label>
<button type="button" class="fan-button reading-fullscreen" data-fullscreen aria-pressed="false">⛶ Fullscreen</button>
</div>
</details>
</div>
<div class="reading-window" data-reader-window tabindex="0" aria-label="Chapter art. Tap an edge, swipe, or use the arrow keys to turn fitted pages. Scroll or swipe to explore zoomed artwork.">
<div class="reading-strip">
{% for frame in frames %}
<div class="reading-frame frame-{{ frame.kind }}" data-frame="{{ frame.kind }}">
{% for page in frame.pages %}
<figure data-page data-number="{{ page.number }}" id="page-{{ page.number }}" class="reactable-page">
<img src="{{ page.art.url }}" alt="{% if frame.kind == 'cover' %}Chapter cover{% elif frame.kind == 'spread' %}Double spread, page {{ page.number }}{% else %}Page {{ page.number }}{% endif %}" {% if not forloop.first or not forloop.parentloop.first %}loading="lazy"{% else %}fetchpriority="high"{% endif %} decoding="async">
<figcaption>{% if frame.kind == 'cover' %}Cover{% elif frame.kind == 'spread' %}Double spread · Page {{ page.number }}{% else %}Page {{ page.number }}{% endif %}
{% include 'reaction-strip.html' with group=page.reactions reaction_for='React to chapter page art' %}</figcaption>
</figure>
{% empty %}
{% include 'chapter-cover.html' %}
{% endfor %}
</div>
{% endfor %}
<div data-reader-end aria-hidden="true"></div>
</div></div>
<div class="reading-tools" data-reader-tools hidden>
<div class="reading-move" aria-label="Page navigation">
<button type="button" class="fan-button" data-step="{% if chapter.reader_direction == 'rtl' %}1{% else %}-1{% endif %}" aria-label="{% if chapter.reader_direction == 'rtl' %}Next pages{% else %}Previous pages{% endif %}">←</button>
<div class="reading-position">
<input type="range" min="1" max="1" value="1" data-reader-scrubber aria-label="Jump to a page or spread">
<span data-page-output aria-live="polite"></span>
</div>
<button type="button" class="fan-button" data-step="{% if chapter.reader_direction == 'rtl' %}-1{% else %}1{% endif %}" aria-label="{% if chapter.reader_direction == 'rtl' %}Previous pages{% else %}Next pages{% endif %}">→</button>
</div>
</div>
{% include 'chapter-finish.html' %}
</section>
{% else %}<h1>{{ chapter.title|slx_brand }}</h1><p>No pages have been posted for this chapter yet.</p>{% endif %}
<div class="reading-chapter-stats">{% include "view-eye.html" with views=chapter.public_views %}</div>
{% if chapter.summary %}<p>{{ chapter.summary|slx_brand }}</p>{% endif %}
<nav class="actions" aria-label="Chapter navigation">
{% if previous_chapter %}<a class="cta secondary" href="{% url 'chapter' previous_chapter.number %}">Previous chapter</a>{% endif %}
<a class="cta secondary" href="{% url 'chapters' %}">Chapter archive</a>
{% if next_chapter %}<a class="cta" href="{% url 'chapter' next_chapter.number %}">Next chapter</a>{% endif %}
</nav>
{% include 'chapter-reviews.html' %}{% include 'fan-section.html' %}</main>{% endblock %}