Pen Settings

HTML

CSS

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

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

Auto Save

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

              
                <div id="content" class="content">
  <div class="timeline">
    <div class="timeline__line"></div>
    <div class="timeline__points">
      
      <div class="point"
           v-for="(point, index) in timelinePoints">
        <div class="upper-content">
          <strong v-text="point.period"></strong>
        </div>
        <div class="circle" 
             v-text="index + 1"
             v-bind:ref="'circle' + index"
             v-on:click="toggleTooltip(index);
                         normalizeSelection(index);">
        </div>
        <div class="bottom-content">
          <div class="tooltip"
               v-bind:ref="'tooltip' + index">
            <p v-text="point.desc"></p>
          </div>
        </div>
      </div>
      
    </div>
  </div>
</div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Roboto);
@mixin flex($dir, $jus: flex-start, $ali: flex-start, $wrap: nowrap) {
  display: flex;
  flex-direction: $dir;
  justify-content: $jus;
  align-items: $ali;
  flex-wrap: $wrap;
}
 
$timeline-container-h: 560px;
$point-w: 300px;
$point-h: 560px;
$circle-size: 40px;
  
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: 'Roboto';
}

.content {
  background: linear-gradient(#61cae6, #60569C);
  height: 100vh;
  @include flex(row, center, center);
}

.timeline {
  background: linear-gradient(90deg, #654e9c 50%, #9b75de 50%);
  width: 100%;
  height: $timeline-container-h;
  @include flex(row, center, center);
  overflow-x: hidden;
  
  &__line {
    // background: radial-gradient(white 50%, gray 90%);
    background: white;
    width: 100%;
    height: 5px;
  }
  
  &__points {
    width: inherit;
    height: $timeline-container-h;
    @include flex(row, space-evenly, center);
    flex-basis: $point-w;
    position: absolute;
  }
}

.point {
  background: rgba(0, 0, 0, 0.1);
  width: $point-w;
  height: $point-h;
  @include flex(column, space-evenly, center);
  .upper-content {
    width: 100%;
    height: calc(#{$point-h} * 0.5 - #{$circle-size});
    @include flex(column, flex-end, center);
    strong {
      color: white;
      font-size: 24px;
      margin-bottom: 24px;
    }
  }
  .bottom-content {
    width: 100%;
    height: calc(#{$point-h} * 0.5 - #{$circle-size});
    @include flex(column, flex-start, center);
  }
}

.short-line {
  background: linear-gradient(white 70%, rgba(0, 0, 0, 0.5) 90%);
  width: 2px;
  height: 50px;
  border-radius: 50%;
  margin-bottom: 36px;
}

.circle {
  background: orange;
  width: $circle-size;
  height: $circle-size;
  @include flex(row, center, center);
  border: 7px solid white;
  border-radius: 50%;
  color: white;
  font-weight: bold;
  box-shadow: 0 7px 16px 0 rgba(238, 145, 36, 0.4);
  &::after {
    content: '';
    display: inline-block;
    border: 5px solid white;
    width: $circle-size * 1.7;
    height: $circle-size * 1.7;
    border-radius: inherit;
    position: absolute;
    transition: all 0.3s ease-out;
    opacity: 0;
  }
  &.active {  
    &::after {
      opacity: 1;
    }
  }
  &:hover {
    cursor: pointer;
  }
}

.tooltip {
  background-color: white;
  padding: 16px;
  border-radius: 16px;
  margin-top: 24px;
  position: relative;
  transition: all 0.3s;
  opacity: 0;
  &.active {
    opacity: 1;
  }
  &::before {
    content: '';
    display: inline-block;
    background: white;
    width: 5px;
    height: 24px;
    position: absolute;
    top: -24px;
    left: 49%;
  }
}
              
            
!

JS

              
                var timeline_points = [
  {period: 'Q1 2018', desc: 'Start verifying and developing technology engaged with 100 brands with various products, financial institution, insurance company & medical industry'},
  {period: 'Q2 2018', desc: 'Pre ICO - Running online & offline campaign. Token presale'},
  {period: 'Q3 2018', desc: 'ICO - Distributing tokens & crowdsale' },
  {period: 'Q4 2018', desc: 'Releasing blueprint technology'},
  {period: 'Q1 2019', desc: 'Close beta for App Launch, first App create API token stacking system and loyalty program'},
  {period: 'Q2 2019', desc: 'Close beta for token stacking system launch token stacking and loyalty program'},
  {period: 'Q3 2019', desc: 'Partner Expand 1500 brand product and logistic around Java' },
  // {period: 'Q4 2019', desc: 'Partner Expand to producers and logistic around Indonesia'},
  // {period: 'Q1 2020', desc: 'Project expansion in South East Asia, logistic partnership airline company'},
  // {period: 'Q2 2020', desc: 'Blockchain forking. Expand capacity'},
];

var vm = new Vue({
  el: '#content',
  data: {
    timelinePoints: timeline_points,
    toggled: false,
  },
  methods: {
    normalizeSelection(idx) {
      var circ, tooltip;
      for(var i = 0; i < 8; i++) {
        if(i != idx) {
          circ = this.$refs['circle'+i][0];
          tooltip = this.$refs['tooltip'+i][0];
          circ.classList.remove('active');
          tooltip.classList.remove('active');
        }
      }
    },
    toggleTooltip(idx) {
      var circ = this.$refs['circle'+idx][0];
      var tooltip = this.$refs['tooltip'+ idx][0];
      if(!circ.classList.contains('active')) {
        circ.classList.add('active');
        tooltip.classList.add('active');
      } else {
        circ.classList.remove('active');
        tooltip.classList.remove('active');
      }
    },
  }
});
              
            
!
999px

Console