Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion Frontend/Analysis/analysis.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1896,4 +1922,4 @@ select:focus-visible,
a:focus-visible {
outline: 3px solid #38bdf8 !important;
outline-offset: 2px !important;
}
}
6 changes: 3 additions & 3 deletions Frontend/Analysis/analysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,9 @@ async function getWeatherData() {
mapMarker
.bindPopup(
`
<div style="min-width: 160px; font-family: sans-serif;">
<h4 style="margin: 0 0 5px 0; color: #fff;">${data.location.city}</h4>
<p style="margin: 0; font-size: 0.8rem; line-height: 1.4; color: #cbd5e1;">
<div class="climate-map-popup" style="min-width: 230px; font-family: sans-serif;">
<h4>${data.location.city}</h4>
<p>
🌡️ Temp: ${data.weather.temperature} °C<br>
🌊 Flood Risk: ${data.risks.flood_risk}<br>
🔥 Heat Risk: ${data.risks.heat_risk}<br>
Expand Down
6 changes: 3 additions & 3 deletions backend/alertsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

# ----------------------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Flask
flask-cors
requests
python-dotenv
gunicorn