templates
tit.reporting.core.templates ¶
CSS and JavaScript templates for TI-Toolbox reports.
Contains the default styling and interactivity for generated reports.
Templates are consumed by ReportAssembler.render_html to produce a
self-contained HTML document.
Public API¶
DEFAULT_CSS_STYLES : str Complete CSS stylesheet for TI-Toolbox reports. DEFAULT_JS_SCRIPTS : str JavaScript for copy-to-clipboard, section toggling, and scroll-tracking. get_html_template Render a complete HTML document from content fragments.
See Also¶
tit.reporting.core.assembler : Uses get_html_template during rendering.
get_html_template ¶
get_html_template(title: str, content: str, toc_html: str = '', metadata_html: str = '', footer_html: str = '', custom_css: str = '', custom_js: str = '') -> str
Generate a complete HTML document with the report content.
Parameters¶
title : str
The report title (used in <title> and the header <h1>).
content : str
The main HTML content (rendered sections).
toc_html : str, optional
Table of contents HTML fragment.
metadata_html : str, optional
Header metadata HTML fragment.
footer_html : str, optional
Footer HTML. Defaults to a TI-Toolbox credit line.
custom_css : str, optional
Additional CSS appended after the default styles.
custom_js : str, optional
Additional JavaScript appended after the default scripts.
Returns¶
str Complete HTML document as a string.
Source code in tit/reporting/core/templates.py
728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 | |