<template>
  <div class="context">
    <div class="container">
      <h2>
        <img src="/images/PDFReaderPro/logo.png" alt="PDFReaderPro">
        PDF Reader Pro
      </h2>
      <div class="title">满足你所有的PDF文件处理需求！</div>
      <div class="get-btn">
        <a target="_blank" :href="platform.isWindows ? $config.PDFReaderPro + '/zh-cn/windows/download' : $config.PDFReaderPro + '/zh-cn/downloading'" class="free">
          <WinBlack v-if="platform.isWindows" />
          <MacBlack v-else />
          免费下载
        </a>
        <a target="_blank" :href="platform.isWindows ? $config.PDFReaderPro + '/zh-cn/windows/store' : $config.PDFReaderPro + '/zh-cn/store'" class="buy">立即购买</a>
      </div>
    </div>
  </div>
</template>

<script>
import MacBlack from '~/assets/images/PDFReaderPro/macBlack.svg?inline'
import WinBlack from '~/assets/images/PDFReaderPro/winBlack.svg?inline'

export default {
  components: {
    MacBlack,
    WinBlack
  },
  props: ['platform']
}

</script>

<style scoped lang="scss">
.context {
  background: url('/images/PDFReaderPro/product_banner.png') top left/cover no-repeat;
  padding: 60px 0;
  h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Helvetica;
    font-size: 44px;
    font-weight: 700;
    line-height: 64px;
    color: #FFFFFF;
    img {
      width: 48px;
      margin-right: 16px;
    }
  }
  .title {
    margin-top: 12px;
    font-family: Source Han Sans CN;
    font-size: 32px;
    font-weight: 700;
    line-height: 48px;
    text-align: center;
    color: #FFFFFF;
  }
  .get-btn {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    a {
      width: 180px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 4px;
      font-family: Source Han Sans CN;
      font-size: 18px;
      font-weight: 700;
      transition: all ease .5;
      &:hover {
        transform: translateY(-6px);
      }
    }
    a + a {
      margin-left: 16px;
    }
    .free {
      line-height: 48px;
      background: #fff;
      color: #193469;
      &:hover {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15)),linear-gradient(0deg, #FFFFFF, #FFFFFF);
      }
      svg {
        margin-right: 4px;
      }
    }
    .buy {
      line-height: 46px;
      border: 1px solid #FFFFFFB2;
      color: #FFFFFF;
      &:hover {
        background: linear-gradient(0deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.15));
      }
    }
  }
}
</style>
