Skip to content

Commit

Permalink
Merge pull request #13 from hoangsonww/improvements
Browse files Browse the repository at this point in the history
Improvements
  • Loading branch information
hoangsonww authored Apr 25, 2024
2 parents 88c243f + d153dc6 commit 04e4760
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion WeatherMate-Mobile/www/src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ input:focus {
background-color: #f5f5f5;
max-height: 400px;
overflow-y: auto;
border-radius: 15px;
border-radius: 16px;
padding: 15px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
width: 80%;
Expand Down
5 changes: 4 additions & 1 deletion WeatherMate-Mobile/www/src/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ function displayFavorites() {
const favorites = getFavorites();

favoritesSection.innerHTML = "";
favoritesList.style.borderRadius = "12px";

if (favorites.length === 0) {
favoritesSection.innerHTML = "<h3>No favorite cities added.</h3>";
Expand All @@ -713,7 +714,7 @@ function displayFavorites() {

favorites.forEach(city => {
const cityElem = document.createElement("div");

cityElem.style.borderRadius = "8px";
const cityLink = document.createElement("span");
cityLink.innerText = city;
cityLink.style.cursor = "pointer";
Expand All @@ -726,6 +727,8 @@ function displayFavorites() {

const removeBtn = document.createElement("button");
removeBtn.innerText = "Remove";
removeBtn.style.font = "inherit";
removeBtn.style.fontSize = "14px";
removeBtn.onclick = function() { removeFavorite(city); };

cityElem.appendChild(removeBtn);
Expand Down
8 changes: 4 additions & 4 deletions src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ body {
}

#center {
background: rgba(255, 255, 255, 0.6);
background: rgba(255, 255, 255, 0.7);
border-radius: 16px;
padding: 15px;
margin: 10px;
Expand Down Expand Up @@ -165,7 +165,7 @@ input:focus {
background-color: #f5f5f5;
max-height: 400px;
overflow-y: auto;
border-radius: 15px;
border-radius: 16px;
padding: 15px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
width: 80%;
Expand Down Expand Up @@ -288,8 +288,8 @@ button:hover {
border-radius: 15px;
padding: 20px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
width: 80%;
max-width: 600px;
width: 600px;
max-width: calc(100% - 20px);
margin: 20px 0;
overflow: hidden;
border: 1px solid rgba(0, 0, 0, 0.1);
Expand Down
6 changes: 3 additions & 3 deletions src/html/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
</head>
<body>

<img src="../../utils/logo.png" id="img" onclick="window.location.href='../../index.html'" title="Click to go back to the home page" style="cursor: pointer"/>
<div class="content">
<img src="../../utils/logo.png" id="img" onclick="window.location.href='../../index.html'" title="Click to go back to the home page" style="cursor: pointer; display: block; margin: auto"/>

<h1 style="text-align: center">About The WeatherMate App</h1>
<h1 style="text-align: center">About The WeatherMate App</h1>

<div class="content">
<p>
Welcome to The WeatherMate App, your digital meteorologist! Its mission is to empower you with accurate, real-time weather updates whether you're at home or on the go. The WeatherMate App delivers a seamless experience, ensuring you're prepared for whatever the weather brings.
</p>
Expand Down
5 changes: 4 additions & 1 deletion src/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ function displayFavorites() {
const favorites = getFavorites();

favoritesSection.innerHTML = "";
favoritesList.style.borderRadius = "12px";

if (favorites.length === 0) {
favoritesSection.innerHTML = "<h3>No favorite cities added.</h3>";
Expand All @@ -713,7 +714,7 @@ function displayFavorites() {

favorites.forEach(city => {
const cityElem = document.createElement("div");

cityElem.style.borderRadius = "8px";
const cityLink = document.createElement("span");
cityLink.innerText = city;
cityLink.style.cursor = "pointer";
Expand All @@ -726,6 +727,8 @@ function displayFavorites() {

const removeBtn = document.createElement("button");
removeBtn.innerText = "Remove";
removeBtn.style.font = "inherit";
removeBtn.style.fontSize = "14px";
removeBtn.onclick = function() { removeFavorite(city); };

cityElem.appendChild(removeBtn);
Expand Down

0 comments on commit 04e4760

Please sign in to comment.