diff --git a/index.html b/index.html index 0785e6b..e6fc996 100644 --- a/index.html +++ b/index.html @@ -1,17 +1,16 @@ - One PR A Day - - + + + -

I will be accepting up to one pull request per day on this project.

@@ -25,8 +24,33 @@

I will be accepting up to one pull request per day on +
+
+

Random Quote

+
+ +
+
+
+

+
by
+
+
+ +
+ + + +
+ + + +

A project by

@@ -37,5 +61,6 @@

A project by

+ diff --git a/scripts/quote.js b/scripts/quote.js new file mode 100644 index 0000000..eb36bb4 --- /dev/null +++ b/scripts/quote.js @@ -0,0 +1,18 @@ +$(document).ready(function() { + $("#res").hide(); + function generate_quote() { + $api_link = "http://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=jsonp&jsonp=?"; + $.getJSON($api_link, function(data) { + $quote = data.quoteText; + $quote_author = data.quoteAuthor; + $("#quote").html($quote); + $("#quote_author").html($quote_author); + }); + } + $("#generate_quote").on("click", function() { + $("#res").show('slow'); + generate_quote(); + }); +$("#res").show('slow'); +generate_quote(); +}) \ No newline at end of file diff --git a/stylesheets/styles.css b/stylesheets/styles.css index 4475567..9a18340 100644 --- a/stylesheets/styles.css +++ b/stylesheets/styles.css @@ -123,7 +123,18 @@ h1 { } - +/* Random Quote */ +.quote{ + margin-top:10px; + margin-bottom:10px; +} +.no-margin-center{ + text-align:center; + margin: 0px auto; +} +blockquote { + margin: 0 0 0px; +} /* Min-width break to add more padding on wider screens */