From 0c85608b3df8e7af44a18b25335b823d21c57d5e Mon Sep 17 00:00:00 2001 From: Deval <139475352+Deval13@users.noreply.github.com> Date: Fri, 16 Feb 2024 12:22:36 +0530 Subject: [PATCH] Add files via upload --- module-3/README.md | 8 ++++ module-3/index.html | 77 +++++++++++++++++++++++++++++++ module-3/style.css | 97 ++++++++++++++++++++++++++++++++++++++++ module-4/README.md | 8 ++++ module-4/SpeakGoodBye.js | 34 ++++++++++++++ module-4/SpeakHello.js | 32 +++++++++++++ module-4/index.html | 19 ++++++++ module-4/script.js | 49 ++++++++++++++++++++ 8 files changed, 324 insertions(+) create mode 100644 module-3/README.md create mode 100644 module-3/index.html create mode 100644 module-3/style.css create mode 100644 module-4/README.md create mode 100644 module-4/SpeakGoodBye.js create mode 100644 module-4/SpeakHello.js create mode 100644 module-4/index.html create mode 100644 module-4/script.js diff --git a/module-3/README.md b/module-3/README.md new file mode 100644 index 0000000..4efc131 --- /dev/null +++ b/module-3/README.md @@ -0,0 +1,8 @@ + + +# Module-3 Coding Assignment + +Coursera course: HTML, CSS, and Javascript for Web Developers + +# To see the output [CLICK HERE](https://siddartha19.github.io/Coursera-HTML-CSS-and-JavaScript-for-Web-Developers/Assignments/module-3/index.html) + diff --git a/module-3/index.html b/module-3/index.html new file mode 100644 index 0000000..b15d66e --- /dev/null +++ b/module-3/index.html @@ -0,0 +1,77 @@ + + + + +Module 3 + + + + + + + + + + + + + + + + + + +

Our Menu

+ + + +
+ +
+
+

Chicken

+

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.(Back to Top)

+
+
+ +
+
+

Beef

+

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.(Back to Top)

+
+
+ + +
+
+

Sushi

+

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.(Back to Top)

