From 20fc9e1ec8381adf5ddfca453c47e43b5a47381a Mon Sep 17 00:00:00 2001 From: Martin Carlsson Date: Wed, 7 Jan 2026 23:02:15 +0100 Subject: [PATCH 1/2] Reorder metadata and remove Beteckning field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move Utfärdad above Publicerad in metadata display - Remove Beteckning from metadata section (already displayed elsewhere) Co-Authored-By: Claude Sonnet 4.5 --- exporters/html/html_export.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/exporters/html/html_export.py b/exporters/html/html_export.py index df610a2..a175efe 100644 --- a/exporters/html/html_export.py +++ b/exporters/html/html_export.py @@ -434,12 +434,8 @@ def convert_to_html(data: Dict[str, Any], apply_amendments: bool = False, up_to_ # Build metadata in two columns column1_items = [] column2_items = [] - - # Column 1: Basic document info - column1_items.append(f""" -
Beteckning:
-
{html.escape(beteckning)}
""") + # Column 1: Basic document info if organisation: column1_items.append(f"""
Departement:
@@ -472,15 +468,15 @@ def convert_to_html(data: Dict[str, Any], apply_amendments: bool = False, up_to_
Ja
""") # Column 2: Dates and links - if publicerad_datum: - column2_items.append(f""" -
Publicerad:
-
{html.escape(publicerad_datum)}
""") - if utfardad_datum: column2_items.append(f"""
Utfärdad:
{html.escape(utfardad_datum)}
""") + + if publicerad_datum: + column2_items.append(f""" +
Publicerad:
+
{html.escape(publicerad_datum)}
""") if ikraft_datum: column2_items.append(f""" From 02b59d9974002b05648dcefbefcc8eab2c497e74 Mon Sep 17 00:00:00 2001 From: Martin Carlsson Date: Wed, 7 Jan 2026 23:02:54 +0100 Subject: [PATCH 2/2] Update navbar initialization to use setHeader API - Refactor navbar configuration to use setHeader(parentText, parentUrl, childText) - Replace deprecated setHeaderChild() with new unified API - Add descriptive comments for navbar configuration Co-Authored-By: Claude Sonnet 4.5 --- exporters/html/selex-init.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/exporters/html/selex-init.js b/exporters/html/selex-init.js index 19f4014..4563a51 100644 --- a/exporters/html/selex-init.js +++ b/exporters/html/selex-init.js @@ -50,12 +50,14 @@ const bodyElement = document.body; const beteckning = bodyElement.getAttribute('data-beteckning'); - // Configure navbar + // Configure navbar with setHeader(parentText, parentUrl, childText) + const parentText = "SFS"; + const parentUrl = "/"; // Root page for now + if (beteckning) { - SweNavbar.setHeader("SFS"); - SweNavbar.setHeaderChild(beteckning); + SweNavbar.setHeader(parentText, parentUrl, beteckning); } else { - SweNavbar.setHeader("SFS"); + SweNavbar.setHeader(parentText, parentUrl); } }).catch((error) => { console.warn('Failed to load navbar script:', error);