<periodbar height="25" duration="10" start="10"></periodbar>
<periodbar height="{{height}}" duration="{{duration}}" start="{{start}}"></periodbar>
{
  "height": 25,
  "duration": 10,
  "start": 10
}
  • Content:
    Vue.component('periodbar', {
      props: ["height", "duration", "start"],
    
      data: function() {
        return {
         
        }
      },
      methods: {
        left: function(start) {
          return start*5;
        },
        width: function(duration) {
          return duration*5;
        }
      },
      computed: {
        periodStyle() {
          return {
            height: this.height+'%',
            left: this.left(this.start)+'%',
            width: this.width(this.duration)+'%'
          }
        }
      },
      template: 
        '<div>'+
          '<div class="periodbar">' + 
            '<div class="periodbar_container" :style="periodStyle"></div>'+
          '</div>'+
        '</div>'
    
    });
  • URL: /components/raw/periodbar/PeriodBar.js
  • Filesystem Path: src\components\01-global_components\PeriodBar\PeriodBar.js
  • Size: 646 Bytes
  • Content:
    .periodbar {
        height: 20px;
        position: relative;
        border: 1px solid $dark-grey;
        border-radius: 2px;
        &:after {
            content: '';
            border-left: 1px solid $dark-grey;
            border-right: 1px solid $dark-grey;
            position: absolute;
            top: 0px;
            bottom: 0px;
            left: 25%;
            right: 50%;
            margin-left: -1px;
            margin-right: 0;
            z-index: 1;
        }
        &:before {
            content: '';
            border-right: 1px solid $dark-grey;
            position: absolute;
            top: 0px;
            bottom: 0px;
            right: 25%;
            left: 25%;
            z-index: 1;
            margin-right: -1px;
        }
        .periodbar_container {
            background: $blue;
            position: absolute;
            bottom: 0;
            left:0;
        }
    }
  • URL: /components/raw/periodbar/PeriodBar.scss
  • Filesystem Path: src\components\01-global_components\PeriodBar\PeriodBar.scss
  • Size: 818 Bytes

There are no notes for this item.