Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="css/main.css"/>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <script src="js/main.js"></script>


    <link rel="shortcut icon" type="image/jpg" href="http://oi64.tinypic.com/2ev7wjd.jpg">
    <title>Tribute: Ludwig Van Beethoven</title>
   
</head>
<body id="main">
    <header>
        <h1 id="title">Tribute</h1>
        <nav>
            <ul>
                <li><a href="#">Home</a></li>
                <li><a href="#">Quotation</a></li>
                <li><a href="#">About</a></li>
                <li><a href="#">Music</a></li>
            </ul>
        </nav>
    </header>
    <div id="img-div" class="container-hero">
        <section id="image" class="hero">
            <div class="section-left">
                <p id="img-caption" class="hero-p">Pianist, Composer</p>
                <h2 class="hero-title">Ludwig Van Beethoven</h2>
            </div>
            <div class="line"></div>
        </section>
    </div>
    <div class="container">
        <section class="quotation">
            <img src="http://oi68.tinypic.com/33vj3te.jpg" alt="quotation">
        </section>

        <section  id="tribute-info" class="about">
            <h3>About</h3>
            <div class="section-left">
                <p>Ludwig van Beethoven (December 16, 1770 to March 26, 1827) was a German pianist and composer widely considered the greatest of all time, whose innovative compositions combined vocals and instruments, widening the scope of sonata, symphony, concerto and quartet.</p>
            </div>
            <div class="section-right">
                <p>He is the crucial transitional figure connecting the Classical and Romantic ages of Western music. Beethoven’s personal life was marked by a struggle against deafness, and some of his most important works were composed during the last 10 years of his life, when he was quite unable to hear. He died at the age of 56.</p>
            </div>
        </section>

        <section class="compositions">
            <h3>Music</h3>
            <div class="section-left">
                <div class="flex"><audio id="youtube" controls loop></audio></div>
                <div id="content">
                    <div id="featured_img">
                      <img id="img" src="http://oi63.tinypic.com/2hpm2o5.jpg">
                    </div>
                    <div id="thumb_img" class="cf">
                      <img class="active" src="http://oi63.tinypic.com/2hpm2o5.jpg" onclick="changeimg('http://oi63.tinypic.com/2hpm2o5.jpg',this);">
                      <img src="http://oi67.tinypic.com/fjnpmd.jpg" onclick="changeimg('http://oi67.tinypic.com/fjnpmd.jpg',this);">
                      <img src="http://oi67.tinypic.com/fbghep.jpg" onclick="changeimg('http://oi67.tinypic.com/fbghep.jpg',this);">
                  <img src="http://oi66.tinypic.com/2d9odgw.jpg" onclick="changeimg('http://oi66.tinypic.com/2d9odgw.jpg',this);">
                    </div>
                  </div>
            </div>
            <div class="section-right">
                <h4>Fur Elise</h4>
                <p class="composition-p">Bagatelle No. 25 in A minor (WoO 59, Bia 515) for solo piano, commonly known as "Für Elise" (German: [fyːɐ̯ ʔeˈliːzə], English: "For Elise"), is one of Ludwig van Beethoven's most popular compositions. It was not published during his lifetime, only being discovered (by Ludwig Nohl) forty years after his death, and may be termed either a Bagatelle or an Albumblatt. The identity of "Elise" is unknown; researchers have suggested Therese Malfatti, Elisabeth Röckel or Elise Barensfeld.
<br> <br>
                        The piece is basically in rondo form, ABACA. It is in A minor and in 3/8 time. It begins with an A minor theme marked Poco moto (in some motion), with the left hand playing arpeggios alternating between A minor and E major. The same motifs follow around C major and G major, before returning to the original theme. The B section in the submediant major of F major which concludes in 32nd note runs leading to a repeat of the A... section. In the D section, an.. agitated theme in the subdominant key of D minor is accompanied by repetitive chords on a pedal point, with some dramatic diminished seventh chords. This section concludes with an ascending A minor arpeggio followed by a chromatic descent over two octaves, leading to another repeat of the A section. While the A section is not difficult to play, the runs in the B section and the rapid rising figure in the C section require more pianistic skill.  The piece is basically in rondo form, ABACA. It is in A minor and in 3/8 time. It begins with an A minor theme marked Poco moto (in some motion), with the left hand playing arpeggios alternating between A minor and E major.  </p>
            </div>
        </section>
    </div>
    <footer>
        <a id="tribute-link" target="_blank" href="https://en.wikipedia.org/wiki/Ludwig_van_Beethoven">Read more at wikipedia.com</a>
        <p>Written and coded for the Beethoven by <a class="profile-link" href="https://forum.freecodecamp.org/u/laciiia5" target="_blank">Laciiia5</a></p>
    </footer>
    <script>
    function changeimg(url,e) {
        document.getElementById("img").src = url;
        var nodes = document.getElementById("thumb_img");
        var img_child = nodes.children;
        for (i = 0; i < img_child.length; i++) {
          img_child[i].classList.remove('active')
        }
        e.classList.add('active');
      }
    </script>
