diff --git a/final_project/css/style.css b/final_project/css/style.css new file mode 100644 index 0000000..913a85b --- /dev/null +++ b/final_project/css/style.css @@ -0,0 +1,38 @@ +body { + margin: 0; + padding: 0; + overflow: hidden; + + } + + img { + + } + + #img{ + + } + +/* Google font */ +@import url('https://fonts.googleapis.com/css?family=Orbitron'); + +#clock { + font-family: 'Orbitron', sans-serif; + color: #66ff99; + font-size: 56px; + position: absolute; + top: 50%; + left: 34%; + + +} +p{ + position: absolute; + top: 40%; + left: 34%; + font-family: 'Orbitron', sans-serif; + color: #66ff99; + font-size: 20px; +} + + diff --git a/final_project/index.html b/final_project/index.html new file mode 100644 index 0000000..011e0ce --- /dev/null +++ b/final_project/index.html @@ -0,0 +1,20 @@ + + + + + + Final Project + + + +
+

+ +
+ + + + + + + \ No newline at end of file diff --git a/final_project/js/this.js b/final_project/js/this.js new file mode 100644 index 0000000..e98f9f2 --- /dev/null +++ b/final_project/js/this.js @@ -0,0 +1,55 @@ +const numItemsToGenerate = 1; + +function renderItem(){ + fetch(`https://source.unsplash.com/1600x900/?morning`).then((response)=> { + let item = document.getElementById("img"); + item.classList.add('item'); + item.innerHTML = ` + morning image + ` + document.documentElement.appendChild(item); + }) +} +for(let i=0;i= 12) ? "PM" : "AM"; /* assigning AM/PM */ + hour = (hour == 0) ? 12 : ((hour > 12) ? (hour - 12): hour); /* assigning hour in 12-hour format */ + hour = updateTime(hour); + min = updateTime(min); + sec = updateTime(sec); + document.getElementById("clock").innerText = hour + " : " + min + " : " + sec + " " + midday; /* adding time to the div */ + var t = setTimeout(currentTime, 1000); /* setting timer */ + } + + function updateTime(k) { /* appending 0 before time elements if less than 10 */ + if (k < 10) { + return "0" + k; + } + else { + return k; + } + } + + currentTime(); + + +var today = new Date() +var curHr = today.getHours() + +if (curHr < 12) { + document.write('good morning').getElementById('good') +} else if (curHr < 18) { + document.write('good afternoon').getElementById('good') +} else { + document.write('good evening').getElementById('good') +} \ No newline at end of file