Skip to content

Commit b7e9539

Browse files
committed
Merge branches 'Color-Pallete-Generator' and 'Color-Pallete-Generator' of https://github.com/ashishgit10/25-Javascript-Projects-for-beginner into Color-Pallete-Generator
2 parents ed80c98 + 8ba87d5 commit b7e9539

File tree

14 files changed

+17
-23
lines changed

14 files changed

+17
-23
lines changed

05-Weather-App/img/Screenshot.png

-26.2 KB
Loading

05-Weather-App/img/bg.jpg

-47.5 KB
Loading
-1.74 KB
Loading
-3.97 KB
Loading
-1.43 KB
Loading
-1.02 KB
Loading

05-Weather-App/script.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ btn.onclick = () => {
1616
// Consider fetching the key from a secure backend or prompting the user.
1717
var key = "YOUR_API_KEY";
1818
fetch(
19-
`https://api.openweathermap.org/data/2.5/weather?q=${val}
20-
&appid=${key}`
19+
`https://api.openweathermap.org/data/2.5/weather?q=${val}&appid=${key}`
2120
)
2221
.then((res) => res.json())
2322
.then((data) => {
@@ -79,12 +78,11 @@ setInterval(() => {
7978
const date = newdt.getDate();
8079
/* console.log(dy[day]); */
8180
/* console.log(hours); */
82-
const hrin12format = hours >= 13 ? hours % 12 : hours;
83-
const apmp = hours >= 12 ? "PM " : "AM";
81+
const hrin12format = hours === 0 ? 12 : (hours > 12 ? hours - 12 : hours);
82+
const apmp = hours >= 12 ? "PM" : "AM";
8483
const min = minutes < 10 ? "0" + minutes : minutes;
8584
const hrs = hrin12format < 10 ? "0" + hrin12format : hrin12format;
86-
const nhr = hrin12format == "00" ? "12" : hrin12format;
87-
time.innerHTML = ` <span class="tm">${nhr}:${min} ${apmp}</span>`;
85+
time.innerHTML = ` <span class="tm">${hrs}:${min} ${apmp}</span>`;
8886
dt.innerHTML = `<span class="dt1"> ${dy[day]}, ${date} ${mth[month]}</span>`;
8987
}, 1000);
9088

@@ -112,7 +110,7 @@ locatebtn.onclick = () => {
112110
1
113111
)} &#176;C</h5>`;
114112
country.innerHTML = `<span id="country">${data.sys.country}</span>`;
115-
city.innerHTML = `<span id="city">${data.name}/</span>`;
113+
city.innerHTML = `<span id="city">${data.name}</span>`;
116114
})
117115
.catch((err) => {
118116
console.log(err);

05-Weather-App/style.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ footer {
159159
display: flex !important;
160160
align-items: center !important;
161161
color: white !important;
162-
cursor:pointer;
162+
cursor: pointer;
163163
font-size: 20px;
164164
}
165165
@media (max-width: 768px) {
@@ -173,10 +173,10 @@ footer {
173173
min-width: 170px;
174174
}
175175
.upbox{
176-
gap:10px;
176+
gap: 10px;
177177
}
178178
}
179-
@media(max-width:305px){
179+
@media (max-width: 305px) {
180180
.time,.centerbox{
181181
min-width:262px;
182182
}
@@ -206,7 +206,7 @@ footer {
206206
font-size: 18px;
207207
}
208208
}
209-
@media(min-width:768px){
209+
@media (min-width: 768px) {
210210
.input{
211211
min-width:175px;
212212
}

28-E-commerce-Website/blog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ <h3>
137137
</h3>
138138
</div>
139139
<div class="email">
140-
<input type="mail" placeholder="Your email address" />
140+
<input type="email" placeholder="Your email address" />
141141
<button>Sign Up</button>
142142
</div>
143143
</section>

28-E-commerce-Website/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<ul class="ul-list">
3939
<i class="fa-solid x-mark fa-xmark"></i>
4040
<li>
41-
<a href="Ecommerce.html'" onclick="window.location.href='Ecommerce.html';">Home</a>
41+
<a href="Ecommerce.html" onclick="window.location.href='Ecommerce.html';">Home</a>
4242
</li>
4343
<li>
4444
<a href="shop.html" onclick="window.location.href='shop.html';">Shop</a>
@@ -506,7 +506,7 @@ <h3>
506506
</h3>
507507
</div>
508508
<div class="email">
509-
<input type="mail" placeholder="Your email address" />
509+
<input type="email" placeholder="Your email address" />
510510
<button>Sign Up</button>
511511
</div>
512512
</section>

0 commit comments

Comments
 (0)