From 8f44c11af942405b391f0e2b97035a386bec0568 Mon Sep 17 00:00:00 2001 From: Maciej Pienczyn Date: Tue, 7 Apr 2026 18:23:06 +0200 Subject: [PATCH] perf: remove d3.js + connections modal from base.html (-225KB per page) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit d3.v7.min.js (225KB) and connections_modal.html (~1100 lines) were loaded on every page but only used by owner-only "Mapa Powiązań" tool. - Removed d3.js and connections_modal include from base.html - Added {% block extra_scripts %} for pages that need external JS - admin/zopk_knowledge_graph.html loads d3 via extra_scripts block - connections_map.html already had its own d3 import - "Mapa Powiązań" link now points to /connections page instead of modal - zopk/index.html d3 code was disabled ({% if false %}) — no change needed Co-Authored-By: Claude Opus 4.6 (1M context) --- templates/admin/zopk_knowledge_graph.html | 4 ++++ templates/base.html | 8 ++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/admin/zopk_knowledge_graph.html b/templates/admin/zopk_knowledge_graph.html index 9057bbc..f523c9d 100644 --- a/templates/admin/zopk_knowledge_graph.html +++ b/templates/admin/zopk_knowledge_graph.html @@ -2,6 +2,10 @@ {% block title %}Graf Relacji Encji - ZOPK Baza Wiedzy{% endblock %} +{% block extra_scripts %} + +{% endblock %} + {% block extra_css %}