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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <!--  Starting point for VueFlix -->
<!--  All custom SCSS is laid out -->
<!--  Movies data store is prepared -->

              
            
!

CSS

              
                $small: 589px;
$medium: 767px;
$large: 1023px;

html, body {
  height: 100%;
  background: linear-gradient(to bottom right,#7f3737,#2a2122);
  @extend .vertical-align;

  .hero {
    @media screen and (max-width: $medium) {
      max-width: 536px;
    }

    background: #1e1d1d !important;
    position: relative;
    max-width: 1021px;
    box-shadow: 0 0 50px 5px rgba(0,0,0,.25);

    .hero-body {
      background-color: rgba(0,0,0,0.7);
      background-blend-mode: multiply;
      -webkit-background-size: cover;
      -moz-background-size: cover;
      -o-background-size: cover;
      background-size: cover;
      padding-bottom: 4rem !important;
      padding-top: 4.5rem !important;

      @media screen and (max-width: $medium) {
        background-color: rgba(0,0,0,0.8);
      }

      .container {
        width: 100%;

        .home-intro {
          font-size: 60px;
          letter-spacing: 8px;
          color: red;
          text-align: center;
          text-transform: uppercase;
        }
      }

      .nav {
        position: absolute;
        top: 10px;
        width: 100%;
        box-shadow: 0px 0px 0px !important;

        .nav-item {
          .fa-bars {
            color: #ce2424;
            font-size: 40px;
          }

          .tag {
            font-size: 15px;
          }

          .title {
            color: red;
            font-size: 18px;
            font-weight: 600;
            text-align: center;
            text-transform: uppercase;
          }
        }

        .nav-right {
          .nav-item {
            float: right;
          }
        }
      }

      .column {
        padding-left: 50px;
        min-height: 264px;

        .title {
          font-size: 45px;
          font-weight: 600;

          @media screen and (max-width: $medium) {
            font-size: 35px;
          }
        }

        .subtitle {
          font-size: 15px;
          font-weight: 600;
          color: red;

          @media screen and (max-width: $medium) {
            font-size: 14px;
          }

          .subtitle-tag {
            display: inline;
          }
        }

        .description {
          font-size: 15px;
          margin-bottom: 24px;
          max-width: 450px;
        }

        .links {
          .play-button {
            background: #ce2424;
            color: #FFF;
            border-radius: 15px;
            border: 0px;
            margin-right: 20px;
            padding: 15px;

            .fa-play {
              padding-left: 7px;
            }

            @media screen and (max-width: $medium) {
              font-size: 14px;
            }
          }

          .favorites-button {
            text-decoration: none;
            color: #FFF;

            &:hover {
              background: none;
              text-decoration: none;
            }

            .fa-plus-square-o {
              padding-left: 10px;
              padding-top: 2px;
            }

            @media screen and (max-width: $medium) {
              background: #FFF;
              color: #4a4a4a;
              border-radius: 15px;
              font-size: 14px;

              &:hover {
                background: #FFF;
              }
            }
          }

          @media screen and (max-width: $medium) {
            text-align: center;
          }
        }
      }
    }

    .trailer-body {
      padding: 0;
      height: 376px;
    }

    .hero-foot {
      background: linear-gradient(to bottom right, #7d1e24, #bb2d35);

      .columns {
        padding: 20px;
        padding-bottom: 30px;
        text-align: center;

        .movie-choice {
          position: relative;
          list-style: none;
          cursor: pointer;

          .favorite-check {
            position: absolute;
            right: 5px;
            top: 5px;
            z-index: 1;
            color: #fcff4c;
            
            @media(max-width: $medium) {
              position: initial;
              display: block;
            }
          }

          img {
            opacity: 0.9;
          }

          .movie-title {
            &:active {
              font-weight: 600;
            }
          }
        }
      }
    }
  }

  .appreciation-tag {
    color: #FFF;
    text-align: center;

    a {
      color: #ce2424;
      font-weight: 600;
    }
  }

  // Miscellaneous
  .vertical-align {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    flex-direction: column;
    align-items: center;
    -webkit-align-items: center;
    justify-content: center;
    -webkit-justify-content: center;
  }

  .movie-title-active {
    font-size: 18px;
    font-weight: 600;
  }

  .iframe-box {
    max-width: 1280px; /* video width */
    max-height: 720px; /* video height */
  }

  .favorite-shadow {
    box-shadow: 0 0 50px 15px rgba(251, 255, 15, 0.25);
  }

  .desktop {
    display: block;

    @media screen and (max-width: $medium) {
      display: none;
    }
  }

  .mobile {
    display: none;

    @media screen and (max-width: $medium) {
      display: block;
    }
  }

  .hide {
    display: none;
  }
}
              
            
!

JS

              
                const movies = {
  "dunkirk": {
    "id": 'dunkirk',
    "title": "Dunkirk",
    "subtitle": "Dunkirk",
    "description": `Miraculous evacuation of Allied soldiers from Belgium, Britain, Canada, and France, who were cut off and surrounded by the German army from the beaches and harbor of Dunkirk, France, during the Battle of France in World War II.`,
    "largeImgSrc": `url('https://image.tmdb.org/t/p/w780/fudEG1VUWuOqleXv6NwCExK0VLy.jpg')`,
    "smallImgSrc": 'https://image.tmdb.org/t/p/w185/fudEG1VUWuOqleXv6NwCExK0VLy.jpg',
    "releaseDate": 'July 21 2017',
    "duration": '1hr 46min',
    "genre": 'Action, Drama, History',
    "trailerPath": 'https://www.youtube.com/embed/F-eMt3SrfFU',
    "favorite": false
  },
  "interstellar": {
    "id": 'interstellar',
    "title": "Interstellar",
    "subtitle": "Interstellar",
    "description": `Interstellar chronicles the adventures of a group of explorers who make use of a newly discovered wormhole to surpass the limitations on human space travel and conquer the vast distances involved in an interstellar voyage.`,
    "largeImgSrc": `url('https://image.tmdb.org/t/p/w780/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg')`,
    "smallImgSrc": 'https://image.tmdb.org/t/p/w185/xu9zaAevzQ5nnrsXN6JcahLnG4i.jpg',
    "releaseDate": 'November 7 2014',
    "duration": '2hr 49min',
    "genre": 'Adventure, Drama',
    "trailerPath": 'https://www.youtube.com/embed/zSWdZVtXT7E',
    "favorite": false
  },
  "the-dark-knight-rises": {
    "id": 'the-dark-knight-rises',
    "title": "The Dark Knight Rises",
    "subtitle": "TDKR",
    "description": `Batman encounters the mysterious Selina Kyle and the villainous Bane, a new terrorist leader who overwhelms Gotham's finest. The Dark Knight resurfaces to protect a city that has branded him an enemy.`,
    "smallImgSrc": 'https://image.tmdb.org/t/p/w185/3bgtUfKQKNi3nJsAB5URpP2wdRt.jpg',
    "largeImgSrc": `url('https://image.tmdb.org/t/p/w780/3bgtUfKQKNi3nJsAB5URpP2wdRt.jpg')`,
    "releaseDate": 'July 20 2012',
    "duration": '2hr 44min',
    "genre": 'Action, Thriller',
    "trailerPath": 'https://www.youtube.com/embed/g8evyE9TuYk',
    "favorite": false
  },
  "inception": {
    "id": 'inception',
    "title": "Inception",
    "subtitle": "Inception",
    "description": `Cobb, a skilled thief is offered a chance to regain his old life as payment for a task considered to be impossible: \"inception\", the implantation of another person's idea into a target's subconscious.`,
    "smallImgSrc": 'https://image.tmdb.org/t/p/w185/s2bT29y0ngXxxu2IA8AOzzXTRhd.jpg',
    "largeImgSrc": `url('https://image.tmdb.org/t/p/w780/s2bT29y0ngXxxu2IA8AOzzXTRhd.jpg')`,
    "releaseDate": 'July 10 2010',
    "duration": '2hr 28min',
    "genre": 'Action, Adventure, Sci-Fi',
    "trailerPath": 'https://www.youtube.com/embed/8hP9D6kZseM',
    "favorite": false
  },
  "the-prestige": {
    "id": 'the-prestige',
    "title": "The Prestige",
    "subtitle": "Prestige",
    "description": `A mysterious story of two magicians whose intense rivalry leads them on a life-long battle for supremacy - to create the ultimate illusion whilst sacrificing everything they have to outwit the other.`,
    "smallImgSrc": 'https://image.tmdb.org/t/p/w185/c5o7FN2vzI7xlU6IF1y64mgcH9E.jpg',
    "largeImgSrc": `url('https://image.tmdb.org/t/p/w780/c5o7FN2vzI7xlU6IF1y64mgcH9E.jpg')`,
    "releaseDate": 'October 20 2006',
    "duration": '2hr 10min',
    "genre": 'Drama, Mystery, Sci-Fi',
    "trailerPath": 'https://www.youtube.com/embed/ijXruSzfGEc',
    "favorite": false
  }
}
              
            
!
999px

Console