diff --git a/mknodes/manual/navs_section.py b/mknodes/manual/navs_section.py index 3e1903a3..2e489fc2 100644 --- a/mknodes/manual/navs_section.py +++ b/mknodes/manual/navs_section.py @@ -196,12 +196,14 @@ def create_template_page(page: mk.MkPage): text = ( 'page.template.announce_block.content = mk.MkMetadataBadges(typ="classifiers")\n' "page.template.footer_block.content = mk.MkProgressBar(50)\n" - f'page.template.tabs_block.content = mk.MkCode("{code}")' + f'page.template.tabs_block.content = mk.MkCode("{code}")\n' + 'page.template.hero_block.content = mk.MkHeader("A header!")' ) page += mk.MkCode(text) page.template.announce_block.content = mk.MkMetadataBadges(typ="classifiers") page.template.footer_block.content = mk.MkProgressBar(50) page.template.tabs_block.content = mk.MkCode(f"{code}") + page.template.hero_block.content = mk.MkHeader("A header!") def create_mkdefaultwebsite_section(nav: mk.MkNav): diff --git a/mknodes/pages/pagetemplate.py b/mknodes/pages/pagetemplate.py index bdbf2eb5..3178c6f0 100644 --- a/mknodes/pages/pagetemplate.py +++ b/mknodes/pages/pagetemplate.py @@ -29,6 +29,7 @@ def __init__( self.footer_block = templateblocks.FooterBlock(parent) self.libs_block = templateblocks.LibsBlock() self.styles_block = templateblocks.StylesBlock() + self.hero_block = templateblocks.HeroBlock() def __bool__(self): return any(self.blocks) @@ -47,6 +48,7 @@ def blocks(self) -> list[templateblocks.Block]: self.libs_block, self.styles_block, self.outdated_block, + self.hero_block, ] def __repr__(self): diff --git a/mknodes/pages/templateblocks.py b/mknodes/pages/templateblocks.py index ec9fe326..1bdd65ff 100644 --- a/mknodes/pages/templateblocks.py +++ b/mknodes/pages/templateblocks.py @@ -98,6 +98,10 @@ class FooterBlock(HtmlBlock): block_id = "footer" +class HeroBlock(HtmlBlock): + block_id = "hero" + + class OutdatedBlock(HtmlBlock): block_id = "outdated"