Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions exporters/html/html_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
<dt>Beteckning:</dt>
<dd property="eli:id_local" datatype="xsd:string">{html.escape(beteckning)}</dd>""")

# Column 1: Basic document info
if organisation:
column1_items.append(f"""
<dt>Departement:</dt>
Expand Down Expand Up @@ -472,15 +468,15 @@ def convert_to_html(data: Dict[str, Any], apply_amendments: bool = False, up_to_
<dd property="eli:type_document" resource="http://data.europa.eu/eli/ontology#directive" datatype="xsd:boolean">Ja</dd>""")

# Column 2: Dates and links
if publicerad_datum:
column2_items.append(f"""
<dt>Publicerad:</dt>
<dd property="eli:date_publication" datatype="xsd:date">{html.escape(publicerad_datum)}</dd>""")

if utfardad_datum:
column2_items.append(f"""
<dt>Utfärdad:</dt>
<dd property="eli:date_document" datatype="xsd:date">{html.escape(utfardad_datum)}</dd>""")

if publicerad_datum:
column2_items.append(f"""
<dt>Publicerad:</dt>
<dd property="eli:date_publication" datatype="xsd:date">{html.escape(publicerad_datum)}</dd>""")

if ikraft_datum:
column2_items.append(f"""
Expand Down
10 changes: 6 additions & 4 deletions exporters/html/selex-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down