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
798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 | |