Some checks failed
Run Tests / test (push) Failing after 1m51s
- Introduced a new table `application_setting` to store configurable application options. - Implemented functions to manage CSS color settings, including loading, updating, and reading environment overrides. - Added a new settings view to render and manage theme colors. - Updated UI to include a settings page with theme color management and environment overrides display. - Enhanced CSS styles for the settings page and sidebar navigation. - Created unit and end-to-end tests for the new settings functionality and CSS management.
89 lines
2.5 KiB
HTML
89 lines
2.5 KiB
HTML
{% set nav_groups = [
|
|
{
|
|
"label": "Dashboard",
|
|
"links": [
|
|
{"href": "/", "label": "Dashboard"},
|
|
],
|
|
},
|
|
{
|
|
"label": "Scenarios",
|
|
"links": [
|
|
{"href": "/ui/scenarios", "label": "Overview"},
|
|
{"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": "Analysis",
|
|
"links": [
|
|
{"href": "/ui/simulations", "label": "Simulations"},
|
|
{"href": "/ui/reporting", "label": "Reporting"},
|
|
],
|
|
},
|
|
{
|
|
"label": "Settings",
|
|
"links": [
|
|
{
|
|
"href": "/ui/settings",
|
|
"label": "Settings",
|
|
"children": [
|
|
{"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>
|