- Replace SB Admin 2 sidebar with a clean fixed sidebar (desktop) and a sticky bottom tab navigation (mobile, ≤767px) - Sidebar collapses to icon-only mode with state persisted in localStorage - Logo is a functional home link on all viewports - Mobile: full-width content, bottom nav replaces sidebar - Dashboard: 6 OBD stat cards (status, speed, RPM, coolant, throttle, fuel) wired to live socket events; removed all placeholder buttons/dropdowns - GPS info section cleaned up (lat/lon display instead of X/Y paragraphs) - DTC page: live /api/dtc wiring — MIL indicator + DTC table populated from API - New /api/dtc route added to app.py (mil + codes) - yaris.js: added obd_coolant_temp / obd_fuel_level / obd_throttle listeners - yaris.css: full rewrite — layout variables, sidebar, bottom nav, OBD cards, border-start utilities, mobile padding for bottom nav Co-authored-by: Copilot <[email protected]>
129 lines
6.7 KiB
HTML
129 lines
6.7 KiB
HTML
<!DOCTYPE html>
|
|
<html data-bs-theme="light" lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
|
<title>{% block title %}Yaris OBD{% endblock %}</title>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='bootstrap/css/bootstrap.min.css') }}">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='yaris.css') }}">
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='fonts/fontawesome-all.min.css') }}">
|
|
{% block styles %}{% endblock %}
|
|
</head>
|
|
|
|
<body id="page-top">
|
|
|
|
{# ── Desktop sidebar ─────────────────────────────────────────────────── #}
|
|
<nav id="app-sidebar" class="app-sidebar d-none d-md-flex flex-column">
|
|
<a class="sidebar-brand" href="{{ url_for('index') }}" aria-label="Home">
|
|
<i class="fas fa-car sidebar-brand-icon"></i>
|
|
<span class="sidebar-brand-text">{{ car.model }}</span>
|
|
</a>
|
|
<hr class="sidebar-divider">
|
|
<ul class="nav flex-column flex-grow-1">
|
|
<li class="nav-item">
|
|
<a class="nav-link{% if request.endpoint == 'index' %} active{% endif %}" href="{{ url_for('index') }}">
|
|
<i class="fas fa-tachometer-alt fa-fw"></i><span>Dashboard</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link{% if request.endpoint == 'dash' %} active{% endif %}" href="{{ url_for('dash') }}">
|
|
<i class="fas fa-video fa-fw"></i><span>Dashcam</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link{% if request.endpoint == 'history' %} active{% endif %}" href="{{ url_for('history') }}">
|
|
<i class="fas fa-route fa-fw"></i><span>Trip history</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link{% if request.endpoint == 'dtc' %} active{% endif %}" href="{{ url_for('dtc') }}">
|
|
<i class="fas fa-exclamation-triangle fa-fw"></i><span>DTC</span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link{% if request.endpoint == 'settings' %} active{% endif %}" href="{{ url_for('settings') }}">
|
|
<i class="fas fa-cog fa-fw"></i><span>Settings</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
<button class="sidebar-collapse-btn" id="sidebarToggle" type="button" aria-label="Collapse sidebar">
|
|
<i class="fas fa-chevron-left"></i>
|
|
</button>
|
|
</nav>
|
|
|
|
{# ── Main content area ────────────────────────────────────────────────── #}
|
|
<div id="content-wrapper">
|
|
|
|
{# Top bar #}
|
|
<nav class="topbar navbar navbar-light bg-white shadow-sm">
|
|
<div class="container-fluid px-3 gap-2">
|
|
{# Mobile: logo on left #}
|
|
<a class="navbar-brand d-flex d-md-none align-items-center gap-2 text-decoration-none" href="{{ url_for('index') }}">
|
|
<i class="fas fa-car text-primary"></i>
|
|
<span class="fw-bold text-dark">{{ car.model }}</span>
|
|
</a>
|
|
<div class="ms-auto d-flex align-items-center gap-2">
|
|
<div class="dropdown">
|
|
<button class="btn btn-link position-relative p-2" id="alert-toggle" type="button"
|
|
data-bs-toggle="dropdown" aria-expanded="false" aria-label="System alerts">
|
|
<i class="fas fa-bell fa-fw text-secondary"></i>
|
|
<span id="alert-count" class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger" hidden></span>
|
|
</button>
|
|
<div class="dropdown-menu dropdown-menu-end shadow" id="alert-menu" aria-labelledby="alert-toggle">
|
|
<h6 class="dropdown-header">System alerts</h6>
|
|
<div id="alert-notifications">
|
|
<div class="dropdown-item-text text-muted small">Loading…</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<span class="text-muted small d-none d-sm-inline">{{ account.name }}</span>
|
|
<img class="rounded-circle border" style="width:2rem;height:2rem;object-fit:cover;"
|
|
src="{{ url_for('static', filename='img/yaris.png') }}" alt="">
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<main class="container-fluid py-4 px-3 px-md-4 main-content">
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
|
|
<footer class="bg-white border-top text-center py-3 small text-muted d-none d-md-block">
|
|
© Yaris OBD {{ car.model }}
|
|
</footer>
|
|
</div>
|
|
|
|
{# ── Mobile bottom navigation bar ─────────────────────────────────────── #}
|
|
<nav class="mobile-bottom-nav d-flex d-md-none" aria-label="Main navigation">
|
|
<a class="mobile-nav-item{% if request.endpoint == 'index' %} active{% endif %}" href="{{ url_for('index') }}">
|
|
<i class="fas fa-tachometer-alt"></i>
|
|
<span>Dashboard</span>
|
|
</a>
|
|
<a class="mobile-nav-item{% if request.endpoint == 'dash' %} active{% endif %}" href="{{ url_for('dash') }}">
|
|
<i class="fas fa-video"></i>
|
|
<span>Dashcam</span>
|
|
</a>
|
|
<a class="mobile-nav-item{% if request.endpoint == 'history' %} active{% endif %}" href="{{ url_for('history') }}">
|
|
<i class="fas fa-route"></i>
|
|
<span>History</span>
|
|
</a>
|
|
<a class="mobile-nav-item{% if request.endpoint == 'dtc' %} active{% endif %}" href="{{ url_for('dtc') }}">
|
|
<i class="fas fa-exclamation-triangle"></i>
|
|
<span>DTC</span>
|
|
</a>
|
|
<a class="mobile-nav-item{% if request.endpoint == 'settings' %} active{% endif %}" href="{{ url_for('settings') }}">
|
|
<i class="fas fa-cog"></i>
|
|
<span>Settings</span>
|
|
</a>
|
|
</nav>
|
|
|
|
<script src="{{ url_for('static', filename='bootstrap/js/bootstrap.min.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/bs-init.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/theme.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/data-list.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/alerts.js') }}"></script>
|
|
{% block scripts %}{% endblock %}
|
|
</body>
|
|
|
|
</html>
|