{% extends "base.html" %} {% block extra_head %} {% endblock %} {% block content %}
{# Toolbar #} {% if not embed %}
{% for label, view in tabs %} {{ label }} {% endfor %}
{# Template select controls for summary view #} {% if current_view == 'summary' and template_controls %} {{ template_controls|safe }} {% endif %} {# Split view inline controls #} {% if current_view == 'split' %}
Left
Right
{% endif %} {# Translation language select #} {% if current_view == 'translated' and translation_langs %}
{% endif %} {# Fullscreen controls #}
{% endif %}
{# PDF-only warning #} {% if is_pdf_only and current_view in ['summary', 'source'] %}
PDF-only entry: summary and source views are unavailable.
{% endif %} {# Main content based on view #} {% if current_view == 'summary' %} {# Summary view #} {% if summary_template_name %}
Template: {{ summary_template_name }}
{% endif %} {% if template_warning %} {{ template_warning|safe }} {% endif %} {% if embed and template_controls %} {{ template_controls|safe }} {% endif %} {# Outline #} {% if show_outline %}
{% endif %}
{{ body_html|safe }}
{% elif current_view == 'source' %} {# Source view #} {% if body_html.startswith('
{{ source_path }}
Rendered from source markdown:
{% if show_outline %}
{% endif %}
{{ body_html|safe }}
{% if body_html %}Loading raw markdown...{% else %}Loading markdown...{% endif %}
Raw markdown
{% endif %} {% elif current_view == 'translated' %} {# Translated view #} {% if body_html.startswith('
Language: {{ selected_lang }}
{{ translated_path }}
Rendered from translated markdown:
{% if embed and translation_langs %}
{% endif %} {% if show_outline %}
{% endif %}
{{ body_html|safe }}
{% if body_html %}Loading raw markdown...{% else %}Loading markdown...{% endif %}
Raw markdown
{% endif %} {% elif current_view == 'pdf' %} {# PDF view (canvas) #} {% if body_html.startswith('
{{ pdf_filename }}
Page 1 / ?
{% endif %} {% elif current_view == 'pdfjs' %} {# PDF.js viewer view #} {% if body_html.startswith('
{{ pdf_filename }}
{% endif %} {% elif current_view == 'split' %} {# Split view #}
{% endif %}
{% endblock %} {% block extra_scripts %} {# CDN scripts for markdown rendering #} {# PDF.js for PDF view #} {% if current_view == 'pdf' %} {% endif %} {# Main detail JavaScript #} {# Outline functionality #} {% if show_outline %} {% endif %} {% endblock %}