Skip to content

Commit

Permalink
Mobile icons changed
Browse files Browse the repository at this point in the history
  • Loading branch information
s27288-pj committed Jan 9, 2024
1 parent 0a92664 commit 1cd5045
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
9 changes: 1 addition & 8 deletions scripts.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
// TODO: Current Weather background change depending on weather only on default mode, Light mode and Dark mode background doesn't change
// TODO: Slider for Modes: Light, Default, Dark
// TODO: Developer Mode for OpenWeatherMap API Key
// TODO:

// TODO: Change before commit

function loadCSSBasedOnUserAgent() {
const userAgent = navigator.userAgent.toLowerCase();

Expand Down Expand Up @@ -260,6 +253,7 @@ function displayCurrentWeather(weather, place_name) {
const currentWeatherIcon = document.getElementById('current-weather-icon');
const weatherIconID = weather.weather[0].icon;

//TODO: Color changes
if (weatherIconID === '01d') {
currentWeatherIcon.innerHTML = `<img src="images/002-clear-sky-day.png" alt="Current Weather Icon">`;
document.documentElement.style.setProperty('--default-background-color-body', '#ffe96e');
Expand Down Expand Up @@ -317,7 +311,6 @@ function displayCurrentWeather(weather, place_name) {
} else {
currentWeatherIcon.innerHTML = `<img src="images/001-meteorology.png" alt="Current Weather Icon">`;
}
// TODO: Unknown weatherID icon

// Memes
const memeBoxElement = document.getElementById('meme-box');
Expand Down
13 changes: 6 additions & 7 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2731,8 +2731,8 @@
}
.default-mode #current-weather-icon img {
margin-top: 5px;
height: 105px;
width: 105px;
height: 95px;
width: 95px;
}
.light-mode #current-weather-icon {
margin-top: 0px;
Expand All @@ -2744,8 +2744,8 @@
}
.light-mode #current-weather-icon img {
margin-top: 5px;
height: 105px;
width: 105px;
height: 95px;
width: 95px;
}
.dark-mode #current-weather-icon {
margin-top: 0px;
Expand All @@ -2757,11 +2757,10 @@
}
.dark-mode #current-weather-icon img {
margin-top: 5px;
height: 105px;
width: 105px;
height: 95px;
width: 95px;
}

/* TODO: center image */
.default-mode #meme-container {
background-color: var(--default-background-color);
margin-top: 5px;
Expand Down

0 comments on commit 1cd5045

Please sign in to comment.