from .utils import here def render_table(table_dict, sort=True, title=None): table_rows = "" table_dict = sorted( table_dict.items(), key=lambda item: item[0] ) # Sort the dictionary by keys for name, description in table_dict: table_rows += f"{name}{description}" html_response = f"""
{"" if title is None else f"

{title}

"} {table_rows}
Name Description
""" return html_response def render_base_template(title, content): css_content = "" css_path = here / "html" / "style.css" if css_path: with open(css_path, "r") as css_file: css_content = css_file.read() github_icon_svg = """""" return f""" {title}
Back to Comfy {github_icon_svg}
{content}
"""