</body>
</html>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Barlow+Semi+Condensed');


*, ::after, ::before {
    box-sizing: border-box;
  /*   -moz-box-sizing: border-box; Firefox */
}

* {
    padding: 0;
    margin: 0;
    text-decoration: none;
}

*:link, *:visited {
    color: #003630;
}

img {
    width: 100%;
}

li {
    list-style: none;
}

body {
  background-color: #F2F5F2;
  font-size: 18px;
  color: #003630;
  line-height: 1.5;
}

header {
    padding-left: 3em;
    padding-right: 3em;
    display: flex;
    max-width: 70%;
    margin: 0 auto;
    align-items: center;
    position: absolute;
    top: 2em;
    left: 0;
    right: 0;

}

h1 {
    font-size: 1.6em;
    font-family: Barlow;
    border-bottom: 4px solid #FF7B7B;
    text-transform: uppercase;
}

nav {
    margin-left: auto;
    display: none;
}

.container-hero {
    max-width: 70%;
    margin: 3em auto 0;
    text-align: left;

}

.hero {

    display: grid;
    align-items: center;
    height: 45em;
    background: url(http://oi67.tinypic.com/ibkww6.jpg);
        background-position-x: 0%;
        background-position-y: 0%;
        background-repeat: repeat;
        background-size: auto auto;
    background-repeat: no-repeat;
    background-position: right center;
    background-size: contain;
    margin-bottom: 15vh;
    position: relative;
}

.container-hero div {
    margin-top: 0;
    align-items: center;

}

.hero > .section-left {
    align-self: center;
    margin-top: -75%;
    font-family: Barlow;
    line-height: 1;
    margin-left: 8vw;
}

.hero-p {
    font-size: 1.7em;
    margin-bottom: .5em;
}

.hero-title {
    font-size: 5em;
    text-transform: uppercase;
}

section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 3em;
  
}

.line {
    height: 2.6em;
    width: 2px;
    background: #003630;
    left: 3em;
    top: 71vh; /* bottom:2em; */
    position: absolute;
    opacity: .8;
    animation-name: line;
    animation-fill-mode: both;
    animation-duration: 1s;
    animation-iteration-count: infinite;
}

@keyframes line { 
    from {height: 0}
    to{height: 50px}
}

.container {
  text-align: left;
  max-width: 70%;
  margin: 0 auto;
  padding-left: 3em;
  padding-right: 3em;
}

.container  h3 {
  grid-column: 1 / -1;
  grid-row: 1 / 2;
  text-align: center;
  font-size: 64px;
  font-family: Barlow;
}

.container h3::after {
  content: "";
  display: block;
  width: .7em;
  height: 8px;
  background-color: #003630;
  margin: 0 auto;
}

.section-left, .section-right, h3 {
    margin-top: 3em;
}



.section-left {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
}

.section-right {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}


.quotation {
    display: block;

}

h4 {
   font-size: 2.5em;
   font-family: Barlow;
   text-align: left;
   margin-bottom: .5em;
 /*  border-bottom: 2px solid #003630;
   padding-bottom: .3em;
   width: 50%; */

}
/*
h4::after {

    content: "";
    display: absolute;
    width: 30%;
    height: 4px;
    background: #F31212;
    top: 10px;
    position: relative;
    left: 0;
    margin: 0;
    display: block;

} */

.composition-list {
    margin-top: 2em;
}

.composition-list a {
    font-size: 1.5em;
    font-family: Barlow;
    cursor: pointer;
    position: relative;
}

.composition-list li {
    margin-top: 1em;
}

.composition-list a::before {
    content: '';
    width: 100%;
    height: 0;
    position: absolute;
    bottom: 0;
    z-index: -1;
    -webkit-transition: height 0.3s;
    transition: height 0.3s;
    background-color: #F31212;
}

.composition-list a:hover::before, .composition-list a:active::before, .composition-list a:focus::before {
    height: 50%;
}

.compositions > .section-left {
    margin-top: 0; 
}

footer {
    text-align: center;
    margin: 8em auto;
}

footer > a {
    font-size: 5em;
    font-family: Barlow;
    border-bottom: 4px solid #003630;
    text-transform: uppercase;
    transition: opacity 0.5s;
}

footer > a:hover {
    opacity: .7;
}

footer p {
    margin-top: 4em;
    font-family: Barlow;
    font-size: 1em;
}

.profile-link {
    transition: opacity 0.5s;
    border-bottom: 1px solid #003630;
}

.profile-link:hover {
    opacity: .7;
}

.composition-image-lis img {
    width: 100%;
    height: 100%;
}

@media only screen and (max-width: 450px) {
    .hero-p {
        font-size: 18px;
    }

    .hero-title {
        font-size: 45px;
    }

    footer > a {
        font-size: 36px !important;
    }
    
    footer {
        padding: 0em 3em;
    }
}


