Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tmarenko
Copy link

@tmarenko tmarenko commented Jun 15, 2022

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.

None yet

1 participant