css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

            
              <div class="container">
  <div class="title">
    <h1>Random Quote Generator</h1>
  </div>
  <div class="quote-box">
    
    <blockquote id="quote-text">The type of man who will be intimidated by me is exactly the type of man I have no interest in.</blockquote>


    <p id="quote-source">-Chimamanda Ngozi Adichie</p>
    <div class="quote-buttons">
      <a class="twitter-share-button" href="https://twitter.com/intent/tweet?text=The type of man who will be intimidated by me is exactly the type of man I have no interest in. -Chimamanda Ngozi Adichie" target="_blank"><i class="fa fa-2x fa-twitter" data-toggle="tooltip" data-placement="bottom" title="Tweet this quote" aria-hidden="true"></i></a>

      <button type="button" onClick="getQuote();" class="btn btn-primary" id="new-quote">New Quote</button>

    </div>
  </div>
</div>
<div class="container">
  <footer>
    <p class="credits"> Designed and coded by <a href="http://www.katelynlemay.com" target="_blank">Katelyn Lemay</a></p>
  </footer>
</div>
            
          
!
            
              body {
  width: 100%;
  height: 100%;
  background-color: #e74c3c;
  color: #ecf0f1;
  font-family: 'Open Sans', sans-serif;
}
h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 4rem;
 
}
#footer, a {
  color: #ecf0f1;
  text-decoration: underline;
}
#footer, a:hover {
  color: #2c3e50;
}
.title {
  text-align: center;
  margin: 2rem auto 3rem;
}
.quote-box {
  background-color: #ecf0f1;
  color: #2c3e50;
  margin: auto;
  padding: 2rem;
  max-width: 50rem;
}
#quote-text {
  font-size: 2rem;
}
#quote-source {
  font-size: 1.5rem;
 
}
.quote-buttons {
  margin-top: 2.5rem;
  text-align: center;
}

.fa-2x {
  vertical-align: middle;
  color: #3498db;
  margin-right: 1rem;
}
.fa-2x:hover {
  color: #2c3e50;
}
.btn-primary {
  background-color: #3498db;
  border: #3498db;
}
.btn-primary:hover {
  background-color: #2c3e50;
  border: #2c3e50;
}
.credits {
  margin: 1rem auto;
  text-align: center;
}

@media only screen and (max-width: 990px) {
  h1 {
    font-size: 3rem;
  }
  #quote-text {
    font-size: 1.75rem;
  }
  #quote-source {
    font-size: 1.5rem;
  }
}

@media only screen and (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  #quote-text {
    text-align: center;
    font-size: 1.5rem;
  }
  #quote-source {
    margin-top: 1rem;
    text-align: center;
    font-size: 1.25rem;
  }
  .quote-buttons {
    text-align: center;
    margin-top: 2rem;
  }
}
@media only screen and (max-width: 441px) {
  h1 {
    font-size: 1.5rem;
  }
  .title {
    margin-bottom: 2rem;
  }
  #quote-text {
    font-size: 1.5rem;
  }
}
  @media only screen and (max-width: 398px) {
      #quote-text {
    font-size: 1.25rem;
  }
     #quote-source {
      font-size: 1rem;
  }
  }
}
            
          
!
            
              $(document).ready(function() {
  $(function () {
  $('[data-toggle="tooltip"]').tooltip()
});
  
});

//store quotes in array
var quotes = [
  {content: "A feminist is any woman who tells the truth about her life.", source: "-Virginia Woolf"},
  {content: "There is no such thing as a single-issue struggle because we do not live single-issue lives.", source: "-Audre Lorde"},
  {content: "Injustice anywhere is a threat to justice everywhere.", source: "-Martin Luther King, Jr."},
  {content: "The type of man who will be intimidated by me is exactly the type of man I have no interest in.", source: "-Chimamanda Ngozi Adichie"},
  {content: "Prejudices... are most difficult to eradicate from the heart whose soil has never been loosened or fertilised by education", source: "-Charlotte Brontë"},
  {content: "Until we get equality in education, we won't have an equal society.", source: "-Sonia Sotomayor"},
  {content: "Women belong in all places where decisions are being made.", source: "-Ruth Bader Ginsburg"},
  {content: "A people without the knowledge of their past history, origin and culture is like a tree without roots.", source: "-Marcus Garvey"},
{content: "To deny people their human rights is to challenge their very humanity.", source: "-Nelson Mandela"},
{content: "A political struggle that does not have women at the heart of it, above it, below it, and within it is no struggle at all.", source: "-Arundhati Roy"},
{content: "Freedom is never granted; it is won. Justice is never given; it is exacted.", source: "-A. Philip Randolph"},
{content: "There may be times when we are powerless to prevent injustice, but there must never be a time when we fail to protest.", source: "-Elie Wiesel"},
{content: "When someone shows you who they are, believe them the first time.", source: "-Maya Angelou"},
{content: "We have to talk about liberating minds as well as liberating society.", source: "-Angela Davis"},
{content: "If we aren’t intersectional, some of us, the most vulnerable, are going to fall through the cracks.", source: "-Kimberle Williams Crenshaw"},
{content: "If you are neutral in situations of injustice, you have chosen the side of the oppressor.", source: "-Desmond Tutu"},
{content: "The oppression of women knows no ethnic nor racial boundaries... but that does not mean it is identical within those boundaries", source: "-Audre Lorde"},

]
function getQuote() {
//generate random number within array length
var randomNumber = Math.floor(Math.random() * quotes.length + 1);

//use random number to get quote and source, append to paragraph
var quoteContent = quotes[randomNumber].content;
var quoteSource = quotes[randomNumber].source;
document.getElementById("quote-text").innerHTML = quoteContent;
document.getElementById("quote-source").innerHTML = quoteSource;
 
  // send to Tweet button
  $(".twitter-share-button").attr("href", 'https://twitter.com/intent/tweet?text=' + quoteContent + " " + quoteSource);
  
};


  


            
          
!
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.
Loading ..................

Console