diff --git a/gen_pages.py b/gen_pages.py index e3bc282..8892815 100644 --- a/gen_pages.py +++ b/gen_pages.py @@ -546,7 +546,8 @@ def _page_shell( {content} {script_tag} +tych plików, edytuj .md i przegeneruj.
+powered by gethumanai.pl{script_tag} """ diff --git a/gen_viz.py b/gen_viz.py index b44d9b3..56e1a40 100644 --- a/gen_viz.py +++ b/gen_viz.py @@ -308,7 +308,11 @@ def _point_concepts_to_pages(graph: dict) -> None: MISSING_PAGES.append(page) -# --- jedyna ingerencja w viewer --------------------------------------- +# --- ingerencje w viewer ---------------------------------------------- +# +# Dwie, obie w locie na stringach wstawianych do viz.html — repo upstream +# zostaje nietknięte: (1) reguła stylu dla węzłów "external" w viz.js, +# (2) dopisek „powered by” w nagłówku szablonu (viewer nie ma stopki). # # Kolor węzła jest sterowany danymi ("background-color": "data(color)"), # więc odróżnienie kolorem nie wymaga tykania viewera. Kształt już tak: @@ -360,6 +364,34 @@ def _load_asset(name: str) -> str: G._load_asset = _load_asset +# Viewer nie ma stopki (main wypełnia okno), więc dopisek ląduje w nagłówku, +# obok istniejącego „OKF bundle” — ta sama klasa `.muted`, czyli ten sam mały +# wyciszony font co reszta metadanych paska. +_CREDIT_ANCHOR = ' OKF bundle\n' + +_CREDIT_MARKUP = ( + ' · powered by gethumanai.pl' + "\n" +) + +_upstream_load_template = G._load_template + + +def _load_template() -> str: + """Upstreamowy szablon + dyskretny dopisek „powered by” w nagłówku.""" + template = _upstream_load_template() + if _CREDIT_ANCHOR not in template: + raise SystemExit( + "gen_viz.py: nie znaleziono kotwicy nagłówka w templates/viz.html — " + "upstream się zmienił, popraw _CREDIT_ANCHOR przed regeneracją." + ) + return template.replace(_CREDIT_ANCHOR, _CREDIT_ANCHOR + _CREDIT_MARKUP, 1) + + +G._load_template = _load_template + + # --- łatki na generator upstreamowy ----------------------------------- _upstream_extract_links = G._extract_links diff --git a/pages/index.html b/pages/index.html index be55ac0..5934fd0 100644 --- a/pages/index.html +++ b/pages/index.html @@ -162,6 +162,7 @@ td.thumb .placeholder { display: flex; width: 120px; height: 80px; border-radius

Wariant Serfaus-Fiss-Ladis

+tych plików, edytuj .md i przegeneruj.
+powered by gethumanai.pl diff --git a/pages/ischgl/oferty/apartment-brandau-kappl.html b/pages/ischgl/oferty/apartment-brandau-kappl.html index 7328300..81c8586 100644 --- a/pages/ischgl/oferty/apartment-brandau-kappl.html +++ b/pages/ischgl/oferty/apartment-brandau-kappl.html @@ -164,7 +164,8 @@ td.thumb .placeholder { display: flex; width: 120px; height: 80px; border-radius

Do zrobienia

+tych plików, edytuj .md i przegeneruj.
+powered by gethumanai.pl