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:
base.html is a base for every template (index, reports, sources)
index.html now has additional logic based on self_contained marker
file-report.html and annotated-source.html are used for usual reports without --self-contained-html option
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
bind-handler.js contains JS script from file-report.html in order to reuse it in different template
Summary: https://github.com/lordmauve/flake8-html/issues/22
Approach:
added
--self-contained-html
option as a marker to understand whether need to write one or multiple HTML filesback.svg
andfile.svg
files passes as Data URLs to one-page reportreport and source HTML files will be in the same one-page report. Navigation is done in
self-contained.js
by hiding elements withpage
classes.redesigned Jinja's templates:
base.html
is a base for every template (index, reports, sources)index.html
now has additional logic based onself_contained
markerfile-report.html
andannotated-source.html
are used for usual reports without--self-contained-html
optionfile-report-content.html
andannotated-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 fillindex.html
templatebind-handler.js
contains JS script fromfile-report.html
in order to reuse it in different template