diff --git a/Simon Game/m0pi9hn9.png b/Simon Game/m0pi9hn9.png new file mode 100644 index 0000000..58b7ad4 Binary files /dev/null and b/Simon Game/m0pi9hn9.png differ diff --git a/Weather Forecast/Asset/Preview.jpg b/Weather Forecast/Asset/Preview.jpg new file mode 100644 index 0000000..a3ebb32 Binary files /dev/null and b/Weather Forecast/Asset/Preview.jpg differ diff --git a/Weather Forecast/Asset/Ringtones.mp3 b/Weather Forecast/Asset/Ringtones.mp3 new file mode 100644 index 0000000..50f15dc Binary files /dev/null and b/Weather Forecast/Asset/Ringtones.mp3 differ diff --git a/Weather Forecast/Asset/nuture.jpg b/Weather Forecast/Asset/nuture.jpg new file mode 100644 index 0000000..761a050 Binary files /dev/null and b/Weather Forecast/Asset/nuture.jpg differ diff --git a/Weather Forecast/app.js b/Weather Forecast/app.js new file mode 100644 index 0000000..9dadaa9 --- /dev/null +++ b/Weather Forecast/app.js @@ -0,0 +1,113 @@ +//to-do list + +let button = document.querySelector(".task button"); +let input = document.querySelector(".task input"); +let ul = document.querySelector("ul"); +let h3 = document.querySelector("h4"); +let count = 1; +button.addEventListener("click", function () { + if (input.value != "") { + count++; + h3.innerText = `TOTAL TASK : ${count}`; + let li = document.createElement("li"); + ul.appendChild(li); + let div = document.createElement("div"); + div.innerHTML = `
+ +

${input.value}

+
+`; + div.setAttribute("class", "task1"); + li.appendChild(div); + let a = Math.floor(Math.random() * 155 + 100); + let b = Math.floor(Math.random() * 155 + 100); + let c = Math.floor(Math.random() * 155 + 100); + div.style.backgroundColor = `rgb(${a},${b},${c})`; + input.value = ""; + } +}); + +ul.addEventListener("click", function (event) { + if (event.target.innerText == "Done") { + ul.removeChild(event.target.parentElement.parentElement); + count--; + h3.innerText = `TOTAL TASK : ${count}`; + } +}); + + +//date time +let h2 = document.querySelector(".date"); +let h = document.querySelector(".time"); +let arr = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; +const date = new Date(); +h2.innerText = `${arr[date.getDay()]}, ${date.getDate()}-${date.getMonth()}-${date.getFullYear()} `; +h.innerText = `Time ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`; +setInterval(() => { + const date = new Date(); + h.innerText = `Time ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`; +}, 1000); + +//Alarm +ul.addEventListener("click", function (event) { + + if (event.target.innerText == "notifications_active") { + let time=prompt("Enter Time : hh:mm:ss"); + const date2 = new Date(); + let nexthour=Number(time.substring(0,2))-date2.getHours(); + let nextminit=Number(time.substring(3,5))-date2.getMinutes(); + let nextsec=Number(time.substring(6,8))-date2.getSeconds(); + let delay=(nexthour*3600+nextminit*60+nextsec)*1000 + setTimeout(async function(){ + event.target.parentElement.parentElement.parentElement.style.backgroundColor="red"; + let audio=new Audio("asset/Ringtones.mp3"); + await audio.play(); + alert(`Its Time to ${event.target.parentElement.parentElement.innerText}`); + audio.pause(); + },delay); + } +}); + +//Weather API +let place = document.querySelector(".weather h3"); +let temp = document.querySelector(".temp"); +let img = document.querySelector(".weather-temp img"); +let weat = document.querySelector(".weather h2"); +let p = document.querySelector(".weather p"); +let get = document.querySelector(".get"); +let change = document.getElementById("search"); + + +const url = "http://api.weatherapi.com/v1/current.json?key=dd35b36d343049bdad990057232009&q="; +let q = "jalpaiguri"; +async function Weather(q) { + try { + let res = await axios(url + q); + let data = res.data.current; + console.log(data); + place.innerText = q; + temp.innerHTML = `${data.feelslike_c}°C`; + img.src = `https:${data.condition.icon}`; + weat.innerText = data.condition.text; + p.innerHTML = `pressure: ${data.pressure_mb} millibars +
+ Humidity: ${data.humidity} % +
+ Wind: ${data.wind_dir} , ${data.wind_kph} kph`; + } + catch (err) { + console.log("Invalid City"); + } +} +Weather(q); + +get.addEventListener("click",()=>{ +if(change.value!=""){ + q=change.value; + Weather(q); + q=""; +} +}); \ No newline at end of file diff --git a/Weather Forecast/index.html b/Weather Forecast/index.html new file mode 100644 index 0000000..f705e87 --- /dev/null +++ b/Weather Forecast/index.html @@ -0,0 +1,75 @@ + + + + + + + ToDo List + + + + + +
+
+
+

MY DAY

+

+

+
+
+ + +

+
+

Jalpaiguri

+
+

26

+ +
+

Heavy rain

+

+ pressure: 1007 millibars +
+ Humidity: 97 % +
+ Wind: SE , 11.2 kph +

+ + +
+
+
+ +


+ +
+ + +
+
+

TOTAL TASK : 1

+
+
+
+ + + + + + \ No newline at end of file diff --git a/Weather Forecast/style.css b/Weather Forecast/style.css new file mode 100644 index 0000000..04bdffb --- /dev/null +++ b/Weather Forecast/style.css @@ -0,0 +1,102 @@ +.container{ + margin: auto; + height: 600px; + width: 600px; + border: 2px solid black; + display: flex; + flex-direction: column; + align-items: center; + background-color: rgb(216, 237, 255); + box-shadow: 10px 10px rgba(0, 0, 0, 0.513); + overflow: scroll; +} +ul { + list-style-type: none; + margin: 0; + padding: 0; + } +li .task1{ + height: 50px; + width: 500px; + border: 2px solid black; + display:flex ; + justify-content: space-between; + align-items: center; + margin-top: 20px; +} +.task1 div{ + display: flex; + align-items: center; + justify-content: center; + margin-left: 20px; +} +.notify{ + margin-left: 20px; + margin-left: 10px; + height: 25px; + width: 35px; +} + +li div button{ + position: relative; + right: 20px; +} +.task1{ + background-color:yellow; +} +.count{ + margin: auto; +} +h1{ + font-weight: 900; +} +.head h2{ + font-weight: 500; +} +.head{ + width: 579px; + height: 250px; + position: sticky; + top: 0px; + z-index: 10; + background-image: url(Asset/nuture.jpg); + background-size: cover; + display: flex; + justify-content: space-between; +} +.task{ + background-color: white; + display: flex; + align-items: center; + width: 500px; + padding-left: 20px; + padding-right: 20px; + position: sticky; + bottom: 0px; + z-index: 10; +} +.task input{ + width: 200px; + height: 30px; +} +.task button{ + height: 30px; + margin-left: 10px; +} +.weather{ + background-color: white; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: 200px; +} +.weather-temp{ + display: flex; + justify-content: space-around; +} +.weather img{ + height: 50px; + width: 50px; + margin-left: 20px; +} \ No newline at end of file diff --git a/index.html b/index.html index ef3ad87..1a66a63 100644 --- a/index.html +++ b/index.html @@ -180,7 +180,27 @@

Playable Piano


- +
+ +

QR Code Generator

+ +
+
+ +
+ +

Advance Weather Forecast

+ +
+
+ +
+ +

Simon Game

+ +
+
+

QR Code Generator