<template>
  <div
    class="help"
    :class="{
      mobile: $isMobile,
    }"
  >
    <button
      class="close"
      :class="{
        mobile: $isMobile,
      }"
      @click="$emit('close')"
    >
      <img
        src="@/assets/images/btn-close.png"
        alt=""
        draggable="false"
      >
    </button>
    <h1
      :class="{
        mobile: $isMobile,
      }"
    >
      操作指引
    </h1>
    <ul
      v-if="!$isMobile"
      class="pc"
    >
      <li>
        <img
          src="@/assets/images/rotate.png"
          alt=""
          draggable="false"
        >
        <h2>旋转</h2>
        <span>鼠标左键</span>
      </li>
      <li>
        <img
          src="@/assets/images/scale.png"
          alt=""
          draggable="false"
        >
        <h2>缩放</h2>
        <span>鼠标中键</span>
      </li>
      <li>
        <img
          src="@/assets/images/translate.png"
          alt=""
          draggable="false"
        >
        <h2>平移</h2>
        <span>鼠标右键</span>
      </li>
      <li>
        <img
          src="@/assets/images/reset.png"
          alt=""
          draggable="false"
        >
        <h2>复原</h2>
        <span>鼠标左键 × 2</span>
      </li>
      <li>
        <img
          src="@/assets/images/light-source-rotate.png"
          alt=""
          draggable="false"
        >
        <h2>光影旋转</h2>
        <span>SHIFT+鼠标左键</span>
      </li>
    </ul>
    <ul
      v-if="$isMobile"
      class="mobile"
    >
      <li>
        <img
          class=""
          src="@/assets/images/enlarge-mobile.png"
          alt=""
          draggable="false"
        >
        <div>放大</div>
      </li>
      <li>
        <img
          class=""
          src="@/assets/images/reduce-mobile.png"
          alt=""
          draggable="false"
        >
        <div>缩小</div>
      </li>
      <li>
        <img
          class=""
          src="@/assets/images/rotate-mobile.png"
          alt=""
          draggable="false"
        >
        <div>旋转</div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  emits: ['close'],
}
</script>

<style lang="less" scoped>
.help {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  padding-left: 235px;
  padding-right: 235px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.82);
  &.mobile {
    padding-left: initial;
    padding-right: initial;
  }
  > button.close {
    position: absolute;
    top: 55px;
    right: 55px;
    width: 62px;
    height: 62px;
    > img {
      width: 100%;
      height: 100%;
    }
    &.mobile {
      top: 7vw;
      right: 4vw;
      width: 8vw;
      height: 8vw;
    }
  }
  > h1 {
    margin-bottom: 105px;
    font-size: 38px;
    font-weight: 400;
    color: #FFFFFF;
    letter-spacing: 7px;
    white-space: pre;
    &.mobile {
      margin-bottom: initial;
      font-size: 4vw;
      letter-spacing: 1vw;
    }
  }
  > ul.pc {
    width: 100%;
    justify-content: space-evenly;
    display: flex;
    align-items: center;
    > li {
      flex: 0 0 auto;
      width: 180px;
      display: flex;
      flex-direction: column;
      align-items: center;
      user-select: none;
      > img {
        width: 69px;
        height: 69px;
        margin-bottom: 27px;
      }
      > h2 {
        font-size: 27px;
        font-weight: 400;
        color: #FFFFFF;
        margin-bottom: 1px;
        margin-bottom: 10px;
      }
      > span {
        font-size: 20px;
        font-weight: 400;
        color: #FFFFFF;
      }
    }
  }
  > ul.mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    > li {
      flex: 0 0 auto;
      width: 27vw;
      user-select: none;
      padding-top: 9vw;
      > img {
        width: 27vw;
        height: 27vw;
        margin-bottom: 2vw;
      }
      > div {
        text-align: center;
        font-size: 4vw;
        font-weight: 400;
        color: #FFFFFF;
      }
    }
  }
}


</style>