rewrite styles
This commit is contained in:
+33
-6
@@ -3,6 +3,7 @@
|
||||
<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 }}">
|
||||
@@ -11,14 +12,41 @@
|
||||
<link rel="stylesheet" href="{{ static_url('css/charts.css') }}">
|
||||
<link rel="stylesheet" href="{{ static_url('css/choices.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg bg-body-tertiary border-bottom sticky-top"><div class="container"><a class="navbar-brand fw-bold text-body-emphasis" href="{{ url_for('main.dashboard') }}">FuelTrack</a>{% if current_user.is_authenticated %}<div class="d-flex gap-2 align-items-center flex-wrap"><a class="btn btn-sm btn-secondary" href="{{ url_for('main.dashboard') }}">Podsumowanie</a><a class="btn btn-sm btn-secondary" href="{{ url_for('main.fuel') }}">Tankowanie</a><a class="btn btn-sm btn-secondary" href="{{ url_for('main.vehicles') }}">Pojazdy</a><a class="btn btn-sm btn-secondary" href="{{ url_for('main.orlen_data') }}">Ceny Orlen</a>{% if current_user.role in ['boss','admin'] %}<a class="btn btn-sm btn-secondary" href="{{ url_for('main.stations') }}">Stacje</a><a class="btn btn-sm btn-secondary" href="{{ url_for('main.admin_companies') }}">Administracja</a>{% endif %}<a class="btn btn-sm btn-danger" href="/api/auth/logout" data-api-logout>Wyloguj</a></div>{% endif %}</div></nav>
|
||||
<main class="container py-4">{% with msgs=get_flashed_messages(with_categories=true) %}{% for cat,msg in msgs %}<div class="alert alert-{{cat}}">{{msg}}</div>{% endfor %}{% endwith %}{% block content %}{% endblock %}</main>
|
||||
<footer class="border-top mt-auto py-3"><div class="container d-flex justify-content-between align-items-center small text-body-secondary"><span>FuelTrack</span><a href="/docs" target="_blank" rel="noopener">API Docs</a></div></footer>
|
||||
<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>
|
||||
<a class="btn btn-outline-danger btn-sm ms-lg-2" href="/api/auth/logout" data-api-logout>Wyloguj</a>
|
||||
</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="{{ asset_urls.socket_io_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>
|
||||
@@ -27,7 +55,6 @@
|
||||
<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/socket.js') }}"></script>
|
||||
<script src="{{ static_url('js/init.js') }}"></script>
|
||||
{% block scripts %}{% endblock %}
|
||||
</body></html>
|
||||
|
||||
Reference in New Issue
Block a user