From 2d2ea063ac71ec648e71f85ba0cdfc599f94473f Mon Sep 17 00:00:00 2001 From: Ahmed Date: Fri, 19 Jun 2026 20:52:59 +0300 Subject: fix: style --- _shared/build.py | 13 ++++++++++--- wk.fo/meta | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/_shared/build.py b/_shared/build.py index a12cd73..a3bd09d 100644 --- a/_shared/build.py +++ b/_shared/build.py @@ -4,8 +4,12 @@ import json import os import sys -def render(title, breadcrumb, style, extra_css, body, footer): +def render(title, breadcrumb, style, extra_css, body, footer, standalone=False): css = style + ("\n" + extra_css if extra_css.strip() else "") + if standalone: + nav = f"" + else: + nav = f'' return f""" @@ -19,7 +23,7 @@ def render(title, breadcrumb, style, extra_css, body, footer):
- +{nav}

{breadcrumb}

@@ -68,6 +72,7 @@ def build(sites_dir): title = site breadcrumb = site + standalone = False meta_file = os.path.join(site_dir, "meta") if os.path.exists(meta_file): for line in open(meta_file): @@ -76,13 +81,15 @@ def build(sites_dir): title = v.strip('"') elif k == "BREADCRUMB": breadcrumb = v.strip('"') + elif k == "STANDALONE": + standalone = v.strip().strip('"') not in ("0", "false", "") extra_css = "" extra_file = os.path.join(site_dir, "extra.css") if os.path.exists(extra_file): extra_css = open(extra_file).read() - out = render(title, breadcrumb, style, extra_css, body, footer) + out = render(title, breadcrumb, style, extra_css, body, footer, standalone=standalone) with open(os.path.join(site_dir, "index.html"), "w") as f: f.write(out) print(f"built: {site}") diff --git a/wk.fo/meta b/wk.fo/meta index e068cc2..3c4e8f5 100644 --- a/wk.fo/meta +++ b/wk.fo/meta @@ -1,2 +1,3 @@ TITLE="wk.fo" BREADCRUMB="wk.fo" +STANDALONE=1 -- cgit v1.2.3