Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

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


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div class="container">
      <nav class="navbar navbar-inverse navbar-fixed-top">
			<div class="container">
				<!-- Brand and toggle get grouped for better mobile display -->
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#try-collapse-bar" aria-expanded="false">
						<span class="sr-only">Toggle navigation</span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					<a target="_blank" class="navbar-brand" id="hi" href="">Tagir Almasov</a>
				<!-- Collect the nav links, forms, and other content for toggling -->
				<div class="collapse navbar-collapse" id="try-collapse-bar">
					<ul class="nav navbar-nav">
						<li><a target="_blank" href="">About<span class="sr-only">(current)</span></a></li>
						<li><a target="_blank" href="">Projects</a></li>
					<ul class="nav navbar-nav navbar-right">
						<li><a target="_blank" href=""><i class="fa fa-vk fa-lg"></i></a></li>
						<li><a target="_blank" href=""><i class="fa fa-github fa-lg"></i></a></li>
						<li><a target="_blank" href="mailto:[email protected]"><i class="fa fa-envelope fa-lg"></i></a></li>
				</div><!-- /.navbar-collapse -->
			</div><!-- /.container-fluid -->

      <div class="jumbotron text-center lower pad-less">
        <h1>Random Quote Machine</h1>
        <p class="lead" id="quote">Quote is loading</p>
        <p><a id="reset-btn" class="btn btn-primary btn-lg" href="#" role="button">Get New Quote</a>
				<a class="btn btn-info btn-lg" id="twitter-share" target="_blank" href="#"><i class="fa fa-twitter fa-lg"></i></a>
      <footer class="footer text-center">
				<p><span>&copy; 2017 by <a target="_blank" href="">Tagir A</a>. Powered by <a target="_blank" href=""></a></span></p>

    </div> <!-- /container -->


                body {
	background: url("");
	background-size: cover;
.nav > li > span {
  position: relative;
  display: block;
.navbar-nav > li > span {
  padding: 15px 15px;
  line-height: 20px;
.navbar-inverse .navbar-nav > li > span {
  color: #9d9d9d;
#hi {
	color: #e8e119;
#hi:hover {
	background-color: black;
.lower	{
		margin-top: 30vh;
.btn-lower {
	margin-top: 30px;

.jumbotron h1 {
	font-size: 1.8em;
	color: #646568;
.jumbotron p {
	font-size: 4rem;
.pad-less {
	padding: 5px;
	margin-bottom: 5px;

footer span {
	color: white;
	background: black;
footer span a {
	color: cyan;
footer span a:hover {
	text-decoration: none;
	color: black;
	background: yellow;


	// It decodes html element into plain text. Had to use is, due to input format.
	var decodeEntities = (function() {
  // this prevents any overhead from creating the object each time
  var element = document.createElement('div');

  function decodeHTMLEntities (str) {
    if(str && typeof str === 'string') {
      // strip script/html tags
      str = str.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi, '');
      str = str.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi, '');
      element.innerHTML = str;
      str = element.textContent;
      element.textContent = '';

    return str;

  return decodeHTMLEntities;
	// I don't use some functionality right now, but I'll probably use it in future
	function getQuote() { $.ajax( {
      url: '[orderby]=rand&filter[posts_per_page]=1',
      success: function(data) {
        var post = data.shift(); // The data is an array of posts. Grab the first one.
     //   $('#author').text(post.title);
				let plainText = decodeEntities(post.content)
				$("#twitter-share").attr("href", "" + encodeURI(plainText) + "&hashtags=freeCodeCamp,quotes");

        // If the Source is available, use it. Otherwise hide it.
        if (typeof post.custom_meta !== 'undefined' && typeof post.custom_meta.Source !== 'undefined') {
          $('#quote-source').html('Source:' + post.custom_meta.Source);
        } else {
        } */
      cache: false
    }); }
	$('#reset-btn').on('click', function(e) {