{% if extra_css %} {% endif %} {# ── Page Header (hidden; JS extracts img src for Playwright header_template) ── #} {% if header_image %} {% endif %} {# ── Right-Side Label (position:fixed, repeats on every page) ── #} {% if label_image %}
{% endif %} {# ── Footer (hidden; Playwright footer_template renders page numbers) ── #} {# ── Cover Page ── #} {% if cover_image %} {% include "partials/cover.html" %} {% endif %} {# ── TOC Image Page ── #} {% if toc_image %}
Table of Contents
{% endif %} {# ── Page Content Wrapper (padding clears the fixed header/footer) ── #}
{# ── Dynamic TOC ── #} {% if not toc_image and toc_items %}
{% include "partials/toc.html" %}
{% endif %} {# ── Global Sections ── #} {% for gs in general_sections %}
{% if gs.blocks %} {% for block in gs.blocks %} {% include "partials/blocks/render_block.html" %} {% endfor %} {% else %} {{ gs.rendered_html }} {% endif %}
{% endfor %} {# ── Summary of Universities ── #} {% if summary_block %}
{% if summary_block.blocks %} {% for block in summary_block.blocks %} {% include "partials/blocks/render_block.html" %} {% endfor %} {% else %} {{ summary_block.rendered_html }} {% endif %}
{% endif %} {# ── University Sections ── #} {% if university_blocks %} {% for block in university_blocks %} {% include "partials/blocks/render_block.html" %} {% endfor %} {% elif universities %} {% for uni in universities %} {% include "partials/university.html" %} {% endfor %} {% endif %}
{# /page-content #} {# ── Bottom Image Pages ── #} {% for img_path in bottom_pages %}
Handbook Page Image
{% endfor %} {# ── Debug Summary ── #} {% if debug and stats %}

PDF Debug Summary

{{ stats | tojson(indent=2) }}
{% endif %}