feat: create static directory and frontend files

This commit is contained in:
2026-08-18 15:12:50 +03:00
parent a509b71614
commit bd83cca99d
4 changed files with 726 additions and 0 deletions

292
static/styles.css Normal file
View File

@@ -0,0 +1,292 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
background-color: #f5f5f5;
color: #333;
height: 100vh;
overflow: hidden;
}
.app-container {
display: flex;
flex-direction: column;
height: 100vh;
}
.header {
background-color: #2c3e50;
color: white;
padding: 1rem 2rem;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.header h1 {
font-size: 1.5rem;
font-weight: 600;
}
.search-container {
background-color: #fff;
padding: 1rem 2rem;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.search-form {
display: flex;
gap: 1rem;
align-items: flex-end;
flex-wrap: wrap;
}
.form-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.form-group label {
font-size: 0.875rem;
font-weight: 500;
color: #555;
}
.form-group input {
padding: 0.5rem 0.75rem;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 1rem;
min-width: 150px;
}
.form-group input:focus {
outline: none;
border-color: #1976d2;
box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}
.search-btn {
padding: 0.5rem 1.5rem;
background-color: #1976d2;
color: white;
border: none;
border-radius: 4px;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s;
}
.search-btn:hover {
background-color: #1565c0;
}
.search-btn:disabled {
background-color: #90caf9;
cursor: not-allowed;
}
.content-container {
display: flex;
flex: 1;
overflow: hidden;
}
.routes-panel {
width: 350px;
background-color: #fff;
border-right: 1px solid #ddd;
display: flex;
flex-direction: column;
overflow: hidden;
}
.routes-panel h2 {
padding: 1rem;
font-size: 1.125rem;
font-weight: 600;
border-bottom: 1px solid #eee;
background-color: #f9f9f9;
}
.routes-list {
flex: 1;
overflow-y: auto;
padding: 0.5rem;
}
.empty-message {
padding: 2rem;
text-align: center;
color: #888;
}
.route-card {
background-color: #fff;
border: 1px solid #ddd;
border-radius: 6px;
padding: 1rem;
margin-bottom: 0.5rem;
cursor: pointer;
transition: box-shadow 0.2s, border-color 0.2s;
}
.route-card:hover {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
border-color: #1976d2;
}
.route-card.selected {
border-color: #1976d2;
background-color: #e3f2fd;
}
.route-card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.5rem;
}
.route-duration {
font-weight: 600;
color: #2c3e50;
}
.route-transfers {
font-size: 0.875rem;
color: #666;
}
.route-cost {
font-weight: 600;
color: #27ae60;
}
.map-panel {
flex: 1;
position: relative;
}
#map {
width: 100%;
height: 100%;
}
.loading-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 1000;
}
.loading-overlay.hidden {
display: none;
}
.loading-spinner {
border: 4px solid #f3f3f3;
border-top: 4px solid #1976d2;
border-radius: 50%;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
margin-bottom: 1rem;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.loading-overlay p {
color: white;
font-size: 1rem;
}
.error-message {
position: fixed;
top: 1rem;
right: 1rem;
background-color: #e74c3c;
color: white;
padding: 1rem;
border-radius: 6px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
z-index: 1001;
max-width: 400px;
}
.error-message.hidden {
display: none;
}
/* Leaflet popup styling */
.leaflet-popup-content {
min-width: 200px;
}
.leaflet-popup-content h4 {
margin-bottom: 0.5rem;
color: #2c3e50;
}
.leaflet-popup-content p {
margin: 0.25rem 0;
font-size: 0.875rem;
}
/* Transport type colors */
.transport-plane {
color: #ff9800;
}
.transport-train {
color: #1976d2;
}
.transport-bus {
color: #cddc39;
}
/* Responsive layout */
@media (max-width: 768px) {
.content-container {
flex-direction: column;
}
.routes-panel {
width: 100%;
height: 40%;
border-right: none;
border-bottom: 1px solid #ddd;
}
.map-panel {
height: 60%;
}
.search-form {
flex-direction: column;
align-items: stretch;
}
.form-group {
width: 100%;
}
.form-group input {
width: 100%;
}
}