A Pen by Scott Kennedy on CodePen.
Last active
February 9, 2016 21:47
-
-
Save scottyzen/8709d79014aed2de2294 to your computer and use it in GitHub Desktop.
Conor McGregor Quote Machine
A Pen by Scott Kennedy on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Conor McGregor Quote's</h1> | |
<img src="http://www.irishtimes.com/polopoly_fs/1.2464981.1450008406!/image/image.jpg" alt="" /> | |
<div id="quoteContainer"> | |
<i class="fa fa-quote-left"></i> | |
<p id="quote"></p> | |
<button onclick="getQuote()">Another Quote</button> | |
<button onclick="tweetIt()">Tweet Quote</button> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var quotes = [ | |
"I'm going to change the way martial arts is viewed. I'm going to change the game. I'm going to change the way people approach fighting.", | |
"Ritual is another word for fear, manifested in a different way.", | |
"We come bulletproof in Ireland. We're reared tough, and we fight.", | |
"Even when I was a kid, everything I had was the best.", | |
"I have a self-defense mind. I've had it all my life.", | |
"Trash talk? Smack talk? This is an American term that makes me laugh. I simply speak the truth. I'm an Irish man.", | |
"I'm just trying to be myself. I'm not trying to be anyone else.", | |
"I have the greatest job in the world. I get paid loads of cash for beating the crap out of people. And I'm very good at it.", | |
"I don't look at a man who's expert in one area as a specialist. I look at him as a rookie in ten other areas.", | |
"It's good to make your brain work more than your body.", | |
"I always teach myself calm and visualization stuff.", | |
"Competition gives me energy. It keeps me focused.", | |
"I take inspiration from everyone and everything. I'm inspired by current champions, former champions, true competitors, people dedicated to their dream, hard workers, dreamers, believers, achievers.", | |
"I see fighters make funny videos about me and stick them on Facebook and get 20 likes. When I make a video, I sell it to Fox and make seven figures. That's the difference.", | |
"My success isn't a result of arrogance - it's a result of belief.", | |
"Life is about growing and improving and getting better.", | |
"I'm not going to get somewhere and say, 'OK, I'm done.' Success is never final; I'll just keep on going. The same way as failure never being fatal. Just keep going. I'm going to the stars and then past them." | |
] | |
function getQuote(){ | |
var quote = quotes[Math.floor(Math.random()*quotes.length)]; | |
$('#quote').hide().text(quote).fadeIn(3000); | |
return quote; | |
}; | |
getQuote(); | |
function tweetIt () { | |
var phrase = document.getElementById('quote').innerText; | |
var tweetUrl = 'https://twitter.com/share?text=' + | |
phrase +' - @TheNotoriousMMA'; | |
window.open(tweetUrl); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body{ | |
margin: 0; | |
padding: 0; | |
text-align: center; | |
} | |
img{ | |
min-width: 300px; | |
max-width: 60%; | |
} | |
#quoteContainer{ | |
width: 60%; | |
padding: 5%; | |
margin: auto; | |
} | |
#quote{ | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
line-height: 1.25; | |
} | |
#quote::after { | |
content: "- Conor McGregor"; | |
color: green; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment