Don't move node off center if no TOC is shown.

This commit is contained in:
Sergio Martínez Portela 2023-05-14 21:06:08 +02:00
parent 210a508a90
commit ce2ca99ebc
2 changed files with 5 additions and 3 deletions

View file

@ -772,8 +772,10 @@ def render(headline, doc, graph, headlineLevel):
def as_document(html, title, global_toc):
body_classes = []
if global_toc is None:
toc_section = ""
body_classes.append('no-toc')
else:
toc_section = f"""
<div class="global-table-of-contents">
@ -793,7 +795,7 @@ def as_document(html, title, global_toc):
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<body class="{' '.join(body_classes)}">
<nav>
<h1><a href="./index.html">Código para llevar [Notes]</a></h1>
<input type="text" id="searchbox" disabled="true" placeholder="Search (requires JS)" />