<template>
  <div>
    <div class="enter">
      <div v-for="(item, idx) in wfTypes" :key="idx" :class="`b${idx + 1}`">
        <span class="title">{{ item.title }}</span>
        <p class="desc">{{ item.desc }}</p>
        <router-link :to="item.target" class="target"><i class="icon-right-circle iconfont-welfare4"></i></router-link>
      </div>
    </div>
  </div>
</template>

<script>
import { wfTypes } from '@/config/mapping/common';
export default {
  name: 'Index',
  data() {
    return {
      wfTypes
    };
  }
};
</script>

<style lang="scss" scoped>
@mixin b($bg1, $bg2, $color) {
	color: $color;
  background: linear-gradient(180deg,$bg1 0%, $bg2 100%);
  span.title {
    background: $color;
  }
}
.enter {
  display: flex;
  align-content: center;
  justify-content: center;
  padding-top: 80px;
  @for $i from 1 through 4 {
    > div.b#{$i}::after {
      content: '';
      display: block;
      width: 231px;
      height: 211px;
      position: absolute;
      right: 0;
      bottom: 0;
      background: url('../assets/images/0#{$i}.png');
    }
  }

  > div {
    width: 280px;
    position: relative;
    height: 360px;
    border-radius: 12px;
    margin-right: 28px;
    &:last-child {
      margin-right: 0;
    }
    &.b1 { @include b(#FAE5E5, #F7CECD, #EB584F); }
    &.b2 { @include b(#F8F7E4, #F7F1CB, #F1BD49); }
    &.b3 { @include b(#f1f1f9, #D9E1FA, #597EF7); }
    &.b4 { @include b(#F5E8DF, #F2D8C8, #DF7D45); }
    p.desc {
      font-size: 14px;
      font-weight: 400;
      line-height: 20px;
      margin: 20px;
      color: inherit;
    }
    .target {
      position: absolute;
      cursor: pointer;
      color: inherit;
      width: 40px;
      height: 40px;
      top: 94px;
      left: 22px;
      i {
        color: inherit;
        font-size: 32px;
      }
    }
    span.title {
      padding-left: 20px;
      width: 140px;
      display: inline-block;
      line-height: 40px;
      color: white;
      border-radius: 12px 0px 12px 0px;
      font-size: 20px;
      font-weight: 500;
    }
  }
}
</style>