Skip to content

Instantly share code, notes, and snippets.

@JasonMustard
Last active August 25, 2015 23:44
Show Gist options
  • Save JasonMustard/2c3a5523fae532b393a2 to your computer and use it in GitHub Desktop.
Save JasonMustard/2c3a5523fae532b393a2 to your computer and use it in GitHub Desktop.
mJNQQK
<body>
<h1 class="font-effect-3d-float">Random Quote Generator</h1>
<div class="container">
<h3>These are some of my favortie quotes, just click the button below to read them.</br><em>Click it</em></br> <u>Now</u></h3>
</div>
<button class="button btn btn-primary btn-lg"><span>Get Your Quote Here</span></button>
<div class="container well">
<div class="quote">
<span class="saying">saying</span>
<span class="author">author</span>
</div>
</div>
</body>
$(document).ready(function(){
generate();
function generate(){
var quotes=["There are two types of people in this world. Those that enter a room and say 'Here I am!' and those that enter a room and say 'There you are!'.@Unknown","Because it's there.@George Mallory on climbing mountains","Footsteps always follow us, whenever it is snowing. They always show us where we've been, but never where we're going.@Winnie the Pooh's A-Z","The only way to climb properly is to realize that just getting up a route is nothing, the way it is done is everything.@Royal Robbins","Small minds discuss people. Average minds discuss events. Great minds discuss ideas.@Unkown","The significant problems we face cannot be solved at the same level of thinking we were at when we created them.@Albert Einstein","We must not cease from exploration and the end of all our exploring will be to arrive where we began and to know the place for the first time.@T S Eliot","One man asked another on the death of a mutual friend, 'How much did he leave?' His friend responded, 'He left it all.'@Proverb","It is more noble to give yourself completely to one individual than to labor diligently for the salvation of the masses.@Dag Hammarskjold, Sec. Gen. of the UN","Maps are a way of organizing wonder.@Edward Tufte","I have decided to make my life my argument.@Albert Schweitzer","Now it's a sqirt mecca for mystery artist, but back then it was just magic.@Jim Snyder on Kayaking","Knowledge keeps about as well as fish.@Alfred North Whitehead","It all began, I said, when I decided that some experts don't really know enough to make a pronouncement of doom on a human being. And I said I hoped they would be careful about what they said to others; they might be believed and that coud be the beginning of the end.@Norman Cousins, Anatomy of an Illness","Do not go gentle into that good night. Rage, rage against the dying of the light.@Dylan Thomas","For you will look smart and feel ignorant and the patient will not know which day it is for you and you will pretend to be smart out of ignorance.@John Stone, Gaudeamus Igitur"];
randomQuote= quotes[Math.floor(Math.random()*quotes.length)];
quoteAuthor=randomQuote.split('@');
$('.saying').text(quoteAuthor[0]);
$('.author').text(quoteAuthor[1]);
}
$('.button').on("click", function() {
generate();
});
});
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
body{
font-family: 'Roboto', sans-serif;
text-align: center;
background-color: #5bc0de;
}
h1,
.quote,
.button {
font-family: 'Slabo 27px', serif;
margin: 10px;
}
.well {
border-radius: 20px;
background: url(http://subtlepatterns.com/patterns/symphony.png);
box-shadow: 5px 5px 5px;
margin: 20px 0px;
}
.saying {
font-size: 2.3em;
heigth: auto;
width: auto;
}
.author {
font-size: 1.5em;
font-style: italic;
}
.button {
border: 5px solid-black;
font-family: 'Roboto', sans-serif;
font-size: 24px;
box-shadow: 2px 3px 3px #000;
}
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<link href="//cdnjs.cloudflare.com/ajax/libs/animate.css/3.2.3/animate.min.css" rel="stylesheet" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment