Files
fuel_track/app/templates/base.html
T
Mateusz Gruszczyński cf4398a2a0 split api pythons
2026-07-14 14:55:46 +02:00

64 lines
4.2 KiB
HTML

<!doctype html>
<html lang="pl" data-bs-theme="{{ app_theme.mode }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="theme-color" content="#0d6efd">
<title>{% block title %}FuelTrack{% endblock %}</title>
<link id="bootstrap-theme" rel="stylesheet" href="{{ app_theme.url }}">
<link rel="stylesheet" href="{{ asset_urls.choices_css }}">
<link rel="stylesheet" href="{{ static_url('css/layout.css') }}">
<link rel="stylesheet" href="{{ static_url('css/components.css') }}">
<link rel="stylesheet" href="{{ static_url('css/charts.css') }}">
<link rel="stylesheet" href="{{ static_url('css/choices.css') }}">
</head>
<body class="{% if not current_user.is_authenticated %}auth-page{% endif %}">
{% if current_user.is_authenticated %}
<nav class="navbar navbar-expand-lg app-navbar sticky-top" aria-label="Główna nawigacja">
<div class="container">
<a class="navbar-brand app-brand" href="{{ url_for('main.dashboard') }}" aria-label="FuelTrack — strona główna">
<span class="brand-fuel">Fuel</span><span class="brand-track">Track</span>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#mainNavigation" aria-controls="mainNavigation" aria-expanded="false" aria-label="Pokaż nawigację"><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="mainNavigation">
<div class="navbar-nav ms-auto align-items-lg-center gap-lg-1 py-3 py-lg-0">
<a class="nav-link {% if request.endpoint=='main.dashboard' %}active{% endif %}" href="{{ url_for('main.dashboard') }}">Podsumowanie</a>
<a class="nav-link {% if request.endpoint=='main.fuel' %}active{% endif %}" href="{{ url_for('main.fuel') }}">Tankowanie</a>
<a class="nav-link {% if request.endpoint=='main.vehicles' %}active{% endif %}" href="{{ url_for('main.vehicles') }}">Pojazdy</a>
<a class="nav-link {% if request.endpoint=='main.orlen_data' %}active{% endif %}" href="{{ url_for('main.orlen_data') }}">Ceny Orlen</a>
{% if current_user.role in ['boss','admin'] %}
<a class="nav-link {% if request.endpoint=='main.stations' %}active{% endif %}" href="{{ url_for('main.stations') }}">Stacje</a>
<a class="nav-link {% if request.endpoint and request.endpoint.startswith('main.admin') %}active{% endif %}" href="{{ url_for('main.admin_companies') }}">Administracja</a>
{% endif %}
<span class="navbar-divider d-none d-lg-block"></span>
<form method="post" action="{{ url_for('auth.logout') }}" class="d-inline ms-lg-2">
<button class="btn btn-outline-danger btn-sm" type="submit">Wyloguj</button>
</form>
</div>
</div>
</div>
</nav>
{% endif %}
<main class="container app-main {% if not current_user.is_authenticated %}auth-main{% endif %}">
{% with msgs=get_flashed_messages(with_categories=true) %}
{% for cat,msg in msgs %}<div class="alert alert-{{cat}} alert-dismissible fade show app-alert" role="alert">{{msg}}<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Zamknij"></button></div>{% endfor %}
{% endwith %}
{% block content %}{% endblock %}
</main>
{% if current_user.is_authenticated %}<footer class="app-footer"><div class="container d-flex justify-content-between align-items-center small"><span>@linuxiarz.pl</span><a href="/docs" target="_blank" rel="noopener">Dokumentacja API</a></div></footer>{% endif %}
<script src="{{ asset_urls.bootstrap_js }}"></script>
<script src="{{ asset_urls.choices_js }}"></script>
<script src="{{ asset_urls.chart_js }}"></script>
<script src="{{ static_url('js/core.js') }}"></script>
<script src="{{ static_url('js/charts.js') }}"></script>
<script src="{{ static_url('js/ajax.js') }}"></script>
<script src="{{ static_url('js/stations.js') }}"></script>
<script src="{{ static_url('js/orlen.js') }}"></script>
<script src="{{ static_url('js/fuel.js') }}"></script>
<script src="{{ static_url('js/auth.js') }}"></script>
<script src="{{ static_url('js/users.js') }}"></script>
<script src="{{ static_url('js/fuel_entries.js') }}"></script>
<script src="{{ static_url('js/init.js') }}"></script>
{% block scripts %}{% endblock %}
</body></html>