From c2a385080ed560db62e73c4129574895c3bc0b5d Mon Sep 17 00:00:00 2001 From: phil65 Date: Thu, 28 Sep 2023 22:55:47 +0200 Subject: [PATCH] chore: cleanup --- mknodes/manual/internals_section.py | 22 +++++----------------- mknodes/theme/materialtheme.py | 2 +- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/mknodes/manual/internals_section.py b/mknodes/manual/internals_section.py index 159ad418..e37f0bf2 100644 --- a/mknodes/manual/internals_section.py +++ b/mknodes/manual/internals_section.py @@ -48,6 +48,11 @@ def create_internals_section(root_nav: mk.MkNav): """Create the "Internals" Sub-MkNav and attach it to given MkNav.""" root_nav += nav page = nav.add_index_page(hide="toc") + page += "TODO" + + +@nav.route.page("Build steps") +def _(page: mk.MkPage): node = mk.MkTimeline() node.add_item(date="Step 1", content=STEP_1) ls = mk.MkList(INFO_PROVIDERS) @@ -64,23 +69,6 @@ def create_internals_section(root_nav: mk.MkNav): page.created_by = create_internals_section -# @nav.route.page("Tree", hide="toc", icon="graph") -# def create_tree_page(page: mk.MkPage): -# page += mk.MkHeader("This is the tree we built up to now.", level=3) -# tree = page.root.get_tree_repr(detailed=False, max_depth=3) -# page += mk.MkCode(tree, language="") - - -@nav.route.page("Requirements", hide="toc", icon="puzzle-edit") -def _(page: mk.MkPage): - page += mk.MkJinjaTemplate("requirements.md") - - -@nav.route.page("Build Log", hide="toc", icon="puzzle-edit") -def _(page: mk.MkPage): - page += mk.MkText("log() | MkCode", is_jinja_expression=True) - - @nav.route.nav("Complete code") def _(nav: mk.MkNav): nav.parse.module("mknodes/manual/", hide="toc") diff --git a/mknodes/theme/materialtheme.py b/mknodes/theme/materialtheme.py index c2f99091..4d089f4b 100644 --- a/mknodes/theme/materialtheme.py +++ b/mknodes/theme/materialtheme.py @@ -62,7 +62,7 @@ ) -def build_badge(icon: str, text: str = "", typ: str = ""): +def build_badge(icon: str, text: str = "", typ: str = "") -> str: classes = f"mdx-badge mdx-badge--{typ}" if typ else "mdx-badge" root = xml.Span(classes) if icon: