diff --git a/Quote of Day Generator/quotes.css b/Quote of Day Generator/quotes.css new file mode 100644 index 0000000..3af648f --- /dev/null +++ b/Quote of Day Generator/quotes.css @@ -0,0 +1,21 @@ +div { + text-align: center; +} + +h1 { + font-size: 80px; + font-family: Impact; +} +button { + width: 250px; + height: 80px; + background-color: green; + color: darkred; +} +p { + font-size: 35px; +} + +button:hover { + background-color: hotpink; +} diff --git a/Quote of Day Generator/quotes.html b/Quote of Day Generator/quotes.html new file mode 100644 index 0000000..d1eacdc --- /dev/null +++ b/Quote of Day Generator/quotes.html @@ -0,0 +1,25 @@ + + + + + + + +
+

Quote of the Day-Morning Everyone!!!

+

Please press the button below to recieve a random quote!

+ + +
+

+ +

+
+ +
+ + + + + + diff --git a/Quote of Day Generator/quotes.js b/Quote of Day Generator/quotes.js new file mode 100644 index 0000000..83ba14a --- /dev/null +++ b/Quote of Day Generator/quotes.js @@ -0,0 +1,64 @@ +var arrayOfQuotes = [ + + { + "author":"Jim Rohn", + "quote":"Beware of what you become in pursuit of what you want." + }, + { + "author": "Epictetus", + "quote":"It's not what happens to you,but how you react to it that matters." + }, + { + "author" :"Frank Sinatra", + "quote": "The best revenge is massive success." + }, + { + "author": "Wayne Gretzy", + "quote": "You miss 100% of the shots you don't take." + }, + { + "author" :"Nelson Mandela", + "quote":"Resentment is like drinking poison and waiting for your enemies to die." + }, + + { + "author":"Confucius", + "quote": "Silence is a true friend who never betrays." + + }, + { + "author": "Elbert Hubbard", + "quote":"Do not take life too seriously. You will not get out alive." + + }, + { + "author":"Lyndon B.Johnson", + "quote": "Yesterday is not ours to recover,but tomorrow is ours to win or lose." + + }, + { + "author":"Henrik Ibsen", + "quote": "A thousand words can not leave the same deep impression as a single deed." + + }, + { + "author": "Katherine Pearson", + "quote": "A dream without a plan is nothing more than a wish" + } + + +] + +function randomSelector(arrayLength) { + return Math.floor(Math.random() * arrayLength); +} + +function generateQuote() { + +var randomNumber = randomSelector(arrayOfQuotes.length); + +document.getElementById("quoteOutput").innerHTML = '"' + arrayOfQuotes[randomNumber].quote + '"'; + +document.getElementById("authorOutput").innerHTML = "- " + arrayOfQuotes[randomNumber].author; + +}