<template>
  <div class="wrap">
    <div class="software_container" id="software_container">
      <div class="empty" v-if="showEmpty"></div>
      <div class="contract_title">
        <p class="line"></p>
        <p class="title">硬件<span class="blue_font">研发经验</span></p>
        <img class="img" :src="Back" alt="back" />
      </div>
      <div class="card_list">
        <div class="card_wrap bg1">
          <img class="img" :src="Danpianji" alt="" />
          <p class="font">单片机</p>
        </div>
        <div class="card_wrap bg2">
          <img class="img" :src="Cpu" alt="" />
          <p class="font">处理器</p>
        </div>
        <div class="card_wrap bg3">
          <img class="img" :src="Fpga" alt="" />
          <p class="font">FPGA</p>
        </div>
        <div class="card_wrap bg4">
          <img class="img" :src="Dps" alt="" />
          <p class="font">DPS</p>
        </div>
        <div class="card_wrap bg5">
          <img class="img" :src="Dianlu" alt="" />
          <p class="font">模拟电路</p>
        </div>
        <div class="card_wrap bg6">
          <img class="img" :src="Shuzi" alt="" />
          <p class="font">数字电路</p>
        </div>
        <div class="card_wrap bg7">
          <img class="img" :src="Chuanganji" alt="" />
          <p class="font">各种传感器</p>
        </div>
      </div>
      <p class="big_title">合作过的<span class="blue_font">芯片原厂</span></p>
      <div class="img_wrap">
        <img :src="ContractImg" class="contracted" />
      </div>
    </div>
  </div>
</template>

<script setup>
import Back from '@/assets/img/hardware/hardware.png'
import Dps from '@/assets/img/hardware/dps.png'
import Shuzi from '@/assets/img/hardware/shuzidianlu.png'
import Dianlu from '@/assets/img/hardware/dianlu.png'
import Danpianji from '@/assets/img/hardware/danpianji.png'
import Fpga from '@/assets/img/hardware/fpga.png'
import Cpu from '@/assets/img/hardware/CPU.png'
import Chuanganji from '@/assets/img/hardware/chuanganqi.png'
import ContractImg from '@/assets/img/hardware/logotubiao.png'
import { ref, onMounted } from 'vue'
import { handleScreenAuto } from '@/common/utils'
onMounted(() => {
  handleScreenAuto(showEmpty, '#software_container')
  window.onresize = handleScreenAuto(showEmpty, '#software_container')
})
const showEmpty = ref(false)
</script>

<style lang="scss" scoped>
.wrap {
  width: 100vw;
  height: 100vh;
  background: $common_bg;
  position: relative;
  .software_container {
    width: 100%;
    height: 100%;
    // background: $common_bg;
    .empty {
      min-height: 90px;
    }
    .contract_title {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      font-family: 'SourceHanSans';
      background-size: 100% 100%;
      padding: 81px 0 41px 0;
      box-sizing: border-box;
      position: relative;
      white-space: nowrap;
      transform-style: preserve-3d;
      .line {
        width: 39px;
        height: 5px;
        background: #283fe7;
        border-radius: 3px;
        margin-bottom: 12px;
      }
      .img {
        position: absolute;
        top: 55%;
        left: 50%;
        transform: translateX(-50%) translateY(-50%) translateZ(-1px);
        width: 422px;
        height: 45px;
      }
      .title {
        font-size: 30px;
        font-weight: bold;
        color: #000000;
        margin-bottom: 21px;
        .blue_font {
          color: $theme_color;
        }
      }
      .detail {
        font-size: 18px;
        font-weight: 300;
        color: #646a73;
      }
    }
    .card_list {
      display: flex;
      align-items: center;
      justify-content: space-evenly;
      padding: 0 230px;
      .card_wrap {
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: space-evenly;
        flex-direction: column;
        width: 186px;
        height: 222px;
        .img {
          width: 51px;
          height: 51px;
        }
        .font {
          font-size: 18px;
          font-family: 'SourceHanSans';
          font-weight: 400;
          color: #ffffff;
        }
      }
      .card_wrap:hover {
        .img {
          transform: scale(1.3);
        }
      }
      .bg1 {
        background: url(../../../../assets/img/hardware/1back.png);
        background-size: 100% 100%;
      }
      .bg2 {
        background: url(../../../../assets/img/hardware/2back.png);
        background-size: 100% 100%;
      }
      .bg3 {
        background: url(../../../../assets/img/hardware/3back.png);
        background-size: 100% 100%;
      }
      .bg4 {
        background: url(../../../../assets/img/hardware/4back.png);
        background-size: 100% 100%;
      }
      .bg5 {
        background: url(../../../../assets/img/hardware/5back.png);
        background-size: 100% 100%;
      }
      .bg6 {
        background: url(../../../../assets/img/hardware/6back.png);
        background-size: 100% 100%;
      }
      .bg7 {
        background: url(../../../../assets/img/hardware/7back.png);
        background-size: 100% 100%;
      }
    }
    .big_title {
      padding: 102px 0 30px 0;
      font-size: 30px;
      font-family: 'SourceHanSans';
      font-weight: bold;
      color: #000000;
      display: flex;
      align-items: center;
      justify-content: center;
      .blue_font {
        color: $theme_color;
      }
    }
    .img_wrap {
      display: flex;
      align-items: center;
      justify-content: center;
      .contracted {
        width: 1480px;
        height: auto;
      }
    }
  }
}
</style>