+
+
+ +
+ + + + diff --git a/module-3/style.css b/module-3/style.css new file mode 100644 index 0000000..91a446c --- /dev/null +++ b/module-3/style.css @@ -0,0 +1,97 @@ + +.container-fluid{ + margin: 0; + padding: 0; +} + +.navbar{ + border-radius: 0px; + background-color: rgba(0,0,0,0.8); +} + +.navbar-brand{ + font-size: 35px; + color: white; + padding-left: 25px; +} + +.navbar-brand:hover{ + color: white; +} + +.nav{ + margin: 0; + padding: 0; +} + +.navbar-nav{ + font-size: 25px; + text-align: center; + margin: 0; + padding: 0; +} + +.navbar-toggle{ + border: 2px solid white; + margin-right: 25px; +} + +.icon-bar{ + background-color: white; +} + + +.main-title{ + margin-bottom: 15px; + text-align: center; + color: #ff4532; + font-size: 50px; + font-family: "Comic Sans MS", cursive, sans-serif; + font-weight: bold; +} + +li{ + box-sizing: border-box; + width: 100%; +} + +.menu-item{ + padding: 0; + margin: 0; + width: 100%; + background-color: white; + border-bottom: 1px solid black; + color: black; + display: block; +} + +.menu-item:hover{ + background-color: rgba(0,0,0,0.9); + color: rgba(0,0,0,0.4); +} + + + +.row{ + margin: 20px; +} + +.content-box{ + margin: 20px; + width: auto; + height: auto; + color: black; + background-color: rgba(0,0,0,0.2); + font-family: "Comic Sans MS", cursive, sans-serif; + padding: 20px; +} + +.item-name{ + text-align: center; + font-size: 20px; + font-weight: bold; +} + +#top{ + +} diff --git a/module-4/README.md b/module-4/README.md new file mode 100644 index 0000000..b41133e --- /dev/null +++ b/module-4/README.md @@ -0,0 +1,8 @@ + + +# Module-4 Coding Assignment + +Coursera course: HTML, CSS, and Javascript for Web Developers + +# To see the output [CLICK HERE](https://siddartha19.github.io/Coursera-HTML-CSS-and-JavaScript-for-Web-Developers/Assignments/module-4/index.html) + diff --git a/module-4/SpeakGoodBye.js b/module-4/SpeakGoodBye.js new file mode 100644 index 0000000..b568399 --- /dev/null +++ b/module-4/SpeakGoodBye.js @@ -0,0 +1,34 @@ +// NOTE! The steps in this file are basically identical to the ones you +// performed in the SpeakHello.js file. + +// STEP 6: Wrap the entire contents of SpeakGoodBye.js inside of an IIFE +// See Lecture 52, part 2 + + +// STEP 7: Create an object, called 'byeSpeaker' to which you will attach +// the "speak" method and which you will expose to the global context +// See Lecture 52, part 1 +// var byeSpeaker = + +// DO NOT attach the speakWord variable to the 'byeSpeaker' object. + + +// STEP 8: Rewrite the 'speak' function such that it is attached to the +// byeSpeaker object instead of being a standalone function. +// See Lecture 52, part 2 + + +// STEP 9: Expose the 'byeSpeaker' object to the global scope. Name it +// 'byeSpeaker' on the global scope as well. +// xxxx.xxxx = byeSpeaker; + + +(function(window) { + var speakWord = "Good Bye"; + var byeSpeaker = function (name) { + console.log(speakWord + " " + name); + } + + window.byeSpeaker = byeSpeaker; + +})(window); diff --git a/module-4/SpeakHello.js b/module-4/SpeakHello.js new file mode 100644 index 0000000..e56e2e2 --- /dev/null +++ b/module-4/SpeakHello.js @@ -0,0 +1,32 @@ +// STEP 2: Wrap the entire contents of SpeakHello.js inside of an IIFE +// See Lecture 52, part 2 + + +// STEP 3: Create an object, called 'helloSpeaker' to which you will attach +// the "speak" method and which you will expose to the global context +// See Lecture 52, part 1 +// var helloSpeaker = + +// DO NOT attach the speakWord variable to the 'helloSpeaker' object. + + +// STEP 4: Rewrite the 'speak' function such that it is attached to the +// helloSpeaker object instead of being a standalone function. +// See Lecture 52, part 2 + +// STEP 5: Expose the 'helloSpeaker' object to the global scope. Name it +// 'helloSpeaker' on the global scope as well. +// See Lecture 52, part 2 +// (Note, Step 6 will be done in the SpeakGoodBye.js file.) +// xxxx.xxxx = helloSpeaker; + + +(function(window) { + var speakWord = "Hello"; + var helloSpeaker = function (name) { + console.log(speakWord + " " + name); + } + + window.helloSpeaker = helloSpeaker; + +})(window); diff --git a/module-4/index.html b/module-4/index.html new file mode 100644 index 0000000..3bd903a --- /dev/null +++ b/module-4/index.html @@ -0,0 +1,19 @@ + + + + + + + Module 4 Solution Starter + + + + + +

Module 4 Solution Starter

+

open console to see the output

+ + + + + diff --git a/module-4/script.js b/module-4/script.js new file mode 100644 index 0000000..ce6d47c --- /dev/null +++ b/module-4/script.js @@ -0,0 +1,49 @@ +// ******************************* +// START HERE IF YOU WANT AN EASIER STARTING POINT FOR THIS ASSIGNMENT +// ******************************* +// +// Module 4 Assignment Instructions. +// +// The idea of this assignment is to take an existing array of names +// and then output either Hello 'Name' or Good Bye 'Name' to the console. +// The program should say "Hello" to any name except names that start with a "J" +// or "j", otherwise, the program should say "Good Bye". So, the final output +// on the console should look like this: +/* +Hello Yaakov +Good Bye John +Good Bye Jen +Good Bye Jason +Hello Paul +Hello Frank +Hello Larry +Hello Paula +Hello Laura +Good Bye Jim +WARNING!!! WARNING!!! +The code does NOT currently work! It is YOUR job to make it work +as described in the requirements and the steps in order to complete this +assignment. +WARNING!!! WARNING!!! +*/ + + +(function () { + +var names = ["Yaakov", "John", "Jen", "Jason", "Paul", "Frank", "Larry", "Paula", "Laura", "Jim"]; + +for (var i = 0; i < names.length; i++) { + var firstLetter = names[i].charAt(0).toLowerCase(); + + if (firstLetter === 'j') { + byeSpeaker(names[i]); + } + else { + helloSpeaker(names[i]); + } +} + +})(); + + +