cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

              <div id="top">
  <div class="container"> 
<h1>Pieology Quotes</h1>
<h3>I actually enjoy waiting in line at Pieology. Their quote wall, especially the one in Upland (off Campus), is full of wise maxims. Great stuff.<br>Here are a few...</h3>
<p class="section"><button type="button" class="btn btn-primary btn-l btn-block" id="quoteButton">Generate quote</button></p>
<div class="container" id="quoteArea"></div>
<div id="tweetArea" style="text-align: right;">    
<a id="link1" href="https://twitter.com/intent/tweet" class="twitter-share-button"{count} data-text="" data-size = "large"></a>

              h1 {
  color: black;
  text-align: center;
  font-size: 400%;

h3 {
  color: black;
  font-size: 125%;
  text-align: center;
  font-size: 200%;

  text-align: right;

{ width: 100%; height: 768px;
  background: url(http://www.richardkeightley.com/Images/quotewall.jpg) no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;

  document.getElementById("quoteButton").addEventListener("click", getForiQuote);

// API call for forismatic
function getForiQuote(){
    url: "https://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=jsonp",
   jsonp: "jsonp",
   dataType: "jsonp"

function update(responseText){
  document.getElementById("quoteArea").innerHTML = "\"" + responseText.quoteText + "\"<br> - " + responseText.quoteAuthor; 

function handleError(jqxhr, textStatus, err){
  console.log("Request failed: " + textStatus + ", " + err);

// vanilla JS... never got it to work
    var url = 'https://api.forismatic.com/api/1.0/?method=getQuote&format=jsonp&lang=en';
  var request = new XMLHttpRequest();
  request.open("GET", url, false);

  request = JSON.parse(request.responseText);
  var theQuote = request.quoteText;
  var theAuthor = request.quoteAuthor;
 document.getElementById("quoteArea").innerHTML =  theQuote + " " + theAuthor;
  // this is the Twitter part
  var elem = document.getElementById("link1");
elem.setAttribute("data-text", elem.getAttribute("data-text") + theQuote + " " + theAuthor);
  window.twttr = (function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0],
    t = window.twttr || {};
  if (d.getElementById(id)) return t;
  js = d.createElement(s);
  js.id = id;
  js.src = "https://platform.twitter.com/widgets.js";
  fjs.parentNode.insertBefore(js, fjs);
  t._e = [];
  t.ready = function(f) {
  return t;
}(document, "script", "twitter-wjs"));        */

Loading ..................