Skip to content

Commit

Permalink
Merge pull request #18 from naturuplift/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
naturuplift committed Dec 23, 2023
2 parents ac50e0e + 349145e commit 08d85bd
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 14 deletions.
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

0 comments on commit 08d85bd

Please sign in to comment.