@media only screen and (max-width: 600px) {

    .hero {
        background: none;
        height: unset;
    }

    .hero > .section-left {
        padding-left: 3em;
    }
    
    .hero-title {
        font-size: 4em;
    }

    footer > a {
        font-size: 36px !important;
    }
    
    footer {
        padding: 0 3em;
    }

    .hero-p {
        font-size: 18px;
    }

    .hero-title {
        font-size: 45px;
    }

}

@media only screen and (max-width: 560px) {
    .composition-list a:hover::before, .composition-list a:active::before, .composition-list a:focus::before {
        height: 0;
    }
}

/* ??? 740 --> 960px ??? */
@media only screen and (max-width: 940px) {
  
    section {
        display: flex !important;
        flex-direction: column;
    }

    .container-hero, header, .container {
        max-width: 100%;
    }

    .composition-p {
        max-width: 100%;
        margin: 0 auto;
    }

    .hero > .section-left {
        padding-left: 3em;
    }

    
    header {
        padding-left: 3em !important;
    }

    footer > a {
        font-size: 36px !important;
    }

    .hero {
        margin-bottom: 6vh;
    }

}


@media only screen and (max-width: 1535px) {

    section {
        display: flex !important;
        flex-direction: column;
    }

    .composition-images img {
        margin-top: 3em;
        margin-left: 0;
    }

    .composition-list {
        text-align: center;
    }

    .composition-p {
       /* max-width: 80%; */
        margin: 0 auto;
    }

    .line {
        display: none;
    }

    .about > .section-right {
        margin-top: 1.5em;
    }

    section > h3 {
        margin-top: 1em;
    }

    .hero > .section-left {
        align-self: center;
        margin-top: 18%;
        font-family: Barlow;
        line-height: 1;
        margin-left: 0;
    }

    header {
        padding-left: 0;
    }

    footer > a {
        font-size: 3em;
    }

}


audio:hover, audio:focus, audio:active {
    -webkit-box-shadow: 15px 15px 20px rgba(0, 0, 0, 0.4);
    -moz-box-shadow: 15px 15px 20px rgba(0, 0, 0, 0.4);
    box-shadow: 15px 15px 20px rgba(0, 0, 0, 0.4);
    -webkit-transform: scale(1.05);
    -moz-transform: scale(1.05);
    transform: scale(1.05);
}

audio {
    -webkit-transition: all 0.5s linear;
    -moz-transition: all 0.5s linear;
    -o-transition: all 0.5s linear;
    transition: all 0.5s linear;
    -moz-box-shadow: 2px 2px 4px 0px #006773;
    -webkit-box-shadow: 2px 2px 4px 0px #006773;
    box-shadow: 2px 2px 4px 0px #006773;
    -moz-border-radius: 7px 7px 7px 7px;
    -webkit-border-radius: 7px 7px 7px 7px;
    border-radius: 7px 7px 7px 7px;
    width: 75%;
    margin: 4em auto 0;
}

.flex {
    display: flex;
}

/* Slider */

.cf:before,
.cf:after {
  content: "";
  display: table;
}

.cf:after {
  clear: both;
}

.cf {
  zoom: 1;
}

#content {
  max-width: 650px;
  margin: 3rem auto;
  text-align: center;
}

#featured_img img,
#thumb_img img {
  max-width: 100%;
}

#thumb_img {
  margin-top: 2%;
}
#thumb_img img {
  float: left;
  max-width: 32%;
  width: 22.5%;
  cursor: pointer;
  margin-right: 2%;
  border: 2px solid #eee;
  box-sizing: border-box;
}
#thumb_img img.active {
  border: 2px solid #cac6b8;
}
#thumb_img img:last-child {
  margin-right: 0;
}

              
            
!

JS

              
                var vid = "_mVW8tgGY_w",
  audio_streams = {};

$.get('https://cors-anywhere.herokuapp.com/https://www.youtube.com/get_video_info?video_id=' + vid, function(data) {
  var data = parse_str(data),
    streams = (data.url_encoded_fmt_stream_map + ',' + data.adaptive_fmts).split(',');
  console.log(streams);
  $.each(streams, function(n, s) {
    var stream = parse_str(s),
      itag = stream.itag * 1,
      quality = false;
    console.log(stream);
    switch (itag) {
      case 139:
        quality = "48kbps";
        break;
      case 140:
        quality = "128kbps";
        break;
      case 141:
        quality = "256kbps";
        break;
    }
    if (quality) audio_streams[quality] = stream.url;
  });
  console.log(audio_streams);
  $("#youtube").attr({
    src: audio_streams['128kbps']
  });
});

function parse_str(str) {
  return str.split('&').reduce(function(params, param) {
    var paramSplit = param.split('=').map(function(value) {
      return decodeURIComponent(value.replace('+', ' '));
    });
    params[paramSplit[0]] = paramSplit[1];
    return params;
  }, {});
}
              
            
!
999px

Console