Cookies and tests

- Added cookie banner
- Improved tests and fixed models accordingly
This commit is contained in:
Johannes Randerath
2024-07-03 01:18:17 +02:00
parent cf6fcda0ed
commit 53ab731787
15 changed files with 434 additions and 165 deletions

View File

@@ -1,53 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OpenStreetMap with GTFS Toolbar</title>
<!-- Bootstrap CSS -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<!-- Leaflet CSS -->
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<link rel="stylesheet" href="https://unpkg.com/leaflet-draw/dist/leaflet.draw.css" />
<link rel="stylesheet" href="https://unpkg.com/leaflet-routing-machine/dist/leaflet-routing-machine.css" />
{% load static %}
<style>
body, html {
height: 100%;
margin: 0;
}
#map {
height: 100%;
width: 100%;
}
.sidebar {
height: 100%;
position: fixed;
top: 0;
left: 0;
width: 250px;
background-color: #f8f9fa;
border-right: 1px solid #dee2e6;
padding-top: 20px;
}
.content {
margin-left: 250px;
height: 100%;
}
.modal-body {
max-height: 60vh;
overflow-y: auto;
}
.route-list {
max-height: 400px;
overflow-y: scroll;
}
</style>
</style>
</head>
<body>
{% extends "base.html" %}
{% load static %}
{% block content %}
<div class="sidebar">
<div class="container">
<h5 class="mt-4">Options</h5>
@@ -56,22 +9,22 @@
<button class="list-group-item list-group-item-action" onclick="document.getElementById('fileInput').click();">Load GTFS from computer</button>
<button class="list-group-item list-group-item-action" onclick="importGTFS()">Import existing GTFS</button>
</div>
<h5 id="currentGTFS">
Current GTFS
<h6 id="newShape">
<button class="list-group-item list-group-item-action" onclick="drawNewShape()">Draw New Shape</button>
<button class="list-group-item list-group-item-action" onclick="addNewShape()">Add New Shape</button>
<button class="list-group-item list-group-item-action" onclick="addNewStop()">Add New Stop</button>
</h6>
<h6 id="chosenShape">
Chosen Shape
<!-- Shape options will be inserted here -->
</h6>
<h6 id="currentRoutes">
<div class="currentGTFS">
<h5 id="currentGTFS">Current GTFS</h5>
<h6 id="newShape">
<button class="list-group-item list-group-item-action" onclick="drawNewShape()">Draw New Shape</button>
<button class="list-group-item list-group-item-action" onclick="addNewShape()">Add New Shape</button>
<button class="list-group-item list-group-item-action" onclick="addNewStop()">Add New Stop</button>
</h6>
<h6 id="chosenShape">
Chosen Shape
<!-- Shape options will be inserted here -->
</h6>
<h6 id="currentRoutes">
Current GTFS
<!-- Route IDs will be inserted here -->
</h6>
</h5>
<!-- Route IDs will be inserted here -->
</h6>
</div>
</div>
</div>
<div class="content">
@@ -205,5 +158,4 @@
}
</script>
</body>
</html>
{% endblock %}