123

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <h1>Mr. Robot Quote Generator</h1>
<div>
  <p id="quotationmark"></p>
  <h2 id="quote"></h2>
  <h2 id="speaker"></h2>
</div>
<div id="picContainer">
<img id="fsocietypic" src="https://images.8tracks.com/cover/i/009/872/540/display-8232.jpg?rect=0,0,630,630&q=98&fm=jpg&fit=max" alt="fsociety pic" width="280" height="280">
</div>
  
<div id="button">
<button id="myButton"><img class="icon icons8-Fsociety-Mask" width="50" height="50" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAFOElEQVRoQ93aj7EsQxQG8H4RIAJEgAgQASJABIgAESACXgSIABEgAkSACKjfrf5unTt3enp2dtYrr6u2du9O9+nznT/fOd17n7TnZDw5EccrrbU3W2uv9xfRby3k/9j//qW15vVTa+33M3S4FgjlP+oKA3BkAATgV9eAOgoEgE9bax8Uzf9urX3XlYnl855p8ZB3w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d8c3Pys6Z2EoiEDKFM/rLTvhpIWmlVnmL1rjbWWjsN7s3/UfOplwJUlzE9QuzxSKViOcJyrMVy4p8is5PeDBR55MojniOPXOE1pNwqdA8Q89UTMb92wzFT8sjzelOzPD6sytsLpLbTuY5RFG1yyg813fKMpX6IgrDb7NJjN2uZyL0uAp7FcD6ZGmuvRwDgATEs8YSY2gHgiGYvBR3vRjZqloM8NB2XAEmBElqstPtHmKkWDycIKd73vufK6KLQylahYt7RGd9i6K94YUq5R1gra4QS16slOF5PdebQg0l0NUToTnMjm18SWlmTrtTfPATM7g0HqBkIiFTzi89BR4DQxYbCi2fkiuLlTuvIcLeF3uUETzDUxQX2KBAK21h4YTLjSKgllKzHUMLqEIlcAyTWr97ZzTLdq1qQw164JtlHoXPp5TQ5R9YMQ/cMjxBerzHzo9DWL1b58UZ47rlinebeWUCSI/W/F6abn/kj65lAwmZpx7eAnNX+3+9xNpA9XrjJnOcGyL83dE1C6qnfCgAAAABJRU5ErkJggg=="></button>
  <a id="twitterbutton" target="_blank"><img src="https://upload.wikimedia.org/wikipedia/fr/archive/c/c8/20160903181213%21Twitter_Bird.svg" width="70" height="70" id="twitterpic"></a>
</div>

            
          
!
            
              h1 {
  color: #c6011f;
  font-family: 'Work Sans';
  font-size: 60px;
  text-align: center;
  height: 70px;
  
}



button {
  padding: 10px;
  font-size: 20px;
  background-color: white;
  border-style: none;
  cursor: pointer;
  
}


#button {
  text-align: center;
  margin-top: 120px;
}


h2 {
  font-size: 30px;
  padding-bottom: 40px;
  color: black;
  margin-bottom: -20px;
  font-family: 'Work Sans';
  text-align: center;
  height: 10px;
}

#twitterpic {
  margin-bottom: -10px;
}

#picContainer {
  text-align: center;
  margin-bottom: -80px;
}

#fsocietypic {
  border: 2px solid;
  border-radius: 25px;
  max-width: 100%;
    height: auto;
}




@media screen and (max-width: 480px) {
  h1 {
    font-size: px; 
    padding-bottom: 90px;
    height: 10px;
  }
  h2 {
    font-size: 22px;
    margin-bottom: -10px;
  }
  button {
    margin-bottom: 0px;
  }
  #fsocietypic {
    margin-top: -30px;
    max-width: 40%;
    
  }
  
}

@media (max-width: 959px) {
  h1 {
    font-size: 34px;
  }
  h2 {
    font-size: 18px;
  }
  #fsocietypic {
    padding-top: 30px;
    border-style: none;
  }
}


            
          
!
            
              // Place all quotes in array 
var quote = [
  '"Do you remember the night we became Gods?" - Tyrell Wellick',
  '"Are you a one or a zero?" - Elliot Alderson',
  `"I've always told you we'd end up working together" - Tyrell Wellick`,
  '"We live in a kingdom of bullshit" - Mr. Robot',
  '"The concept of waiting bewilders me.  There are always deadlines.  There are always ticking clocks." - Whiterose',
  '"We were meant to allies." - Tyrell Wellick',
  '"You hack people.  I hack time." - Whiterose'
  
];


// function that gets random quote and tweets out the quote 
function randomQuote() {
  var newQuote = Math.floor((Math.random() * quote.length));
  document.getElementById("quote").innerHTML = quote[newQuote];  
  var tweetit = document.getElementById("twitterbutton");
  tweetit.setAttribute("href", `https://twitter.com/intent/tweet?text=` + quote[newQuote])
}
  


// adds functionality to the random quote button 
document.getElementById("myButton").addEventListener("click", randomQuote);


//execues random quote so user is presented random quote at start 
randomQuote();
 
$(function() {
$("button").on("mousedown", function() {
  $(this).css(
  "box-shadow", "0 12px 16px 0 rgba(0,0,0,0.24)"

);
    });
  $("button").on("mouseup", function(){
    $(this).css(
    "box-shadow", "none");
  
    
  });
});

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console