- Updated test functions in various test files to enhance code clarity by formatting long lines and improving indentation. - Adjusted assertions to use multi-line formatting for better readability. - Added new test cases for theme settings API to ensure proper functionality. - Ensured consistent use of line breaks and spacing across test files for uniformity.
50 lines
2.1 KiB
HTML
50 lines
2.1 KiB
HTML
{% set nav_groups = [ { "label": "Dashboard", "links": [ {"href": "/", "label":
|
|
"Dashboard"}, ], }, { "label": "Overview", "links": [ {"href": "/ui/parameters",
|
|
"label": "Parameters"}, {"href": "/ui/costs", "label": "Costs"}, {"href":
|
|
"/ui/consumption", "label": "Consumption"}, {"href": "/ui/production", "label":
|
|
"Production"}, { "href": "/ui/equipment", "label": "Equipment", "children": [
|
|
{"href": "/ui/maintenance", "label": "Maintenance"}, ], }, ], }, { "label":
|
|
"Simulations", "links": [ {"href": "/ui/simulations", "label": "Simulations"},
|
|
], }, { "label": "Analytics", "links": [ {"href": "/ui/reporting", "label":
|
|
"Reporting"}, ], }, { "label": "Settings", "links": [ { "href": "/ui/settings",
|
|
"label": "Settings", "children": [ {"href": "/theme-settings", "label":
|
|
"Themes"}, {"href": "/ui/currencies", "label": "Currency Management"}, ], }, ],
|
|
}, ] %}
|
|
|
|
<nav class="sidebar-nav" aria-label="Primary navigation">
|
|
{% set current_path = request.url.path if request else "" %} {% for group in
|
|
nav_groups %}
|
|
<div class="sidebar-section">
|
|
<div class="sidebar-section-label">{{ group.label }}</div>
|
|
<div class="sidebar-section-links">
|
|
{% for link in group.links %} {% set href = link.href %} {% if href == "/"
|
|
%} {% set is_active = current_path == "/" %} {% else %} {% set is_active =
|
|
current_path.startswith(href) %} {% endif %}
|
|
<div class="sidebar-link-block">
|
|
<a
|
|
href="{{ href }}"
|
|
class="sidebar-link{% if is_active %} is-active{% endif %}"
|
|
>
|
|
{{ link.label }}
|
|
</a>
|
|
{% if link.children %}
|
|
<div class="sidebar-sublinks">
|
|
{% for child in link.children %} {% if child.href == "/" %} {% set
|
|
child_active = current_path == "/" %} {% else %} {% set child_active =
|
|
current_path.startswith(child.href) %} {% endif %}
|
|
<a
|
|
href="{{ child.href }}"
|
|
class="sidebar-sublink{% if child_active %} is-active{% endif %}"
|
|
>
|
|
{{ child.label }}
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</nav>
|