Files
pdf-reporting/report_generator/template/summary.html.j2
T
alexanderandClaude Opus 5.5 864e2ff824 Add a summary report set from Markdown
from-markdown takes a hand-written summary such as SUMMARY.md and sets it
in the full report's dress: the same cover, header, footers, table of
contents, headings and grids. The shared macros move to macros.html.j2 so
both templates draw from them, and layout.render_pdf takes the template and
document title to use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 12:22:45 +02:00

37 lines
1.1 KiB
Django/Jinja

{#
The summary report, set from a Markdown file in the dress of the full report: the same cover,
running header and footers, table of contents and headings, with the body in between.
The body arrives already rendered -- :mod:`summary` turns the Markdown into HTML whose elements
are the ones `report.css` already styles -- so this file only places it. The context this expects
is described by `summary.CONTEXT`.
#}
{% from "macros.html.j2" import facts %}
<div class="page-header"><img src="{{ cover.logo }}" alt="CipherCell" /></div>
<span class="footer-scan">{{ cover.footer }}</span>
<span class="footer-date">{{ cover.footer_date }}</span>
<div class="cover-mark">
<img src="{{ cover.logo }}" alt="CipherCell" />
</div>
<div class="cover-title">{{ cover.title }}</div>
{{ facts(cover.identity) }}
{% if cover.intro %}
<div class="prose cover-intro">{{ cover.intro }}</div>
{% endif %}
{% if contents %}
<h1 style="break-before: page">Table of Contents</h1>
<ol class="toc">
{% for entry in contents %}
<li><a href="#{{ entry.id }}">{{ entry.title }}</a></li>
{% endfor %}
</ol>
{% endif %}
<div class="prose">{{ body }}</div>