Skip to content

Commit

Permalink
Now user can twwet their favorite quote.
Browse files Browse the repository at this point in the history
  • Loading branch information
faahim committed Aug 13, 2017
1 parent 540380d commit 428ddbc
Show file tree
Hide file tree
Showing 12 changed files with 2,702 additions and 3 deletions.
4 changes: 4 additions & 0 deletions css/font-awesome.min.css

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ body {
padding: 30px;
border-radius: 10px;
background-color: darkred;
}
}

Binary file added fonts/FontAwesome.otf
Binary file not shown.
Binary file added fonts/fontawesome-webfont.eot
Binary file not shown.
2,671 changes: 2,671 additions & 0 deletions fonts/fontawesome-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fonts/fontawesome-webfont.ttf
Binary file not shown.
Binary file added fonts/fontawesome-webfont.woff
Binary file not shown.
Binary file added fonts/fontawesome-webfont.woff2
Binary file not shown.
Binary file added img/tweet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions img/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 10 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,23 @@
<html>
<head>
<title>Random Quote Generator</title>
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>

<body>
<div id="quote-box">
<p class="insert-quote">Test</p>
<p class="insert-author">Test</p>
<button id="btn">Next</button>
<button class="tweet">Tweet</button>
<button id="btn" class="refresh-icon">
<svg viewBox="0 0 90 90">
<path class="circle-path" d="M 45 45 m 0 -30 a 30 30 0 1 1 0 60 a 30 30 0 1 1 0 -60"></path>
</svg>
<svg class="arrow-svg" viewBox="0 0 90 90">
<path class="arrow-path" d="M 50 15 m -18 -18 l 18 18 l -18 18"></path>
</svg>
</button>
<a id="tweet" class="twitter-share-button" href="https://twitter.com/intent/tweet?text=Hello%20world" target="_blank"><i class="fa fa-twitter" aria-hidden="true"></i></a>
</div>
</body>

Expand Down
1 change: 1 addition & 0 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ $(document).ready(function() {
success: function(quotes) {
$(".insert-quote").html(quotes.quote);
$(".insert-author").html("- " + quotes.author);
$("#tweet").attr("href", "https://twitter.com/intent/tweet?text="+quotes.quote+" -"+quotes.author);
},
beforeSend: function(xhr) {
xhr.setRequestHeader("X-Mashape-Authorization", "tLoCsKtopemshNeZYqkzFIYU45dvp1WHQRrjsnmBOsG4EMUvoE");
Expand Down

0 comments on commit 428ddbc

Please sign in to comment.