Old Gregg Quotes

In this example below you will see how to do a Old Gregg Quotes with some HTML / CSS and Javascript

Random Quote generator for Old Gregg quotes

Thumbnail
This awesome code was written by 1bladesforhire, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright 1bladesforhire ©

Technologies

  • HTML
  • CSS
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Old Gregg Quotes</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">

  <link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css'>
<link rel='stylesheet prefetch' href='http://cdnjs.cloudflare.com/ajax/libs/animate.css/3.2.3/animate.min.css'>
<link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Tangerine:bold,bolditalic|Inconsolata:italic|Droid+Sans'>

      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  
  <div class="container-fluid">
    <h1 class="text-primary">Old Gregg Quotes</h1>
  </div>
  <div class="container-fluid">
    <div class="row">
      <div id="quote_container" class="col-xs-6 col-xs-offset-3">
        <div id="quote">
          <div class="row clearfix">
            <button class="btn btn-danger" id="quote_button">More Gregg Quotes</button>
             <button id="twtbox" class="btn btn-info"></button>
            </div>
            <div class="row clearfix">
              <p class="well" id="quote_p">
              I'm old Gregggggg!
              </p>
            </div>
        
        </div>
      </div>
    </div>
  </div>
<script>
    window.twttr = (function(d, s, id) {
        var t, js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s);
        js.id = id;
        js.src = "https://platform.twitter.com/widgets.js";
        fjs.parentNode.insertBefore(js, fjs);
        return window.twttr || (t = {
            _e: [],
            ready: function(f) {
                t._e.push(f)
            }
        });
    }(document, "script", "twitter-wjs"));
</script>
  <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js'></script>
<script src='http://platform.twitter.com/widgets.js'></script>

  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/1bladesforhire/old-gregg-quotes-Vevxxd */
h1, button, #quote_container {
  text-align: center;
}

.row.clearfix {
  margin-bottom: 20px;
}

h1 {
  font-family: 'Tangerine', serif;
}

p {
  font-family: 'Droid Sans';
  color: orange;
  font-size: 15px;
  font-weight: bold;
}

button {
  font-family: 'Inconsolata';
}
button a {
  color: white;
  text-decoration: none;
}
button a:hover {
  text-decoration: underline;
}


/*Downloaded from https://www.codeseek.co/1bladesforhire/old-gregg-quotes-Vevxxd */
var quotes = ["I'm Old Gregg. Pleased to meet you.", "Then how come this hook's in my head, fool?", "I'm old Gregggggg!", "It's attached to your rod, motherlicker!", "Easy now, fuzzy little man-peach, hmm?", "You ever drunk Bailey's from a shoe?", "Wanna come to a club where people wee on each other?", "I know what you're thinking. Here comes Old Gregg, he's a scaly man-fish. You don't know me. You don't know what I got. I got something to show you. (bright light shines) You know what that is? That's Old Gregg's vagina. I've got a mangina! I'M OLD GREEEEEEEEGG!", " You like Bailey's? Mmmm... creamy. Soft, creamy beige.", "That was our first date, hmm? You pulled me up with your strong arms!", "You've seen my downstairs mix-up.", "Yeah, I know you are. You've told me 89 times now.", "You must love me exactly as I love you.", "You know what Gregg? Maybe I was being a bit hasty there, uh, when I said I didn't love you. Perhaps now in this light with you in the tu-tu and the water playing off your... seaweed. Maybe I could love you. Maybe I was lying because when you do love someone sometimes you say you don't because you're playing hard to get, playing a game.", "Are you playing your love games with me?", "Moving too fast, this isn't a race.Mmmmm baby, back off, and lower the pace now.Slow it down and give me some space, mmmmm.Moving too fast, this isn 't a race."];
var max = quotes.length - 1;
var random = Math.floor((Math.random() * max) + 1);

$('#quote_button').on('document.ready click', function() {
  var random = Math.floor((Math.random() * max) + 1);
  document.getElementById("quote_p").innerHTML = quotes[random];
});
$(function() {
  quoteGenerator(); //this calls it on load
  $("#quote_button").click(quoteGenerator);
});

function quoteGenerator() {
  var link = document.getElementById("quote_p").innerHTML;
  link = link.substr(0, 125);
  //alert(link);

  $('#twtbox').empty().append('<a href="https://twitter.com/intent/tweet?text=' + link + '&button_hashtag=OLDGREGG">Tweet This</a>');
};

Comments