- Split server.js routes into modular files (server/routes/) - departures.js: Departure data endpoints - sites.js: Site search and nearby sites - config.js: Configuration endpoints - Reorganized file structure following Node.js best practices: - Moved sites-config.json to config/sites.json - Moved API_RESPONSE_DOCUMENTATION.md to docs/ - Moved raspberry-pi-setup.sh to scripts/ - Archived legacy files to archive/ directory - Updated all code references to new file locations - Added archive/ to .gitignore to exclude legacy files from repo - Updated README.md with new structure and organization - All functionality tested and working correctly Version: 1.2.0
137 lines
6.0 KiB
HTML
137 lines
6.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>SL Transport Departures - Ambassaderna (1411)</title>
|
|
<!-- Global configuration - will be set by Constants.js, kept for backward compatibility -->
|
|
<script>
|
|
// Global variables (fallback if Constants not loaded)
|
|
window.API_URL = window.API_URL || 'http://localhost:3002/api/departures';
|
|
window.REFRESH_INTERVAL = window.REFRESH_INTERVAL || 5000;
|
|
</script>
|
|
|
|
<!-- Leaflet.js for map functionality -->
|
|
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
|
|
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
|
|
|
|
<!-- External CSS -->
|
|
<link rel="stylesheet" href="public/css/main.css">
|
|
<link rel="stylesheet" href="public/css/components.css">
|
|
|
|
<!-- Utility scripts (must load first) -->
|
|
<script src="public/js/utils/constants.js"></script>
|
|
<script src="public/js/utils/logger.js"></script>
|
|
|
|
<!-- Component scripts (load in dependency order) -->
|
|
<script src="public/js/components/ConfigManager.js"></script>
|
|
<script src="public/js/components/Clock.js"></script>
|
|
<script src="public/js/components/WeatherManager.js"></script>
|
|
<script src="public/js/components/DeparturesManager.js"></script>
|
|
|
|
<!-- Main application script -->
|
|
<script src="public/js/main.js"></script>
|
|
|
|
<!-- Inline styles removed - now in external CSS files -->
|
|
</head>
|
|
<body>
|
|
<!-- Content wrapper for vertical orientation -->
|
|
<div id="content-wrapper">
|
|
<!-- Clock element -->
|
|
<div id="clock"></div>
|
|
|
|
<!-- Site ID header removed as requested -->
|
|
|
|
<!-- Main content grid for landscape layout -->
|
|
<div class="main-content-grid">
|
|
<!-- Left side: Departures -->
|
|
<div class="departures-section">
|
|
<div class="status" id="status">Loading departures...</div>
|
|
|
|
<div class="departure-container" id="departures">
|
|
<!-- Departures will be inserted here by JavaScript -->
|
|
</div>
|
|
</div>
|
|
|
|
</div> <!-- End of main-content-grid -->
|
|
|
|
<!-- Weather widget - fixed at bottom -->
|
|
<div class="weather-section">
|
|
<div class="weather-container">
|
|
<!-- Custom weather display with hourly forecast -->
|
|
<div id="custom-weather">
|
|
<div class="current-weather">
|
|
<div class="location-info">
|
|
<h3>Stockholm</h3>
|
|
<div class="weather-icon">
|
|
<img src="https://cdn.weatherapi.com/weather/64x64/day/113.png" alt="Clear" />
|
|
<div>Clear</div>
|
|
</div>
|
|
</div>
|
|
<div class="temperature">7.1 °C</div>
|
|
</div>
|
|
<div class="forecast">
|
|
<div class="forecast-hour">
|
|
<div class="time">Nu</div>
|
|
<div class="icon">
|
|
<img src="https://cdn.weatherapi.com/weather/64x64/day/113.png" alt="Clear" width="40" />
|
|
</div>
|
|
<div class="temp">7.1 °C</div>
|
|
</div>
|
|
<div class="forecast-hour">
|
|
<div class="time">19:00</div>
|
|
<div class="icon">
|
|
<img src="https://cdn.weatherapi.com/weather/64x64/night/113.png" alt="Clear" width="40" />
|
|
</div>
|
|
<div class="temp">6.8 °C</div>
|
|
</div>
|
|
<div class="forecast-hour">
|
|
<div class="time">20:00</div>
|
|
<div class="icon">
|
|
<img src="https://cdn.weatherapi.com/weather/64x64/night/113.png" alt="Clear" width="40" />
|
|
</div>
|
|
<div class="temp">6.5 °C</div>
|
|
</div>
|
|
<div class="forecast-hour">
|
|
<div class="time">21:00</div>
|
|
<div class="icon">
|
|
<img src="https://cdn.weatherapi.com/weather/64x64/night/116.png" alt="Partly cloudy" width="40" />
|
|
</div>
|
|
<div class="temp">6.2 °C</div>
|
|
</div>
|
|
<div class="forecast-hour">
|
|
<div class="time">22:00</div>
|
|
<div class="icon">
|
|
<img src="https://cdn.weatherapi.com/weather/64x64/night/116.png" alt="Partly cloudy" width="40" />
|
|
</div>
|
|
<div class="temp">6.0 °C</div>
|
|
</div>
|
|
<div class="forecast-hour">
|
|
<div class="time">23:00</div>
|
|
<div class="icon">
|
|
<img src="https://cdn.weatherapi.com/weather/64x64/night/116.png" alt="Partly cloudy" width="40" />
|
|
</div>
|
|
<div class="temp">5.8 °C</div>
|
|
</div>
|
|
<div class="forecast-hour">
|
|
<div class="time">00:00</div>
|
|
<div class="icon">
|
|
<img src="https://cdn.weatherapi.com/weather/64x64/night/116.png" alt="Partly cloudy" width="40" />
|
|
</div>
|
|
<div class="temp">5.5 °C</div>
|
|
</div>
|
|
</div>
|
|
<div class="sun-times">
|
|
â˜€ï¸ Sunrise: 06:45 AM | 🌙 Sunset: 05:32 PM
|
|
</div>
|
|
</div> <!-- End of weather-section -->
|
|
|
|
<div class="last-updated" id="last-updated"></div>
|
|
</div> <!-- End of content-wrapper -->
|
|
|
|
|
|
|
|
|
|
|
|
|