From f913a8af538b5a7f22b49b47c5b9efbb159c158f Mon Sep 17 00:00:00 2001 From: oskar Date: Mon, 3 Aug 2026 17:52:23 +0200 Subject: [PATCH] =?UTF-8?q?Stopka:=20dyskretne=20"powered=20by=20gethumana?= =?UTF-8?q?i.pl"=20na=20ka=C5=BCdej=20stronie=20i=20w=20grafie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit W _page_shell dopisek idzie do istniejącej stopki, tym samym małym wyciszonym fontem co nota o generatorze. Viewer grafu stopki nie ma (main wypełnia okno), więc w gen_viz.py dopisek ląduje w nagłówku obok "OKF bundle", w tej samej klasie .muted — przez łatkę na _load_template, tak samo jak dotychczasowa łatka na viz.js: repo upstream zostaje nietknięte, a brak kotwicy przerywa regenerację zamiast po cichu gubić dopisek. Co-Authored-By: Claude Opus 5 (1M context) --- gen_pages.py | 3 +- gen_viz.py | 34 ++++++++++++++++++- pages/index.html | 3 +- .../oferty/apartment-brandau-kappl.html | 3 +- pages/ischgl/oferty/apartments-kappl.html | 3 +- pages/ischgl/region.html | 3 +- .../oferty/haeuslerhof-valdaora.html | 3 +- .../oferty/residence-corones-valdaora.html | 3 +- pages/kronplatz/region.html | 3 +- pages/linki.html | 3 +- pages/oferty/alpenparks-rehrenberg.html | 3 +- pages/oferty/alpenparks-sonnleiten.html | 3 +- pages/oferty/dom-dla-grupy.html | 3 +- pages/oferty/glemm-lodge.html | 3 +- pages/oferty/kristall-schattbergxpress.html | 3 +- pages/oferty/sportchalet-viehhofen.html | 3 +- pages/porownanie.html | 3 +- pages/region.html | 3 +- pages/sfl/oferty/apart-ideal-serfaus.html | 3 +- pages/sfl/oferty/haus-central-ladis.html | 3 +- pages/sfl/region.html | 3 +- pages/start.html | 3 +- pages/szablon-maila.html | 3 +- pages/wyjazd.html | 3 +- viz.html | 1 + 25 files changed, 80 insertions(+), 24 deletions(-) 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}
Wygenerowane z bundle'a OKF przez gen_pages.py — nie edytuj -tych plików, edytuj .md i przegeneruj.
{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

Wygenerowane z bundle'a OKF przez gen_pages.py — nie edytuj -tych plików, edytuj .md i przegeneruj.
+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

Wygenerowane z bundle'a OKF przez gen_pages.py — nie edytuj -tych plików, edytuj .md i przegeneruj.
+tych plików, edytuj .md i przegeneruj.
+powered by gethumanai.pl