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

              
                <!-- 
@desc: Inspired by the AniChart Card Components. project to learn VueJs.
coded by: RubyGems

-->
<div class="container" id="anime">

  <div class="likes">

    <div class="heart-icon">
      <svg data-v-1e613282="" version="1.1" viewBox="0 0 18 18" class="svg-icon" style=""><path stroke="rgb(var(--color-red))"  pid="0" d="M15.63 3.458a4.125 4.125 0 0 0-5.835 0L9 4.253l-.795-.795A4.126 4.126 0 1 0 2.37 9.293l.795.795L9 15.922l5.835-5.835.795-.795a4.125 4.125 0 0 0 0-5.835v0z" _stroke="#EF5C5C" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>
    </div>
    <div class="likes-count">
      0 likes
    </div>

  </div>

  <div class="card flex">
    <div class="card-image">
      <img src="https://s4.anilist.co/file/anilistcdn/media/anime/cover/large/bx108759-jcXbDf9BJTcb.jpg" alt="">
      <div class="cover">
        <div class="img-overlay">
          <a href="" class="title">
          Sword Art Online: Alicization - War of Underworld
        </a>

          <div class="studio">
            <a href="">A-1 Pictures</a>
          </div>
        </div>
      </div>
    </div>

    <div class="card-content">

      <a href="">Airing On</a>
      <h1>{{anime.fantasy[0].airingDate}}</h1>

      <div class="description">
        <p>The Soul Translator is a state-of-the-art full-dive interface which interacts with the user's Fluctlight—the technological equivalent of a human soul—and fundamentally differs from the orthodox method of sending signals to the brain. </p>
      </div>

      <div class="cta">
        <button>
          watch now
        </button>
      </div>

    </div>

  </div>
  <!--  Selection  -->
  <div class="anime-selection">
    <h1 class="heading">Select a genre</h1>
    <div class="selection-items">
      <div @click="setActive" class="selection-item active" :class='{active:active}'>fantasy</div>
      <div class="selection-item">action</div>
      <div class="selection-item">adventure</div>

    </div>

  </div>

</div>
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css?family=Merriweather:300,400,700|Poppins&display=swap");

body {
  background: #edf1f5;
}
h1,
h2,
h3 {
  font-family: "Merriweather", serif;
}
p,
a {
  font-family: "Poppins", sans-serif;
}

h1.heading {
  text-align: center;
  padding-bottom: 20px;
  color: hsla(0, 0%, 0%, 0.9);
}
.container {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 20px 0px;

  background: #edf1f5;
}

.likes {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;

  .likes-count {
    font-size: 14px;
    font-family: "Poppins", sans-serif;
    color: hsla(0, 0%, 10%, 0.7);
  }

  svg {
    display: inline-block;
    color: inherit;
    vertical-align: middle;
    fill: transparent;
    stroke: #ea677f;
    margin: 0px 10px;
    width: 21px;
    transition: 300ms;
    &:hover {
      width: 24px;
      fill: #ea677f;
    }
  }
}

.flex {
  display: flex;
}
.card {
  position: relative;
  background-color: white;
  min-width: 370px;
  max-width: 500px;
  box-shadow: inset 2px -2px hsla(0, 100%, 100%, 0.3);
  box-shadow: 4px 3px 10px hsla(0, 0%, 0%, 0.2);
  padding: 20px;
  overflow: hidden;
  margin: 0 auto;

  .card-content {
    padding: 10px 20px;

    a {
      text-decoration: none;
      color: hsl(211, 20%, 15%);
    }

    h1 {
      padding-top: 10px;
      padding-bottom: 0px;
      font-size: 17px;
      color: hsl(211, 20%, 30%);
    }

    p {
      padding: 0;
      font-size: 12px;
      color: hsl(211, 20%, 60%);
    }
    .description {
      padding-top: 5px;
      p {
        text-align: justify;
        hyphens: auto;
        line-height: 1.5;
        max-width: 45ch;
        font-size: 11px;
      }

      span {
      }

      a {
        text-decoration: none;
        color: hsl(211, 20%, 15%);
        font-size: 14px;
        font-weight: 500;
      }
    }

    .cta {
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 10px;

      button {
        padding: 11px;
        border-radius: 3px;
        border: none;
        font-size: 12px;
        background: #212121;
        color: white;
        box-shadow: inset 2px -2px hsla(0, 100%, 100%, 0.3);
        box-shadow: 1px 3px 3px hsla(0, 0%, 0%, 0.2);
        transition: 800ms;

        &:hover {
          background-color: #9e3677;
          font-size: 14px;
        }
      }
    }
  }

  .card-image {
    position: relative;
    z-index: 1;

    img {
      max-width: 185px;
    }

    .cover {
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      position: absolute;
      top: 0;
      left: 0;
      bottom: 0;
      z-index: 2;

      .img-overlay {
        width: 100%;

        background: hsla(0, 0%, 16%, 0.9);
        padding: 10px 10px;
        box-sizing: border-box;

        .studio {
          padding-top: 10px;
          a {
            color: hsl(14, 80%, 70%);
          }
        }

        a {
          color: white;
          font-size: 12px;
          line-height: 1.52;
          text-decoration: none;
        }
      }
    }
  }
}
.anime-selection {
  padding: 20px 0px;

  .selection-items {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    width: 100%;

    .selection-item {
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      min-width: 60px;
      font-size: 11px;
      color: #fff;
      padding: 6px 8px;
      border-radius: 8px;
      position: relative;
   

      &:nth-of-type(1) {
        background: #357fea;
        transition: 500ms;

        &:hover {
          box-shadow: 1px 3px 6px hsla(211, 48%, 70%, 0.5);
          background-color: #00c3d5;
        }
      }
      &:nth-of-type(2) {
        background: #4e5fb7;
        &:hover {
          box-shadow: 1px 3px 6px hsla(211, 48%, 70%, 0.5);
          background-color: #00c3d5;
        }
      }
      &:nth-of-type(3) {
        background: #9ebaff;
        &:hover {
          box-shadow: 1px 3px 6px hsla(211, 48%, 70%, 0.5);
          background-color: #00c3d5;
        }
      }
    }
  }
}

              
            
!

JS

              
                // Anime
var anime = [
  {
    fantasy: [
      {
        title: "Sword Art Online: Alicization - War of Underworld",
        genre: "fantasy",
        description:
          "The Soul Translator is a state-of-the-art full-dive interface which interacts with the user's Fluctlight—the technological equivalent of a human soul—and fundamentally differs from the orthodox method of sending signals to the brain.",
        airingDate: "October 12, 2019",
        imgSrc:
          "https://s4.anilist.co/file/anilistcdn/media/anime/cover/large/bx108759-jcXbDf9BJTcb.jpg"
      }
    ]
  }
];

var app = new Vue({
  el: "#anime",
  data: {
    anime: anime[0],
    active: false
  
  },
  methods:{
    setActive: function(){
      this.active = !this.active;
      console.log('greeting.', this.active);
    }
  }
});

              
            
!
999px

Console