From 773da1c68ceb2c91025efc6f532d893bfb509207 Mon Sep 17 00:00:00 2001 From: harshgithub01 <69034968+harshgithub01@users.noreply.github.com> Date: Fri, 21 Aug 2020 10:01:44 +0530 Subject: [PATCH 1/3] Set theme jekyll-theme-cayman --- _config.yml | 1 + index.md | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 _config.yml create mode 100644 index.md diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..c419263 --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-cayman \ No newline at end of file diff --git a/index.md b/index.md new file mode 100644 index 0000000..2a78a0f --- /dev/null +++ b/index.md @@ -0,0 +1,37 @@ +## Welcome to GitHub Pages + +You can use the [editor on GitHub](https://github.com/harshgithub01/module4-assignment/edit/gh-pages/index.md) to maintain and preview the content for your website in Markdown files. + +Whenever you commit to this repository, GitHub Pages will run [Jekyll](https://jekyllrb.com/) to rebuild the pages in your site, from the content in your Markdown files. + +### Markdown + +Markdown is a lightweight and easy-to-use syntax for styling your writing. It includes conventions for + +```markdown +Syntax highlighted code block + +# Header 1 +## Header 2 +### Header 3 + +- Bulleted +- List + +1. Numbered +2. List + +**Bold** and _Italic_ and `Code` text + +[Link](url) and ![Image](src) +``` + +For more details see [GitHub Flavored Markdown](https://guides.github.com/features/mastering-markdown/). + +### Jekyll Themes + +Your Pages site will use the layout and styles from the Jekyll theme you have selected in your [repository settings](https://github.com/harshgithub01/module4-assignment/settings). The name of this theme is saved in the Jekyll `_config.yml` configuration file. + +### Support or Contact + +Having trouble with Pages? Check out our [documentation](https://docs.github.com/categories/github-pages-basics/) or [contact support](https://github.com/contact) and we’ll help you sort it out. From ffa133f992ecfd5ee56f4d96041c93e65b4af6c8 Mon Sep 17 00:00:00 2001 From: harshgithub01 <69034968+harshgithub01@users.noreply.github.com> Date: Fri, 21 Aug 2020 10:01:53 +0530 Subject: [PATCH 2/3] Update index.md From 12436180044ceaa859c9b23710e8a5ccd851d0cf Mon Sep 17 00:00:00 2001 From: harshgithub01 Date: Fri, 21 Aug 2020 12:26:35 +0530 Subject: [PATCH 3/3] javascript/html --- module4-solution/SpeakGoodBye.js | 9 +++++++++ module4-solution/SpeakHello.js | 9 +++++++++ module4-solution/index.html | 24 ++++++++++++++++++++++++ module4-solution/script.js | 16 ++++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 module4-solution/SpeakGoodBye.js create mode 100644 module4-solution/SpeakHello.js create mode 100644 module4-solution/index.html create mode 100644 module4-solution/script.js diff --git a/module4-solution/SpeakGoodBye.js b/module4-solution/SpeakGoodBye.js new file mode 100644 index 0000000..7e12d2d --- /dev/null +++ b/module4-solution/SpeakGoodBye.js @@ -0,0 +1,9 @@ +(function(window) { + var speakWord = "Good Bye"; + var speakBye = function (name) { + console.log(speakWord + " " + name); + } + + window.speakBye = speakBye; + +})(window); \ No newline at end of file diff --git a/module4-solution/SpeakHello.js b/module4-solution/SpeakHello.js new file mode 100644 index 0000000..b3f8f18 --- /dev/null +++ b/module4-solution/SpeakHello.js @@ -0,0 +1,9 @@ +(function(window) { + var speakWord = "Hello"; + var speakHello = function (name) { + console.log(speakWord + " " + name); + } + + window.speakHello = speakHello; + +})(window); \ No newline at end of file diff --git a/module4-solution/index.html b/module4-solution/index.html new file mode 100644 index 0000000..65b39d1 --- /dev/null +++ b/module4-solution/index.html @@ -0,0 +1,24 @@ + + + + + Module 4 Solution Starter + + + + + + + + +

Module 4 Solution

+

Head over to the console to see the output

+ + \ No newline at end of file diff --git a/module4-solution/script.js b/module4-solution/script.js new file mode 100644 index 0000000..501e11d --- /dev/null +++ b/module4-solution/script.js @@ -0,0 +1,16 @@ +(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') { + speakBye(names[i]); + } + else { + speakHello(names[i]); + } +} + +})(); \ No newline at end of file