diff --git a/Frontend/Analysis/analysis.css b/Frontend/Analysis/analysis.css index a628a76..ef9de96 100644 --- a/Frontend/Analysis/analysis.css +++ b/Frontend/Analysis/analysis.css @@ -1120,6 +1120,32 @@ button:hover { border: 1px solid rgba(56, 189, 248, 0.3) !important; } +.leaflet-popup-content { + margin: 14px 16px !important; + min-width: 230px; +} + +.climate-map-popup { + color: var(--text-primary); + font-family: "Poppins", sans-serif !important; +} + +.climate-map-popup h4 { + margin: 0 0 10px; + color: var(--text-primary); + font-size: 1rem; + line-height: 1.25; +} + +.climate-map-popup p { + margin: 0; + color: var(--text-primary); + font-size: 0.88rem; + font-weight: 600; + line-height: 1.65; + white-space: nowrap; +} + /* MULTI-RISK GRID (5 CARDS) */ .risk-grid-five { display: grid; @@ -1896,4 +1922,4 @@ select:focus-visible, a:focus-visible { outline: 3px solid #38bdf8 !important; outline-offset: 2px !important; -} \ No newline at end of file +} diff --git a/Frontend/Analysis/analysis.js b/Frontend/Analysis/analysis.js index 5dfa76a..5f345d4 100644 --- a/Frontend/Analysis/analysis.js +++ b/Frontend/Analysis/analysis.js @@ -442,9 +442,9 @@ async function getWeatherData() { mapMarker .bindPopup( ` -
+
🌡️ Temp: ${data.weather.temperature} °C
🌊 Flood Risk: ${data.risks.flood_risk}
🔥 Heat Risk: ${data.risks.heat_risk}
diff --git a/backend/alertsystem.py b/backend/alertsystem.py
index bde3472..2959e9f 100644
--- a/backend/alertsystem.py
+++ b/backend/alertsystem.py
@@ -215,14 +215,14 @@ def get_weather_insights():
"message": "Please fill all fields."
}), 400
- api_key = os.environ.get("OPENWEATHER_API_KEY")
+ api_key = os.environ.get("OPENWEATHER_API_KEY", "").strip()
- if not api_key:
+ if not api_key or api_key.lower() in {"your_api_key_here", "your_openweather_api_key_here"}:
print("OPENWEATHER_API_KEY missing")
return jsonify({
"success": False,
- "message": "Weather service configuration error."
+ "message": "Weather service configuration error. Create a .env file with OPENWEATHER_API_KEY."
}), 500
# ----------------------------------------------------
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..41daf66
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,5 @@
+Flask
+flask-cors
+requests
+python-dotenv
+gunicorn