From ce2ca99ebc90ed18300f2b910fd3f8c414ccd4a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Sun, 14 May 2023 21:06:08 +0200 Subject: [PATCH] Don't move node off center if no TOC is shown. --- scripts/generate.py | 4 +++- static/style.css | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/generate.py b/scripts/generate.py index ef08ee1..9f98e7b 100644 --- a/scripts/generate.py +++ b/scripts/generate.py @@ -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"""
@@ -793,7 +795,7 @@ def as_document(html, title, global_toc): - +