Skip to content

#22 add option to generate one-page report#29

Open
tmarenko wants to merge 2 commits into
lordmauve:mainfrom
tmarenko:master
Open

#22 add option to generate one-page report#29
tmarenko wants to merge 2 commits into
lordmauve:mainfrom
tmarenko:master

Conversation

@tmarenko

@tmarenko tmarenko commented Jun 15, 2022

Copy link
Copy Markdown

Summary: #22

Approach:

  • added --self-contained-html option as a marker to understand whether need to write one or multiple HTML files

  • back.svg and file.svg files passes as Data URLs to one-page report

  • report and source HTML files will be in the same one-page report. Navigation is done in self-contained.js by hiding elements with page classes.

  • redesigned Jinja's templates:

  1. base.html is a base for every template (index, reports, sources)
  2. index.html now has additional logic based on self_contained marker
  3. file-report.html and annotated-source.html are used for usual reports without --self-contained-html option
  4. file-report-content.html and annotated-source-content.html are used both for usual and one-page report. Usual report uses them as template to fill, one-page report uses them to fill index.html template
  5. bind-handler.js contains JS script from file-report.html in order to reuse it in different template

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant