Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #18

Merged
merged 2 commits into from
Dec 23, 2023
Merged
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
8 changes: 1 addition & 7 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,8 @@ body {
.btn.btn-primary {
background-color: rgb(87, 80, 117);
color: white;
}

/* set the search history button color
#searchHistory.list-group {
background-color: rgb(87, 80, 117);
color: white;
border: none;
} */
}

/* set the 5-day forecast card color */
.card-0,
Expand Down
Binary file modified assets/img/5-day.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/img/information.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/img/search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/img/weather.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 13 additions & 7 deletions assets/scripts/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,27 +181,33 @@ function viewCurrentWeather(city,legibleDate,weatherIcon,temp,windSpeed,humidity
const extractedStringDate = partDate[0];

// display name of location, date and weather icon
cityDisplayandDate = `${extractedStringCity} (${extractedStringDate}) ${weatherIcon}`;
cityDisplayandDate = `${extractedStringCity} (${extractedStringDate})`;

// set current weather display to html card
// set current weather display to html container
$('.current-card h5').text(cityDisplayandDate);

// display current weather icon
cityDisplayandWeatherIcon = `${weatherIcon}`;

// set weather icon display to html container
$('.current-card #weather-icon').text(cityDisplayandWeatherIcon);

// display current temperature
cityDisplayandTemp = `Temp: ${temp} °C`;

// set temperature display to html card
// set temperature display to html container
$('.current-card #temp').text(cityDisplayandTemp);

// display wind speed
// display current wind speed
cityDisplayandWind = `Wind: ${windSpeed} m/s`;

// set wind speed display to html card
// set wind speed display to html container
$('.current-card #wind').text(cityDisplayandWind);

// display humidity
// display current humidity
cityDisplayandHumidity = `Humidity: ${humidity} %`;

// set humidity display to html card
// set humidity display to html container
$('.current-card #humidity').text(cityDisplayandHumidity);
}

Expand Down
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<!DOCTYPE html>
<!-- "en" language instead of specific US language "en-us" -->
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<!-- Upgrade insecure http request to https -->
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
<!-- import Bootstrap -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link rel="stylesheet" href="./assets/css/style.css" />
<title>Weather Dashboard</title>
Expand Down Expand Up @@ -43,6 +46,7 @@ <h2 class="text-center">Current Weather</h2>

<div class="card-body">
<h5 class="card-title"">City Name (Date) Weather-icon</h5>
<p class="card-text" id="weather-icon">Weather-icon</p>
<p class="card-text" id="temp">Temp: 0°C</p>
<p class="card-text" id="wind">Wind: 0 m/s</p>
<p class="card-text" id="humidity">Humidity: 0%</p>
Expand Down