69 lines
2.4 KiB
HTML
69 lines
2.4 KiB
HTML
{% load static %}
|
|
{% load i18n %}
|
|
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% translate "Hors ligne — Contrôles" %}</title>
|
|
<link rel="manifest" href="{% static 'common/controls.webmanifest' %}" crossorigin="use-credentials">
|
|
<link rel="stylesheet" href="{% static 'common/bootstrap.min.css' %}">
|
|
<link rel="stylesheet" href="{% static 'common/bootstrap-icons.min.css' %}">
|
|
<style>
|
|
body { background-color: #f8f9fa; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="container py-5">
|
|
<div class="row justify-content-center">
|
|
<div class="col-11 col-md-6 text-center">
|
|
|
|
<i class="bi bi-wifi-off mb-3" style="font-size: 4.5rem; color: #dc3545;"></i>
|
|
<h2 class="mb-2">{% translate "Vous êtes hors ligne" %}</h2>
|
|
<p class="text-muted mb-4">
|
|
{% translate "Cette page n'est pas disponible sans connexion réseau." %}
|
|
</p>
|
|
|
|
<div class="d-grid gap-3">
|
|
|
|
<!-- Bouton affiché uniquement si un contrôle a déjà été visité -->
|
|
<a id="btn-last-control" href="#" class="btn btn-primary d-none">
|
|
<i class="bi bi-arrow-counterclockwise me-2"></i>
|
|
{% translate "Reprendre le contrôle en cours" %}
|
|
</a>
|
|
|
|
<a href="/mobile/controls/" class="btn btn-outline-secondary">
|
|
<i class="bi bi-list-task me-2"></i>
|
|
{% translate "Liste des contrôles (depuis le cache)" %}
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<p class="text-muted mt-4 small">
|
|
{% translate "Les pages déjà visitées lors de votre dernière connexion sont disponibles hors ligne." %}
|
|
</p>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="{% static 'common/bootstrap.bundle.min.js' %}"></script>
|
|
<script>
|
|
// Restaurer le dernier contrôle visité depuis localStorage
|
|
(function () {
|
|
try {
|
|
const lastUrl = localStorage.getItem('streetup.lastControlUrl');
|
|
if (lastUrl) {
|
|
const btn = document.getElementById('btn-last-control');
|
|
if (btn) {
|
|
btn.href = lastUrl;
|
|
btn.classList.remove('d-none');
|
|
}
|
|
}
|
|
} catch (e) { /* localStorage non disponible */ }
|
|
})();
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|